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

add component column to files table

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Blocker
    • 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

      At present the file areas names have arbitrary form, this is leading to multiple problems:
      1/ blocks that start with the same words separamted by '_' can not be identified - this could lead to data loss when uninstalling blocks
      2/ modules can not store stuff outside of module context
      3/ files supported only in blocks and modules, other plugins have no way to implement access control in pluginfile.php
      4/ backup areas rely on complex naming schemes

      This new column allows us to exactly identify the owner of each file area in any context. Hopefully this will help devs to use file api correctly.

      Steps:

      • add column component to files table
      • redefine pathnamehash - we should use really full path "/contexid/component/filearea/itemid/path/path/filename.ext" (much easier to remember, yay!)
      • reshuffle file_storage and file_browser - the problem is nobody understands the current lib/file/*, we have to place these in separate dirs (why did I not do this earlier?)
      • tweak file backup annotate files code
      • global search & replace to use new frankenstyle component everywhere
      • make repository support draft area only again (it is much, much easier to get the security right!)
      • move filemanager renderer stuff back to where it belongs (core renderer is not a place for that, sorry)
      • move mod/folder stuff back to own renderer
      • new files/renderer.php
      • etc.

        Attachments

          Issue Links

          There are no Sub-Tasks for this issue.

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              skodak Petr Skoda
              Tester:
              Nobody
              Participants:
              Component watchers:
              Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

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