Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-14589 META: Develop new File API
  3. MDL-22214

How should we support course-wide or site-wide files created by modules?

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Files API
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Andreas Grabs came across this when converting Feedback to Moodle 2.0.

      He wants to let the feedback module create templates an template items that can be used across a course or site. These template items have texts that might contain media, so they need a filearea and context.

      1) If the filearea is tied to any specific feedback instance, then feedback_pluginfile() is called and can handle permissions, but then the templates will be DELETED whenever that instance is deleted.

      2) If a new course-level filearea is created for them (eg feedback_items), then pluginfile.php will not be able to serve them (and will not know how to find mod/feedback/lib.php to call feedback_pluginfile()).

      What is the best solution for these cases?

      One might be to extend pluginfile.php to handle module-created fileareas at course level or system level.

        Attachments

          Activity

            People

            • Assignee:
              skodak Petr Skoda
              Reporter:
              dougiamas Martin Dougiamas
              Tester:
              Nobody
              Participants:
              Component watchers:
              Matteo Scaramuccia, Jake Dallimore, Jun Pataleta, Ryan Wyllie
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10