MDL-31775 lesson: fix undefined variable warnings

This commit is contained in:
Dan Poltawski
2012-03-27 20:01:06 +08:00
parent 296c0247c6
commit 0094c90c79
+1 -1
View File
@@ -193,7 +193,7 @@ if (empty($pageid)) {
// if there are any questions have been answered correctly in this attempt
$corrrectattempts = $lesson->get_attempts($retries, true);
if ($corrrectattempts>0) {
if (!empty($corrrectattempts)) {
$attempt = end($corrrectattempts);
$jumpto = $DB->get_field('lesson_answers', 'jumpto', array('id' => $attempt->answerid));
// convert the jumpto to a proper page id