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

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

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

Revision 5339 Revision 5340
306 # 306 #
307 # Call the original grader 307 # Call the original grader
308 # 308 #
309 $self->{grader} = \&problemRandomize::resetGrader if $self->{isReset}; 309 $self->{grader} = \&problemRandomize::resetGrader if $self->{isReset};
310 my ($result,$state) = &{$self->{grader}}(@_); 310 my ($result,$state) = &{$self->{grader}}(@_);
311 shift; shift; my %options = @_;
311 312
312 # 313 #
313 # Update that state information and encode it. 314 # Update that state information and encode it.
314 # 315 #
315 my $status = $self->{status}; 316 my $status = $self->{status};
319 $result->{type} = "problemRandomize ($result->{type})"; 320 $result->{type} = "problemRandomize ($result->{type})";
320 321
321 # 322 #
322 # Conditions for when to show the reseed message 323 # Conditions for when to show the reseed message
323 # 324 #
325 my $score = ($options{answer_submitted} ? $result->{score} : $state->{recorded_score});
324 my $isWhen = ($self->{when} eq 'always' || 326 my $isWhen = ($self->{when} eq 'always' ||
325 ($self->{when} eq 'correct' && $result->{score} >= 1 && 327 ($self->{when} eq 'correct' && $score >= 1 && !$main::inputs_ref->{previewAnswers}));
326 !$main::inputs_ref->{previewAnswers}));
327 my $okDate = (!$self->{onlyAfterDue} || time >= $main::dueDate); 328 my $okDate = (!$self->{onlyAfterDue} || time >= $main::dueDate);
328 329
329 # 330 #
330 # Add the problemRandomize message and data 331 # Add the problemRandomize message and data
331 # 332 #

Legend:
Removed from v.5339  
changed lines
  Added in v.5340

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9