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

Adding additional copyright types into the license table does not populate the filepicker drop down menu

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.0.8
    • Fix Version/s: None
    • Component/s: Filepicker, Repositories
    • Labels:
      None
    • Affected Branches:
      MOODLE_30_STABLE

      Description

      When uploading a file via file picker, the license type drop down box is not populated with the licenses specified in the license table.

      Reproduce:

      1. Add an additional license type to the license table.
      2. Add this license type to the license.php lang file as well
      3. Go into a course and add a file resource.
      4. Check the license type drop down menu in this dialog for the newly added license type. It won't appear there.

      I poked around in some of the files and the source of the bug lies in repository/lib.php inside of the initialise_filepicker function. The function is only coded to utilize default licenses. The fix I used was to manually add a select all query for the license table where the enabled flag is 1. From there I manually populated the $licenses array using a foreach loop.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mellark Shawn Clake
                Participants:
                Component watchers:
                Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: