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

get_course_progress_percentage is too slow

XMLWordPrintable

    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • MDL-64889_master
    • Hide
      1. Create a course with 5 course modules, each with manual completion enabled.
      2. Enrol a user on the course
      3. Log in as the user, go to the course and tick 2 checkboxes
      4. Go to the Dashboard (/my)
      5. Find the course in the My Overview block
        • Confirm that the progress for the block shows 40%
      Show
      Create a course with 5 course modules, each with manual completion enabled. Enrol a user on the course Log in as the user, go to the course and tick 2 checkboxes Go to the Dashboard (/my) Find the course in the My Overview block Confirm that the progress for the block shows 40%

      Related to MDL-64886, another issue we have found as part of the enrol_get_users_courses webservice is that get_course_progress_percentage can take a long time (as much as 13 seconds on our larger courses, between 0.5 and 1 seconds on our typical courses).  It doesn't take many of these to hit the 30s timeout from the app's webservice calls.

      Fortunately, this appears to be an easy fix.  The call to $completion->get_data() in /completion/classes/progress.php has the wholecourse argument set to "false" even though its looping over every module on the course. Setting this to "true" appears to do the job.

            marxjohnson Mark Johnson
            marxjohnson Mark Johnson
            Sam Marshall Sam Marshall
            Andrew Lyons Andrew Lyons
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 50 minutes
                1h 50m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.