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

Get rid of referencelastsync and referencelifetime from the {files} table

    XMLWordPrintable

Details

    • MOODLE_24_STABLE
    • MOODLE_26_STABLE
    • wip-MDL-33416-master
    • Hide

      You must have existing shortcuts to internal and external repositories before upgrade.

      Before test hack the code in repository/lib.php and change value returned by get_reference_file_lifetime() to something small (i.e. 30 seconds). Note that filesystem repo overwrites it.

      Test for regressions/errors in the following operations:

      1. If you had shortcuts before the upgrade, make sure they still work.
      2. Add a file from repository as a copy and as a shortcut (both image and non-image files, in both filemanager and text editor)
      3. Create a file resource with shortcut to some external repository, make sure to check the option "display size"
      4. Replace the files in the repositories
      5. Make sure the image thumbnail and file size for non-image files is updated for the shortcuts (you'll have to wait for 30s or whatever you have hacked to above)
      6. Create several shortcuts to the same file in internal repository (private files, server files)
      7. Overwrite the source file of those shortcuts, make sure the shortcuts are updated immediately
      8. Delete the source of those shortcuts, make sure they are converted to the normal files.

      Please don't report UI bugs already reported in MDL-41491 and MDL-41591

      Show
      You must have existing shortcuts to internal and external repositories before upgrade. Before test hack the code in repository/lib.php and change value returned by get_reference_file_lifetime() to something small (i.e. 30 seconds). Note that filesystem repo overwrites it. Test for regressions/errors in the following operations: If you had shortcuts before the upgrade, make sure they still work. Add a file from repository as a copy and as a shortcut (both image and non-image files, in both filemanager and text editor) Create a file resource with shortcut to some external repository, make sure to check the option "display size" Replace the files in the repositories Make sure the image thumbnail and file size for non-image files is updated for the shortcuts (you'll have to wait for 30s or whatever you have hacked to above) Create several shortcuts to the same file in internal repository (private files, server files) Overwrite the source file of those shortcuts, make sure the shortcuts are updated immediately Delete the source of those shortcuts, make sure they are converted to the normal files. Please don't report UI bugs already reported in MDL-41491 and MDL-41591

    Description

      In DB, we now have files::referencelastsync and files::referencelifetime as well as files_reference::lastsync and files_reference::lifetime. Surely they should be in one table only. I believe that those is files_reference are valid as the lifetime and lastsync is common for all aliases.

      Also add field files_reference.details and API for repositories to store custom information there (i.e. result of last sync)

      Attachments

        Issue Links

          Activity

            People

              marina Marina Glancy
              mudrd8mz David Mudrák (@mudrd8mz)
              Frédéric Massart Frédéric Massart
              Sam Hemelryk Sam Hemelryk
              Dan Poltawski Dan Poltawski
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                18/Nov/13