From: mark-nielsen Date: Sat, 30 Sep 2006 19:00:07 +0000 (+0000) Subject: BugFix for MDL-6730: now blank lessons redirect to edit.php where the user is prompte... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b3b4bc44ce92e9cc26a2ab35057379f14ebad9ce;p=moodle.git BugFix for MDL-6730: now blank lessons redirect to edit.php where the user is prompted by a menu of options. --- 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);