Number of records displayed per page

Number of records displayed per page

by Chris Nelson -
Number of replies: 6

Hi,

First off - what a great tool the Database module is! smile

However, I'm finding it a little inflexible for my purposes at the moment. I've been searching for a way to display thirty records per page rather than the default ten, but after much Googling I haven't found out if there's a setting. Am I missing something obvious? If there isn't a feature allowing us to do so, or if not, where would be a good place to start looking in the code itself?

The reason is that I have several webpages that I want to be "rated" using three possible options. Then, in the footer of the List View, I've got a summary table of the totals and percentages of each webpage. This works fine, except it can only count the values on the same page. I realise there must be a way to get the PHP to count the next page of records, but it occurs to me that it might be a bit simpler to have an option setting how many records to display per page.

I would appreciate any advice or comments.

Many thanks,

C. 

Average of ratings: -
In reply to Chris Nelson

Re: Number of records displayed per page

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Chris - I am guessing that you are using Moodle 1.9. If so then fortunately, you've just missed something obvious. You should be able to see where to set the number of entries per page in a drop down box at the botton of the page when you are viewing the list. I suspect you were looking in the update database page or on the template page. I'm attaching a screenshot to show you what I mean. Let me know if this is what you are looking for. If not, we will both keep searching. Peace - Anthony
Attachment database_30.png
Average of ratings: Useful (1)
In reply to Anthony Borrow

Re: Number of records displayed per page

by Chris Nelson -

Hi Anthony,

Thanks for the pointer - the advanced search tab defaults to "off" on this installation, and as the database doesn't need to be searchable, and more tabs would require more explanation in the activity documentation and probably just confuse students/make it a lot more daunting, I didn't consider looking there - although it didn't pop up in my google search either (harumph).

I've found I can set the "display records" to max (1,000), save it and then remove Advanced Search, and now it displays my test records all on one page without giving students more tabs. It seems (to me anyway) a bit illogical for a general record display setting to be under an optional "Search" tab though.

Anyway, you've been a great help so thanks very much! smile

C.

In reply to Chris Nelson

Re: Number of records displayed per page

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Chris - Glad to be of help although I am a little confused. It sounds like you did not initially have the Entries per page option displaying when you looked at the list the first time. Could you describe for me and perhaps provide a screen shot to help me understand better. I've been looking at usability issues recently and now everything seems to be a usability issue. Bottom line, it should be as intuitive as possible and it sounds like there is something here that might be less than intuitive so I would appreciate your help in figuring out what is happening. Peace - Anthony
In reply to Anthony Borrow

Re: Number of records displayed per page

by Chris Nelson -

Hi Anthony,

Hmm, looks like using the Advanced Search option causes problems with the PHP code in the summary table (which I put in the "Footer" of the list view). However, it's something that can be fixed with a page refresh and otherwise seems to work for me (although obviosuly the "display search results" setting only applies to my own account).

I've asked around and a collegue has suggested that a general "default records to display per page" setting could be put into the general Database settings (affecting all database users) - they're having a look at it over the next few weeks to see how possible it would be smile

Cheers,

Chris.

In reply to Chris Nelson

Re: Number of records displayed per page

by Chris Nelson -

Hi all,

General update to this:

One of our programmers created an option to set the default number of records per page. With the option set to '1,000', it's as good as unlimited as up to 300 students are posting one record each.

This allows the PHP to count the values in the table columns, and output the results in a summary box. I used the "<-- -->" code to hide the table from view, so only the summary box can be seen.

The result is quite satisfactory - although it would be nice to know about how to make the Databases less chunky and clunky and more aesthetically pleasing. 

Many thanks,

Chris.

In reply to Chris Nelson

Re: Number of records displayed per page

by Andreas Glombitza -

Hello Chris,

even if it's an older thread - could you give details on how your programmers avhieved this? I'm having the exact same problem here, and any hint where to look for the default "perpage" value in the code would be appreciated smile

Best,

Andi