Commit daa1dd74 authored by Andrew Davis's avatar Andrew Davis
Browse files

MDL-35519 mod_book: fixed the cancel import redirect URL

parent 5d6285c2
......@@ -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()) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment