I was wondering if it's possible to remove the message you get in moodle when you start and submit a quiz.
The first message says: This quiz has a time limit and is limited to 1 attempt(s). You are about to start a new attempt. Do you wish to proceed?
The second message says: You are about to close this attempt. Once you close the attempt you will no longer be able to change your answers.
I'm using Moodle Version 1.9.1+
Any help is most appreciated
Simon
// LOCAL CUSTOMISATION starts // Remove JavaScript pop-up warning when staring an attempt $strconfirmstartattempt = ''; // LOCAL CUSTOMISATION ends
Before the line
// Determine the URL to use.
The second message comes from attempt.php, about 50 lines from the end. Again there is a variable, this time $strconfirmattempt, that you need to set back to being an empty string after it has been initialised.
Tim,
This is kind of related. how can i change the wording "Submit all and finish" to "Submit all and finish (click once)"
Tieku
Hi Tim!
I'd also like to remove these two popups, but I'm using version 2.0 and while I found the variable $strconfirmstartattempt (in accessrules.php) I can't find $strconfirmattempt. Could you point me in the right direction?
Thanks!
Nicole
Re: Remove Message when starting and submitting a quiz
Hello guys! I also want to remove that.
I tracked that message and the only file which contains that string is moodle/mod/quiz/renderer.php. I'm working on moodle 2.6.11. Does any of you know how to remove it?
$button = new single_button(
new moodle_url($attemptobj->processattempt_url(), $options),
get_string('submitallandfinish', 'quiz'));
$button->id = 'responseform';
if ($attemptobj->get_state() == quiz_attempt::IN_PROGRESS) {
$button->add_action(new confirm_action(get_string('confirmclose', 'quiz'), null,
get_string('submitallandfinish', 'quiz')));
}
Thanks in advance!
Probably the minimal change is to modify
if ($attemptobj->get_state() == quiz_attempt::IN_PROGRESS) {
to
if (false && $attemptobj->get_state() == quiz_attempt::IN_PROGRESS) {
(Bold bit inserted.)
Oh Tim, that was impressive. Thank you very much, it worked like a charm! Thanks again.
Hi,
I Too want o get rid of the pop up boxes but changes as in the renderer.php file as desribed in t he last post ' if (false && $attemptobj->get_state() == quiz_attempt::IN_PROGRESS) { ' doesn't work for me. I am using moodle 2.9.1+
where can I change it?
Thanks.
jose
The same code change should still work. The link you need to change is now here:
https://github.com/moodle/moodle/blob/v2.9.1/mod/quiz/renderer.php#L699