Page Navigation bar

Page Navigation bar

by . madea -
Number of replies: 6

Hey, Moodlers!

I have an exam that has 196 questions and, for various reasons, I broke up the questions so there are only 2 per page.  That gives me a horizontal "page navigation bar" at the top and bottom of each question page of 1 through 98!!!  Essentially, the participant has to scroll horizontally (off the page) to access pages greater than 30 (or thereabouts).  Repeatedly.  Not good navigation.

What I need is a reasonable page navigation bar at the top and bottom of the page, something similar to what we see in the quiz forum (see the attachment with three examples, pages 1 through 42).   The examples show a horizontal page navigation bar that enables you to quickly navigate relative to your current position (and without going "off the page")! 

Can someone explain how to do this in my exam (quiz)?  I am using v1.5.2.

Thanks!

madea
madea@mmsi.com

Attachment PageNavigationExamples.jpg
Average of ratings: -
In reply to . madea

Re: Page Navigation bar

by . madea -

I'm suspecting that some amount of coding is going to be involved in order to get the page navigation bar to accomplish what I would like (as shown in the examples).  Can someone confirm that?  (Or is there a switch somewhere in moodle set-up I'm missing that automatically sets up the page navigation to function as shown in the examples?)

Is v1.6 capable of "automatically" setting up the page navigation bar to function as shown in the examples?

Thanks,

madea
madea@mmsi.com
In reply to . madea

Re: Page Navigation bar

by N Hansen -
I would put a feature request in for it in the bug tracker. I would suspect there may be a function for this somewhere as Moodle does do that in other places, like on the users page.
In reply to N Hansen

Re: Page Navigation bar

by . madea -

I agree with you N Hansen that there "...may be a function for this somewhere as Moodle does do that in other places, like on the users page."  Exactly!  But where?

I'll take your advice, tho, and try to put it in the bug tracker, if I can...

Thanks!

madea
madea@mmsi.com
In reply to . madea

Re: Page Navigation bar

by N Hansen -
Found it: it's called print_paging_bar
In reply to N Hansen

Re: Page Navigation bar

by . madea -
N Hansen wrote:
> Found it: it's called print_paging_bar

Where, N Hansen?  Is it a switch I, as a user, can find and toggle or is it a line in the code?

Thanks!

madea
madea@mmsi.com
In reply to . madea

Re: Page Navigation bar

by Gustav W Delius -
The quiz paging bar is printed by the function quiz_print_navigation_panel() defined in mod/quiz/locallib.php. I agree that ideally this would use the core Moodle function print_paging_bar() in lib/weblib.php but it doesn't because the quiz needs some extra javascript in its paging bar. However you could take the code from print_paging_bar() to modify quiz_print_navigation_panel() to do what you want. If you attach your modified code here it may help others.

I just saw that you created an entry in the bug tracker for this. Thanks, that is very useful because forum posts can easily get forgotten later.