MDL-10452 - start quiz UI is confusing if you have quiz:preview capability. Change the 'start/continue attempt button' to say 'start/continue preview' in this case.

This commit is contained in:
tjhunt
2007-07-13 15:57:29 +00:00
parent 097eb89c65
commit 9b4327c71d
2 changed files with 10 additions and 2 deletions
+2
View File
@@ -98,6 +98,7 @@ $string['confirmstartattempttimelimit'] = 'This quiz has a time limit and is lim
$string['confirmstarttimelimit'] = 'The Quiz has a time limit. Are you sure that you wish to start?';
$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['continuepreview'] = 'Continue the last preview';
$string['copyingfrom'] = 'Creating a copy of the question \'$a\'';
$string['copyingquestion'] = 'Copying a question';
$string['correct'] = 'Correct';
@@ -360,6 +361,7 @@ $string['popupnotice'] = 'Students will see this quiz in a secure window';
$string['preview'] = 'Preview';
$string['previewquestion'] = 'Preview question';
$string['previewquiz'] = 'Preview $a';
$string['previewquiznow'] = 'Preview quiz now';
$string['previous'] = 'Previous state';
$string['publish'] = 'Publish';
$string['publishedit'] = 'You must have permission in the publishing course to add or edit questions in this category';
+8 -2
View File
@@ -317,11 +317,17 @@
echo "<div align=\"center\">";
if ($unfinished) {
$buttontext = get_string('continueattemptquiz', 'quiz');
if (has_capability('mod/quiz:preview', $context)) {
$buttontext = get_string('continuepreview', 'quiz');
} else {
$buttontext = get_string('continueattemptquiz', 'quiz');
}
} else {
// Work out the appropriate button caption.
if ($numattempts == 0) {
if (has_capability('mod/quiz:preview', $context)) {
$buttontext = get_string('previewquiznow', 'quiz');
} else if ($numattempts == 0) {
$buttontext = get_string('attemptquiznow', 'quiz');
} else {
$buttontext = get_string('reattemptquiz', 'quiz');