예제 #1
0
/**
 * Handler that gets called when the curriculum expiration time
 * setting is changed
 *
 * @param string $name Shortname of the changed setting
 */
function curriculum_expiration_start_updatedcallback($name)
{
    global $DB, $SESSION;
    if (!empty($SESSION->curriculum_expiration_toggled)) {
        //updating curriculum assignment times has already been handled for the
        //lifetime of the current script (prevent updating records twice)
        return;
    }
    $enabled = get_config('local_elisprogram', 'enable_curriculum_expiration');
    if ($enabled) {
        curriculumstudent::update_expiration_times();
    }
}