mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Err... course block instances weren't being deleted along with the course?
This commit is contained in:
parent
7d5784a55a
commit
251af423cd
1 changed files with 9 additions and 0 deletions
|
@ -2459,6 +2459,15 @@ function remove_course_contents($courseid, $showfeedback=true) {
|
||||||
error('No modules are installed!');
|
error('No modules are installed!');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Delete course blocks
|
||||||
|
if (delete_records('block_instance', 'pagetype', PAGE_COURSE_VIEW, 'pageid', $course->id)) {
|
||||||
|
if ($showfeedback) {
|
||||||
|
notify($strdeleted .' block_instance');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$result = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Delete any user stuff
|
// Delete any user stuff
|
||||||
|
|
||||||
if (delete_records('user_students', 'course', $course->id)) {
|
if (delete_records('user_students', 'course', $course->id)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue