| … | |
… | |
| 320 | $result->{type} = "problemRandomize ($result->{type})"; |
320 | $result->{type} = "problemRandomize ($result->{type})"; |
| 321 | |
321 | |
| 322 | # |
322 | # |
| 323 | # Conditions for when to show the reseed message |
323 | # Conditions for when to show the reseed message |
| 324 | # |
324 | # |
|
|
325 | my $inputs = $main::inputs_ref; |
|
|
326 | my $isSubmit = $inputs->{submitAnswers} || $inputs->{previewAnswers} || $inputs->{checkAnswers}; |
| 325 | my $score = ($options{answer_submitted} ? $result->{score} : $state->{recorded_score}); |
327 | my $score = ($isSubmit || $self->{isReset} ? $result->{score} : $state->{recorded_score}); |
| 326 | my $isWhen = ($self->{when} eq 'always' || |
328 | my $isWhen = ($self->{when} eq 'always' || |
| 327 | ($self->{when} eq 'correct' && $score >= 1 && !$main::inputs_ref->{previewAnswers})); |
329 | ($self->{when} eq 'correct' && $score >= 1 && !$main::inputs_ref->{previewAnswers})); |
| 328 | my $okDate = (!$self->{onlyAfterDue} || time >= $main::dueDate); |
330 | my $okDate = (!$self->{onlyAfterDue} || time >= $main::dueDate); |
| 329 | |
331 | |
| 330 | # |
332 | # |
| … | |
… | |
| 351 | } |
353 | } |
| 352 | |
354 | |
| 353 | # |
355 | # |
| 354 | # Don't show the summary section if the problem is being reset. |
356 | # Don't show the summary section if the problem is being reset. |
| 355 | # |
357 | # |
| 356 | if ($self->{isReset}) { |
358 | if ($self->{isReset} && $isSubmit) { |
| 357 | $result->{msg} .= "<style>.problemHeader {display:none}</style>"; |
359 | $result->{msg} .= "<style>.problemHeader {display:none}</style>"; |
| 358 | $state->{state_summary_msg} = |
360 | $state->{state_summary_msg} = |
| 359 | "<b>Note:</b> This is a new (re-randomized) version of the problem.".$main::BR. |
361 | "<b>Note:</b> This is a new (re-randomized) version of the problem.".$main::BR. |
| 360 | "If you come back to it later, it may revert to its original version.".$main::BR. |
362 | "If you come back to it later, it may revert to its original version.".$main::BR. |
| 361 | "Hardcopy will always print the original version of the problem."; |
363 | "Hardcopy will always print the original version of the problem."; |