Why do my reports default to only 10 rows?

Why do my reports default to only 10 rows?

by Dan Bell -
Number of replies: 4

Hi,

We are using Moodle 3.8 with an updated plugin for configurable reports.

Most of our SQL reports default to only 10 rows. We have the option to change only up to 100 rows from the Show entries menu. The pagination for the reports is set to 0. How can we change the default to 100 or perhaps higher? I do have a report that returns many rows - too many - and I am not sure what the difference is.

ConfigReportOnly10Rows 

რეიტინგების საშუალო: -
In reply to Dan Bell

Re: Why do my reports default to only 10 rows?

by Séverin Terrier -
Documentation writers სურათი Particularly helpful Moodlers სურათი Testers სურათი Translators სურათი
Hi Dan,

Because the configurable reports block is programmed like that, having 10 results by default.

It could really be usefull to have an option allowing the Admin to choose this default value. A suggestion to make to the programmer.

I thought modifying "aLengthMenu" (line 7971) of blocks/configurable_reports/amd/src/jquery.dataTables.js would have made the change, but it didn't seem to be reflected on my page.

Séverin
რეიტინგების საშუალო: -
In reply to Séverin Terrier

Re: Why do my reports default to only 10 rows?

by Dan Bell -
Thanks for your reply. Ill try to locate that other report that took a minute or two to appear but loaded thousands of rows by default.....
რეიტინგების საშუალო: -
In reply to Séverin Terrier

Re: Why do my reports default to only 10 rows?

by Séverin Terrier -
Documentation writers სურათი Particularly helpful Moodlers სურათი Testers სურათი Translators სურათი
Hi again Dan,

After digging, and different tries, i found that you could modify "_iDisplayLength" values in blocks/configurable_reports/amd/build/jquery.dataTables.min.js and blocks/configurable_reports/amd/build/jquery.dataTables.min.js.map

Some places with things like :
_iDisplayLength=parseInt(a,10)
_iDisplayLength,10
_iDisplayLength:10

And have to purge caches so that it is effective.

Perhaps there is a better and simpler/efficient way to do that.

HTH,
Séverin
რეიტინგების საშუალო: Useful (1)