Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-32999 META: Files UI Stage 2 polishing in master
  3. MDL-33330

We might need a hash field for files_reference.reference

    XMLWordPrintable

    Details

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

      Upgrade:

      • Please test on a site which has been on master and ensure the upgrade runs correctly.

      Functionality:

      1. Go to my private files, upload an image to your private files area
      2. Go to a course, create a new file resource
      3. Choose the private files repository and choose the file from your private files area which you just uploaded
      4. Choose the option 'create an alias/shortcut to this file' when selecting
      5. Save file resource
      6. VERIFY: that image visible in your private files is also shown in the file resource you just created
      7. Edit the file resource
      8. Click on the file in the filemanager
      9. VERIFY: that there is an original listed in the file info and it is in my private files
      10. Go back to my private files (not the repository!)
      11. Click on file you uploaded in filemanager
      12. VERIFY: that there is a listing of aliases/shortcuts with the alias you just created in it.
      13. Click delete in the file options
      14. VERIFY: that you are prompted that the aliased files will be turned into true copies
      15. Go back to the file resource you created and edit it
      16. Click on the file in file manager
      17. VERFIY: that the original is no longer listed in file info
      Show
      Upgrade: Please test on a site which has been on master and ensure the upgrade runs correctly. Functionality: Go to my private files, upload an image to your private files area Go to a course, create a new file resource Choose the private files repository and choose the file from your private files area which you just uploaded Choose the option 'create an alias/shortcut to this file' when selecting Save file resource VERIFY: that image visible in your private files is also shown in the file resource you just created Edit the file resource Click on the file in the filemanager VERIFY: that there is an original listed in the file info and it is in my private files Go back to my private files (not the repository!) Click on file you uploaded in filemanager VERIFY: that there is a listing of aliases/shortcuts with the alias you just created in it. Click delete in the file options VERIFY: that you are prompted that the aliased files will be turned into true copies Go back to the file resource you created and edit it Click on the file in file manager VERFIY: that the original is no longer listed in file info
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-33330-files-reference

      Description

      As the field is a text field it is not indexable. Eloy suggests this will not perform well. It looks like it probably gets used on every display of files.

      And indeed I had to convert searches for this field to:
      $DB->sql_compare_text('r.reference').' = '.$DB->sql_compare_text('?')

      So this issue is here because for performances sake we might need to add a hash for this to allow fast selects.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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