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

Days taking course columns do not aggregate/sort correctly

XMLWordPrintable

    • MOODLE_403_STABLE, MOODLE_404_STABLE
    • MOODLE_403_STABLE, MOODLE_404_STABLE
    • MDL-82467-403
    • MDL-82467-404
    • Hide

      Setup

      1. Log in as admin
      2. Create two users
      3. Create a course
        • Course start date: 10 July 2024 00:00
        • Completion tracking > Enable completion tracking: Yes
      4. Make a note of the course ID (in the URL, e.g. /course/view.php?id=<COURSEID>
      5. Enrol both users as students on course
      6. Navigate to More > Course completion in course navigation
      7. Open Condition: Manual completion by others
        • Select Teacher
        • Condition requires: Any selected roles to mark when the condition is met
      8. Turn editing on
      9. Add the Course completion status block to the course
      10. Press View course report inside the block
      11. Under Approval, mark both users as complete
      12. Ensure cron runs
      13. Create another new user
      14. Enrol this user as a student in the course
      15. Navigate to Server > Tasks > Scheduled tasks in site administration
      16. Manually run the Completion mark as started task (Make sure pathtophp is configured)
      17. Run the following query in your DB:

        SELECT * FROM moodle.m_course_completions WHERE course = <COURSEID>
        

      18. Amend the timecompleted value of the first record to 1720825200 (13 July 2024 00:00)

      Test report

      1. Create new report form Course participants report source
        • Include default setup: No
      2. In the editor, add the Course > Course full name column to report

      Completed column

      1. Add the Course completion > Completed column to report
      2. Set Completed column aggregation to Average
      3. Confirm Completed column value for test course is "0.7"
      4. Set Completed column aggregation to Maximum
      5. Confirm Completed column value for test course is "Yes"
      6. Set Completed column aggregation to Minimum
      7. Confirm Completed column value for test course is "No"
      8. Delete the Completed column

      Days taking course

      Note: because of rounding to nearest day, there is a lack of precision in this column while aggregating

      1. Add the Course completion > Days taking course column to report
      2. For each of the following column aggregation types, confirm the Days taking course column gives a value (they are non-empty):
        • Average
        • Maximum
        • Minimum
        • Sum
      3. Delete the Days taking course column

      Days until completion

      Note: because of rounding to nearest day, there is a lack of precision in this column while aggregating

      1. Add the Course completion > Days until completion column to report
      2. For each of the following column aggregation types, confirm the Days until completion column gives a value (they are non-empty):
        • Average
        • Maximum
        • Minimum
        • Sum
      3. Delete the Days until completion column
      Show
      Setup Log in as admin Create two users Create a course Course start date: 10 July 2024 00:00 Completion tracking > Enable completion tracking: Yes Make a note of the course ID (in the URL, e.g. /course/view.php?id=<COURSEID> Enrol both users as students on course Navigate to More > Course completion in course navigation Open Condition: Manual completion by others Select Teacher Condition requires: Any selected roles to mark when the condition is met Turn editing on Add the Course completion status block to the course Press View course report inside the block Under Approval , mark both users as complete Ensure cron runs Create another new user Enrol this user as a student in the course Navigate to Server > Tasks > Scheduled tasks in site administration Manually run the Completion mark as started task (Make sure pathtophp is configured) Run the following query in your DB: SELECT * FROM moodle.m_course_completions WHERE course = <COURSEID> Amend the timecompleted value of the first record to 1720825200 (13 July 2024 00:00) Test report Create new report form Course participants report source Include default setup: No In the editor, add the Course > Course full name column to report Completed column Add the Course completion > Completed column to report Set Completed column aggregation to Average Confirm Completed column value for test course is "0.7" Set Completed column aggregation to Maximum Confirm Completed column value for test course is "Yes" Set Completed column aggregation to Minimum Confirm Completed column value for test course is "No" Delete the Completed column Days taking course Note: because of rounding to nearest day, there is a lack of precision in this column while aggregating Add the Course completion > Days taking course column to report For each of the following column aggregation types, confirm the Days taking course column gives a value (they are non-empty): Average Maximum Minimum Sum Delete the Days taking course column Days until completion Note: because of rounding to nearest day, there is a lack of precision in this column while aggregating Add the Course completion > Days until completion column to report For each of the following column aggregation types, confirm the Days until completion column gives a value (they are non-empty): Average Maximum Minimum Sum Delete the Days until completion column

      Found while looking at MDL-82463

      See the sorting

      • The sorting is inconsistent, because it's on this field, the output of which is hidden by the callback depending on the value of the following field

      & the disappearing aggregation

      • The aggregated values disappear on numeric aggregation, and we get no column data because of this comparison. Only the first selected field is present in this case

      The aggregation part is the same as we fixed elsewhere recently in MDL-82202. Once this one is also fixed, we should also improve the output from these "Day" columns: MDL-82466

      & the "Course completed" column

      This column is incorrectly determining which users should be considered as having completion information (e.g. whether they've completed the course). Teachers should not be considered for this, which is important for aggregation purposes where this value would be skewed downwards (using "Average" or "Percentage" by users who could never complete the course

        1. aggregate.png
          aggregate.png
          67 kB
        2. completed.png
          completed.png
          45 kB
        3. MDL-82467 -1.png
          MDL-82467 -1.png
          160 kB
        4. MDL-82467 -2.png
          MDL-82467 -2.png
          173 kB
        5. MDL-82467 -3.png
          MDL-82467 -3.png
          281 kB
        6. sort.png
          sort.png
          80 kB

            pholden Paul Holden
            pholden Paul Holden
            Carlos Castillo Carlos Castillo
            David Carrillo David Carrillo
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 19 minutes
                6h 19m

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