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

Course completion timeenrolled is not always set correctly

    XMLWordPrintable

    Details

      Description

      The logic around setting timeenrolled in course completion has a couple of issues.

      First, the cron uses the enrolments timecreated if it's higher than timeenrolled - this was to try work around the fact enrolment plugins might have a timeenrolled value of 0. Unfortunately this means that if an enrolment is created for the past the timecreated value will be higher and therefore completion will pick up the wrong date.

      Secondly, if the course_completions record is created between the user enrolling in the course and the first cron run, completion_completion::mark_inprogress() does not set the timeenrolled value and will be set at 0.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              sry_not4sale Aaron Barnes
              Peer reviewer:
              Peter Burnett
              Integrator:
              Andrew Nicols
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              2 Vote for this issue
              Watchers:
              13 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours, 11 minutes
                  3h 11m