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

Grader report showing wrong number of students per page for suspended users

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create a new course and enrol 20 students
      2. Suspend the enrolment of 3 random students
      3. Go to "Gradebook > My preferences: Grader report"
        • Set Students per page to 5
        • Set Show only active enrolments to No
      4. Go to the Grader report.
      5. Make sure that all the students are displayed
        • Take note of the order of the students through the pages
        • Suspended users are greyed out
      6. Go back and set Show only active enrolments to Yes
      7. On the gradebook, make sure that...
        • ... suspended users are not displayed
        • ... the pagination is correct (5 per page, nobody is skipped unless suspended)
      Show
      Create a new course and enrol 20 students Suspend the enrolment of 3 random students Go to "Gradebook > My preferences: Grader report" Set Students per page to 5 Set Show only active enrolments to No Go to the Grader report. Make sure that all the students are displayed Take note of the order of the students through the pages Suspended users are greyed out Go back and set Show only active enrolments to Yes On the gradebook, make sure that... ... suspended users are not displayed ... the pagination is correct (5 per page, nobody is skipped unless suspended)
    • Affected Branches:
      MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-47953-master

      Description

      If course has suspended users and "Show only active enrollments" is set to Yes, list of students shows wrong number of students in the list and whole pagination is wrong.

      To test this have course with at least 20 students. Make sure that some students are suspended (in my case it enrollment method was disabled). In grader user settings set 5 students per page and "Show only active enrollments" to Yes. In students list not all pages will show 5 students and maybe you will not be able to see all students. Problem is in file /grade/report/grader/lib.php in function load_users. Function first gets correct number of students and then filters inactive students resulting in list that can have less students then you should suspect and can also make pagination worthless as you will not be able to see all your active students. Function should always show right number of students per page.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Mar/15