[system] / trunk / pg / macros / PG.pl Repository:
ViewVC logotype

Diff of /trunk/pg/macros/PG.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1896 Revision 2166
168# $main::PG_random_generator = new PGrandom($main::problemSeed) || die "Can't create random number generator."; 168# $main::PG_random_generator = new PGrandom($main::problemSeed) || die "Can't create random number generator.";
169# $main::ans_rule_count = 0; # counts questions 169# $main::ans_rule_count = 0; # counts questions
170 170
171 # end unpacking of environment variables. 171 # end unpacking of environment variables.
172# $main::QUIZ_PREFIX = '' unless defined($main::QUIZ_PREFIX) 172# $main::QUIZ_PREFIX = '' unless defined($main::QUIZ_PREFIX)
173
174 $STRINGforOUTPUT = '<SCRIPT SRC="'.$main::envir{jsMathURL}.'"></SCRIPT>' . "\n" . $STRINGforOUTPUT
175 if ($main::envir{displayMode} eq 'HTML_jsMath');
173 176
174} 177}
175 178
176sub inc_ans_rule_count { 179sub inc_ans_rule_count {
177 eval(q!++$main::ans_rule_count!); # evalute at runtime to get correct main:: 180 eval(q!++$main::ans_rule_count!); # evalute at runtime to get correct main::
419 warn "ERROR: The problem grader is not a subroutine" unless ref( $main::PG_FLAGS{PROBLEM_GRADER_TO_USE}) eq 'CODE' 422 warn "ERROR: The problem grader is not a subroutine" unless ref( $main::PG_FLAGS{PROBLEM_GRADER_TO_USE}) eq 'CODE'
420 or $main::PG_FLAGS{PROBLEM_GRADER_TO_USE} = 'std_problem_grader' 423 or $main::PG_FLAGS{PROBLEM_GRADER_TO_USE} = 'std_problem_grader'
421 or $main::PG_FLAGS{PROBLEM_GRADER_TO_USE} = 'avg_problem_grader'; 424 or $main::PG_FLAGS{PROBLEM_GRADER_TO_USE} = 'avg_problem_grader';
422 # return results 425 # return results
423 }; 426 };
427
428 $STRINGforOUTPUT .= '<SCRIPT> jsMath.ProcessBeforeShowing() </SCRIPT>'
429 if ($main::envir{displayMode} eq 'HTML_jsMath');
424 430
425 (\$STRINGforOUTPUT, \$STRINGforHEADER_TEXT,\%PG_ANSWERS_HASH,eval(q!\%main::PG_FLAGS!)); 431 (\$STRINGforOUTPUT, \$STRINGforHEADER_TEXT,\%PG_ANSWERS_HASH,eval(q!\%main::PG_FLAGS!));
426} 432}
427 433
428 434

Legend:
Removed from v.1896  
changed lines
  Added in v.2166

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9