mirror of
https://github.com/moodle/moodle.git
synced 2025-03-22 08:30:04 +01:00
Merge branch 'MDL-77440_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE
This commit is contained in:
commit
6d70b125a8
@ -101,7 +101,9 @@ $summarydata['questionname'] = array(
|
||||
|
||||
// Other attempts at the quiz.
|
||||
if ($attemptobj->has_capability('mod/quiz:viewreports')) {
|
||||
$attemptlist = $attemptobj->links_to_other_attempts($baseurl);
|
||||
$otherattemptsurl = clone($baseurl);
|
||||
$otherattemptsurl->param('slot', $attemptobj->get_original_slot($slot));
|
||||
$attemptlist = $attemptobj->links_to_other_attempts($otherattemptsurl);
|
||||
if ($attemptlist) {
|
||||
$summarydata['attemptlist'] = array(
|
||||
'title' => get_string('attempts', 'quiz'),
|
||||
|
@ -115,7 +115,7 @@ Feature: Allow students to redo questions in a practice quiz, without starting a
|
||||
@javascript @_switch_window
|
||||
Scenario: Teachers reviewing can see all the questions attempted in a slot
|
||||
Given I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
|
||||
When I press "Attempt quiz"
|
||||
And I press "Attempt quiz"
|
||||
And I click on "False" "radio" in the "First question" "question"
|
||||
And I click on "Check" "button" in the "First question" "question"
|
||||
And I press "Try another question like this one"
|
||||
@ -123,7 +123,7 @@ Feature: Allow students to redo questions in a practice quiz, without starting a
|
||||
And I press "Submit all and finish"
|
||||
And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
|
||||
And I log out
|
||||
And I am on the "Quiz 1" "mod_quiz > View" page logged in as "teacher"
|
||||
When I am on the "Quiz 1" "mod_quiz > View" page logged in as "teacher"
|
||||
And I follow "Attempts: 1"
|
||||
And I follow "Review attempt"
|
||||
And I click on "1" "link" in the "First question" "question"
|
||||
@ -140,6 +140,34 @@ Feature: Allow students to redo questions in a practice quiz, without starting a
|
||||
And "True" row "Frequency" column of "quizresponseanalysis" table should contain "0.00%"
|
||||
And "[No response]" row "Frequency" column of "quizresponseanalysis" table should contain "100.00%"
|
||||
|
||||
@javascript @_switch_window
|
||||
Scenario: Teachers reviewing can switch between attempts in the review question popup
|
||||
Given I am on the "Quiz 1" "mod_quiz > View" page logged in as student
|
||||
# Create two attempts, only one of which has a redo.
|
||||
When I press "Attempt quiz"
|
||||
And I click on "False" "radio" in the "First question" "question"
|
||||
And I click on "Check" "button" in the "First question" "question"
|
||||
And I press "Try another question like this one"
|
||||
And I press "Finish attempt ..."
|
||||
And I press "Submit all and finish"
|
||||
And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
|
||||
And I follow "Finish review"
|
||||
And I press "Re-attempt quiz"
|
||||
And I click on "True" "radio" in the "First question" "question"
|
||||
And I click on "Check" "button" in the "First question" "question"
|
||||
And I log out
|
||||
And I am on the "Quiz 1" "mod_quiz > View" page logged in as teacher
|
||||
And I follow "Attempts: 2"
|
||||
# Review the first attempt - and switch to the first question seen.
|
||||
And I follow "Review attempt"
|
||||
And I click on "1" "link" in the "First question" "question"
|
||||
And I switch to "reviewquestion" window
|
||||
And the state of "First question" question is shown as "Incorrect"
|
||||
# Now switch to the other quiz attempt using the link at the top, which does not have a redo.
|
||||
And I click on "2" "link" in the "Attempts" "table_row"
|
||||
Then the state of "First question" question is shown as "Correct"
|
||||
And I should not see "Other questions attempted here"
|
||||
|
||||
@javascript
|
||||
Scenario: Redoing question 1 should save any changes to question 2 on the same page
|
||||
Given I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
|
||||
|
Loading…
x
Reference in New Issue
Block a user