diff --git a/course/lib.php b/course/lib.php index d57acd904fe..f85624998fc 100644 --- a/course/lib.php +++ b/course/lib.php @@ -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)) {