MDL-86609 qbank_bulkmove: Select the current category by default
This commit is contained in:
@@ -82,7 +82,11 @@ class bulk_move implements \renderable, \templatable {
|
||||
)[0];
|
||||
}
|
||||
|
||||
$categoryselector = new question_category_selector([$currentbankcm->context], autocomplete: true);
|
||||
$categoryselector = new question_category_selector(
|
||||
[$currentbankcm->context],
|
||||
selected: "{$this->currentcategoryid},{$currentbankcm->context->id}",
|
||||
autocomplete: true,
|
||||
);
|
||||
|
||||
$savebutton = new single_button(
|
||||
new moodle_url('#'),
|
||||
|
||||
@@ -209,7 +209,7 @@ Feature: Use the qbank plugin manager page for bulkmove
|
||||
And I click on "With selected" "button"
|
||||
And I click on "move" "button"
|
||||
And the field "searchbanks" matches value "C1 - Test quiz"
|
||||
And the field "selectcategory" matches value "Default for Test quiz"
|
||||
And the field "selectcategory" matches value "Test questions 1 (2)"
|
||||
And I open the autocomplete suggestions list in the ".search-banks" "css_element"
|
||||
And I should see "C1 - Question bank 1" in the ".search-banks .form-autocomplete-suggestions" "css_element"
|
||||
And I should see "C2 - Question bank 2" in the ".search-banks .form-autocomplete-suggestions" "css_element"
|
||||
@@ -227,7 +227,7 @@ Feature: Use the qbank plugin manager page for bulkmove
|
||||
And I click on "With selected" "button"
|
||||
And I click on "move" "button"
|
||||
And the field "searchbanks" matches value "C1 - Question bank 1"
|
||||
And the field "selectcategory" matches value "Default for Question bank 1 (1)"
|
||||
And the field "selectcategory" matches value "Test questions 2 (2)"
|
||||
# The moved question should be highlighted
|
||||
And the "class" attribute of "Seventh question" "table_row" should contain "highlight"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user