mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
fixed closing of popup on saving question which was broken and also added closing of popup on cancel.
This commit is contained in:
parent
cb14dd6316
commit
11a6096775
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user