mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
BugFix for MDL-6730: now blank lessons redirect to edit.php where the user is prompted by a menu of options.
This commit is contained in:
parent
6c89dc5514
commit
b3b4bc44ce
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user