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

File resource: Option to display uploaded date

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.1
    • Fix Version/s: 3.0
    • Component/s: Resource
    • Testing Instructions:
      Hide

      Create a file resource and upload a file
      Go to the settings page for the resource and check Show upload/modified date
      View the course page and the upload date for the file will be shown
      Repeat this for all combinations of 'Show size', 'Show type' and 'Show upload/modified date'

      Show
      Create a file resource and upload a file Go to the settings page for the resource and check Show upload/modified date View the course page and the upload date for the file will be shown Repeat this for all combinations of 'Show size', 'Show type' and 'Show upload/modified date'
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE
    • Pull Master Branch:

      Description

      The file resource should have an option to display the date when the file has been uploaded and/or modified.

      Example :
      Summary.pdf (uploaded on 2013/07/23) 4.7MB PDF document

      Students have a better user experience if they can see when the file has been uploaded or modified. The block Recent activity does not show the uploaded date.

      This feature can be added to other resource like "page" or "folder".
      I understand displaying this information can be a problem (when the description of the resource is changed, the date is updated while the file is still the same) but it helps student to identify which files is "new" for them.
      (More :
      Combined with the log table, we can also display an personnalized message like "You have never downloaded this file", "You have already downloaded this file" or "The file or its description has been updated since you accessed this file".)

      I begun to code this feature just to have an idea (it is not a clean code) :

      File mod/resource/locallib.php, original line 333 :
      return $details;

      replaced by
      $res = $DB->get_record('resource', array('id'=>$resource->id), "timemodified");
      return "(uploaded on ".date("d/m/Y", $res->timemodified).") ".$details;

        Attachments

        1. course_error.png
          course_error.png
          229 kB
        2. file_resource_error.png
          file_resource_error.png
          94 kB
        3. resource_date.png
          resource_date.png
          41 kB

          Issue Links

            Activity

              People

              • Votes:
                7 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  16/Nov/15