Permalink
Browse files

MDL-30038 mod_lesson was not working on PHP4.

  • Loading branch information...
1 parent f28a448 commit 9d656f584ad11ef8c3543a83ab7e79ee8fff4661 @timhunt timhunt committed Nov 1, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 mod/lesson/action/continue.php
@@ -414,8 +414,9 @@
$userresponse = implode(",", $userresponse);
$response = '';
- if ($ncorrect == count($answers)-2) { // dont count correct/wrong responses in the total.
- $response = reset($answers)->answer;
+ if ($ncorrect == count($answers) - 2) { // dont count correct/wrong responses in the total.
+ $answer = reset($answers);
+ $response = $answer->answer;
if (isset($correctpageid)) {
$newpageid = $correctpageid;
}
@@ -425,7 +426,8 @@
$correctanswer = true;
} else {
reset($answers);
- $response = next($answers)->answer;
+ $answer = next($answers);
+ $response = $answer->answer;
$newpageid = $wrongpageid;
$answerid = $wronganswerid;
}

0 comments on commit 9d656f5

Please sign in to comment.