Tag search results

Tag search results

by Ritchie Langley -
Number of replies: 1

Is there a way to change the number of tag search results per page, either in a setting somewhere or in code?

At the moment I see 5 per page with the more >> in the bottom right.  It would be good to be able to change this to something like 20 or 50 results (or let the user decide).

Thanks

Attachment 2018-12-13 11_12_43-Tag - Year 7.png
Average of ratings: -
In reply to Ritchie Langley

Re: Tag search results

by Karen Holland -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Ritchie, this was an interesting query, and yes you're correct, it's currently hard-coded to 5 in the php code.

Generally, it's really not a good idea to alter the core moodle php code, but if this is important, the place to edit it is here:

filename course/lib.php
Line 3736 (This could well be different, based on moodle version, this is from 3.5.4+ (Build: 20190301))
function course_get_tagged_courses
variable $perpage

This example snippet is my git diff showing that I've altered the original value from 5 to 4, for testing...

course tag limit code snippet


I wasn't able to find a relevant tracker ticket about making this specific page limit configurable, which would be the more ideal solution to be developed long-term.