fixed closing of popup on saving question which was broken and also added closing of popup on cancel.

This commit is contained in:
jamiesensei 2007-09-27 08:17:09 +00:00
parent cb14dd6316
commit 11a6096775

View File

@ -140,10 +140,15 @@ if ($cm !== null){
} else {
$toform->courseid = $COURSE->id;
}
$toform->inpopup = $inpopup;
$mform->set_data($toform);
if ($mform->is_cancelled()){
redirect($returnurl);
if ($inpopup) {
close_window();
} else {
redirect($returnurl);
}
} elseif ($fromform = $mform->get_data()){
$returnurl = new moodle_url($returnurl);
//select category that question has been saved in / moved to when we return to question bank