Skip to content

Commit

Permalink
MDL-57137 quiz: Create question category with specified parent category
Browse files Browse the repository at this point in the history
Fix question category generator bug. Now it is possible to specify parent category of subcategory, supply only name of parent category
  • Loading branch information
melihovv committed Nov 25, 2016
1 parent 0fbe41f commit 834cc0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tests/behat/behat_data_generators.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class behat_data_generators extends behat_base {
'question categories' => array(
'datagenerator' => 'question_category',
'required' => array('name', 'contextlevel', 'reference'),
'switchids' => array('questioncategory' => 'category')
'switchids' => array('questioncategory' => 'parent')
),
'questions' => array(
'datagenerator' => 'question',
Expand Down
1 change: 1 addition & 0 deletions question/tests/behat/question_categories.feature
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Feature: A teacher can put questions in categories in the question bank
Scenario: A question category can be edited
When I navigate to "Categories" node in "Course administration > Question bank"
And I click on "Edit" "link" in the "Subcategory" "list_item"
And the field "parent" matches value "   Default for C1"
And I set the following fields to these values:
| Name | New name |
| Category info | I was edited |
Expand Down

0 comments on commit 834cc0e

Please sign in to comment.