Skip to content

Commit

Permalink
MDL-26165 quiz submit are-you-sure is potentially confusing.
Browse files Browse the repository at this point in the history
  • Loading branch information
timhunt committed Jul 6, 2011
1 parent 8f78cd5 commit 6c7da46
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
3 changes: 2 additions & 1 deletion mod/quiz/accessrules.php
Expand Up @@ -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')));
}
}

Expand Down
3 changes: 2 additions & 1 deletion mod/quiz/lang/en/quiz.php
Expand Up @@ -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?';
Expand Down Expand Up @@ -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';
Expand Down
10 changes: 4 additions & 6 deletions mod/quiz/renderer.php
Expand Up @@ -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,
Expand All @@ -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;
}
Expand Down
1 change: 0 additions & 1 deletion mod/quiz/summary.php
Expand Up @@ -103,4 +103,3 @@
// Finish the page
$accessmanager->show_attempt_timer_if_needed($attemptobj->get_attempt(), time());
echo $OUTPUT->footer();

0 comments on commit 6c7da46

Please sign in to comment.