Skip to content

Commit

Permalink
MDL-72397 qbank_managecategories: UI enhancement
Browse files Browse the repository at this point in the history
This implementation will introduce a new user interface for
"qbank_managecategories" plugin which will allow user to drag and drop.
Having this plugin will give users the flexibility of reordering, adding
or editing
categories from the qbank_managecategories view.

Co-authored-by: Marc-Alexandre Ghaly <[email protected]>
Co-authored-by: Luca Bösch <[email protected]>
  • Loading branch information
3 people committed Jul 30, 2024
1 parent 4e4e426 commit 6894a0f
Show file tree
Hide file tree
Showing 66 changed files with 4,208 additions and 273 deletions.
7 changes: 7 additions & 0 deletions .upgradenotes/MDL-72397-2024060512165928.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
issueNumber: MDL-72397
notes:
qbank_managecategories:
- message: >-
question_category_list and question_category_list_item are no longer
used, and are deprecated. Category lists are now generated by templates.
type: deprecated
22 changes: 6 additions & 16 deletions mod/quiz/tests/behat/editing_add.feature
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,12 @@ Feature: Edit quiz page - adding things
in various categories and add them to the question bank.

# Create a couple of sub categories.
When I am on the "Course 1" "core_question > course question categories" page
Then I should see "Add category"
And I follow "Add category"
Then I set the field "Parent category" to "Default for C1"
And I set the field "Name" to "Subcat 1"
And I set the field "Category info" to "This is sub category 1"
And I press "id_submitbutton"
And I should see "Subcat 1"

And I follow "Add category"
Then I set the field "Parent category" to "Default for C1"
And I set the field "Name" to "Subcat 2"
And I set the field "Category info" to "This is sub category 2"
And I press "id_submitbutton"
And I should see "Subcat 2"

Given the following "question categories" exist:
| contextlevel | reference | questioncategory | name |
| Course | C1 | Default for C1 | Subcat 1 |
| Course | C1 | Default for C1 | Subcat 2 |
When I am on "Course 1" course homepage
And I navigate to "Question bank" in current page administration
And I select "Questions" from the "Question bank tertiary navigation" singleselect
And I should see "Question bank"

Expand Down
6 changes: 4 additions & 2 deletions mod/quiz/tests/behat/random_question.feature
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ Feature: Moving a question to another category should not affect random question
And I press "Add random question"
And I should see "Random question based on filter condition" on quiz page "1"
And I am on the "Course 1" "core_question > course question categories" page
And I click on "Edit this category" "link" in the "Used category" "list_item"
And I open the action menu in "Used category" "list_item"
And I choose "Edit" in the open action menu
And I set the following fields to these values:
| Name | Used category new |
| Category info | I was edited |
And I press "Save changes"
And I press "Edit category"
And I set the field "Show descriptions" to "1"
Then I should see "Used category new"
And I should see "I was edited" in the "Used category new" "list_item"
And I am on the "Quiz 1" "mod_quiz > Edit" page
Expand Down
3 changes: 3 additions & 0 deletions question/bank/managecategories/amd/build/addcategory.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions question/bank/managecategories/amd/build/category.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions question/bank/managecategories/amd/build/categorylist.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6894a0f

Please sign in to comment.