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

get_course_progress_percentage is too slow

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5.4, 3.6.2
    • Fix Version/s: 3.5.5, 3.6.3
    • Component/s: Web Services
    • Labels:

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Mar/19

                Time Tracking

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