Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.11 Pull Request #251

Merged
merged 150 commits into from
Dec 22, 2015
Merged

Release 2.11 Pull Request #251

merged 150 commits into from
Dec 22, 2015

Conversation

goehle
Copy link
Member

@goehle goehle commented Nov 11, 2015

This is the PG pull request corresponding to WeBWorK pull number 651. See that pull request for details.

mgage and others added 30 commits July 29, 2014 13:59
Fix on instance where $rh_ans->pretty_print was used instead of pretty_print($rh_ans, 'html');
This is not yet used for anything in PG.  I thought it would be useful for printing out the trace of the answer evaluators, but
using DEBUG_MESSAGE and the html mode turned out to work better.

This pretty_print_text() routine is essentially the same as several of the pretty_print_rh routines that are used in clients/renderProblem.pl
WeBWorKClients.pm and other files on the WeBWorK2 side.  All the uses of pretty_print on the PG side seem to be going through PGUtils.pm
…nel instead of through warn.

Using this channel and the pretty_print_html() format provides much nicer output than using warn.

One should think about whether this exposes too much information and allows for XSS exploits.  This is meant for instructor use
only and makes it possible to debug answer evaluators by adding the key   debug=>1 when calling the answer evaluator creator.
This will suppress warning messages emitted by newer versions of perl.
This replaces an earlier modification which overzealously replaced
\1 by  on the left side of substitution grep expressions. This does
not work -- \1 must be used as a back reference on the left side
of substitution expressions.
Change \1 to  in right hand side of grep substitution expressions.

Check both instances of the change and things worked fine.
>
> The text mode has been most useful on the Webwork2 side of the WW/PG divide. I don't know if it will be used for pg information but it seems useful to have it available just in case.  This code is taken from clients/renderProblem.pl and similar implementations in WebworkClient.pm
Fix one more instance of using \1 instead of $1 on RHS of substitution

Checks out.
Develop fix pretty print

Tested with given set.  The infinite loop issues are fixed.
goehle and others added 27 commits September 3, 2015 17:23
loadFiles subdirectory bug
…es the context, it is the right one. Resolves bux 3449.
Fix problem with context during stratification of answer hash references

Works for me.
Allow MathObject checker subroutine to provide partial credit.
… WARN_MESSAGE for error messages rather than warn.
Patch PGML- Works as described above.
…t it back to the original), so that post filters will run in the correct context.
… be regenerated if seed changes, but also causes some duplication when linking to files that are not seed dependent.
Add problem seed to PGalias.
Fix incorrect call to Parser::Context->current().

Works for me.
Fix Parser::UOP so that it will add parentheses for implied multiplication when needed
Patch BOP to add needed parentheses
In the process I think I found a minor bug in MathObjects.

I think I found the following  error in Real() answer evaluator.   The answer hash below was created for the second answer blank which has the answer evaluator $two->cmp where $two=Real(2);  It looks like the correct_ans
entry in the ans_hash is not filled in although the correct_value is filled out.

The problem is actually due to a change you made in May:

	https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openwebwork_pg_blame_develop_lib_Value_AnswerChecker.pm-23L655&d=BQIFAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=C6Pt5AGtImanmAdcooarL-JZO8M5dSFPfs3VweYXYkE&m=rUVB-c_7DjcElz-vuK-5frnGOi5EgTmOcN6_-NAJ6eo&s=6dC0dcZOekPjy4ZtNxZRJore3HPspMJtugupDCXFTlM&e=

which makes the result of protect() be defined when it isn't supposed to be.  That makes the check at line 82
no longer fail (since the value is defined, but empty), and so the correct answer is never applied.
I would recommend removing line 655 and replace it with
	return unless defined($string);

instead.  That should restore the correct answer string.

Davide
Fix incorrect requirement for extraParens in stringification of UOP.
…, are not copied from one object to another during an eval() call.
Fix problem with correct_ans being incorrectly set
goehle added a commit that referenced this pull request Dec 22, 2015
@goehle goehle merged commit 6f19816 into master Dec 22, 2015
@goehle goehle deleted the release-2.11 branch January 2, 2016 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants