mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'MDL-78941-39' of https://github.com/andelacruz/moodle i…
…nto MOODLE_39_STABLE
- Loading branch information
Showing
1 changed file
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
@mod @mod_quiz | ||
Feature: Flag quiz questions | ||
As a student | ||
In order to flag a quiz questions | ||
All review options for immediately after the attempt are ticked | ||
|
||
Background: | ||
Given the following "users" exist: | ||
| username | firstname | lastname | email | | ||
| student1 | Student | 1 | student1@email.com | | ||
| teacher1 | Teacher | 1 | teacher1@email.com | | ||
And the following "courses" exist: | ||
| fullname | shortname | | ||
| Course 1 | C1 | | ||
And the following "course enrolments" exist: | ||
| user | course | role | | ||
| student1 | C1 | student | | ||
| teacher1 | C1 | teacher | | ||
And the following "question categories" exist: | ||
| contextlevel | reference | name | | ||
| Course | C1 | Test questions | | ||
And the following "questions" exist: | ||
| questioncategory | qtype | name | questiontext | | ||
| Test questions | truefalse | TF1 | First question | | ||
| Test questions | truefalse | TF2 | Second question | | ||
| Test questions | truefalse | TF3 | Third question | | ||
And the following "activity" exists: | ||
| activity | quiz | | ||
| name | Quiz 1 | | ||
| course | C1 | | ||
| attemptimmediately | 1 | | ||
| correctnessimmediately | 1 | | ||
| maxmarksimmediately | 1 | | ||
| marksimmediately | 1 | | ||
| specificfeedbackimmediately | 1 | | ||
| generalfeedbackimmediately | 1 | | ||
| rightanswerimmediately | 1 | | ||
| overallfeedbackimmediately | 1 | | ||
And quiz "Quiz 1" contains the following questions: | ||
| question | page | | ||
| TF1 | 1 | | ||
| TF2 | 2 | | ||
| TF3 | 3 | | ||
|
||
@javascript | ||
Scenario: Flag a quiz during and after quiz attempt | ||
Given I am on the "Quiz 1" "quiz activity" page logged in as student1 | ||
And I press "Attempt quiz" | ||
# flag question 1 | ||
When I click on "Not flagged" "button" in the "First question" "question" | ||
# Confirm question 1 is flagged in navigation | ||
Then "Question 1 This page Flagged" "link" should exist | ||
# Confirm that link in question 1 is changed to Remove flag | ||
And I should see "Remove flag" in the "First question" "question" | ||
# Answer questions | ||
And I click on "True" "radio" in the "First question" "question" | ||
And I press "Next page" | ||
And I click on "True" "radio" in the "Second question" "question" | ||
And I press "Next page" | ||
And I click on "True" "radio" in the "Third question" "question" | ||
And I follow "Finish attempt ..." | ||
And I press "Submit all and finish" | ||
And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue" | ||
# Confirm only flagged question is flagged | ||
And I should see "Remove flag" in the "First question" "question" | ||
And I should see "Flag question" in the "Second question" "question" | ||
And I should see "Flag question" in the "Third question" "question" | ||
And I click on "Not flagged" "button" in the "Second question" "question" | ||
And I am on the "Quiz 1" "mod_quiz > Grades report" page logged in as teacher1 | ||
And "Flagged" "icon" should exist in the "Student 1" "table_row" | ||
And I am on the "Quiz 1" "mod_quiz > Responses report" page | ||
And "Flagged" "icon" should exist in the "Student 1" "table_row" |