mirror of
https://github.com/moodle/moodle.git
synced 2025-01-30 03:58:34 +01:00
MDL-49814 quiz: make question dependency clear in the nav
This commit is contained in:
parent
d5d23acdf5
commit
377ce9938b
@ -2145,6 +2145,11 @@ abstract class quiz_nav_panel_base {
|
||||
$button->currentpage = $this->showall || $button->page == $this->page;
|
||||
$button->flagged = $qa->is_flagged();
|
||||
$button->url = $this->get_question_url($slot);
|
||||
if ($this->attemptobj->is_blocked_by_previous_question($slot)) {
|
||||
$button->url = null;
|
||||
$button->stateclass = 'blocked';
|
||||
$button->statestring = get_string('questiondependsonprevious', 'quiz');
|
||||
}
|
||||
$buttons[] = $button;
|
||||
}
|
||||
|
||||
|
@ -125,6 +125,11 @@ body.jsenabled .questionflagcheckbox {
|
||||
.path-mod-quiz.dir-rtl .qnbutton {
|
||||
float: right;
|
||||
}
|
||||
.path-mod-quiz .qnbutton:visited:hover,
|
||||
.path-mod-quiz .qnbutton:link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.path-mod-quiz .qnbutton .trafficlight,
|
||||
.path-mod-quiz .qnbutton .thispageholder {
|
||||
display: block;
|
||||
@ -146,6 +151,7 @@ body.jsenabled .questionflagcheckbox {
|
||||
background: url([[pix:quiz|navflagged]]) no-repeat top right;
|
||||
}
|
||||
|
||||
.path-mod-quiz .qnbutton.blocked,
|
||||
.path-mod-quiz .qnbutton.notyetanswered,
|
||||
.path-mod-quiz .qnbutton.requiresgrading,
|
||||
.path-mod-quiz .qnbutton.invalidanswer {
|
||||
@ -164,18 +170,14 @@ body.jsenabled .questionflagcheckbox {
|
||||
.path-mod-quiz .qnbutton.incorrect {
|
||||
background-color: #fcc;
|
||||
}
|
||||
.path-mod-quiz .qnbutton.blocked {
|
||||
color: #999;
|
||||
}
|
||||
.path-mod-quiz .qnbutton.notanswered .trafficlight,
|
||||
.path-mod-quiz .qnbutton.incorrect .trafficlight {
|
||||
border-top: 3px solid #800;
|
||||
}
|
||||
|
||||
.path-mod-quiz .qnbutton.free:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.path-mod-quiz .qnbutton.free span {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.path-mod-quiz .othernav {
|
||||
clear: both;
|
||||
margin: 0.5em 0;
|
||||
|
@ -51,6 +51,8 @@ Feature: Attemp a quiz where some questions require that the previous question h
|
||||
And I should see "First question"
|
||||
And I should see "This question cannot be attempted until the previous question has been completed."
|
||||
And I should not see "Second question"
|
||||
And "Question 1" "link" should exist
|
||||
And "Question 2" "link" should not exist
|
||||
|
||||
@javascript
|
||||
Scenario: A question requires the previous one becomes available when the first one is answered
|
||||
@ -76,6 +78,8 @@ Feature: Attemp a quiz where some questions require that the previous question h
|
||||
Then I should see "First question"
|
||||
And I should not see "This question cannot be attempted until the previous question has been completed."
|
||||
And I should see "Second question"
|
||||
And "Question 1" "link" should exist
|
||||
And "Question 2" "link" should exist
|
||||
|
||||
@javascript
|
||||
Scenario: After quiz submitted, all questions show on the review page
|
||||
|
Loading…
x
Reference in New Issue
Block a user