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

Preload course format renderer in /course/view.php

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4.2
    • Component/s: Course
    • Labels:
      None
    • Testing Instructions:
      Hide

      Test 1. hardcoded 'weeks' bug fix

      1. Change the default course format to 'topics'
      2. install 3rd party course format
      3. create course in the new format
      4. remove the 3rd party course format (do not click 'uninstall', just delete a folder in /course/format/)
      5. view the course as admin and as a student
      6. developer warning should appear but course should be shown in format set as default ('topics')

      Test 2. preloading renderers

      1. create course in social format (format that does not have renderer)
      2. view the course (/course/view.php) as admin and as a student, make sure there are no errors
      Show
      Test 1. hardcoded 'weeks' bug fix Change the default course format to 'topics' install 3rd party course format create course in the new format remove the 3rd party course format (do not click 'uninstall', just delete a folder in /course/format/) view the course as admin and as a student developer warning should appear but course should be shown in format set as default ('topics') Test 2. preloading renderers create course in social format (format that does not have renderer) view the course (/course/view.php) as admin and as a student, make sure there are no errors
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:
      wip-MDL-37206-master

      Description

      Course format renderers may add some JS in their renderers or other actions that may need get_renderer() to be called before output starts. Usually it is so but in /course/view.php output starts before format.php is included.

      It would be nice to preload the course format renderer in /course/view.php before output starts

      Also while fixing I found that 'weeks' format was still hardcoded in /course/view.php, fixed it.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  9 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    11/Mar/13