Template changing

Template changing

by Himanshu Sharma -
Number of replies: 3
Hi,

I need the template of the quiz module to be edit. The 3 buttons at the bottom should be edit.
Currently the buttons are "Save Page without submitting" "submit page" "submit all and finish". All these buttons should be removed. Instead when the student clicks on the "next page" or another page number then the current page should be saved and the student should be taken to the page he clicked to go to.
Please let me know how this will be done.

Regards,

Himanshu Sharma.
Average of ratings: -
In reply to Himanshu Sharma

Re: Template changing

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It is already the case that whenever the student navigates, the current page is saved.

I think you still need to keep the Submit all and Finish button, so the student have a way to indicate that they have finished.

There are two ways to do what you want:
  1. The simplest way is to edit mode/quiz/attempt.php. Near the end you can find where the buttons are output, and delete or comment out the ones you don't want.
  2. In your theme, you may be able to hide the buttons you don't want with display: none; rules.
In reply to Tim Hunt

Re: Template changing

by Himanshu Sharma -
Also what is the way to change the default penalty level to 0 so that i dont need to edit it every time.

Regards,

Himanshu Sharma.
In reply to Himanshu Sharma

Re: Template changing

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
In question/type/edit_question_form.php, change the line that looks like

$mform->setDefault('penalty', 0.1);