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

In Database activity, export dates as formatted dates

XMLWordPrintable

    • MOODLE_22_STABLE, MOODLE_28_STABLE, MOODLE_310_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
    • master-MDL-32637
    • Hide

      Testing via GUI

      1. Create a data activity and add a date field.
      2. Add at least one entry.
      3. Access "Export" tab.
      4. Confirm, the "Date fields in human-readable format" checkbox is displayed and unticked by default.
      5. Confirm, the "With this option enabled the export file could not be re-imported later" warning is displayed under the "Date fields in human-readable format" checkbox.
      6. Export the records with having 'Date fields in human-readable format' unchecked.
      7. Confirm, that the date value is a UNIX timestamp.
      8. Export the records with having 'Date fields in human-readable format' checked.
      9. Confirm, that the date value is formatted according to your current language.

      Automated testing

      1. Confirm, that unit tests pass.
      2. Confirm, that behat tests pass.
      Show
      Testing via GUI Create a data activity and add a date field. Add at least one entry. Access "Export" tab. Confirm , the "Date fields in human-readable format" checkbox is displayed and unticked by default. Confirm , the "With this option enabled the export file could not be re-imported later" warning is displayed under the "Date fields in human-readable format" checkbox. Export the records with having 'Date fields in human-readable format' unchecked. Confirm , that the date value is a UNIX timestamp. Export the records with having 'Date fields in human-readable format' checked. Confirm , that the date value is formatted according to your current language. Automated testing Confirm , that unit tests pass. Confirm , that behat tests pass.

      This test requires a database activity in which several students have added entries.

      1. Login as a teacher and try exporting database activity entries as a CSV file.
      2. Open the CSV file in Excel or OpenOffice and check that all entries are listed.
      3. Select only one field for export then try exporting entries in ODS format.
      4. Open the file and check that all entries with just the field selected are listed.

      The dates are not in the format YYYY/MM/DD. Instead, it shows Unix timestamps, for example: 1335758400.

        1. addentry.png
          addentry.png
          13 kB
        2. Date format is incorrect when exporting in CSV.jpg
          Date format is incorrect when exporting in CSV.jpg
          284 kB
        3. export.png
          export.png
          39 kB
        4. exportfile.png
          exportfile.png
          9 kB

            Votes:
            36 Vote for this issue
            Watchers:
            34 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.