Example #1
0
 /**
  * Removes all associations with a track, this entails removing
  * user track, cluster track and class track associations
  * @param none
  * @return none
  */
 function delete()
 {
     // Cascade
     $level = context_level_base::get_custom_context_level('track', 'block_curr_admin');
     $result = usertrack::delete_for_track($this->id);
     $result = $result && clustertrack::delete_for_track($this->id);
     $result = $result && trackassignmentclass::delete_for_track($this->id);
     $result = $result && delete_context($level, $this->id);
     return $result && $this->data_delete_record();
 }