mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'MDL-76550' of https://github.com/AnupamaSarjoshi/moodle
This commit is contained in:
commit
1e594c9777
4 changed files with 30 additions and 24 deletions
|
@ -52,7 +52,7 @@
|
||||||
{{#questions}}
|
{{#questions}}
|
||||||
<li class="list-group-item text-truncate">
|
<li class="list-group-item text-truncate">
|
||||||
{{#icon}}{{#pix}} {{key}}, {{component}}, {{{alttext}}} {{/pix}}{{/icon}}
|
{{#icon}}{{#pix}} {{key}}, {{component}}, {{{alttext}}} {{/pix}}{{/icon}}
|
||||||
{{name}}
|
{{{name}}}
|
||||||
</li>
|
</li>
|
||||||
{{/questions}}
|
{{/questions}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -25,17 +25,19 @@ Feature: Adding random questions to a quiz based on category and tags
|
||||||
| contextlevel | reference | name | questioncategory |
|
| contextlevel | reference | name | questioncategory |
|
||||||
| Course | C1 | Subcategory | Questions Category 1 |
|
| Course | C1 | Subcategory | Questions Category 1 |
|
||||||
And the following "questions" exist:
|
And the following "questions" exist:
|
||||||
| questioncategory | qtype | name | user | questiontext |
|
| questioncategory | qtype | name | user | questiontext |
|
||||||
| Questions Category 1 | essay | question 1 name | admin | Question 1 text |
|
| Questions Category 1 | essay | question 1 name | admin | Question 1 text |
|
||||||
| Questions Category 1 | essay | question 2 name | teacher1 | Question 2 text |
|
| Questions Category 1 | essay | question 2 name | teacher1 | Question 2 text |
|
||||||
| Subcategory | essay | question 3 name | teacher1 | Question 3 text |
|
| Subcategory | essay | question 3 name | teacher1 | Question 3 text |
|
||||||
| Subcategory | essay | question 4 name | teacher1 | Question 4 text |
|
| Subcategory | essay | question 4 name | teacher1 | Question 4 text |
|
||||||
|
| Questions Category 1 | essay | "listen" & "answer" | teacher1 | Question 5 text |
|
||||||
And the following "core_question > Tags" exist:
|
And the following "core_question > Tags" exist:
|
||||||
| question | tag |
|
| question | tag |
|
||||||
| question 1 name | foo |
|
| question 1 name | foo |
|
||||||
| question 2 name | bar |
|
| question 2 name | bar |
|
||||||
| question 3 name | foo |
|
| question 3 name | foo |
|
||||||
| question 4 name | bar |
|
| question 4 name | bar |
|
||||||
|
| "listen" & "answer" | foo |
|
||||||
|
|
||||||
Scenario: Available tags are shown in the autocomplete tag field
|
Scenario: Available tags are shown in the autocomplete tag field
|
||||||
Given I am on the "Quiz 1" "mod_quiz > Edit" page logged in as "teacher1"
|
Given I am on the "Quiz 1" "mod_quiz > Edit" page logged in as "teacher1"
|
||||||
|
@ -80,6 +82,8 @@ Feature: Adding random questions to a quiz based on category and tags
|
||||||
And I click on "(See questions)" "link"
|
And I click on "(See questions)" "link"
|
||||||
Then I should see "Questions Category 1"
|
Then I should see "Questions Category 1"
|
||||||
And I should see "foo"
|
And I should see "foo"
|
||||||
|
And I should see "question 1 name"
|
||||||
|
And I should see "\"listen\" & \"answer\""
|
||||||
|
|
||||||
Scenario: Teacher without moodle/question:useall should not see the add a random question menu item
|
Scenario: Teacher without moodle/question:useall should not see the add a random question menu item
|
||||||
Given the following "permission overrides" exist:
|
Given the following "permission overrides" exist:
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
<b>
|
<b>
|
||||||
<a title="{{#str}}editquestions, question{{/str}}" href="{{{questionbankurl}}}">
|
<a title="{{#str}}editquestions, question{{/str}}" href="{{{questionbankurl}}}">
|
||||||
{{categoryname}}
|
{{{categoryname}}}
|
||||||
{{#idnumber}}
|
{{#idnumber}}
|
||||||
<span class="badge badge-primary">
|
<span class="badge badge-primary">
|
||||||
<span class="accesshide">
|
<span class="accesshide">
|
||||||
|
|
|
@ -15,11 +15,12 @@ Feature: A teacher can put questions in categories in the question bank
|
||||||
| user | course | role |
|
| user | course | role |
|
||||||
| teacher1 | C1 | editingteacher |
|
| teacher1 | C1 | editingteacher |
|
||||||
And the following "question categories" exist:
|
And the following "question categories" exist:
|
||||||
| contextlevel | reference | questioncategory | name |
|
| contextlevel | reference | questioncategory | name |
|
||||||
| Course | C1 | Top | top |
|
| Course | C1 | Top | top |
|
||||||
| Course | C1 | top | Default for C1 |
|
| Course | C1 | top | Default for C1 |
|
||||||
| Course | C1 | Default for C1 | Subcategory |
|
| Course | C1 | Default for C1 | Subcategory |
|
||||||
| Course | C1 | top | Used category |
|
| Course | C1 | top | Used category |
|
||||||
|
| Course | C1 | top | Default & testing |
|
||||||
And the following "questions" exist:
|
And the following "questions" exist:
|
||||||
| questioncategory | qtype | name | questiontext |
|
| questioncategory | qtype | name | questiontext |
|
||||||
| Used category | essay | Test question to be moved | Write about whatever you want |
|
| Used category | essay | Test question to be moved | Write about whatever you want |
|
||||||
|
@ -30,18 +31,18 @@ Feature: A teacher can put questions in categories in the question bank
|
||||||
When I am on the "Course 1" "core_question > course question categories" page
|
When I am on the "Course 1" "core_question > course question categories" page
|
||||||
And I follow "Add category"
|
And I follow "Add category"
|
||||||
And I set the following fields to these values:
|
And I set the following fields to these values:
|
||||||
| Name | New Category 1 |
|
| Name | 'Test' & 'display' |
|
||||||
| Parent category | Top |
|
| Parent category | Default & testing |
|
||||||
| Category info | Created as a test |
|
| Category info | Created for testing category, HTML entity & its encoding |
|
||||||
| ID number | newcatidnumber |
|
| ID number | newcatidnumber |
|
||||||
And I press "submitbutton"
|
And I press "submitbutton"
|
||||||
Then I should see "New Category 1"
|
Then I should see "Default & testing"
|
||||||
And I should see "ID number"
|
And I should see "ID number"
|
||||||
And I should see "newcatidnumber"
|
And I should see "newcatidnumber"
|
||||||
And I should see "(0)"
|
And I should see "(0)"
|
||||||
And I should see "Created as a test" in the "New Category 1" "list_item"
|
And I should see "Created for testing category, HTML entity & its encoding" in the "'Test' & 'display'" "list_item"
|
||||||
And I follow "Add category"
|
And I follow "Add category"
|
||||||
And "New Category 1 [newcatidnumber]" "option" should exist in the "Parent category" "select"
|
And "'Test' & 'display' [newcatidnumber]" "option" should exist in the "Parent category" "select"
|
||||||
|
|
||||||
Scenario: A question category can be edited
|
Scenario: A question category can be edited
|
||||||
When I am on the "Course 1" "core_question > course question categories" page
|
When I am on the "Course 1" "core_question > course question categories" page
|
||||||
|
@ -63,6 +64,7 @@ Feature: A teacher can put questions in categories in the question bank
|
||||||
When I am on the "Course 1" "core_question > course question categories" page
|
When I am on the "Course 1" "core_question > course question categories" page
|
||||||
And I click on "Delete" "link" in the "Used category" "list_item"
|
And I click on "Delete" "link" in the "Used category" "list_item"
|
||||||
And I should see "The category 'Used category' contains 1 questions"
|
And I should see "The category 'Used category' contains 1 questions"
|
||||||
|
And I select "Default for C1" from the "Category" singleselect
|
||||||
And I press "Save in category"
|
And I press "Save in category"
|
||||||
Then I should not see "Used category"
|
Then I should not see "Used category"
|
||||||
And I follow "Add category"
|
And I follow "Add category"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue