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

Reactive JS tries to find the course add sections button on single section pages and fails

XMLWordPrintable

    • MOODLE_405_STABLE
    • MOODLE_405_STABLE
    • mdl-82784_main_wip
    • Hide
      1. Create a new Custom Sections format course.
      2. Turn editing on.
      3. Open the JavaScript console, to show error messages.
      4. Click on a section in the course index, to go to the section's page.
      5. Confirm the error message "TypeError: courseAddSections is null" is NOT given.
      Show
      Create a new Custom Sections format course. Turn editing on. Open the JavaScript console, to show error messages. Click on a section in the course index, to go to the section's page. Confirm the error message "TypeError: courseAddSections is null" is NOT given.

      In Moodle 4.5, reactive JS searches for the course add sections button, and changes it to a message if the maximum number of sections has been reached.  However it tries to do this even on single section pages, where there is no such button, and it gives an error.

      Steps to reproduce:

      1. Create a new Custom Sections format course.
      2. Turn editing on.
      3. Open the JavaScript console, to show error messages.
      4. Click on a section in the course index, to go to the section's page.
      5. An error message "TypeError: courseAddSections is null" appears in the console.

            james-cnz James E. Calder
            james-cnz James E. Calder
            Ferran Recio Ferran Recio
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 50 minutes
                50m

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