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

Activity chooser: "sr" parameter set to null

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 3.9
    • None
    • Course
    • None
    • MOODLE_39_STABLE

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rex Rex Lorenzo
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: