Example #1
0
 function delete()
 {
     // delete associated data
     require_once elis::lib('data/data_filter.class.php');
     //filter specific for tracks, due to different field name
     $filter = new field_filter('curid', $this->id);
     track::delete_records($filter, $this->_db);
     //filter for all other associations
     $filter = new field_filter('curriculumid', $this->id);
     clustercurriculum::delete_records($filter, $this->_db);
     curriculumcourse::delete_records($filter, $this->_db);
     curriculumstudent::delete_records($filter, $this->_db);
     parent::delete();
     //clean up the curriculum context instance
     $context = \local_elisprogram\context\program::instance($this->id);
     $context->delete();
 }
Example #2
0
 public function delete()
 {
     //delete associated classes
     $filter = new field_filter('courseid', $this->id);
     pmclass::delete_records($filter, $this->_db);
     //clean up associated records
     curriculumcourse::delete_records($filter, $this->_db);
     coursetemplate::delete_records($filter, $this->_db);
     // ELIS-8528: Remove LOs/completion elements.
     coursecompletion::delete_records($filter, $this->_db);
     parent::delete();
     $context = \local_elisprogram\context\course::instance($this->id);
     $context->delete();
 }