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

admin_externalpage constructor should check the name is unique

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.3, 2.4.1
    • Fix Version/s: 2.5
    • Component/s: Administration
    • Labels:
    • Testing Instructions:
      Hide

      Test steps

      1. Duplicate the line $ADMIN->add() in report/security/settings.php
      2. Login as an admin
      3. Make sure you see a notice about the duplicated entry
      4. Make sure the duplicate does not appear in the navigation
      Show
      Test steps Duplicate the line $ADMIN->add() in report/security/settings.php Login as an admin Make sure you see a notice about the duplicated entry Make sure the duplicate does not appear in the navigation
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-27901-master

      Description

      Instantiating this class (say in a plugin's settings.php) requires that the name is unique. Unfortunately, it doesn't check and you can add a non-unique name anyway.

      When the actual page is displayed and admin_externalpage_setup( 'name' ) is called, oddness can then ensue (typically a Section Error).

      It would save time if a check was made.

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/May/13