Show alphabet filter in grader report regardless of number of student

Show alphabet filter in grader report regardless of number of student

by Nic Duke -
Number of replies: 4

This is related to tracker - https://tracker.moodle.org/browse/MDL-48610

The alphabet filter at the top of the grader report page is very useful. However, it only appears when the list of students spans across two pages; if all students are able to fit on one page (e.g. if you set assignments per page to 100 and there are only 90 students to show) then the user is unable to benefit from alphabet filter.

Is anyone able to suggest a patch for this please?

Average of ratings: Useful (1)
In reply to Nic Duke

Re: Show alphabet filter in grader report regardless of number of student

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You need to be looking in lib/tablelib.php. Search in there for 'initial' to see all the relevant code.

If you are interested, you can try to work it out for yourself. If you want a spoiler:

https://github.com/moodle/moodle/blob/8f06fffbe117b91bc0c36c78a25210c994fb0a20/lib/tablelib.php#L1444

Change

$this->initialbars($grandtotal > $pagesize);

to

$this->initialbars(true);
In reply to Tim Hunt

Re: Show alphabet filter in grader report regardless of number of student

by Nic Duke -

Tim, thank you very much for this 

In reply to Nic Duke

Re: Show alphabet filter in grader report regardless of number of student

by Nic Duke -

I have been advised to ask forums users to vote for this fix on the open tracker (https://tracker.moodle.org/browse/MDL-48610). If this suggestion becomes popular then they will integrate it. T

In reply to Nic Duke

Re: Show alphabet filter in grader report regardless of number of student

by Daniel Neis Araujo -
Picture of Core developers Picture of Plugin developers Picture of Translators

Hello,


i've voted for the issue =) as I agree that is better for consistency and also "less code is better".


Kind regards,

Daniel