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

Activity chooser: "sr" parameter set to null

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.9
    • Course
    • None
    • MOODLE_39_STABLE

      I am using the Moodle 3.9 master (2020051500.00) and noticed that our custom format is broken when adding a course module via the new Activity chooser.

      The problem is that on current STABLE moodle versions the "sr" parameter is being set, but on master the "sr" parameter is no longer being set and just left null.

      Example:

      Moodle 3.5 URL when adding content: https://ccle.ucla.edu/course/modedit.php?add=assign&type=&course=212&section=3&return=0&sr=3

      Moodle master URL when adding content: https://qa.moodledemo.net/course/modedit.php?add=assign&type=&course=2&section=1&return=0&sr=

      Some formats use "sr", such as ours, use that parameter when overriding the get_view_url() method when we inherit format_base.

      Is the "sr" parameter being deprecated? If so, we can adjust our code to account for it, but it seems like a bug that the new activity chooser is just not setting it properly.

      The JS code that appears to be missing setting the sr parameter is: https://github.com/moodle/moodle/blob/master/course/amd/src/activitychooser.js#L144

      It is just setting "module.link += '&section=' + id;"

      With no sr parameter.

            Unassigned Unassigned
            rex Rex Lorenzo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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