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

Repository Filepicker doesn't list repositories in correct order

    Details

    • Testing Instructions:
      Hide

      On a fresh installation

      • navigate to Settings -> Site administration -> Plugins -> Repositories -> Manage repositories;
      • change the order of the repositories and make a note of the new order (I moved 'Upload a file' to the top);
      • open a course;
      • Turn editing on;
      • From "Add a resource", choose "File";
      • Select "Add..."

      Expected Results

      The repositories are listed in the updated order

      Actual Results

      The order of repositories listed in the picker has not changed

      Show
      On a fresh installation navigate to Settings -> Site administration -> Plugins -> Repositories -> Manage repositories; change the order of the repositories and make a note of the new order (I moved 'Upload a file' to the top); open a course; Turn editing on; From "Add a resource", choose "File"; Select "Add..." Expected Results The repositories are listed in the updated order Actual Results The order of repositories listed in the picker has not changed
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-31000-master-3

      Description

      The filepicker currently ignores the sortorder of repository plugins

      When get_instances() retrieves the list of plugins it performs an ORDER BY sortorder on the search.
      However, when the repository metadata is retrieved (repository/lib.php->initialise_filepicker()), the array is indexed by the repository ID. As a result, the JS in the filepicker orders results by ID rather than the order of the array.

        Gliffy Diagrams

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Mar/12