From: Mike G. v. a. <we...@ma...> - 2010-05-14 17:17:03
|
Log Message: ----------- correct initialiazation problem for showPartialCorrectAnswers Modified Files: -------------- pg/macros: PG.pl Revision Data ------------- Index: PG.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PG.pl,v retrieving revision 1.43 retrieving revision 1.44 diff -Lmacros/PG.pl -Lmacros/PG.pl -u -r1.43 -r1.44 --- macros/PG.pl +++ macros/PG.pl @@ -263,18 +263,14 @@ # check that answers match # gather up PG_FLAGS elements - - my @elements = qw(showPartialCorrectAnswers - recordSubmittedAnswers refreshCachedImages - hintExists solutionExists - ); - while (@elements) { - my $var= shift @elements; - $PG->{flags}->{$var} = ${$var}; - } - $PG->{flags}->{comment} = $pgComment; #KLUDGE #FIXME - $PG->{flags}->{showHintLimit} = $showHint; #KLUDGE #FIXME - + $PG->{flags}->{showPartialCorrectAnswers} = defined($showPartialCorrectAnswers)? $showPartialCorrectAnswers : 1 ; + $PG->{flags}->{recordSubmittedAnswers} = defined($recordSubmittedAnswers)? $recordSubmittedAnswers : 1 ; + $PG->{flags}->{refreshCachedImages} = defined($refreshCachedImages)? $refreshCachedImages : 0 ; + $PG->{flags}->{hintExists} = defined($hintExists)? $hintExists : 0 ; + $PG->{flags}->{solutionExists} = defined($solutionExists)? $solutionExists : 0 ; + $PG->{flags}->{comment} = defined($pgComment)? $pgComment :'' ; + $PG->{flags}->{showHintLimit} = defined($showHint)? $showHint : 0 ; + # install problem grader if (defined($PG->{flags}->{PROBLEM_GRADER_TO_USE}) ) { |