12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- defined('MOODLE_INTERNAL') || die();
- require_once ($CFG->dirroot . '/mod/iassign/locallib.php');
- function xmldb_iassign_uninstall () {
- global $DB;
- $fs = get_file_storage();
- $context_system = context_system::instance();
- $fs->delete_area_files($context_system->id, 'mod_iassign', 'ilm');
- $courses = $DB->get_records('course');
- foreach ($courses as $course) {
- $context_course = context_course::instance($course->id);
- $fs->delete_area_files($context_course->id, 'mod_iassign', 'exercise');
- $fs->delete_area_files($context_course->id, 'mod_iassign', 'activity');
- }
- return true;
- }
|