Merge branch 'MDL-86701-405-fix' of https://github.com/junpataleta/moodle into MOODLE_405_STABLE

This commit is contained in:
Huong Nguyen
2025-11-07 08:46:59 +07:00
10 changed files with 24 additions and 21 deletions
@@ -181,13 +181,14 @@ Feature: The my overview block allows users to group courses by custom fields
And I set the field "Custom field" to "1"
Then the "Field to use" select box should not contain "Hidden field"
@core_customfield
Scenario: Hidden fields not displayed in the filter
Given the following config values are set as admin:
| displaygroupingcustomfield | 1 | block_myoverview |
| customfiltergrouping | textfield2 | block_myoverview |
And I log in as "admin"
And I navigate to "Courses > Default settings > Course custom fields" in site administration
And I click on "Edit" "link" in the "Text field 2" "table_row"
And I press "Edit custom field: Text field 2"
And I set the field "Visible to" to "Nobody"
And I press "Save changes"
And I log out
@@ -1,4 +1,4 @@
@customfield @customfield_checkbox @javascript
@core_customfield @customfield_checkbox @javascript
Feature: Managers can manage course custom fields checkbox
In order to have additional data on the course
As a manager
@@ -28,7 +28,7 @@ Feature: Managers can manage course custom fields checkbox
| Name | Test field |
| Short name | testfield |
And I click on "Save changes" "button" in the "Adding a new Checkbox" "dialogue"
And I click on "Edit" "link" in the "Test field" "table_row"
And I press "Edit custom field: Test field"
And I set the following fields to these values:
| Name | Edited field |
And I click on "Save changes" "button" in the "Updating Test field" "dialogue"
@@ -42,7 +42,7 @@ Feature: Managers can manage course custom fields checkbox
| Name | Test field |
| Short name | testfield |
And I click on "Save changes" "button" in the "Adding a new Checkbox" "dialogue"
And I click on "Delete" "link" in the "Test field" "table_row"
And I press "Delete custom field: Test field"
And I click on "Yes" "button" in the "Confirm" "dialogue"
Then I should not see "Test field"
And I log out
@@ -1,4 +1,4 @@
@customfield @customfield_date @javascript
@core_customfield @customfield_date @javascript
Feature: Managers can manage course custom fields date
In order to have additional data on the course
As a manager
@@ -1,4 +1,4 @@
@customfield @customfield_number @javascript
@core_customfield @customfield_number @javascript
Feature: Managers can manage course custom fields number
In order to have additional data on the course
As a manager
@@ -36,7 +36,7 @@ Feature: Managers can manage course custom fields number
| Short name | numberfield |
And I click on "Save changes" "button" in the "Adding a new Number" "dialogue"
Then I should see "Number field"
And I click on "Edit" "link" in the "Number field" "table_row"
And I press "Edit custom field: Number field"
And I set the following fields to these values:
| Name | Edited number field |
And I click on "Save changes" "button" in the "Updating Number field" "dialogue"
@@ -50,7 +50,7 @@ Feature: Managers can manage course custom fields number
| Name | Number field |
| Short name | numberfield |
And I click on "Save changes" "button" in the "Adding a new Number" "dialogue"
And I click on "Delete" "link" in the "Number field" "table_row"
And I press "Delete custom field: Number field"
And I click on "Yes" "button" in the "Confirm" "dialogue"
And I wait until the page is ready
And I wait until "Number field" "text" does not exist
@@ -186,7 +186,7 @@ Feature: Managers can manage course custom fields number
And I log in as "admin"
And I navigate to "Courses > Default settings > Course custom fields" in site administration
And I click on "Edit" "link" in the "Number field" "table_row"
And I press "Edit custom field: Number field"
And I set the following fields to these values:
| Display when zero | |
And I click on "Save changes" "button" in the "Updating Number field" "dialogue"
@@ -1,4 +1,4 @@
@customfield @customfield_select @javascript
@core_customfield @customfield_select @javascript
Feature: Managers can manage course custom fields select
In order to have additional data on the course
As a manager
@@ -38,7 +38,7 @@ Feature: Managers can manage course custom fields select
b
"""
And I click on "Save changes" "button" in the "Adding a new Dropdown menu" "dialogue"
And I click on "Edit" "link" in the "Test field" "table_row"
And I press "Edit custom field: Test field"
And I set the following fields to these values:
| Name | Edited field |
And I click on "Save changes" "button" in the "Updating Test field" "dialogue"
@@ -58,7 +58,7 @@ Feature: Managers can manage course custom fields select
b
"""
And I click on "Save changes" "button" in the "Adding a new Dropdown menu" "dialogue"
And I click on "Delete" "link" in the "Test field" "table_row"
And I press "Delete custom field: Test field"
And I click on "Yes" "button" in the "Confirm" "dialogue"
Then I should not see "Test field"
And I log out
@@ -1,4 +1,4 @@
@customfield @customfield_text @javascript
@core_customfield @customfield_text @javascript
Feature: Managers can manage course custom fields text
In order to have additional data on the course
As a manager
@@ -28,7 +28,7 @@ Feature: Managers can manage course custom fields text
| Name | Test field |
| Short name | testfield |
And I click on "Save changes" "button" in the "Adding a new Short text" "dialogue"
And I click on "Edit" "link" in the "Test field" "table_row"
And I press "Edit custom field: Test field"
And I set the following fields to these values:
| Name | Edited field |
And I click on "Save changes" "button" in the "Updating Test field" "dialogue"
@@ -44,7 +44,7 @@ Feature: Managers can manage course custom fields text
| Name | Test field |
| Short name | testfield |
And I click on "Save changes" "button" in the "Adding a new Short text" "dialogue"
And I click on "Delete" "link" in the "Test field" "table_row"
And I press "Delete custom field: Test field"
And I click on "Yes" "button" in the "Confirm" "dialogue"
And I wait until the page is ready
And I wait until "Test field" "text" does not exist
@@ -1,4 +1,4 @@
@customfield @customfield_textarea @javascript @editor_tiny
@core_customfield @customfield_textarea @javascript @editor_tiny
Feature: Default value for the textarea custom field can contain images
In order to see images on custom fields
As a manager
@@ -1,4 +1,4 @@
@customfield @customfield_textarea @javascript
@core_customfield @customfield_textarea @javascript
Feature: Managers can manage course custom fields textarea
In order to have additional data on the course
As a manager
@@ -28,7 +28,7 @@ Feature: Managers can manage course custom fields textarea
| Name | Test field |
| Short name | testfield |
And I click on "Save changes" "button" in the "Adding a new Text area" "dialogue"
And I click on "Edit" "link" in the "Test field" "table_row"
And I press "Edit custom field: Test field"
And I set the following fields to these values:
| Name | Edited field |
And I click on "Save changes" "button" in the "Updating Test field" "dialogue"
@@ -43,7 +43,7 @@ Feature: Managers can manage course custom fields textarea
| Name | Test field |
| Short name | testfield |
And I click on "Save changes" "button" in the "Adding a new Text area" "dialogue"
And I click on "Delete" "link" in the "Test field" "table_row"
And I press "Delete custom field: Test field"
And I click on "Yes" "button" in the "Confirm" "dialogue"
Then I should not see "Test field"
And I log out
@@ -115,6 +115,7 @@ Feature: Set default question bank column order and size
And "Question" "table_row" should appear before "Comments" "table_row"
And the field "Width of 'Question' in pixels" matches value ""
@core_customfield
Scenario: Deleting a custom field which is removed from the Column sort order
Given the following "custom field categories" exist:
| name | component | area | itemid |
@@ -132,7 +133,7 @@ Feature: Set default question bank column order and size
# Delete a question custom field.
And I navigate to "Plugins > Question bank plugins > Question custom fields" in site administration
And I click on "Delete" "link" in the "Field 1" "table_row"
And I press "Delete custom field: Field 1"
And I click on "Yes" "button" in the "Confirm" "dialogue"
And I navigate to "Plugins > Question bank plugins > Column sort order" in site administration
Then I should see "Column sort order"
@@ -139,6 +139,7 @@ Feature: Set question bank column order and size
And "Create a new question" "button" should exist
# Really, we are just checking the question bank displayed without errors.
@core_customfield
Scenario: Deleting a custom field which a user had removed from his preferences
Given the following "custom field categories" exist:
| name | component | area | itemid |
@@ -156,7 +157,7 @@ Feature: Set question bank column order and size
# Delete a question custom field.
And I log in as "admin"
And I navigate to "Plugins > Question bank plugins > Question custom fields" in site administration
And I click on "Delete" "link" in the "Field 1" "table_row"
And I press "Delete custom field: Field 1"
And I click on "Yes" "button" in the "Confirm" "dialogue"
And I am on the "Test quiz Q001" "mod_quiz > question bank" page logged in as "teacher1"
And I apply question bank filter "Category" with value "Question category 1"