Index: mod/lesson/locallib.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/lesson/locallib.php,v retrieving revision 1.71.2.4 diff -u -r1.71.2.4 locallib.php --- mod/lesson/locallib.php 21 Jan 2008 13:39:51 -0000 1.71.2.4 +++ mod/lesson/locallib.php 11 Mar 2009 20:23:39 -0000 @@ -1444,7 +1444,7 @@ $earned += $essayinfo->score; $nmanual++; $manualpoints += $answers[$attempt->answerid]->score; - } else { + } else if (!empty($attempt->answerid)) { $earned += $answers[$attempt->answerid]->score; } } else { Index: mod/lesson/action/continue.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/lesson/action/continue.php,v retrieving revision 1.39.2.8 diff -u -r1.39.2.8 continue.php --- mod/lesson/action/continue.php 26 Nov 2008 15:13:51 -0000 1.39.2.8 +++ mod/lesson/action/continue.php 11 Mar 2009 20:23:40 -0000 @@ -122,7 +122,7 @@ $expectedanswer = str_replace('#####', '.*', $expectedanswer); } // see if user typed in any of the correct answers - if (lesson_iscorrect($pageid, $answer->jumpto) and ($lesson->custom && $answer->score > 0) ) { + if ((!$lesson->custom && lesson_iscorrect($pageid, $answer->jumpto)) or ($lesson->custom && $answer->score > 0) ) { if (!$useregexp) { // we are using 'normal analysis', which ignores case if (preg_match('/^'.$expectedanswer.'$/i',$useranswer)) { $ismatch = true;