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

Repository Filepicker doesn't list repositories in correct order

    XMLWordPrintable

Details

    • MOODLE_22_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • MDL-31000-master-3
    • 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

    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.

      Attachments

        Issue Links

          Activity

            People

              dobedobedoh Andrew Lyons
              dobedobedoh Andrew Lyons
              Dongsheng Cai Dongsheng Cai
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Rajesh Taneja Rajesh Taneja
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                12/Mar/12