Merge branch 'MDL-69296-m39' of https://github.com/NeillM/moodle into MOODLE_39_STABLE
This commit is contained in:
+6
-1
@@ -143,7 +143,12 @@ $mform->set_data($data);
|
||||
|
||||
if ($mform->is_cancelled()) {
|
||||
if ($return && !empty($cm->id)) {
|
||||
redirect("$CFG->wwwroot/mod/$module->name/view.php?id=$cm->id");
|
||||
$urlparams = [
|
||||
'id' => $cm->id, // We always need the activity id.
|
||||
'forceview' => 1, // Stop file downloads in resources.
|
||||
];
|
||||
$activityurl = new moodle_url("/mod/$module->name/view.php", $urlparams);
|
||||
redirect($activityurl);
|
||||
} else {
|
||||
redirect(course_get_url($course, $cw->section, array('sr' => $sectionreturn)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user