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

Statistics report - links to 'Course logs' don't properly select the date for a given range

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.10
    • Fix Version/s: None
    • Component/s: Logging, Reports
    • Labels:
    • Affected Branches:
      MOODLE_35_STABLE

      Description

      When viewing the course Statistics report you can see information broken down into months, with each month having a URL to view the 'Course logs' for that month. Each URL contains a GET variable called 'date' which is different for each link on the page, presumably intended to show the course logs for the given month chosen from the stats report.

      Instead, the course logs page does nothing with the 'date' variable and shows as blank with no values filled in, essentially making every single 'Course logs' URL identical despite the intent of showing logs only for each month.

      Replication:

      1. Install new site
      2. Create a few users and a course.
      3. Copy the attached generate_stats.php script to the root dir of your site
      4. Run the script with:

      php generate_stats.php 

      5. Wait for it to finish (it's faking stats from Jun, 2019, so might take a few mins to finish)
      6. View the stats report for a course
      7. Select a monthly period and scroll to the table below the chart.
      Actual: Notice that clicking the 'Course logs' link takes you to those logs for a specific day only, not the entire time period corresponding to that table row.
      Expected: Clicking the 'Course logs' for a row should take the user to a report containing all logs for that period, not just for the ending date.

      The 'date' param makes sense and does work when using a time period filter of 1, 2, 3 or 4 weeks - in which case each row in the table represents a single day. It only breaks when the table starts to show weeks and months rather than days.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            araydefence araydefence
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: