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

Avoid extra db queries when displaying some modules on dashboard

    XMLWordPrintable

Details

    • MOODLE_33_STABLE
    • MOODLE_33_STABLE
    • wip-MDL-58665-master
    • 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)

    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

              marina Marina Glancy
              marina Marina Glancy
              Juan Leyva Juan Leyva
              Andrew Lyons Andrew Lyons
              John Okely John Okely
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                15/May/17