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

Default role selection in enrolment plugins order reversed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a bug
    • Affects Version/s: 2.6.4, 2.7.1
    • Fix Version/s: None
    • Component/s: Enrolments
    • Labels:
    • Testing Instructions:
      Hide
      • Go to Administration -> Plugins -> Enrolments ->Manage enrol plugins and select the settings for the external database plugin
      • Compare the order of entries in the "Default roles" setting with those in /admin/roles/manage.php
      • Confirm the orders are the same
      Show
      Go to Administration -> Plugins -> Enrolments ->Manage enrol plugins and select the settings for the external database plugin Compare the order of entries in the "Default roles" setting with those in /admin/roles/manage.php Confirm the orders are the same
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull Master Branch:

      Description

      The select box which gives the default role selection shows a list of roles in the reverse order from which they are ordered in the "define roles" administration page.

      I would expect them to be in the same order defined by the administrator.

      The underlying reason seems to be that the get_default_enrol_roles() function in accesslib.php has an "ORDER BY sortorder DESC" clause in the SQL.

      To replicate:

      • Go to Administration -> Plugins -> Enrolments -> External database
      • Compare the order of entries in the "Default roles" setting with those in /admin/roles/manage.php

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: