X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=blobdiff_plain;f=mod%2Flesson%2Flocallib.php;h=767b5807b22d86313cb0ec59fdf3845bafcbd767;hp=61a4f92de4727f63a9a3fd2d5106593e8ca76f84;hb=a44987a0818841798994c95bc32c3e676b6cac27;hpb=195480e9d7849de848344524dda47350becab807 diff --git a/mod/lesson/locallib.php b/mod/lesson/locallib.php index 61a4f92de47..767b5807b22 100644 --- a/mod/lesson/locallib.php +++ b/mod/lesson/locallib.php @@ -2515,6 +2515,11 @@ class lesson extends lesson_base { if (!array_key_exists($exitjump, $lessonpages)) { return LESSON_EOL; } + // Check to see that the return type is not a cluster. + if ($lessonpages[$exitjump]->qtype == LESSON_PAGE_CLUSTER) { + // If the exitjump is a cluster then go through this function again and try to find an unseen question. + $exitjump = $this->cluster_jump($exitjump, $userid); + } return $exitjump; } }