Quiz navigation along the top rather than in a block location.

Quiz navigation along the top rather than in a block location.

by Graham Paull -
Number of replies: 1

Hi All,

I have a quiz set up and was wondering if it is possible to have the Quiz Navigation block along the top of the quiz rather than over to the left of the quiz.

I understand this will most likly require a lot of code changes to the theme but maybe someone could point me in the right direction, I am quite comfortable playing around with code etc.

Moodle 2.3 - Boxxie theme.

 

Many thanks,

Average of ratings: -
In reply to Graham Paull

Re: Quiz navigation along the top rather than in a block location.

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

There are various ways you might be able to do this without writing too much code.

The navigation appears on the attempt.php, summary.php and review.php pages of the quiz. The key bit of code is:

$PAGE->blocks->add_fake_block($navbc, reset($regions));

You may be able to do quite a lot just using CSS. If that is not enough, you probably need to change this so that instead to outputting the navigation as a fake block, you output it directly into the body of the page, which is done by $output->attempt_page, which is a method in mod/quiz/renderer.php.

I hope those clues are enough to get you started. For future help, you may do better posting in either the Quiz forum on the Themes forum.