From b3b4bc44ce92e9cc26a2ab35057379f14ebad9ce Mon Sep 17 00:00:00 2001 From: mark-nielsen Date: Sat, 30 Sep 2006 19:00:07 +0000 Subject: [PATCH] BugFix for MDL-6730: now blank lessons redirect to edit.php where the user is prompted by a menu of options. --- mod/lesson/view.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mod/lesson/view.php b/mod/lesson/view.php index ff9ab30aef..be4a0212b1 100644 --- a/mod/lesson/view.php +++ b/mod/lesson/view.php @@ -179,7 +179,7 @@ lesson_set_message(get_string('lessonnotready', 'lesson', $course->teacher)); // a nice message to the student } else { if (!count_records('lesson_pages', 'lessonid', $lesson->id)) { - redirect("$CFG->wwwroot/mod/lesson/lesson.php?id=$cm->id&action=addpage&pageid=0"); // no pages - redirect to add pages + redirect("$CFG->wwwroot/mod/lesson/edit.php?id=$cm->id"); // no pages - redirect to add pages } else { lesson_set_message(get_string('lessonpagelinkingbroken', 'lesson')); // ok, bad mojo } @@ -413,8 +413,6 @@ } } - - // check to see if the user can see the left menu if (!has_capability('mod/lesson:manage', $context)) { $lesson->displayleft = lesson_displayleftif($lesson); -- 2.39.5