]> git.mjollnir.org Git - moodle.git/commitdiff
BugFix for MDL-6730: now blank lessons redirect to edit.php where the user is prompte...
authormark-nielsen <mark-nielsen>
Sat, 30 Sep 2006 19:00:07 +0000 (19:00 +0000)
committermark-nielsen <mark-nielsen>
Sat, 30 Sep 2006 19:00:07 +0000 (19:00 +0000)
mod/lesson/view.php

index ff9ab30aef65389a2ceb6c12c23fcb32e026e4e9..be4a0212b16563a45021bb791663704d7437041b 100644 (file)
                 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&amp;action=addpage&amp;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
                 }
             }
         }
         
-        
-        
         // check to see if the user can see the left menu
         if (!has_capability('mod/lesson:manage', $context)) {
             $lesson->displayleft = lesson_displayleftif($lesson);