MDL-35519 mod_book: fixed the cancel import redirect URL

This commit is contained in:
Andrew Davis
2012-10-01 10:05:22 +08:00
parent 5d6285c220
commit daa1dd74d4
+2 -2
View File
@@ -60,9 +60,9 @@ $mform = new booktool_importhtml_form(null, array('id'=>$id, 'chapterid'=>$chapt
// If data submitted, then process and store.
if ($mform->is_cancelled()) {
if (empty($chapter->id)) {
redirect("/mod/book/view.php?id=$cm->id");
redirect($CFG->wwwroot."/mod/book/view.php?id=$cm->id");
} else {
redirect("/mod/book/view.php?id=$cm->id&chapterid=$chapter->id");
redirect($CFG->wwwroot."/mod/book/view.php?id=$cm->id&chapterid=$chapter->id");
}
} else if ($data = $mform->get_data()) {