. /** * Lib functions (cron) to automatically complete the assignment module upgrade if it was not done all at once during the main upgrade. * * @package tool_assignmentupgrade * @copyright 2012 NetSpot * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die; /** * Standard cron function */ function tool_assignmentupgrade_cron() { $settings = get_config('tool_assignmentupgrade'); if (empty($settings->cronenabled)) { return; } mtrace('assignmentupgrade: tool_assignmentupgrade_cron() started at '. date('H:i:s')); try { tool_assignmentupgrade_process($settings); } catch (Exception $e) { mtrace('assignmentupgrade: tool_assignmentupgrade_cron() failed with an exception:'); mtrace($e->getMessage()); } mtrace('assignmentupgrade: tool_assignmentupgrade_cron() finished at ' . date('H:i:s')); } /** * This function does the cron process within the time range according to settings. * This is not implemented yet * @param stdClass $settings - not used */ function tool_assignmentupgrade_process($settings) { global $CFG; require_once(dirname(__FILE__) . '/locallib.php'); mtrace('assignmentupgrade: processing ...'); mtrace('assignmentupgrade: Done.'); return; }