mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-68757 questions: don't do output in low-level functions
This commit is contained in:
parent
d85118369d
commit
4a45b7112c
7 changed files with 52 additions and 131 deletions
|
@ -5270,7 +5270,7 @@ function remove_course_contents($courseid, $showfeedback = true, array $options
|
|||
foreach ($instances as $cm) {
|
||||
if ($cm->id) {
|
||||
// Delete activity context questions and question categories.
|
||||
question_delete_activity($cm, $showfeedback);
|
||||
question_delete_activity($cm);
|
||||
// Notify the competency subsystem.
|
||||
\core_competency\api::hook_course_module_deleted($cm);
|
||||
}
|
||||
|
@ -5330,7 +5330,7 @@ function remove_course_contents($courseid, $showfeedback = true, array $options
|
|||
}
|
||||
|
||||
// Delete questions and question categories.
|
||||
question_delete_course($course, $showfeedback);
|
||||
question_delete_course($course);
|
||||
if ($showfeedback) {
|
||||
echo $OUTPUT->notification($strdeleted.get_string('questions', 'question'), 'notifysuccess');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue