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

We should not use statics for things that should only be output once. It needs to be tracked per-page

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.8
    • 2.7
    • HTML and CSS
    • MOODLE_27_STABLE
    • MOODLE_28_STABLE
    • Hide

      Run all the behat tests. I hope that is a sufficent regression test.

      If you want to test manually:

      1. Turn editing on in a course, and verify that you can add an activity.
      2. Verify that the Toggle acitvity chooser link only appears once.
      3. Verify that the file-picker/manager works.
      4. Inspect the HTML, and verify that the HTML for these things are not output multiple times.
      Show
      Run all the behat tests. I hope that is a sufficent regression test. If you want to test manually: Turn editing on in a course, and verify that you can add an activity. Verify that the Toggle acitvity chooser link only appears once. Verify that the file-picker/manager works. Inspect the HTML, and verify that the HTML for these things are not output multiple times.

      There are several places in our renderers where we have things that should only be output once. E.g. the contents on the mod chooser, when editin a course.

      At the moment, these are typically tracked using static variables, but that does not work becuase in some cases (e.g. unit tests) we may need to reset this within one script. It should be tracked per page.

      The place we track othre things like this is in page_requirements_manager. I am going to add an API there.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Andrew Lyons Andrew Lyons
            Damyon Wiese Damyon Wiese
            Jetha Chan Jetha Chan
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.