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

assign::grading_disabled() should be more efficient.

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.11
    • Fix Version/s: 4.0
    • Component/s: Assignment
    • Testing Instructions:
      Hide

      Before the patch

      1. Go to Site Administration > Development > Debugging and turn "Performance info" on.
      2. Go to Site Administration > Development > Make test course and create an L sized test course.
      3. Enter an assignment and hit the "View all submissions" link to view the grading page.
      4. At the bottom of the page, under "options" set Assignments per page to "all"
      5. Further down the bottom of the page where the performance debug output is displayed, notes the DB reads.

      After the patch

      1. Repeat steps 1-5 of the "Before the patch" section.
      2. Confirm DB reads are lower than the number before the patch.
      Show
      Before the patch Go to Site Administration > Development > Debugging and turn "Performance info" on. Go to Site Administration > Development > Make test course and create an L sized test course. Enter an assignment and hit the "View all submissions" link to view the grading page. At the bottom of the page, under "options" set Assignments per page to "all" Further down the bottom of the page where the performance debug output is displayed, notes the DB reads. After the patch Repeat steps 1-5 of the "Before the patch" section. Confirm DB reads are lower than the number before the patch.
    • Affected Branches:
      MOODLE_311_STABLE
    • Fixed Branches:
      MOODLE_400_STABLE
    • Pull Master Branch:

      Description

      When viewing all submissions in an assignment, the function grading_disabled is called twice for each user and seems responsible for up to 40% of the db queries on the page (after MDL-72052 and MDL-72054 are fixed) - just to return a boolean "true/false" - we should make it more efficient.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              danmarsden Dan Marsden
              Reporter:
              danmarsden Dan Marsden
              Peer reviewer:
              Sujith Haridasan Sujith Haridasan
              Integrator:
              Víctor Déniz Falcón Víctor Déniz Falcón
              Tester:
              Angelia Dela Cruz Angelia Dela Cruz
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Dec/21

                  Time Tracking

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