MDL-27710 lesson module: add the following jump options: unseen branch page, random...
authorRossiani Wijaya <rwijaya@moodle.com>
Tue, 20 Mar 2012 07:17:38 +0000 (15:17 +0800)
committerRossiani Wijaya <rwijaya@moodle.com>
Fri, 23 Mar 2012 02:20:52 +0000 (10:20 +0800)
mod/lesson/pagetypes/branchtable.php

index 3965bf7..6f29bb8 100644 (file)
@@ -79,6 +79,10 @@ class lesson_page_type_branchtable extends lesson_page {
         $jump[LESSON_NEXTPAGE] = get_string("nextpage", "lesson");
         $jump[LESSON_PREVIOUSPAGE] = get_string("previouspage", "lesson");
         $jump[LESSON_EOL] = get_string("endoflesson", "lesson");
         $jump[LESSON_NEXTPAGE] = get_string("nextpage", "lesson");
         $jump[LESSON_PREVIOUSPAGE] = get_string("previouspage", "lesson");
         $jump[LESSON_EOL] = get_string("endoflesson", "lesson");
+        $jump[LESSON_UNSEENBRANCHPAGE] = get_string("unseenpageinbranch", "lesson");
+        $jump[LESSON_RANDOMPAGE] = get_string("randompageinbranch", "lesson");
+        $jump[LESSON_RANDOMBRANCH] = get_string("randombranch", "lesson");
+
         if (!$firstpage) {
             if (!$apageid = $DB->get_field("lesson_pages", "id", array("lessonid" => $lesson->id, "prevpageid" => 0))) {
                 print_error('cannotfindfirstpage', 'lesson');
         if (!$firstpage) {
             if (!$apageid = $DB->get_field("lesson_pages", "id", array("lessonid" => $lesson->id, "prevpageid" => 0))) {
                 print_error('cannotfindfirstpage', 'lesson');