Línea 43... |
Línea 43... |
43 |
When I apply question bank filter "Tag" with value "foo"
|
43 |
When I apply question bank filter "Tag" with value "foo"
|
44 |
And I should see "question 01 name" in the "categoryquestions" "table"
|
44 |
And I should see "question 01 name" in the "categoryquestions" "table"
|
45 |
And I should not see "question 02 name" in the "categoryquestions" "table"
|
45 |
And I should not see "question 02 name" in the "categoryquestions" "table"
|
Línea 46... |
Línea 46... |
46 |
|
46 |
|
47 |
Scenario: The question modal can be paginated
|
47 |
Scenario: The question modal can be paginated
|
48 |
Given the following "questions" exist:
|
48 |
Given the following "question categories" exist:
|
49 |
| questioncategory | qtype | name | user | questiontext |
|
- |
|
50 |
| Test questions | essay | question 03 name | teacher1 | Question 03 text |
|
- |
|
51 |
| Test questions | essay | question 04 name | teacher1 | Question 04 text |
|
- |
|
52 |
| Test questions | essay | question 05 name | teacher1 | Question 05 text |
|
- |
|
53 |
| Test questions | essay | question 06 name | teacher1 | Question 06 text |
|
- |
|
54 |
| Test questions | essay | question 07 name | teacher1 | Question 07 text |
|
- |
|
55 |
| Test questions | essay | question 08 name | teacher1 | Question 08 text |
|
- |
|
56 |
| Test questions | essay | question 09 name | teacher1 | Question 09 text |
|
- |
|
57 |
| Test questions | essay | question 10 name | teacher1 | Question 10 text |
|
49 |
| contextlevel | reference | name |
|
58 |
| Test questions | essay | question 11 name | teacher1 | Question 11 text |
|
- |
|
59 |
| Test questions | essay | question 12 name | teacher1 | Question 12 text |
|
50 |
| Course | C1 | My collection |
|
60 |
| Test questions | essay | question 13 name | teacher1 | Question 13 text |
|
51 |
And 45 "questions" exist with the following data:
|
61 |
| Test questions | essay | question 14 name | teacher1 | Question 14 text |
|
52 |
| questioncategory | My collection |
|
62 |
| Test questions | essay | question 15 name | teacher1 | Question 15 text |
|
53 |
| qtype | essay |
|
63 |
| Test questions | essay | question 16 name | teacher1 | Question 16 text |
|
54 |
| name | Feature question [count] |
|
64 |
| Test questions | essay | question 17 name | teacher1 | Question 17 text |
|
55 |
| questiontext | Write about topic [count] |
|
65 |
| Test questions | essay | question 18 name | teacher1 | Question 18 text |
|
56 |
| user | teacher1 |
|
66 |
| Test questions | essay | question 19 name | teacher1 | Question 19 text |
|
- |
|
67 |
| Test questions | essay | question 20 name | teacher1 | Question 20 text |
|
- |
|
68 |
| Test questions | essay | question 21 name | teacher1 | Question 21 text |
|
57 |
# Sadly, the above step generates questions which sort like FQ1, FQ11, FQ12, ..., FQ19, FQ2, FQ20, ...
|
69 |
| Test questions | essay | question 22 name | teacher1 | Question 22 text |
|
- |
|
70 |
And I log in as "teacher1"
|
58 |
# so the expected paging behaviour is not immediately intuitive with 20 questions per page.
|
71 |
And I am on the "Quiz 1" "mod_quiz > Edit" page
|
59 |
When I am on the "Quiz 1" "mod_quiz > Edit" page logged in as teacher1
|
72 |
And I open the "last" add to quiz menu
|
60 |
And I open the "last" add to quiz menu
|
73 |
And I follow "from question bank"
|
- |
|
74 |
And I click on "2" "link" in the ".pagination" "css_element"
|
- |
|
75 |
Then I should see "question 21 name" in the "categoryquestions" "table"
|
- |
|
76 |
And I should see "question 22 name" in the "categoryquestions" "table"
|
- |
|
77 |
And I should not see "question 01 name" in the "categoryquestions" "table"
|
- |
|
78 |
And I click on "1" "link" in the ".pagination" "css_element"
|
61 |
And I follow "from question bank"
|
- |
|
62 |
And I should see "question 01 name" in the "categoryquestions" "table"
|
- |
|
63 |
And I should see "question 02 name" in the "categoryquestions" "table"
|
- |
|
64 |
And I should not see "Feature question" in the "categoryquestions" "table"
|
- |
|
65 |
And I set the field "Category" to "My collection"
|
- |
|
66 |
And I press "Apply filters"
|
- |
|
67 |
And I wait until the page is ready
|
- |
|
68 |
Then I should not see "question 01 name" in the "categoryquestions" "table"
|
- |
|
69 |
And I should see "Feature question 1" in the "categoryquestions" "table"
|
- |
|
70 |
And I should see "Feature question 27" in the "categoryquestions" "table"
|
- |
|
71 |
And I should not see "Feature question 28" in the "categoryquestions" "table"
|
- |
|
72 |
And I click on "2" "link" in the ".pagination" "css_element"
|
- |
|
73 |
And I wait until the page is ready
|
- |
|
74 |
And I should not see "Feature question 27" in the "categoryquestions" "table"
|
- |
|
75 |
And I should see "Feature question 28" in the "categoryquestions" "table"
|
- |
|
76 |
And I should see "Feature question 45" in the "categoryquestions" "table"
|
- |
|
77 |
And I should not see "Feature question 5"
|
- |
|
78 |
And I click on "3" "link" in the ".pagination" "css_element"
|
- |
|
79 |
And I wait until the page is ready
|
- |
|
80 |
And I should not see "Feature question 45" in the "categoryquestions" "table"
|
- |
|
81 |
And I should see "Feature question 5"
|
- |
|
82 |
And I should see "Feature question 9"
|
- |
|
83 |
|
- |
|
84 |
Scenario: After closing and reopening the modal, it still works
|
- |
|
85 |
Given the following "question categories" exist:
|
- |
|
86 |
| contextlevel | reference | name |
|
- |
|
87 |
| Course | C1 | My collection |
|
- |
|
88 |
And the following "question" exists:
|
- |
|
89 |
| questioncategory | My collection |
|
- |
|
90 |
| qtype | essay |
|
- |
|
91 |
| name | Feature question |
|
- |
|
92 |
| questiontext | Write about topic |
|
- |
|
93 |
| user | teacher1 |
|
- |
|
94 |
When I am on the "Quiz 1" "mod_quiz > Edit" page logged in as teacher1
|
- |
|
95 |
And I open the "last" add to quiz menu
|
- |
|
96 |
And I follow "from question bank"
|
- |
|
97 |
And I click on "Close" "button" in the "Add from the question bank at the end" "dialogue"
|
- |
|
98 |
And I open the "last" add to quiz menu
|
- |
|
99 |
And I follow "from question bank"
|
- |
|
100 |
And I set the field "Category" to "My collection"
|
- |
|
101 |
And I press "Apply filters"
|
Línea 79... |
Línea 102... |
79 |
And I should see "question 01 name" in the "categoryquestions" "table"
|
102 |
Then I should see "Feature question"
|
80 |
|
103 |
|
81 |
Scenario: Questions are added in the right place with multiple sections
|
104 |
Scenario: Questions are added in the right place with multiple sections
|
82 |
Given the following "questions" exist:
|
105 |
Given the following "questions" exist:
|