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

    • Sub-task
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.4.3
    • 2.5
    • Enrolments, Performance
    • MOODLE_24_STABLE
    • MOODLE_25_STABLE
    • wip-MDL-38596-master
    • 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)

    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

              marina Marina Glancy
              marina Marina Glancy
              Petr Skoda Petr Skoda
              Damyon Wiese Damyon Wiese
              Mark Nelson Mark Nelson
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/May/13