How do i add sections in a quiz, that also appear in the navigation bar. This should show during an attempt.
A quiz consists of questions, which can be displayed on pages. What do you mean by "sections"?
the quiz nav bar shows only the question numbers. I want my quiz to have parts, (Like part 1, part 2 et al), and want a direct button to access that part during test.
I can think of two methods that may work for you. I think this will do exactly what you want, just using different words.
Create a Topic called "Math Quiz". In Gradebook, create a category called math quiz.
Within that Topic, create three Quizzes - Part1, Part2, Part3. In the gradebook, add each of those three to the Match Quiz category.
What you called "a quiz with sections" Moodle calls "a topic with quizzes", but it works the way you want it to work, I believe.
The other option would be to use Lesson rather than Quiz. Lessons can have questions like Quizzes do, but are much more free-form. You can (and must) decide how Lessons behave, whereas Quiz always behaves the way the developers decided a Quiz should behave. (Neither is necessarily better. Sometimes you prefer an assembled product and other times you prefer pieces you can assemble yourself as you see fit.)
can i not recode a portion of the php file of the quiz attempt page and bring the necessary changes. If so, where exactly do i change the code?
the gradebook add category isn't there in moodle 2.5?
Parts (which just means subheadings to break up the navigation block, is something we are planning to implement at the OU in the second half of this year, so that would be in Moodle 2.6 or 2.7.
can i not recode the mod/quiz/attempt.php to achieve that?
Well, if you re-code Moodle, can can make it do anything you like, given enough work
This particular change is not huge, but it is not small either. To cahnge the display, you would probably need to change mod/quiz/renderer.php and attemptlib.php (not attemp.php). However you also need to think about how your are going to let teacher control this, that is a bit harder.
can you help me with the code?