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

course_add_cm_to_section should not test for sections unless necessary

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.4.6, 2.5.2
    • 2.6
    • Course
    • MOODLE_26_STABLE
    • MOODLE_24_STABLE, MOODLE_25_STABLE
    • MDL-41045-master
    • Hide
      1. Create course
      2. Add activity
      3. Move activity to another section
      4. Refresh page, make sure everything is ok
      5. Disable AJAX (or Javascript) and move activity to another section again
      6. Make sure everything looks ok
      Show
      Create course Add activity Move activity to another section Refresh page, make sure everything is ok Disable AJAX (or Javascript) and move activity to another section again Make sure everything looks ok

      The course_add_cm_to_section has a comment about not using modinfo because it might not be valid. (It clears modinfo, but does not use it directly.) However, it calls course_create_sections_if_missing which does use modinfo.

      This causes performance problems if you try to add a cm to a section repeatedly, which I am doing at present; each time it will create modinfo, then clear it. Additionally, presumably there was some reason for not using modinfo in the first place.

      I propose that we change course_create_sections_if_missing so that it optionally doesn't use modinfo.

            quen Sam Marshall
            quen Sam Marshall
            Marina Glancy Marina Glancy
            Sam Hemelryk Sam Hemelryk
            Michael de Raadt Michael de Raadt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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