From: tjhunt
Date: Tue, 18 Jul 2006 16:49:33 +0000 (+0000)
Subject: Bug #6048 - Fix 'are you sure you want to start an attempt' warning.
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=45d5305e19d68acf1b02d6f73652fe72f9ac9e39;p=moodle.git
Bug #6048 - Fix 'are you sure you want to start an attempt' warning.
---
diff --git a/lang/en_utf8/quiz.php b/lang/en_utf8/quiz.php
index a429bc25b8..67ae0b1e5a 100644
--- a/lang/en_utf8/quiz.php
+++ b/lang/en_utf8/quiz.php
@@ -88,8 +88,8 @@ $string['completedon'] = 'Completed on';
$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['confirmserverdelete'] = 'Are you sure you want to remove the server $a from the list?';
$string['confirmstarttimelimit'] = 'The Quiz has a time limit. Are you sure that you wish to start?';
-$string['confirmstartattemptlimit'] = 'This quiz is limited to $a attempts. Accessing the quiz will be counted as an attempt. Do you wish to proceed?';
-$string['confirmstartattempttimelimit'] = 'This quiz has a time limit and is limited to $a attempts. Accessing the quiz will be counted as an attempt. Do you wish to proceed?';
+$string['confirmstartattemptlimit'] = 'This quiz is limited to $a attempt(s). 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?';
$string['containercategorycreated'] = 'This category has been created to store all the original categories moved to site level due to the causes specified below.';
$string['continueattemptquiz'] = 'Continue the last attempt';
$string['copyingfrom'] = 'Creating a copy of the question \'$a\'';
diff --git a/mod/quiz/view.php b/mod/quiz/view.php
index 6755eb918f..8e99ba1b91 100644
--- a/mod/quiz/view.php
+++ b/mod/quiz/view.php
@@ -214,15 +214,10 @@
};
if (!empty($quiz->popup)) {
$datecompleted .= "var windowoptions = 'left=0, top=0, height='+window.screen.height+
- ', width='+window.screen.width+', channelmode=yes, fullscreen=yes, scrollbars=yes, '+
- 'resizeable=no, directories=no, toolbar=no, titlebar=no, location=no, status=no, '+
- 'menubar=no';\n";
- $jslink = 'javascript:';
- $strconfirmstartattempt = confirm_string($quiz->timelimit, $quiz->attempts);
- if ($strconfirmstartattempt) {
- $jslink .= "if (confirm(\'$strconfirmstartattempt\')) ";
- }
- $jslink .= "var popup = window.open(\\'$attempturl\\', \\'quizpopup\\', windowoptions);";
+ ', width='+window.screen.width+', channelmode=yes, fullscreen=yes, scrollbars=yes, '+
+ 'resizeable=no, directories=no, toolbar=no, titlebar=no, location=no, status=no, '+
+ 'menubar=no';\n";
+ $jslink = "javascript:var popup = window.open(\\'$attempturl\\', \\'quizpopup\\', windowoptions);";
} else {
$jslink = $attempturl;
}
@@ -314,45 +309,36 @@
print_heading("$strbestgrade: $mygrade / $quiz->grade.");
}
- $strconfirmstartattempt = confirm_string($quiz->timelimit, $quiz->attempts);
-
echo " ";
echo "
";
+ echo "
";
if ($quiz->delay1 or $quiz->delay2) {
//quiz enforced time delay
$lastattempt_obj = get_record_select('quiz_attempts', "quiz = $quiz->id AND attempt = $numattempts AND userid = $USER->id", 'timefinish');
if ($lastattempt_obj) {
$lastattempt = $lastattempt_obj->timefinish;
}
- echo "