Is there a way to remove the 3rd “Submit all and Finish” button from a quiz?

Is there a way to remove the 3rd “Submit all and Finish” button from a quiz?

by Zhivko Z -
Number of replies: 6

Hello,

Is there a way to remove the 3rd “Submit” button from a quiz? (image attached)

I have 25 mini quizzes (1 question each) because I need to have the time limit per question (not per quiz as a whole).

The quizzes are linked, and work as one. However, for every question the students answer – they have to click “Submit” 3 times – “Finish Attempt” – “Submit all and Finish” – “Submit all and finish”…

Is there any way to simplify this?

Thanks a lot.

 

Moodle 3.1.2


Attachment Submit answer.PNG
Average of ratings: -
In reply to Zhivko Z

Re: Is there a way to remove the 3rd “Submit all and Finish” button from a quiz?

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

Only by altering the code.

Specifically, in mod/quiz/renderer.php, in the summary_page_controls method, remove the bit about

$button->add_action(new confirm_action(

Perhaps the easiest way to do that is to change the if statement just before it from

if ($attemptobj->get_state() == quiz_attempt::IN_PROGRESS) {

to

if (false && $attemptobj->get_state() == quiz_attempt::IN_PROGRESS) {

https://github.com/moodle/moodle/blob/d97582fd27de3afc97eba9c0d4f2f22ccc1570f4/mod/quiz/renderer.php#L740

Average of ratings: Useful (2)
In reply to Tim Hunt

Re: Is there a way to remove the 3rd “Submit all and Finish” button from a quiz?

by Zhivko Z -

Hi Tim,

Thank you for the information. I'm not familiar with coding so I'm a little hesitant of touching it...

A couple of questions though:

1. Will the change you are suggesting definitely do it?

2. Where do I find mod/quiz/renderer.php?

Thanks a lot

In reply to Zhivko Z

Re: Is there a way to remove the 3rd “Submit all and Finish” button from a quiz?

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

If you are not confident with coding, then there is a risk trying to make this sort of change. If you get it wrong, you could break your Moodle site, and would then have to fix it (by getting an un-changed copy of the file you edited, and putting the original version back).

When you installed Moodle, you will have put all the Moodle files in a folder on our server as part of the install. That code file will be in there.

The suggested fix will work.

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Is there a way to remove the 3rd “Submit all and Finish” button from a quiz?

by Zhivko Z -

Thank you Tim!

Just to confirm - this change will eliminate the small pop-up Confirmation window (the one on the picture above)?

In reply to Zhivko Z

Re: Is there a way to remove the 3rd “Submit all and Finish” button from a quiz?

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

Yes.

In reply to Tim Hunt

Re: Is there a way to remove the 3rd “Submit all and Finish” button from a quiz?

by Mahomed Ouedraogo -

Hello !!!

This topic helped me too because I had the same problem as this user!

In the same logic I would like to know:

Is there a way to remove the 1rd “Do the test” button from a quiz?

The first time to run a test on a quiz, when you click on the link of the quiz to access it, there is still a window as indicated by my capture: "do the test" !!!

How can I remove this window?

I think it can be in "mod / quiz / renderer.php" but on which part of the code?

Version moodle: 3.2

Thanks for the help you can provide



Attachment faire_test.gif