MDL-64531 course: course_delete_module shouldn't output during AJAX
Committer's note: This change was originally part of a bigger patchset submitted by the author. This is a stripped-down version that does not use phpunit tests for the new behaviour.
This commit is contained in:
+3
-1
@@ -1144,7 +1144,9 @@ function course_delete_module($cmid, $async = false) {
|
||||
}
|
||||
|
||||
// Delete activity context questions and question categories.
|
||||
question_delete_activity($cm);
|
||||
$showinfo = !defined('AJAX_SCRIPT') || AJAX_SCRIPT == '0';
|
||||
|
||||
question_delete_activity($cm, $showinfo);
|
||||
|
||||
// Call the delete_instance function, if it returns false throw an exception.
|
||||
if (!$deleteinstancefunction($cm->instance)) {
|
||||
|
||||
Reference in New Issue
Block a user