mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +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
|
@ -1993,7 +1993,7 @@ class core_course_category implements renderable, cacheable_object, IteratorAggr
|
|||
|
||||
// Now delete anything that may depend on course category context.
|
||||
grade_course_category_delete($this->id, 0, $showfeedback);
|
||||
if (!question_delete_course_category($this, 0, $showfeedback)) {
|
||||
if (!question_delete_course_category($this, null)) {
|
||||
throw new moodle_exception('cannotdeletecategoryquestions', '', '', $this->get_formatted_name());
|
||||
}
|
||||
|
||||
|
@ -2153,7 +2153,7 @@ class core_course_category implements renderable, cacheable_object, IteratorAggr
|
|||
|
||||
// Now delete anything that may depend on course category context.
|
||||
grade_course_category_delete($this->id, $newparentid, $showfeedback);
|
||||
if (!question_delete_course_category($this, $newparentcat, $showfeedback)) {
|
||||
if (!question_delete_course_category($this, $newparentcat)) {
|
||||
if ($showfeedback) {
|
||||
echo $OUTPUT->notification(get_string('errordeletingquestionsfromcategory', 'question', $catname), 'notifysuccess');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue