Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-26165 quiz submit are-you-sure is potentially confusing.

  • Loading branch information...
commit 934c878eaa2bd2139cf2b5fe0cfeb21ce0d5d982 1 parent b11d374
@timhunt timhunt authored stronk7 committed
View
3  mod/quiz/accessrules.php
@@ -231,7 +231,8 @@ public function print_start_attempt_button($canpreview, $buttontext, $unfinished
if (!$unfinished) {
$strconfirmstartattempt = $this->confirm_start_attempt_message();
if ($strconfirmstartattempt) {
- $button->add_confirm_action($strconfirmstartattempt);
+ $button->add_action(new confirm_action($strconfirmstartattempt, null,
+ get_string('startattempt', 'quiz')));
}
}
View
3  mod/quiz/lang/en/quiz.php
@@ -175,7 +175,7 @@
$string['configtimelimit'] = 'Default time limit for quizzes in minutes. 0 mean no time limit.';
$string['configtimelimitsec'] = 'Default time limit for quizzes in seconds. 0 mean no time limit.';
$string['configurerandomquestion'] = 'Configure question';
-$string['confirmclose'] = 'You are about to close this attempt. Once you close the attempt you will no longer be able to change your answers.';
+$string['confirmclose'] = 'Once you submit, you will no longer be able to change your answers for this attempt.';
$string['confirmserverdelete'] = 'Are you sure you want to remove the server <b>{$a}</b> from the list?';
$string['confirmstartattemptlimit'] = 'Number of attempts allowed: {$a}. You are about to start a new attempt. Do you wish to proceed?';
$string['confirmstartattempttimelimit'] = 'This quiz has a time limit and is limited to {$a} attempt(s). You are about to start a new attempt. Do you wish to proceed?';
@@ -719,6 +719,7 @@
$string['specificapathnotonquestion'] = 'The specified file path is not on the specified question';
$string['specificquestionnotonquiz'] = 'Specified question is not on the specified quiz';
$string['startagain'] = 'Start again';
+$string['startattempt'] = 'Start attempt';
$string['startedon'] = 'Started on';
$string['startnewpreview'] = 'Start a new preview';
$string['statenotloaded'] = 'The state for question {$a} has not been loaded from the database';
View
10 mod/quiz/renderer.php
@@ -547,7 +547,6 @@ public function summary_page_controls($attemptobj) {
$output .= $this->countdown_timer();
// Finish attempt button.
- $output .= $this->container_start('submitbtns mdl-align');
$options = array(
'attempt' => $attemptobj->get_attemptid(),
'finishattempt' => 1,
@@ -560,12 +559,11 @@ public function summary_page_controls($attemptobj) {
new moodle_url($attemptobj->processattempt_url(), $options),
get_string('submitallandfinish', 'quiz'));
$button->id = 'responseform';
- $button->add_confirm_action(get_string('confirmclose', 'quiz'));
+ $button->add_action(new confirm_action(get_string('confirmclose', 'quiz'), null,
+ get_string('submitallandfinish', 'quiz')));
- $output .= $this->container_start('controls');
- $output .= $this->render($button);
- $output .= $this->container_end();
- $output .= $this->container_end();
+ $output .= $this->container($this->container($this->render($button),
+ 'controls'), 'submitbtns mdl-align');
return $output;
}
View
1  mod/quiz/summary.php
@@ -103,4 +103,3 @@
// Finish the page
$accessmanager->show_attempt_timer_if_needed($attemptobj->get_attempt(), time());
echo $OUTPUT->footer();
-
Please sign in to comment.
Something went wrong with that request. Please try again.