Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-33320

Course completion cron code sometimes needs to run twice to mark students as complete

    XMLWordPrintable

Details

    • MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_31_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE

    Description

      The course completion cron code sometimes has to run twice before students are marked as complete in a course.

      I think this is because:

      • as part of completion_cron_mark_started() and maybe completion_cron_criteria(), records get inserted into course_completions with a reaggregate value of time()
      • in completion_cron_completions(), only course completions with a reaggregate less than the the value of time() are checked

      For small sites its possible for records that should be processed in completion_cron_completion() to get missed.

      The function completion_cron_completions should check for records that have a reaggregate value less than *or equal* to the current value of time().

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nmares Nathan Mares
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Sara Arjona (@sarjona)
              Votes:
              12 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated: