Moodle
  1. Moodle
  2. MDL-14589 META: Develop new File API
  3. MDL-22583

When displaying a file tree in browse mode, ignore empty folders

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Blocker 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
    • Rank:
      32798

      Description

      As discussed last Friday (http://moodle.org/mod/cvsadmin/view.php?conversationid=4890#c199940):

      When displaying a folder of files in a read-only mode

      • in server files repository plugin
      • in the new folder renderer MDL-22582

      then don't display empty directories at all. This check needs to work recursively, so that even a folder that contains an empty folder won't be displayed.

      We decided not to implement this in the File API, but just do it in the renderers and repository plugin.

        Issue Links

          Activity

          Hide
          Martin Dougiamas added a comment - - edited

          Turns out this is really expensive ... we probably need to think about calculating it when files and fileareas are created and storing it in a new table. Possibly 2.1.

          In the meantime, we can reduce the need for server files with a new "private files" repository plugin. MDL-22591

          Show
          Martin Dougiamas added a comment - - edited Turns out this is really expensive ... we probably need to think about calculating it when files and fileareas are created and storing it in a new table. Possibly 2.1. In the meantime, we can reduce the need for server files with a new "private files" repository plugin. MDL-22591
          Hide
          Martin Dougiamas added a comment -

          Is it possible to do it at all just for the current level (for the server files repository plugin)? (Without worrying about empty folders in empty folders etc)

          Show
          Martin Dougiamas added a comment - Is it possible to do it at all just for the current level (for the server files repository plugin)? (Without worrying about empty folders in empty folders etc)

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: