Example #1
0
 /**
  * Do the job.
  * Throw exceptions on errors (the job will be retried).
  */
 public function execute()
 {
     global $CFG;
     if ($CFG->enablecompletion) {
         // Daily Completion cron.
         require_once $CFG->dirroot . '/completion/cron.php';
         completion_cron_mark_started();
     }
 }
Example #2
0
/**
 * Update user's course completion statuses
 *
 * First update all criteria completions, then aggregate all criteria completions
 * and update overall course completions.
 *
 * @deprecated since Moodle 3.0 MDL-50287 - please do not use this function any more.
 * @todo Remove this function in Moodle 3.2 MDL-51226.
 */
function completion_cron()
{
    global $CFG;
    require_once $CFG->dirroot . '/completion/cron.php';
    debugging('completion_cron() is deprecated. Functionality has been moved to scheduled tasks.', DEBUG_DEVELOPER);
    completion_cron_mark_started();
    completion_cron_criteria();
    completion_cron_completions();
}
Example #3
0
/**
 * Update user's course completion statuses
 *
 * First update all criteria completions, then
 * aggregate all criteria completions and update
 * overall course completions
 *
 * @return  void
 */
function completion_cron()
{
    completion_cron_mark_started();
    completion_cron_criteria();
    completion_cron_completions();
}