Merge branch 'MDL-76996' of https://github.com/timhunt/moodle
This commit is contained in:
@@ -79,3 +79,14 @@ Feature: An plugin column can be reordered and displayed in the question bank vi
|
||||
And I click on "Column sort order" "link"
|
||||
Then I should not see "Currently disabled question bank plugins:"
|
||||
And I should see "checkboxcustomcolumn"
|
||||
|
||||
Scenario: Reordering with disabled columns
|
||||
When I log in as "admin"
|
||||
And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
||||
And I click on "Disable" "link" in the "Question statistics" "table_row"
|
||||
And I click on "Enable" "link" in the "Question statistics" "table_row"
|
||||
And I click on "Disable" "link" in the "Question statistics" "table_row"
|
||||
And I am on the "Course 1" "core_question > course question bank" page
|
||||
Then I should see "Question bank"
|
||||
And "Create a new question" "button" should exist
|
||||
# Really, we are just checking the question bank displayed without errors.
|
||||
|
||||
@@ -300,7 +300,7 @@ class view {
|
||||
}
|
||||
foreach ($plugincolumnobjects as $columnobject) {
|
||||
$columnname = $columnobject->get_column_name();
|
||||
foreach ($corequestionbankcolumns as $key => $corequestionbankcolumn) {
|
||||
foreach ($corequestionbankcolumns as $corequestionbankcolumn) {
|
||||
if (!\core\plugininfo\qbank::is_plugin_enabled($componentname)) {
|
||||
unset($questionbankclasscolumns[$columnname]);
|
||||
continue;
|
||||
@@ -334,7 +334,7 @@ class view {
|
||||
|
||||
// Mitigate the error in case of any regression.
|
||||
foreach ($questionbankclasscolumns as $shortname => $questionbankclasscolumn) {
|
||||
if (empty($questionbankclasscolumn)) {
|
||||
if (!is_object($questionbankclasscolumn)) {
|
||||
unset($questionbankclasscolumns[$shortname]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user