XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3
    • Component/s: Files API, Repositories
    • Labels:
    • Testing Instructions:
      Hide

      1. Add an instance of every repository possible.
      2. Add a folder in a course.
      3. Add one file from every repository to the folder.
      4. Look in the files table for that contextid, and verify that the "source" field for every file is either a URL to somewhere meaningful (ie you can see the original file) or a description of the location of the file within that repository, prefixed by the name of the repository.

      Show
      1. Add an instance of every repository possible. 2. Add a folder in a course. 3. Add one file from every repository to the folder. 4. Look in the files table for that contextid, and verify that the "source" field for every file is either a URL to somewhere meaningful (ie you can see the original file) or a description of the location of the file within that repository, prefixed by the name of the repository.
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
      dev_MDL-33513_files_source

      Description

      The files->source field is supposed to ALWAYS contain some string that indicates where the file came from. For many repositories (like URL or Wikimedia) it should have the full URL to the original file. For private repositories (like Equella) it can just have the original filename like "somefilename.jpg"

      These can be used to produce the human-readable source in the fileinfo dialogue in the file manager, both for referenced files and potentially also for files that have been copied into Moodle.

      I've been exploring this in 2.3 and finding that:

      1) It's really hard to see how this field should be set. Please explain exactly where and how.
      2) When it is set, we sometimes see a bare URL and sometimes see a serialised array.
      3) It's not set at all for many repositories (like Equella).

      I suggest that we stick to ALWAYS using a URL to the source (either the source file itself or to a page where that source file can be found).

      Someone needs to go though and fix up all the repositories to behave consistently.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dongsheng Dongsheng Cai
              Reporter:
              dougiamas Martin Dougiamas
              Peer reviewer:
              Martin Dougiamas
              Integrator:
              Dan Poltawski
              Tester:
              Martin Dougiamas
              Participants:
              Component watchers:
              Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                25/Jun/12