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:
@@ -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
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user