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

add component column to files table

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.0
    • 2.0
    • Files API
    • None
    • MOODLE_20_STABLE
    • 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

          Activity

            People

              skodak Petr Skoda
              skodak Petr Skoda
              Nobody Nobody
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                24/Nov/10