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

Expected parameter definition for shortname in course/view.php is incorrect

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.0.6, 3.1.2
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      Hide
      1. Check that you still can view courses by shortname course/view.php?name=
      2. Enable the multi-lang filter, making sure to enable it for both content and headings
      3. Create a course with multi-lang tags in the short name
      4. Check that you can view the course passing the whole shortname (including the multi-lang tags) as parameter course/view.php?name=
      Show
      Check that you still can view courses by shortname course/view.php?name= Enable the multi-lang filter, making sure to enable it for both content and headings Create a course with multi-lang tags in the short name Check that you can view the course passing the whole shortname (including the multi-lang tags) as parameter course/view.php?name=
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-55128-master

      Description

      This is really minor, is something I noticed when working on new course Web Services.

      $name = optional_param('name', '', PARAM_RAW); // This is for short name

      It should be PARAM_TEXT as if defined in the edit form:

      $mform->setType('shortname', PARAM_TEXT)

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Sep/16