Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 72... Línea 72...
72
// If data submitted, then process and store.
72
// If data submitted, then process and store.
73
if ($mform->is_cancelled()) {
73
if ($mform->is_cancelled()) {
74
    // Make sure at least one chapter exists.
74
    // Make sure at least one chapter exists.
75
    $chapters = book_preload_chapters($book);
75
    $chapters = book_preload_chapters($book);
76
    if (!$chapters) {
76
    if (!$chapters) {
-
 
77
        $section = $DB->get_record('course_sections', ['id' => $cm->section]);
77
        redirect(new moodle_url('/course/view.php', array('id' => $course->id))); // Back to course view.
78
        redirect(course_get_url($course, $section)); // Back to course view.
78
    }
79
    }
Línea 79... Línea 80...
79
 
80
 
80
    if (empty($chapter->id)) {
81
    if (empty($chapter->id)) {
81
        redirect("view.php?id=$cm->id");
82
        redirect("view.php?id=$cm->id");