[system] / trunk / webwork2 / lib / WeBWorK / ContentGenerator / Problem.pm Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

Diff of /trunk/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm

Revision 683 Revision 684
101 101
102 # final values for options 102 # final values for options
103 my %will; 103 my %will;
104 foreach (keys %must) { 104 foreach (keys %must) {
105 \$will{\$_} = \$can{\$_} && (\$want{\$_} || \$must{\$_}); 105 \$will{\$_} = \$can{\$_} && (\$want{\$_} || \$must{\$_});
106 #warn "\$_: can? \$can{\$_} want? \$want{\$_} must? \$must{\$_} will? \$will{\$_}\n";
107 } 106 }
108 107
110 109
127 { # translation options 126 { # translation options
128 displayMode => \$displayMode, 127 displayMode => \$displayMode,
129 showHints => \$will{showHints}, 128 showHints => \$will{showHints},
130 showSolutions => \$will{showSolutions}, 129 showSolutions => \$will{showSolutions},
131 refreshMath2img => \$will{showHints} || \$will{showSolutions}, 130 refreshMath2img => \$will{showHints} || \$will{showSolutions},
132 # try leaving processAnswers on all the time? 131 processAnswers => 1,
134 }, 132 },
135 ); 133 );
134
135 ##### fix hint/solution options #####
136
137 \$can{showHints} &&= \$pg->{flags}->{hintExists};
138 \$can{showSolutions} &&= \$pg->{flags}->{solutionExists};
136 139
137 ##### store fields ##### 140 ##### store fields #####
138 141
139 \$self->{cldb} = \$cldb; 142 \$self->{cldb} = \$cldb;
140 \$self->{wwdb} = \$wwdb; 143 \$self->{wwdb} = \$wwdb;
393 if (\$pg->{warnings} ne "") { 396 if (\$pg->{warnings} ne "") {
394 print CGI::hr(), warningOutput(\$pg->{warnings}); 397 print CGI::hr(), warningOutput(\$pg->{warnings});
395 } 398 }
396 399
397 # debugging stuff 400 # debugging stuff
398 #print 401 print
399 # CGI::hr(), 402 CGI::hr(),
400 # CGI::h2("debugging information"), 403 CGI::h2("debugging information"),
401 # CGI::h3("form fields"), 404 CGI::h3("form fields"),
402 # ref2string(\$self->{formFields}), 405 ref2string(\$self->{formFields}),
403 # CGI::h3("user object"), 406 CGI::h3("user object"),
404 # ref2string(\$self->{user}), 407 ref2string(\$self->{user}),
405 # CGI::h3("set object"), 408 CGI::h3("set object"),
406 # ref2string(\$set), 409 ref2string(\$set),
407 # CGI::h3("problem object"), 410 CGI::h3("problem object"),
408 # ref2string(\$problem), 411 ref2string(\$problem),
409 # CGI::h3("PG object"), 412 CGI::h3("PG object"),
410 # ref2string(\$pg, {'WeBWorK::PG::Translator' => 1}); 413 ref2string(\$pg, {'WeBWorK::PG::Translator' => 1});
411 414
412 return ""; 415 return "";
413} 416}
414 417
415##### output utilities ##### 418##### output utilities #####

Legend:
 Removed from v.683 changed lines Added in v.684