Exemplo n.º 1
0
/**
 * Deletes the settings entry for the given course upon course deletion.
 */
function format_grid_delete_course($courseid)
{
    global $DB;
    /* Delete any images associated with the course.
       Done this way so will work if the course has
       been a grid format course in the past even if
       it is not now. */
    $courseformat = format_grid::get_instance($courseid);
    //
    $courseformat->delete_images();
    unset($courseformat);
    // Destruct.
    $DB->delete_records("format_grid_summary", array("courseid" => $courseid));
}