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

Avoid extra db queries when displaying some modules on dashboard

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Repeat the following test for feedback, choice, data and scorm modules:

      1. Create a module in a course, specify timeopen and timeclose in the past. For feedback add a question
      2. Enrol student in this course
      3. As a student make sure the module does not appear on the dashboard
      4. As a teacher change timeopen and timeclose to be in the future
      5. As a student make sure the module appears on the dashboard but the link to complete is not active
      6. As a teacher change timeopen to be in the past
      7. As a student make sure module appears on the dashboard with a link
      8. For feedback and choice only: Submit your answers
      9. Make sure it no longer appears on the dashboard
        (Note mod_data do not disappear if timeclose is empty or is in the future see MDL-58564. SCORM will dissappear as per it's completion criteria)
      Show
      Repeat the following test for feedback, choice, data and scorm modules: Create a module in a course, specify timeopen and timeclose in the past. For feedback add a question Enrol student in this course As a student make sure the module does not appear on the dashboard As a teacher change timeopen and timeclose to be in the future As a student make sure the module appears on the dashboard but the link to complete is not active As a teacher change timeopen to be in the past As a student make sure module appears on the dashboard with a link For feedback and choice only: Submit your answers Make sure it no longer appears on the dashboard (Note mod_data do not disappear if timeclose is empty or is in the future see MDL-58564 . SCORM will dissappear as per it's completion criteria)
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull Master Branch:
      wip-MDL-58665-master

      Description

      As noticed in MDL-58494 there are multiple DB queries for feedback module when checking calendar event visibility or when displaying it on dashboard.
      They can be avoided by caching things like timeopen and timeclose in the course modinfo

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marina Marina Glancy
              Reporter:
              marina Marina Glancy
              Peer reviewer:
              Juan Leyva
              Integrator:
              Andrew Nicols
              Tester:
              John Okely
              Participants:
              Component watchers:
              Dan Marsden, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/May/17