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 9273bd1abb
commit 113f51d7c9

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()) {