mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'MDL-77440' of https://github.com/timhunt/moodle
This commit is contained in:
commit
022acf037b
2 changed files with 33 additions and 3 deletions
|
@ -101,7 +101,9 @@ $summarydata['questionname'] = [
|
||||||
|
|
||||||
// Other attempts at the quiz.
|
// Other attempts at the quiz.
|
||||||
if ($attemptobj->has_capability('mod/quiz:viewreports')) {
|
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) {
|
if ($attemptlist) {
|
||||||
$summarydata['attemptlist'] = [
|
$summarydata['attemptlist'] = [
|
||||||
'title' => get_string('attempts', 'quiz'),
|
'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
|
@javascript @_switch_window
|
||||||
Scenario: Teachers reviewing can see all the questions attempted in a slot
|
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"
|
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 "False" "radio" in the "First question" "question"
|
||||||
And I click on "Check" "button" 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 "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 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 click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
|
||||||
And I log out
|
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 "Attempts: 1"
|
||||||
And I follow "Review attempt"
|
And I follow "Review attempt"
|
||||||
And I click on "1" "link" in the "First question" "question"
|
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 "True" row "Frequency" column of "quizresponseanalysis" table should contain "0.00%"
|
||||||
And "[No response]" row "Frequency" column of "quizresponseanalysis" table should contain "100.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
|
@javascript
|
||||||
Scenario: Redoing question 1 should save any changes to question 2 on the same page
|
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"
|
Given I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue