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

Participants filter for last access to course doesn't work correctly

    XMLWordPrintable

Details

    Description

      There are two problems with the course participants filter when used inside a course (as opposed to the site front page):

      1. The conditional for checking the current course is wrong (as described in MDL-75536);
      2. The generated SQL for determining whether a user had never accessed a course was wrong (because the user_lastaccess record would not exist at all, so the Never option was broken as described in MDL-71088)

      Original report

      Open file - /user/classes/output/participants_filter.php, go to get_accesssince_filter() method.

      1) Condition is incorrect - "if (!$this->course->id == SITEID)".

      2) The condition for getting not active participants is incorrect:

      $params = [
                      'courseid' => $this->course->id,
                      'timeaccess' => 0,
                  ];

       

      In this case, rows with "timeaccess=0" condition do not exist. Need to change condition, for example, use join with tables {user_enrolments}, {enrol}

      We noticed a problem when we tried to select course participants due to "Inactivity for more than Never"

      Attachments

        Issue Links

          Activity

            People

              pholden Paul Holden
              fidan Synbulatov Fidan
              Andrew Lyons Andrew Lyons
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              CiBoT CiBoT
              Votes:
              1 Vote for this issue
              Watchers:
              18 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 - 1 hour, 26 minutes
                  1h 26m

                  Clockify

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