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

Completion report: Date format for "Excel-compatible format" CSV export updated to use excel compatible format

    XMLWordPrintable

Details

    • MOODLE_27_STABLE
    • MOODLE_403_STABLE
    • MDL-45452-course_completion_excel_dates
    • Hide
      1. In a course with some completions, click Reports > Course Completion.
      2. With some completions showing, click "Download in Excel-compatible format (.csv)".
      3. Open the file in Excel. Ignore any message about SYLK (that is unrelated to this issue).
      4. In Excel, select a date field.
      5. Click Format > Cells and see that date formats can be applied to the column.
      6. Select a date column in the Excel worksheet.
      7. Use Data > Sort to ensure Excel can now sort by the date column
      Show
      In a course with some completions, click Reports > Course Completion. With some completions showing, click "Download in Excel-compatible format (.csv)". Open the file in Excel. Ignore any message about SYLK (that is unrelated to this issue). In Excel, select a date field. Click Format > Cells and see that date formats can be applied to the column. Select a date column in the Excel worksheet. Use Data > Sort to ensure Excel can now sort by the date column

    Description

      At the bottom of the "Course completion" report are the following two links:

      Download in spreadsheet format (UTF-8 .csv)
      Download in Excel-compatible format (.csv)

      Both currently output dates in whatever human-readable format is set as the user's locale preference for the site in general. These are (generally) not Excel-compatible, so Excel sees them as arbitrary strings rather than as dates, which can be sorted, reformatted, etc.

      Specifically choosing "Excel-compatible" should instead output dates that Excel can recognize as such. ISO 8601 format, userdate('%Y-%m-%d %H:%M:%S'), fits the bill. The referenced commit does so.

      Attachments

        Issue Links

          Activity

            People

              leonstr Leon Stringer
              raymor Ray Morris
              Paul Holden Paul Holden
              Ferran Recio Ferran Recio
              Ron Carl Alfon Yu Ron Carl Alfon Yu
              Votes:
              12 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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

                  Clockify

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