original_string: public static function hook_course_deleted(stdClass $course) {
          global $DB;
          $DB->delete_records(course_competency::TABLE, array('courseid' => $course->id));
          $DB->delete_records(course_competency_settings::TABLE, array('courseid' => $course->id));
          $DB->delete_records(user_competency_course::TABLE, array('courseid' => $course->id));
      }
code: public static function hook_course_deleted(stdClass $course) {
          global $DB;
          $DB->delete_records(course_competency::TABLE, array('courseid' => $course->id));
          $DB->delete_records(course_competency_settings::TABLE, array('courseid' => $course->id));
          $DB->delete_records(user_competency_course::TABLE, array('courseid' => $course->id));
      }
code_tokens: public static function hook_course_deleted ( stdClass $ course ) { global $ DB ; $ DB -> delete_records ( course_competency :: TABLE , array ( 'courseid' => $ course -> id ) ) ; $ DB -> delete_records ( course_competency_settings :: TABLE , array ( 'courseid' => $ course -> id ) ) ; $ DB -> delete_records ( user_competency_course :: TABLE , array ( 'courseid' => $ course -> id ) ) ; }
docstring: Action to perform when a course is deleted.
  
  Do not call this directly, this is reserved for core use.
  
  @param stdClass $course The course object.
  @return void
docstring_tokens: Action to perform when a course is deleted .