Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-36320 META: Move HTML generation from course/lib.php to renderer
  3. MDL-38596

Create function to preload course contacts for the group of courses

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.4.3
    • Fix Version/s: 2.5
    • Component/s: Enrolments, Performance
    • Labels:
    • Testing Instructions:
      Hide

      Testing the different combinations of roles+enrollment is covered in unittest.
      Also several people already did performance testing.

      Just to make sure you may:

      1. Create several courses and enrol some teachers in them
      2. Make sure that teachers names appear in the list of courses
      3. Rename the Teacher role in one of the courses, make sure that course listing shows the new name (clear the course contacts cache before it)
      4. Change the admin setting "coursecontact" and make sure that teachers no longer appear (cache is cleared on this action automatically)

      Cache life time is 1 hour. It can be purged in Plugins->Cache->Cache settings (or purge all caches)

      Show
      Testing the different combinations of roles+enrollment is covered in unittest. Also several people already did performance testing. Just to make sure you may: Create several courses and enrol some teachers in them Make sure that teachers names appear in the list of courses Rename the Teacher role in one of the courses, make sure that course listing shows the new name (clear the course contacts cache before it) Change the admin setting "coursecontact" and make sure that teachers no longer appear (cache is cleared on this action automatically) Cache life time is 1 hour. It can be purged in Plugins->Cache->Cache settings (or purge all caches)
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull Master Branch:
      wip-MDL-38596-master

      Description

      We used to have function get_courses_wmanagers() that loaded course contacts for the list of courses in one big query instead of doing one query per course.

      In MDL-36898 the function core_course_renderer::course_info_box() was changed so the course contacts include only enrolled users. But get_courses_wmanagers() was not changed.

      In MDL-38147 / MDL-37009 all course contacts are retrieved in one function in class coursecat, at the moment it uses the same code as was changed in MDL-36898 core_course_renderer::course_info_box()

      We really need some efficient function/query that loads contacts for the number of courses. They will usually be the courses in the same category but it also can be search results, enrolled courses, available courses on the frontpage that can be from different categories.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marina Marina Glancy
              Reporter:
              marina Marina Glancy
              Peer reviewer:
              Petr Skoda
              Integrator:
              Damyon Wiese
              Tester:
              Mark Nelson
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/May/13