mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'MDL-76169-master' of https://github.com/andrewnicols/moodle
This commit is contained in:
commit
add46e3112
42 changed files with 462 additions and 395 deletions
|
@ -22,15 +22,13 @@ Feature: Use the qbank plugin manager page for bulkmove
|
|||
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "Bulk move questions"
|
||||
And I click on "Disable" "link" in the "Bulk move questions" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And I click on "First question" "checkbox"
|
||||
And I click on "With selected" "button"
|
||||
Then I should not see question bulk action "move"
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "Bulk move questions" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And I click on "First question" "checkbox"
|
||||
And I click on "With selected" "button"
|
||||
And I should see question bulk action "move"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
@qbank @qbank_columnsortorder @javascript
|
||||
Feature: An plugin column can be reordered and displayed in the question bank view.
|
||||
In order to reorganise the question bank view columns
|
||||
As an admin
|
||||
I need to be able to reorder them
|
||||
In order to reorganise the question bank view columns
|
||||
As an admin
|
||||
I need to be able to reorder them
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
|
@ -16,8 +16,8 @@ Feature: An plugin column can be reordered and displayed in the question bank vi
|
|||
| course | C1 |
|
||||
| name | Test quiz Q001 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And the following "question category" exist:
|
||||
| contextlevel | reference | name |
|
||||
| Activity module | Test quiz Q001 | Question category 1 |
|
||||
|
@ -26,8 +26,7 @@ Feature: An plugin column can be reordered and displayed in the question bank vi
|
|||
| Question category 1 | essay | Test question to be seen | teacher1 | Write about whatever you want | idnumber1 |
|
||||
|
||||
Scenario: Teacher can see proper view
|
||||
Given I am on the "Test quiz Q001" "quiz activity" page logged in as "teacher1"
|
||||
When I navigate to "Question bank" in current page administration
|
||||
Given I am on the "Test quiz Q001" "mod_quiz > question bank" page logged in as "teacher1"
|
||||
And I set the field "category" to "Question category 1"
|
||||
And I should see "Test question to be seen"
|
||||
Then I should see "Teacher 1"
|
||||
|
@ -36,8 +35,7 @@ Feature: An plugin column can be reordered and displayed in the question bank vi
|
|||
Given I log in as "admin"
|
||||
When I navigate to "Plugins > Question bank plugins > Column sort order" in site administration
|
||||
And I drag "Created by (creator_name_column)" "text" and I drop it in "T (question_type_column)" "text"
|
||||
And I am on the "Test quiz Q001" "quiz activity" page logged in as "teacher1"
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz Q001" "mod_quiz > question bank" page logged in as "teacher1"
|
||||
And I set the field "category" to "Question category 1"
|
||||
Then ".creatorname" "css_element" should appear before ".qtype" "css_element"
|
||||
|
||||
|
|
|
@ -14,20 +14,18 @@ Feature: A Teacher can comment in a question
|
|||
| teacher1 | C1 | editingteacher |
|
||||
| teacher2 | C1 | editingteacher |
|
||||
And the following "activities" exist:
|
||||
| activity | name | course | idnumber |
|
||||
| quiz | Test quiz | C1 | quiz1 |
|
||||
| activity | name | course | idnumber |
|
||||
| quiz | Test quiz | C1 | quiz1 |
|
||||
And the following "question categories" exist:
|
||||
| contextlevel | reference | name |
|
||||
| Course | C1 | Test questions |
|
||||
| contextlevel | reference | name |
|
||||
| Course | C1 | Test questions |
|
||||
And the following "questions" exist:
|
||||
| questioncategory | qtype | name | questiontext |
|
||||
| Test questions | truefalse | First question | Answer the first question |
|
||||
|
||||
@javascript
|
||||
Scenario: Add a comment in question
|
||||
Given I log in as "teacher1"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
Given I am on the "Test quiz" "mod_quiz > question bank" page logged in as "teacher1"
|
||||
And I set the field "Select a category" to "Test questions"
|
||||
And I should see "0" on the comments column
|
||||
When I click "0" on the row on the comments column
|
||||
|
@ -39,9 +37,7 @@ Feature: A Teacher can comment in a question
|
|||
|
||||
@javascript
|
||||
Scenario: Delete a comment from question
|
||||
Given I log in as "teacher1"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
Given I am on the "Test quiz" "mod_quiz > question bank" page logged in as "teacher1"
|
||||
And I set the field "Select a category" to "Test questions"
|
||||
And I should see "0" on the comments column
|
||||
When I click "0" on the row on the comments column
|
||||
|
@ -58,9 +54,7 @@ Feature: A Teacher can comment in a question
|
|||
|
||||
@javascript
|
||||
Scenario: Preview question with comments
|
||||
Given I log in as "teacher1"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
Given I am on the "Test quiz" "mod_quiz > question bank" page logged in as "teacher1"
|
||||
And I set the field "Select a category" to "Test questions"
|
||||
And I choose "Preview" action for "First question" in the question bank
|
||||
And I click on "Comments" "link"
|
||||
|
@ -86,9 +80,7 @@ Feature: A Teacher can comment in a question
|
|||
| moodle/question:commentmine | Allow |
|
||||
| moodle/question:commentall | Prevent |
|
||||
And I log out
|
||||
Then I log in as "teacher1"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
Given I am on the "Test quiz" "mod_quiz > question bank" page logged in as "teacher1"
|
||||
And I set the field "Select a category" to "Test questions"
|
||||
And I choose "Preview" action for "First question" in the question bank
|
||||
Then I should not see "Save comment"
|
||||
|
@ -105,10 +97,7 @@ Feature: A Teacher can comment in a question
|
|||
And I click on "Comments" "link"
|
||||
Then I should see "Save comment"
|
||||
And I log out
|
||||
Then I log in as "teacher2"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I set the field "Select a category" to "Test questions"
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page logged in as "teacher2"
|
||||
And I choose "Preview" action for "First question" in the question bank
|
||||
Then I should not see "Save comment"
|
||||
And I click on "Close preview" "button"
|
||||
|
@ -118,9 +107,7 @@ Feature: A Teacher can comment in a question
|
|||
|
||||
@javascript
|
||||
Scenario: Comments added from the quiz page are visible
|
||||
Given I log in as "teacher1"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
When I navigate to "Questions" in current page administration
|
||||
Given I am on the "Test quiz" "mod_quiz > edit" page logged in as "teacher1"
|
||||
And I press "Add"
|
||||
And I follow "from question bank"
|
||||
And I click on "Select" "checkbox" in the "First question" "table_row"
|
||||
|
@ -132,16 +119,14 @@ Feature: A Teacher can comment in a question
|
|||
And I click on "Save comment" "link"
|
||||
And I should see "Some new comment"
|
||||
And I switch to the main window
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And I choose "Preview" action for "First question" in the question bank
|
||||
And I click on "Comments" "link"
|
||||
And I should see "Some new comment"
|
||||
And I should see "T1 Teacher1"
|
||||
And I delete "Some new comment" comment from question preview
|
||||
And I should not see "Some new comment"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Questions" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > edit" page
|
||||
And I click on "Preview question" "link"
|
||||
And I switch to "questionpreview" window
|
||||
And I press "Comments"
|
||||
|
|
|
@ -22,11 +22,9 @@ Feature: Use the qbank plugin manager page for comment
|
|||
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "Question comments"
|
||||
And I click on "Disable" "link" in the "Question comments" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
Then "#categoryquestions .header.commentcount" "css_element" should not be visible
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "Question comments" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And "#categoryquestions .header.commentcount" "css_element" should be visible
|
||||
|
|
|
@ -37,8 +37,7 @@ Feature: A teacher can edit question with custom fields
|
|||
| Correct answer | False |
|
||||
| Feedback for the response 'True'. | So you think it is true |
|
||||
| Feedback for the response 'False'. | So you think it is false |
|
||||
And I am on the "Test quiz name" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz name" "mod_quiz > question bank" page
|
||||
|
||||
Scenario: Edit a previously created question and see the custom field in the overview table and in the question preview.
|
||||
When I choose "Edit question" action for "First question" in the question bank
|
||||
|
|
|
@ -37,8 +37,7 @@ Feature: The visibility of question custom fields control where they are display
|
|||
| Correct answer | False |
|
||||
| Feedback for the response 'True'. | So you think it is true |
|
||||
| Feedback for the response 'False'. | So you think it is false |
|
||||
And I am on the "Test quiz name" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz name" "mod_quiz > question bank" page
|
||||
|
||||
@javascript
|
||||
Scenario: Display custom question fields to teachers based on their visibility.
|
||||
|
|
|
@ -22,16 +22,12 @@ Feature: Use the qbank plugin manager page for deletequestion
|
|||
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "Delete question"
|
||||
And I click on "Disable" "link" in the "Delete question" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
|
||||
Then I should not see "Delete" in the "region-main" "region"
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
Then the "Delete" action should not exist for the "First question" question in the question bank
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "Delete question" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
|
||||
And I should see "Delete" in the "region-main" "region"
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And the "Delete" action should exist for the "First question" question in the question bank
|
||||
|
||||
@javascript
|
||||
Scenario: Enable/disable delete questions bulk action from the base view
|
||||
|
@ -39,22 +35,18 @@ Feature: Use the qbank plugin manager page for deletequestion
|
|||
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "Delete question"
|
||||
And I click on "Disable" "link" in the "Delete question" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And I click on "With selected" "button"
|
||||
Then I should not see question bulk action "deleteselected"
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "Delete question" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And I click on "With selected" "button"
|
||||
And I should see question bulk action "deleteselected"
|
||||
|
||||
@javascript
|
||||
Scenario: I should not see the deleted questions in the base view
|
||||
Given I log in as "admin"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
Given I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
||||
And I click on "First question" "checkbox"
|
||||
And I click on "First question second" "checkbox"
|
||||
And I click on "With selected" "button"
|
||||
|
|
|
@ -22,18 +22,13 @@ Feature: Use the qbank plugin manager page for editquestion
|
|||
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "Edit question"
|
||||
And I click on "Disable" "link" in the "Edit question" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
Then I should not see "Status"
|
||||
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
|
||||
And I should not see "Edit question" in the "region-main" "region"
|
||||
And I should not see "Duplicate" in the "region-main" "region"
|
||||
And the "Edit question" action should not exist for the "First question" question in the question bank
|
||||
And the "Duplicate" action should not exist for the "First question" question in the question bank
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "Edit question" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
Then I should see "Status"
|
||||
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
|
||||
And I should see "Edit question" in the "region-main" "region"
|
||||
And I should see "Duplicate" in the "region-main" "region"
|
||||
And the "Edit question" action should exist for the "First question" question in the question bank
|
||||
And the "Duplicate" action should exist for the "First question" question in the question bank
|
||||
|
|
|
@ -19,9 +19,7 @@ Feature: Use the qbank base view to test the status change using
|
|||
|
||||
@javascript
|
||||
Scenario: Question status dropdown should change the status of the question
|
||||
Given I log in as "admin"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
Given I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
||||
And I set the field "Select a category" to "Test questions"
|
||||
And I should see "Test questions"
|
||||
And the field "question_status_dropdown" in the "First question" "table_row" matches value "Ready"
|
||||
|
|
|
@ -21,13 +21,9 @@ Feature: Use the qbank plugin manager page for exporttoxml
|
|||
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "Export to XML"
|
||||
And I click on "Disable" "link" in the "Export to XML" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
|
||||
Then I should not see "Export as Moodle XML"
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
Then the "Export as Moodle XML" action should not exist for the "First question" question in the question bank
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "Export to XML" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
|
||||
And I should see "Export as Moodle XML"
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And the "Export as Moodle XML" action should exist for the "First question" question in the question bank
|
||||
|
|
|
@ -22,21 +22,15 @@ Feature: Use the qbank plugin manager page for question history
|
|||
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "Question history"
|
||||
And I click on "Disable" "link" in the "Question history" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
|
||||
Then I should not see "History" in the "region-main" "region"
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
Then the "History" action should not exist for the "First question" question in the question bank
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "Question history" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
|
||||
And I should see "History" in the "region-main" "region"
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
Then the "History" action should exist for the "First question" question in the question bank
|
||||
|
||||
Scenario: History page shows only the specified features and questions
|
||||
Given I log in as "admin"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
When I navigate to "Question bank" in current page administration
|
||||
Given I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
||||
And I choose "History" action for "First question" in the question bank
|
||||
Then I should not see "Select a category"
|
||||
And I should see "No tag filters applied"
|
||||
|
@ -46,8 +40,6 @@ Feature: Use the qbank plugin manager page for question history
|
|||
And I should see "Version"
|
||||
And I should see "Created by"
|
||||
And I should see "First question"
|
||||
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
|
||||
But I should not see "History"
|
||||
And the "History" action should not exist for the "First question" question in the question bank
|
||||
And I click on "#qbank-history-close" "css_element"
|
||||
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
|
||||
And I should see "History" in the "region-main" "region"
|
||||
And the "History" action should exist for the "First question" question in the question bank
|
||||
|
|
|
@ -21,11 +21,9 @@ Feature: Use the qbank plugin manager page for version column
|
|||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "Question history"
|
||||
When I click on "Disable" "link" in the "Question history" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
Then I should not see "Version" in the "region-main" "region"
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "Question history" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And I should see "Version" in the "region-main" "region"
|
||||
|
|
|
@ -15,14 +15,11 @@ Feature: A teacher can move question categories in the question bank
|
|||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And the following "activities" exist:
|
||||
| activity | name | course | idnumber |
|
||||
| quiz | Test quiz | C1 | quiz1 |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
| activity | name | course | idnumber |
|
||||
| quiz | Test quiz | C1 | quiz1 |
|
||||
|
||||
Scenario: A question category can be moved to another context
|
||||
When I follow "Test quiz"
|
||||
And I navigate to "Question bank" in current page administration
|
||||
Given I am on the "Test quiz" "mod_quiz > question bank" page logged in as "teacher1"
|
||||
And I select "Categories" from the "Question bank tertiary navigation" singleselect
|
||||
And I follow "Add category"
|
||||
And I set the following fields to these values:
|
||||
|
@ -33,8 +30,7 @@ Feature: A teacher can move question categories in the question bank
|
|||
Then I should see "Test category" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' questioncategories ') and contains(concat(' ', normalize-space(@class), ' '), ' contextlevel50 ')]" "xpath_element"
|
||||
|
||||
Scenario: A question category can be moved to top level
|
||||
When I follow "Test quiz"
|
||||
And I navigate to "Question bank" in current page administration
|
||||
Given I am on the "Test quiz" "mod_quiz > question bank" page logged in as "teacher1"
|
||||
And I select "Categories" from the "Question bank tertiary navigation" singleselect
|
||||
And I follow "Add category"
|
||||
And I set the following fields to these values:
|
||||
|
|
|
@ -25,8 +25,7 @@ Feature: Use the qbank plugin manager page for managecategories
|
|||
Then "Categories" "link" should not exist in current page administration
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "Manage categories" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And I should see "Categories" in the "//div[contains(@class, 'urlselect')]//option[contains(text(), 'Categories')]" "xpath_element"
|
||||
|
||||
Scenario: Enable/disable the tab New category when tyring to add a random question to a quiz
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@qbank @qbank_previewquestion @javascript
|
||||
@qbank @qbank_previewquestion
|
||||
Feature: A teacher can preview questions in the question bank
|
||||
In order to ensure the questions are properly created
|
||||
As a teacher
|
||||
|
@ -23,9 +23,7 @@ Feature: A teacher can preview questions in the question bank
|
|||
And the following "questions" exist:
|
||||
| questioncategory | qtype | name |
|
||||
| Test questions | numerical | Test question to be previewed |
|
||||
And I log in as "teacher1"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page logged in as "teacher1"
|
||||
When I choose "Preview" action for "Test question to be previewed" in the question bank
|
||||
|
||||
Scenario: Question preview shows the question and other information
|
||||
|
|
|
@ -16,37 +16,28 @@ Feature: Use the qbank plugin manager page for previewquestion
|
|||
| questioncategory | qtype | name | questiontext |
|
||||
| Test questions | truefalse | First question | Answer the first question |
|
||||
|
||||
@javascript
|
||||
Scenario: Enable/disable previewquestion column from the base view
|
||||
Given I log in as "admin"
|
||||
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "Preview question"
|
||||
And I click on "Disable" "link" in the "Preview question" "table_row"
|
||||
And I am on the "C1" "Course" page
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I click on ".action-menu" "css_element" in the "First question" "table_row"
|
||||
Then I should not see "Preview" in the "region-main" "region"
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
Then the "Preview" item should not exist in the "Edit" action menu of the "First question" "table_row"
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "Preview question" "table_row"
|
||||
And I am on the "C1" "Course" page
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I click on ".action-menu" "css_element" in the "First question" "table_row"
|
||||
And I should see "Preview" in the "region-main" "region"
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And the "Preview" item should exist in the "Edit" action menu of the "First question" "table_row"
|
||||
|
||||
Scenario: Enable/disable preview button from question edit form
|
||||
Given I log in as "admin"
|
||||
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "Preview question"
|
||||
And I click on "Disable" "link" in the "Preview question" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And I choose "Edit question" action for "First question" in the question bank
|
||||
Then I should not see "Preview" in the "region-main" "region"
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "Preview question" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And I choose "Edit question" action for "First question" in the question bank
|
||||
And I should see "Preview" in the "region-main" "region"
|
||||
|
|
|
@ -21,15 +21,13 @@ Feature: Use the qbank plugin manager page for statistics
|
|||
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "Question statistics"
|
||||
And I click on "Disable" "link" in the "Question statistics" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
Then I should not see "Facility index"
|
||||
And I should not see "Discriminative efficiency"
|
||||
And I should not see "Needs checking?"
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "Question statistics" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And I should see "Facility index"
|
||||
And I should see "Discriminative efficiency"
|
||||
And I should see "Needs checking?"
|
||||
|
|
|
@ -70,11 +70,10 @@ Feature: Show statistics in question bank
|
|||
| 2 | True |
|
||||
And user "student2" has attempted "Quiz 2" with responses:
|
||||
| slot | response |
|
||||
| 1 | True |
|
||||
| 2 | True |
|
||||
When I am on the "Course 1" course page logged in as admin
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I should see "50.00%" in the "TF1" "table_row"
|
||||
| 1 | True |
|
||||
| 2 | True |
|
||||
When I am on the "Course 1" "core_question > course question bank" page logged in as "admin"
|
||||
Then I should see "50.00%" in the "TF1" "table_row"
|
||||
And I should see "75.00%" in the "TF2" "table_row"
|
||||
And I should see "75.00%" in the "TF3" "table_row"
|
||||
And I should see "50.00%" in the "TF4" "table_row"
|
||||
|
@ -82,15 +81,14 @@ Feature: Show statistics in question bank
|
|||
Scenario: View discriminative efficiency in question bank
|
||||
Given user "student1" has attempted "Quiz 2" with responses:
|
||||
| slot | response |
|
||||
| 1 | False |
|
||||
| 2 | False |
|
||||
| 1 | False |
|
||||
| 2 | False |
|
||||
And user "student2" has attempted "Quiz 2" with responses:
|
||||
| slot | response |
|
||||
| 1 | True |
|
||||
| 2 | True |
|
||||
When I am on the "Course 1" course page logged in as admin
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I should see "50.00%" in the "TF1" "table_row"
|
||||
| 1 | True |
|
||||
| 2 | True |
|
||||
When I am on the "Course 1" "core_question > course question bank" page logged in as "admin"
|
||||
Then I should see "50.00%" in the "TF1" "table_row"
|
||||
And I should see "75.00%" in the "TF2" "table_row"
|
||||
And I should see "75.00%" in the "TF3" "table_row"
|
||||
And I should see "50.00%" in the "TF4" "table_row"
|
||||
|
@ -98,15 +96,14 @@ Feature: Show statistics in question bank
|
|||
Scenario: View discrimination index in question bank, good questions
|
||||
Given user "student1" has attempted "Quiz 2" with responses:
|
||||
| slot | response |
|
||||
| 1 | False |
|
||||
| 2 | False |
|
||||
| 1 | False |
|
||||
| 2 | False |
|
||||
And user "student2" has attempted "Quiz 2" with responses:
|
||||
| slot | response |
|
||||
| 1 | True |
|
||||
| 2 | True |
|
||||
When I am on the "Course 1" course page logged in as admin
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I should see "Likely" in the "TF1" "table_row"
|
||||
| 1 | True |
|
||||
| 2 | True |
|
||||
When I am on the "Course 1" "core_question > course question bank" page logged in as "admin"
|
||||
Then I should see "Likely" in the "TF1" "table_row"
|
||||
And I should see "Unlikely" in the "TF2" "table_row"
|
||||
And I should see "Unlikely" in the "TF3" "table_row"
|
||||
And I should see "Likely" in the "TF4" "table_row"
|
||||
|
@ -116,19 +113,18 @@ Feature: Show statistics in question bank
|
|||
Scenario: View discrimination index in question bank, bad questions
|
||||
Given user "student1" has attempted "Quiz 2" with responses:
|
||||
| slot | response |
|
||||
| 1 | True |
|
||||
| 2 | True |
|
||||
| 1 | True |
|
||||
| 2 | True |
|
||||
And user "student2" has attempted "Quiz 2" with responses:
|
||||
| slot | response |
|
||||
| 1 | False |
|
||||
| 2 | True |
|
||||
| 1 | False |
|
||||
| 2 | True |
|
||||
And user "student3" has attempted "Quiz 2" with responses:
|
||||
| slot | response |
|
||||
| 1 | True |
|
||||
| 2 | False |
|
||||
When I am on the "Course 1" course page logged in as admin
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I should see "Likely" in the "TF1" "table_row"
|
||||
| 1 | True |
|
||||
| 2 | False |
|
||||
When I am on the "Course 1" "core_question > course question bank" page logged in as "admin"
|
||||
Then I should see "Likely" in the "TF1" "table_row"
|
||||
And I should see "Very likely" in the "TF2" "table_row"
|
||||
And I should see "Very likely" in the "TF3" "table_row"
|
||||
And I should see "Likely" in the "TF4" "table_row"
|
||||
|
|
|
@ -18,32 +18,26 @@ Feature: Use the qbank plugin manager page for tagquestion
|
|||
|
||||
Scenario: Enable/disable tagquestion column from the base view
|
||||
Given I log in as "admin"
|
||||
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "Tag question"
|
||||
And I click on "Disable" "link" in the "Tag question" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
|
||||
Then I should not see "Manage tags"
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And the "Manage tags" action should not exist for the "First question" question in the question bank
|
||||
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "Tag question" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I click on ".dropdown-toggle" "css_element" in the "First question" "table_row"
|
||||
And I should see "Manage tags"
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
Then the "Manage tags" action should exist for the "First question" question in the question bank
|
||||
|
||||
Scenario: Enable/disable tagquestion section from question edit form
|
||||
Given I log in as "admin"
|
||||
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "Tag question"
|
||||
And I click on "Disable" "link" in the "Tag question" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And I choose "Edit question" action for "First question" in the question bank
|
||||
Then I should not see "Tags" in the "region-main" "region"
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "Tag question" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And I choose "Edit question" action for "First question" in the question bank
|
||||
And I should see "Tags" in the "region-main" "region"
|
||||
|
|
|
@ -21,20 +21,16 @@ Feature: Use the qbank plugin manager page for question usage
|
|||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "Question usage"
|
||||
When I click on "Disable" "link" in the "Question usage" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
Then I should not see "Usage"
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "Question usage" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And I should see "Usage"
|
||||
|
||||
@javascript
|
||||
Scenario: Question usage modal should work without any usage data
|
||||
Given I log in as "admin"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
||||
And I set the field "Select a category" to "Test questions"
|
||||
And I should see "Test questions"
|
||||
And I should see "0" on the usage column
|
||||
|
|
|
@ -21,11 +21,9 @@ Feature: Use the qbank plugin manager page for viewcreator plugin
|
|||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "View creator"
|
||||
When I click on "Disable" "link" in the "View creator" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
Then I should not see "Created by"
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "View creator" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
Then I should see "Created by"
|
||||
|
|
|
@ -21,11 +21,9 @@ Feature: Use the qbank plugin manager page for viewquestionname
|
|||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "View question name"
|
||||
When I click on "Disable" "link" in the "View question name" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
Then I should not see "First question"
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "View question name" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And I should see "First question"
|
||||
|
|
|
@ -22,14 +22,12 @@ Feature: Use the qbank plugin manager page for viewquestiontext
|
|||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "View question text"
|
||||
When I click on "Disable" "link" in the "View question text" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And I should not see "Show question text in the question list"
|
||||
Then "#categoryquestions .questiontext" "css_element" should not be visible
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "View question text" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And I should see "Show question text in the question list"
|
||||
And I click on "qbshowtext" "checkbox"
|
||||
And I should see "Answer the first question"
|
||||
|
|
|
@ -22,11 +22,9 @@ Feature: Use the qbank plugin manager page for viewquestiontype
|
|||
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I should see "View question type"
|
||||
And I click on "Disable" "link" in the "View question type" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
Then "#categoryquestions .header.qtype" "css_element" should not be visible
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Enable" "link" in the "View question type" "table_row"
|
||||
And I am on the "Test quiz" "quiz activity" page
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I am on the "Test quiz" "mod_quiz > question bank" page
|
||||
And "#categoryquestions .header.qtype" "css_element" should be visible
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue