mirror of
https://github.com/moodle/moodle.git
synced 2025-04-25 10:26:17 +02:00
Merge branch 'MDL-76550' of https://github.com/AnupamaSarjoshi/moodle
This commit is contained in:
commit
1e594c9777
mod/quiz
question/bank/managecategories
@ -52,7 +52,7 @@
|
||||
{{#questions}}
|
||||
<li class="list-group-item text-truncate">
|
||||
{{#icon}}{{#pix}} {{key}}, {{component}}, {{{alttext}}} {{/pix}}{{/icon}}
|
||||
{{name}}
|
||||
{{{name}}}
|
||||
</li>
|
||||
{{/questions}}
|
||||
</ul>
|
||||
|
@ -25,17 +25,19 @@ Feature: Adding random questions to a quiz based on category and tags
|
||||
| contextlevel | reference | name | questioncategory |
|
||||
| Course | C1 | Subcategory | Questions Category 1 |
|
||||
And the following "questions" exist:
|
||||
| questioncategory | qtype | name | user | questiontext |
|
||||
| Questions Category 1 | essay | question 1 name | admin | Question 1 text |
|
||||
| Questions Category 1 | essay | question 2 name | teacher1 | Question 2 text |
|
||||
| Subcategory | essay | question 3 name | teacher1 | Question 3 text |
|
||||
| Subcategory | essay | question 4 name | teacher1 | Question 4 text |
|
||||
| questioncategory | qtype | name | user | questiontext |
|
||||
| Questions Category 1 | essay | question 1 name | admin | Question 1 text |
|
||||
| Questions Category 1 | essay | question 2 name | teacher1 | Question 2 text |
|
||||
| Subcategory | essay | question 3 name | teacher1 | Question 3 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:
|
||||
| question | tag |
|
||||
| question 1 name | foo |
|
||||
| question 2 name | bar |
|
||||
| question 3 name | foo |
|
||||
| question 4 name | bar |
|
||||
| question | tag |
|
||||
| question 1 name | foo |
|
||||
| question 2 name | bar |
|
||||
| question 3 name | foo |
|
||||
| question 4 name | bar |
|
||||
| "listen" & "answer" | foo |
|
||||
|
||||
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"
|
||||
@ -80,6 +82,8 @@ Feature: Adding random questions to a quiz based on category and tags
|
||||
And I click on "(See questions)" "link"
|
||||
Then I should see "Questions Category 1"
|
||||
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
|
||||
Given the following "permission overrides" exist:
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
<b>
|
||||
<a title="{{#str}}editquestions, question{{/str}}" href="{{{questionbankurl}}}">
|
||||
{{categoryname}}
|
||||
{{{categoryname}}}
|
||||
{{#idnumber}}
|
||||
<span class="badge badge-primary">
|
||||
<span class="accesshide">
|
||||
|
@ -15,11 +15,12 @@ Feature: A teacher can put questions in categories in the question bank
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And the following "question categories" exist:
|
||||
| contextlevel | reference | questioncategory | name |
|
||||
| Course | C1 | Top | top |
|
||||
| Course | C1 | top | Default for C1 |
|
||||
| Course | C1 | Default for C1 | Subcategory |
|
||||
| Course | C1 | top | Used category |
|
||||
| contextlevel | reference | questioncategory | name |
|
||||
| Course | C1 | Top | top |
|
||||
| Course | C1 | top | Default for C1 |
|
||||
| Course | C1 | Default for C1 | Subcategory |
|
||||
| Course | C1 | top | Used category |
|
||||
| Course | C1 | top | Default & testing |
|
||||
And the following "questions" exist:
|
||||
| questioncategory | qtype | name | questiontext |
|
||||
| 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
|
||||
And I follow "Add category"
|
||||
And I set the following fields to these values:
|
||||
| Name | New Category 1 |
|
||||
| Parent category | Top |
|
||||
| Category info | Created as a test |
|
||||
| ID number | newcatidnumber |
|
||||
| Name | 'Test' & 'display' |
|
||||
| Parent category | Default & testing |
|
||||
| Category info | Created for testing category, HTML entity & its encoding |
|
||||
| ID number | newcatidnumber |
|
||||
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 "newcatidnumber"
|
||||
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 "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
|
||||
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
|
||||
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 select "Default for C1" from the "Category" singleselect
|
||||
And I press "Save in category"
|
||||
Then I should not see "Used category"
|
||||
And I follow "Add category"
|
||||
|
Loading…
x
Reference in New Issue
Block a user