mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
quiz MDL-23711 was testing canattempt before canpreview, which is the wrong way round.
Meat that admins saw a Start attempt button, when they should have seen Start preview.
This commit is contained in:
parent
1be4990421
commit
150ce06891
@ -346,13 +346,15 @@
|
||||
echo $OUTPUT->heading(get_string("noquestions", "quiz"));
|
||||
} else {
|
||||
if ($unfinished) {
|
||||
if ($canattempt) {
|
||||
$buttontext = get_string('continueattemptquiz', 'quiz');
|
||||
} else if ($canpreview) {
|
||||
if ($canpreview) {
|
||||
$buttontext = get_string('continuepreview', 'quiz');
|
||||
} else if ($canattempt) {
|
||||
$buttontext = get_string('continueattemptquiz', 'quiz');
|
||||
}
|
||||
} else {
|
||||
if ($canattempt) {
|
||||
if ($canpreview) {
|
||||
$buttontext = get_string('previewquiznow', 'quiz');
|
||||
} else if ($canattempt) {
|
||||
$messages = $accessmanager->prevent_new_attempt($numattempts, $lastfinishedattempt);
|
||||
if ($messages) {
|
||||
$accessmanager->print_messages($messages);
|
||||
@ -361,8 +363,6 @@
|
||||
} else {
|
||||
$buttontext = get_string('reattemptquiz', 'quiz');
|
||||
}
|
||||
} else if ($canpreview) {
|
||||
$buttontext = get_string('previewquiznow', 'quiz');
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user