WeBWorK Problems

Randomization button fails: "434 setmaker.js: /webwork2/instructorXMLHandler: Forbidden"

Randomization button fails: "434 setmaker.js: /webwork2/instructorXMLHandler: Forbidden"

by Keir Lockridge -
Number of replies: 9

Hello,

I'm writing my first WW problem (a work in progress; see below) and it seems to work ok, but for some reason when I try to click on the "Randomize" link when viewing the problem in the library browser I get an error:

"434 setmaker.js: /webwork2/instructorXMLHandler: Forbidden"

I can use the "Randomize" link for other problems in the library, but not for this one. I can get WW to generate various randomizations of the problem by editing the problem and using the view option (where you can specify a seed).

Does anyone know why I'm earning the warning above? Thanks!

--Keir

(I'm also happy to hear from anyone who wants to tell me how to better construct this problem.)

#########

DOCUMENT();
loadMacros(
  "PGstandard.pl",
  "MathObjects.pl",
  "PGML.pl",
  "PGcourse.pl",
  "contextFraction.pl",
  "parserPopUp.pl",
);

$showPartialCorrectAnswers = 1;

TEXT(beginproblem());

Context("Fraction-NoDecimals");

$b = non_zero_random(-6,6);
$d = non_zero_random(-6,6);

do {
    $a = non_zero_random(-6,6);
    $c = non_zero_random(-6,6);
} until $c != $a;

Context()->variables->add(k=>"Real");
Context()->variables->add(h=>"Real");
Context()->variables->add(y=>"Real");

$k_cutoff = Formula("$a * $d / ($c * $b)")->reduce();
$h_cutoff = Formula("$k_cutoff / (1 - $c / $a)")->reduce();

$popEQ = PopUp(["select","=","≠"], "=");
$popNEQ = PopUp(["select","=","≠"], "≠");

$LHS1 = Formula("$a * x + $b *k* y")->reduce();
$LHS2 = Formula("$c * x + $d * y")->reduce();

BEGIN_PGML

Consider the linear system [```\begin{array}{rl}[$LHS1] &= h \\[$LHS2] &= h -k \\\end{array}```] In the parts below, if you think that [``h``] can be any real number, then input [``h = ``] ANY.

(a) Find all values of [``k``] and [``h``] so that the system has no solution.

    [``k``] [@ $popEQ->menu() @]* [_____] and [``h``] [@ $popNEQ->menu() @]* [_____]

(b) Find all values of [``k``] and [``h``] so that the system has a unique solution.

    [``k``] [@ $popNEQ->menu() @]* [_____] and [``h``] [@ $popEQ->menu() @]* [_____]

(c) Find all values of [``k``] and [``h``] so that the system has infinitely many solutions.

    [``k``] [@ $popEQ->menu() @]* [_____] and [``h``] [@ $popEQ->menu() @]* [_____]

END_PGML

ANS($popEQ->cmp());
ANS($k_cutoff->cmp());
ANS($popNEQ->cmp());
ANS($h_cutoff->cmp());

ANS($popNEQ->cmp());
ANS($k_cutoff->cmp());
ANS($popEQ->cmp());
Context()->strings->add(ANY=>{});
ANS(String("ANY")->cmp());

ANS($popEQ->cmp());
ANS($k_cutoff->cmp());
ANS($popEQ->cmp());
ANS($h_cutoff->cmp());

# For the solution.

$b2 = Formula("($b/$a)*k")->reduce();
$d2 = Formula("$d - ($c * $b/$a)*k")->reduce();
$aug1 = Formula("h/$a")->reduce();
$aug2 = Formula("(1 - [$c]/[$a])*h - k")->reduce();
$sf = Formula("1/[$a]")->reduce();

BEGIN_PGML_SOLUTION

The augmented matrix for the given linear system is [```\left[ \begin{array}{rrr} [$a] & [$b]k & h \\ [$c] & [$d] & h - k \end{array}\right].```]

We may row reduce the matrix to obtain (e.g., scale the top row [``R_1``] by [``[$sf]``], then replace the second row [``R_2``] with [``R_2 - ([$c])R_1``]): [```\left[ \begin{array}{rrr} 1 & [$b2] & [$aug1] \\ 0 & [$d2] & [$aug2] \end{array}\right].```]

If [``[$d2] \neq 0``] ([``k \neq [$k_cutoff]``]), then the system will be consistent for any value of [``h``]. If [``[$d2] = 0``] ([``k = [$k_cutoff]``]), then the system  has infinitely many solutions if [``[$aug2] = 0``] ([``h = [$h_cutoff]``]) and has no solutions (is inconsistent) if [``[$aug2] \neq 0``] ([``h \neq [$h_cutoff]``]).

END_PGML_SOLUTION

ENDDOCUMENT(); 

In reply to Keir Lockridge

Re: Randomization button fails: "434 setmaker.js: /webwork2/instructorXMLHandler: Forbidden"

by Danny Glin -

I have come across this issue with other problems (e.g. Library/TCNJ/TCNJ_MatrixInverse/problem1.pg).  It also occurs if you try to render the problem in the Homework Sets Editor.  I haven't had the time to try to hunt down the cause, as the workaround you mention is available.  The reason that the error only shows up in these scenarios is that in these cases there is javascript dynamically rendering a problem within a page, as opposed to the problem being rendered in advance of the page being served.

I suspect that it has something to do with an extended character appearing somewhere in the problem, but that could be way off.

I realize that this doesn't solve your issue, but I'm posting it in the hope that it helps someone properly narrow down the cause of the issue.

In reply to Danny Glin

Re: Randomization button fails: "434 setmaker.js: /webwork2/instructorXMLHandler: Forbidden"

by Keir Lockridge -

Thank you for the reply! So: as long as it correctly randomizes when I edit the problem and use the view option (where you specify a seed), then I can assume it will correctly randomize the problem for students. Is that correct?

In reply to Keir Lockridge

Re: Randomization button fails: "434 setmaker.js: /webwork2/instructorXMLHandler: Forbidden"

by Nathan Wallach -
Yes. If changing the seed gets the randomization to work, then it works fine.
In reply to Danny Glin

Re: Randomization button fails: "434 setmaker.js: /webwork2/instructorXMLHandler: Forbidden"

by Nathan Wallach -

This sounds like to issue with UTF-8 and XMLRPC which can be fixed by patching /usr/share/perl5/XMLRPC/Lite.pm to support UTF-8 text. AFAIK the "not equals" symbol (used in the PopUp) requires UTF-8 which is the apparent trigger.

See https://github.com/openwebwork/webwork2/issues/967#issuecomment-523941959

The patch replaces line 55 of /usr/share/perl5/XMLRPC/Lite.pm which originally was:

     base64 => [10, sub {$_[0] =~ /[^\x09\x0a\x0d\x20-\x7f]/}, 'as_base64'],

with the following replacement line:

     base64 => [10, sub {$_[0] =~ /[^\x09\x0a\x0d\x20-\x7f]/ && !utf8::is_utf8($_[0])}, 'as_base64'],


In reply to Nathan Wallach

Re: Randomization button fails: "434 setmaker.js: /webwork2/instructorXMLHandler: Forbidden"

by Keir Lockridge -
I did the patch and restarted my webservers. Now when I hit the randomize button I get ... quite an error message (see below). Perhaps I can try to avoid the not equals sign.

--Keir

WebworkClient Errors
Errors:
not well-formed (invalid token) at line 1, column 7480, byte 7482 at /usr/lib/x86_64-linux-gnu/perl5/5.30/XML/Parser.pm line 187. PG_ANSWERS_HASHAnSwEr0001responseresponse_orderAnSwEr0001responsesAnSwEr0001answergroup_labelAnSwEr0001ans_labelAnSwEr0001ans_evaldebugevaluatorsCODE referencepre_filtersCODE referencerh_ansstudentsMustReduceUnions1showTypeWarnings1ignoreStrings1correct_valueparser::PopUp referencecorrect_ans_latex_string\text{=}ans_labelignoreInfinity1showUnionReduceWarnings1original_student_anserror_flagtypeValue (PopUp)score0showEqualErrors1error_messagecorrect_ans=student_anstypeMatchValue::Realpreview_latex_stringans_messagepreview_text_stringpost_filtersCODE referenceactive1AnSwEr0002ans_labelAnSwEr0002responseanswergroup_labelAnSwEr0002response_orderAnSwEr0002responsesAnSwEr0002active1ans_evalevaluatorsCODE referencedebugpre_filtersCODE referenceCODE referencecmp_prefilterpost_filtersCODE referenceCODE referencecmp_postfilterrh_ansshowTypeWarnings1correct_valueValue::Formula referenceignoreStrings1studentsMustReduceUnions1upToConstant0correct_ans_latex_string2showDomainErrors1ans_labelignoreInfinity1showUnionReduceWarnings1error_flagoriginal_student_anstypeValue (Formula)score0showEqualErrors1correct_ans2error_messagestudent_anspreview_latex_stringpreview_text_stringans_messageAnSwEr0003ans_evaldebugevaluatorsCODE referencepre_filtersCODE referencerh_anspreview_text_stringans_messagepreview_latex_stringtypeMatchValue::Realstudent_anscorrect_ansâ error_messageshowEqualErrors1score0typeValue (PopUp)original_student_anserror_flagshowUnionReduceWarnings1ignoreInfinity1ans_labelcorrect_ans_latex_string{\verbâ }showTypeWarnings1correct_valueparser::PopUp referenceignoreStrings1studentsMustReduceUnions1post_filtersCODE referenceactive1responseanswergroup_labelAnSwEr0003responsesAnSwEr0003response_orderAnSwEr0003ans_labelAnSwEr0003AnSwEr0004ans_evalrh_ansshowEqualErrors1score0correct_ans-2error_messagepreview_latex_stringstudent_anspreview_text_stringans_messageignoreStrings1showTypeWarnings1correct_valueValue::Formula referencestudentsMustReduceUnions1upToConstant0ans_labelshowDomainErrors1correct_ans_latex_string-2error_flagoriginal_student_ansignoreInfinity1showUnionReduceWarnings1typeValue (Formula)post_filtersCODE referenceCODE referencecmp_postfilterpre_filtersCODE referenceCODE referencecmp_prefilterevaluatorsCODE referencedebugactive1responseresponse_orderAnSwEr0004responsesAnSwEr0004answergroup_labelAnSwEr0004ans_labelAnSwEr0004AnSwEr0005ans_labelAnSwEr0005responseanswergroup_labelAnSwEr0005responsesAnSwEr0005response_orderAnSwEr0005active1ans_evalevaluatorsCODE referencedebugpre_filtersCODE referencepost_filtersCODE referencerh_anscorrect_ans_latex_string{\verbâ }ans_labelignoreStrings1correct_valueparser::PopUp referenceshowTypeWarnings1studentsMustReduceUnions1typeValue (PopUp)showUnionReduceWarnings1ignoreInfinity1error_flagoriginal_student_anserror_messagecorrect_ansâ score0showEqualErrors1preview_text_stringans_messagetypeMatchValue::Realstudent_anspreview_latex_stringAnSwEr0006ans_evalrh_anstypeValue (Formula)showUnionReduceWarnings1ignoreInfinity1error_flagoriginal_student_anscorrect_ans_latex_string2showDomainErrors1ans_labelcorrect_valueValue::Formula referenceshowTypeWarnings1ignoreStrings1upToConstant0studentsMustReduceUnions1preview_text_stringans_messagestudent_anspreview_latex_stringcorrect_ans2error_messagescore0showEqualErrors1post_filtersCODE referenceCODE referencecmp_postfilterpre_filtersCODE referenceCODE referencecmp_prefilterevaluatorsCODE referencedebugactive1responseanswergroup_labelAnSwEr0006response_orderAnSwEr0006responsesAnSwEr0006ans_labelAnSwEr0006AnSwEr0007ans_evalpost_filtersCODE referencerh_ansshowEqualErrors1score0error_messagecorrect_ans=preview_latex_stringtypeMatchValue::Realstudent_anspreview_text_stringans_messagecorrect_valueparser::PopUp referenceignoreStrings1showTypeWarnings1studentsMustReduceUnions1ans_labelcorrect_ans_latex_string\text{=}original_student_anserror_flagshowUnionReduceWarnings1ignoreInfinity1typeValue (PopUp)pre_filtersCODE referenceevaluatorsCODE referencedebugactive1responseanswergroup_labelAnSwEr0007response_orderAnSwEr0007responsesAnSwEr0007ans_labelAnSwEr0007AnSwEr0008responseanswergroup_labelAnSwEr0008responsesAnSwEr0008response_orderAnSwEr0008ans_labelAnSwEr0008ans_evalpost_filtersCODE referencerh_anspreview_text_stringans_messagepreview_latex_stringtypeMatchValue::Realstudent_anserror_messagecorrect_ansANYshowEqualErrors1score0typeValue (String)error_flagoriginal_student_ansshowUnionReduceWarnings1ignoreInfinity1ans_labelcorrect_ans_latex_string\text{ANY}correct_valueValue::String referenceshowTypeWarnings1ignoreStrings1studentsMustReduceUnions1pre_filtersCODE referencedebugevaluatorsCODE referenceactive1AnSwEr0009ans_evalrh_ansstudent_anstypeMatchValue::Realpreview_latex_stringans_messagepreview_text_stringscore0showEqualErrors1correct_ans=error_messageignoreInfinity1showUnionReduceWarnings1error_flagoriginal_student_anstypeValue (PopUp)studentsMustReduceUnions1correct_valueparser::PopUp referenceshowTypeWarnings1ignoreStrings1correct_ans_latex_string\text{=}ans_labelpost_filtersCODE referenceevaluatorsCODE referencedebugpre_filtersCODE referenceactive1responseresponse_orderAnSwEr0009responsesAnSwEr0009answergroup_labelAnSwEr0009ans_labelAnSwEr0009AnSwEr0010ans_labelAnSwEr0010responseresponsesAnSwEr0010response_orderAnSwEr0010answergroup_labelAnSwEr0010active1ans_evalpost_filtersCODE referenceCODE referencecmp_postfilterrh_ansans_messagepreview_text_stringstudent_anspreview_latex_stringerror_messagecorrect_ans2score0showEqualErrors1typeValue (Formula)showUnionReduceWarnings1ignoreInfinity1error_flagoriginal_student_ansshowDomainErrors1correct_ans_latex_string2ans_labelstudentsMustReduceUnions1upToConstant0ignoreStrings1correct_valueValue::Formula referenceshowTypeWarnings1pre_filtersCODE referenceCODE referencecmp_prefilterdebugevaluatorsCODE referenceAnSwEr0011ans_evalpost_filtersCODE referencerh_ansscore0showEqualErrors1correct_ans=error_messagestudent_anstypeMatchValue::Realpreview_latex_stringans_messagepreview_text_stringstudentsMustReduceUnions1correct_valueparser::PopUp referenceignoreStrings1showTypeWarnings1correct_ans_latex_string\text{=}ans_labelshowUnionReduceWarnings1ignoreInfinity1error_flagoriginal_student_anstypeValue (PopUp)evaluatorsCODE referencedebugpre_filtersCODE referenceactive1responseanswergroup_labelAnSwEr0011response_orderAnSwEr0011responsesAnSwEr0011ans_labelAnSwEr0011AnSwEr0012ans_labelAnSwEr0012responseanswergroup_labelAnSwEr0012response_orderAnSwEr0012responsesAnSwEr0012active1ans_evalrh_anspreview_latex_stringstudent_anspreview_text_stringans_messageshowEqualErrors1score0error_messagecorrect_ans-2error_flagoriginal_student_ansshowUnionReduceWarnings1ignoreInfinity1typeValue (Formula)ignoreStrings1showTypeWarnings1correct_valueValue::Formula referencestudentsMustReduceUnions1upToConstant0ans_labelshowDomainErrors1correct_ans_latex_string-2post_filtersCODE referenceCODE referencecmp_postfilterevaluatorsCODE referencedebugpre_filtersCODE referenceCODE referencecmp_prefilteranswersflagsANSWER_ENTRY_ORDERAnSwEr0001AnSwEr0002AnSwEr0003AnSwEr0004AnSwEr0005AnSwEr0006AnSwEr0007AnSwEr0008AnSwEr0009AnSwEr0010AnSwEr0011AnSwEr0012KEPT_EXTRA_ANSWERSAnSwEr0001AnSwEr0002AnSwEr0003AnSwEr0004AnSwEr0005AnSwEr0006AnSwEr0007AnSwEr0008AnSwEr0009AnSwEr0010AnSwEr0011AnSwEr0012recordSubmittedAnswers1showHint1showPartialCorrectAnswers1PROBLEM_GRADER_TO_USEshowHintLimit1commenthintExists0solutionExists1refreshCachedImages0showpartialCorrectAnswers1problem_resulterrorsuserIDklockridcompute_time 0 wallclock secs ( 0.19 usr + 0.00 sys = 0.19 CPU)debug_messagestextPHNjcmlwdCB0eXBlPSJ0ZXh0L3gtbWF0aGpheC1jb25maWciPgogICAgICAgICAgICAgICAgICBN YXRoSmF4Lkh1Yi5Db25maWcoewogICAgICAgICAgICAgICAgICAgICBNYXRoTWVudToge3Nob3dD b250ZXh0OiB0cnVlfQogICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgPC9z Y3JpcHQ+CgkJCQkgIDxzY3JpcHQgdHlwZT0idGV4dC9qYXZhc2NyaXB0Ij4gCgkJCQ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GV4MmpheF9p Z25vcmUiPuKJoDwvb3B0aW9uPgo8L3NlbGVjdD4gPGlucHV0IHR5cGU9dGV4dCBjbGFzcz0iY29k ZXNoYXJkIiBzaXplPTUgbmFtZT0iQW5Td0VyMDAxMiIgaWQ9IkFuU3dFcjAwMTIiIGFyaWEtbGFi ZWw9ImFuc3dlciAxMiAiIGRpcj0iYXV0byIgYXV0b2NvbXBsZXRlPSJvZmYiIGF1dG9jb3JyZWN0 PSJvZmYiIGF1dG9jYXBpdGFsaXplPSJvZmYiIHNwZWxsY2hlY2s9ImZhbHNlIiB2YWx1ZT0iIj4K PGlucHV0IHR5cGU9aGlkZGVuIG5hbWU9InByZXZpb3VzX0FuU3dFcjAwMTIiIHZhbHVlPSIiPgo8 L2Rpdj4KPGRpdiBzdHlsZT0ibWFyZ2luLXRvcDoxZW0iPjwvZGl2Pgo8L2Rpdj4K session_keygSkr8At4yLwp9mSbpOQvGI1hE6tPQ7ctheader_textproblem_statewarning_messages
------The current problem set number setNumber is not defined
------The current problem number probNum is not definedinternal_debug_messagescourseIDmath212f2012WARNINGSV0FSTklOR1MKCjxici8+TW9yZTxici8+Cg== at /opt/webwork/webwork2/lib/WebworkClient.pm line 302.

End Errors
WeBWorK error
An error occured while processing your request. For help, please send mail to this site's webmaster (webmaster@localhost), including all of the following information as well as what what you were doing when the error occured.

Thu Jun 11 14:17:02 2020

Warning messages
Error messages
xmlrpcCall to renderProblem returned no result for
Call stack
The information below can help locate the source of the problem.

in WeBWorK::ContentGenerator::instructorXMLHandler::content called at line 233 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
in WeBWorK::ContentGenerator::go called at line 386 of /opt/webwork/webwork2/lib/WeBWorK.pm
Request information
Method POST
URI /webwork2/instructorXMLHandler
HTTP Headers
Sec-Fetch-Dest empty
X-Requested-With XMLHttpRequest
Accept-Language en-US,en;q=0.9
Cookie WeBWorKCourseAuthen.math212f2012=klockrid%09gSkr8At4yLwp9mSbpOQvGI1hE6tPQ7ct%091591899416; qa_noticed=1; username-gettysburgmath-org-8888="2|1:0|10:1590183835|32:username-XXX-org-8888|44:OGM1M2VmYmU4NmY5NGE4OWIxODBhNjJlNTY0YzE1YjM=|e8dc5529c5fd88e707d3080cac270ebc09eb701c648b1d7d310eb255fa565725"
Connection keep-alive
Accept */*
Content-Type application/x-www-form-urlencoded; charset=UTF-8
Accept-Encoding gzip, deflate, br
Content-Length 390
In reply to Keir Lockridge

Re: Randomization button fails: "434 setmaker.js: /webwork2/instructorXMLHandler: Forbidden"

by Nathan Wallach -
We are making progress - as the error is now occurring somewhere else, and the message jogged my memory.

You can probably avoid the issue by not using "not equals" or any other UTF-8 as part of an answer... but PopUp will not allow you to use "math" inside the options. 

I hope we can instead find the "fixes" you need to solve the problem - and that it will help make sure that the future WW 2.16 (if not 2.15) is really ready for UTF-8 without all these bugs. (It will still probably require the manual patch to Lite.pm as part of the installation procedure.)

UTF-8 support in WW was only added in WW 2.15, and there were issues none of us found during the testing before WW 2.15 was released. For a good while, I was aware that some problems could not be loaded in the library browser or via html2xml in general, but discovering why and finding a fix was quite challenging. We also told students not to use images mode due to one of the issues (see below). I hope that the patches discussed below also fixed the issue you are encountering now.

The "not well-formed (invalid token)" issue seems to have been related to problems where the correct/student answers could contain UTF-8 strings, as the "XMLRPC" system was not properly encoding strings deep inside the data it was passing, in particular for "answer" strings which contained UTF-8 characters. The "not equals" sign would almost certainly trigger that problem (in html2xml and apparently for the "randomization" button).

If my analysis is correct, then I hope that the changes made in the pull request https://github.com/openwebwork/webwork2/pull/1089 which had been merged into the develop branch will solve the problem you are having. I have been using that patched code for a good while, and it seems to solve the issues I had before with some problems in the library browser and with the same problems embedded via html2xml which I ran into before the changes.

Also there was a second issue with UTF-8 answers discussed in https://github.com/openwebwork/pg/issues/443 and likely to effect your problems. The second  issue was a failure to generating the answer table in "images" mode for cases like this. Students would only get an error page and not the feedback, etc. Davide Cervone proposed a fix, and Mike made the fix in https://github.com/openwebwork/pg/pull/466 which is also only in "develop" and not WW 2.15. Since that issue will effect such problems when used by students, if they change to using "images" mode for equation display - it is also something you probably want to consider patching on your system.

Sorry, I should have recalled both these issues when I posted my first response. Hopefully, we will not discover another problem later on.

Nathan
In reply to Nathan Wallach

Re: Randomization button fails: "434 setmaker.js: /webwork2/instructorXMLHandler: Forbidden"

by Keir Lockridge -

Would you advise me to avoid not equals for now and wait for 2.16, or try to install these patches? (I'm content with something like "!=" for now.)

Thanks to you and all the others who are doing the development work!

In reply to Keir Lockridge

Re: Randomization button fails: "434 setmaker.js: /webwork2/instructorXMLHandler: Forbidden"

by Nathan Wallach -
If you have time - help testing patches/development code is always a contribution which helps the project and the community.

I tested the Library browser randomize button with your problem on my laptop which is running some version of the development code, and it worked for me. That is a pretty good indication that the patch mentioned above should solve your problem, so it is likely to just work once WW 2.16 gets released. However, there are plenty of other changes in the develop branch, so it could be some other commit/PR was also part of what fixed the issue. Testing with just the PR 1089 changes would narrow down what the issue and fix is.
In reply to Nathan Wallach

Re: Randomization button fails: "434 setmaker.js: /webwork2/instructorXMLHandler: Forbidden"

by Keir Lockridge -
I would be happy to -- but I don't know how to install patches; is there a page you can point me to with instructions?

--Keir