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



    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.5.10
    • None
    • Logging, Reports


      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.


      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.




            Unassigned Unassigned
            araydefence araydefence
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            0 Vote for this issue
            2 Start watching this issue