MDL-72115 course: Rename Miscellaneous category

The "Miscellaneous" course category has been renamed to Category 1.
Besides, the description field has been set from FORMAT_MOODLE to
FORMAT_HTML.
This commit is contained in:
Sara Arjona
2021-09-13 08:36:17 +02:00
parent 1d700796ca
commit 3f2f2e85bb
46 changed files with 213 additions and 189 deletions
@@ -40,7 +40,7 @@ Feature: Set up contextual data for tests
And I should see "Course 2"
And I follow "Cat 2"
And I should see "No courses in this category"
And I follow "Miscellaneous"
And I follow "Category 1"
And I should see "Course 3"
@javascript
@@ -22,7 +22,7 @@ Feature: Show capabilities for multiple contexts
| Roles: | Student |
And I click on "Get the overview" "button"
Then I should see "Permissions in System"
And I should see "Permissions in Category: Miscellaneous"
And I should see "Permissions in Category: Category 1"
And I should see "Permissions in Course: Course 1"
And I should not see "Permissions in Course: Course 2"
@@ -32,7 +32,7 @@ Feature: Show capabilities for multiple contexts
| Roles: | Student |
And I click on "Get the overview" "button"
Then I should see "Permissions in System"
And I should not see "Permissions in Category: Miscellaneous"
And I should not see "Permissions in Category: Category 1"
And I should not see "Permissions in Course: Course 1"
And I should not see "Permissions in Course: Course 2"
@@ -42,7 +42,7 @@ Feature: Show capabilities for multiple contexts
| Roles: | Student |
And I click on "Get the overview" "button"
Then I should see "Permissions in System"
And I should see "Permissions in Category: Miscellaneous"
And I should see "Permissions in Category: Category 1"
And I should see "Permissions in Course: Course 1"
And I should not see "Permissions in Course: Course 2"
@@ -52,7 +52,7 @@ Feature: Show capabilities for multiple contexts
| Roles: | Student |
And I click on "Get the overview" "button"
Then I should see "Permissions in System"
And I should see "Permissions in Category: Miscellaneous"
And I should see "Permissions in Category: Category 1"
And I should see "Permissions in Course: Course 1"
And I should not see "Permissions in Course: Course 2"
@@ -62,7 +62,7 @@ Feature: Show capabilities for multiple contexts
| Roles: | Student |
And I click on "Get the overview" "button"
Then I should see "Permissions in System"
And I should not see "Permissions in Category: Miscellaneous"
And I should not see "Permissions in Category: Category 1"
And I should not see "Permissions in Course: Course 1"
And I should not see "Permissions in Course: Course 2"
@@ -72,7 +72,7 @@ Feature: Show capabilities for multiple contexts
| Roles: | |
And I click on "Get the overview" "button"
Then I should see "Permissions in System"
And I should see "Permissions in Category: Miscellaneous"
And I should see "Permissions in Category: Category 1"
And I should see "Permissions in Course: Course 1"
And I should not see "Permissions in Course: Course 2"
@@ -82,7 +82,7 @@ Feature: Show capabilities for multiple contexts
| Roles: | |
And I click on "Get the overview" "button"
Then I should see "Permissions in System"
And I should not see "Permissions in Category: Miscellaneous"
And I should not see "Permissions in Category: Category 1"
And I should not see "Permissions in Course: Course 1"
And I should not see "Permissions in Course: Course 2"
@@ -92,7 +92,7 @@ Feature: Show capabilities for multiple contexts
| Roles: | |
And I click on "Get the overview" "button"
Then I should see "Permissions in System"
And I should see "Permissions in Category: Miscellaneous"
And I should see "Permissions in Category: Category 1"
And I should see "Permissions in Course: Course 1"
And I should see "Permissions in Course: Course 2"
@@ -103,7 +103,7 @@ Feature: Show capabilities for multiple contexts
And I set the field "Show differences only" to "1"
And I click on "Get the overview" "button"
Then I should see "Permissions in System"
And I should see "Permissions in Category: Miscellaneous"
And I should see "Permissions in Category: Category 1"
And I should see "There are no differences to show between selected roles in this context"
And I should see "Permissions in Course: Course 1"
And I should not see "Permissions in Course: Course 2"
@@ -116,7 +116,7 @@ Feature: Show capabilities for multiple contexts
And I click on "Get the overview" "button"
Then I should see "Permissions in System"
And I should see "There are no differences to show between selected roles in this context"
And I should not see "Permissions in Category: Miscellaneous"
And I should not see "Permissions in Category: Category 1"
And I should not see "Permissions in Course: Course 1"
And I should not see "Permissions in Course: Course 2"
@@ -127,7 +127,7 @@ Feature: Show capabilities for multiple contexts
And I set the field "Show differences only" to "1"
And I click on "Get the overview" "button"
Then I should see "Permissions in System"
And I should see "Permissions in Category: Miscellaneous"
And I should see "Permissions in Category: Category 1"
And I should see "There are no differences to show between selected roles in this context"
And I should see "Permissions in Course: Course 1"
And I should not see "Permissions in Course: Course 2"
@@ -33,7 +33,7 @@ Course cards should always show
"courseimage": "https://placekitten.com/300/500",
"fullname": "Mathematics Year One",
"isfavourite": true,
"coursecategory": "Miscellaneous",
"coursecategory": "Category 1",
"showcoursecategory": true,
"visible": true
}
@@ -71,7 +71,7 @@ The example below show a deck of cards as used on the starred courses block
"courseimage": "https://placekitten.com/300/500",
"fullname": "Mathematics Year One",
"isfavourite": true,
"coursecategory": "Miscellaneous",
"coursecategory": "Category 1",
"showcoursecategory": true,
"visible": true
},
@@ -27,7 +27,7 @@
"viewurl": "https://moodlesite/course/view.php?id=2",
"courseimage": "https://moodlesite/pluginfile/123/course/overviewfiles/123.jpg",
"fullname": "course 3",
"coursecategory": "Miscellaneous",
"coursecategory": "Category 1",
"visible": true
}
]
+5 -1
View File
@@ -510,7 +510,11 @@ class analytics_manager_testcase extends advanced_testcase {
$this->assertCount(1, \core_analytics\manager::get_potential_context_restrictions([CONTEXT_COURSECAT], 'Course category'));
$this->assertCount(1, \core_analytics\manager::get_potential_context_restrictions([CONTEXT_COURSECAT], 'Course category 1'));
$this->assertCount(1, \core_analytics\manager::get_potential_context_restrictions([CONTEXT_COURSECAT], 'Miscellaneous'));
$this->assertCount(
2,
\core_analytics\manager::get_potential_context_restrictions([CONTEXT_COURSECAT],
get_string('defaultcategoryname')
));
$this->assertCount(1, \core_analytics\manager::get_potential_context_restrictions([CONTEXT_COURSE], 'Test course 1'));
$this->assertCount(1, \core_analytics\manager::get_potential_context_restrictions([CONTEXT_COURSE], 'Test course'));
}
+1 -1
View File
@@ -135,7 +135,7 @@ class core_analytics_prediction_testcase extends advanced_testcase {
$this->resetAfterTest(true);
$this->setAdminuser();
$misc = $DB->get_record('course_categories', ['name' => 'Miscellaneous']);
$misc = $DB->get_record('course_categories', ['name' => get_string('defaultcategoryname')]);
$miscctx = \context_coursecat::instance($misc->id);
$category = $this->getDataGenerator()->create_category();
+1 -1
View File
@@ -1,7 +1,7 @@
<ID>1</ID>
<CATEGORY>
<ID>1</ID>
<NAME>Miscellaneous</NAME>
<NAME>Category 1</NAME>
</CATEGORY>
<PASSWORD></PASSWORD>
<FULLNAME>[#course_name#]</FULLNAME>
+1 -1
View File
@@ -1378,7 +1378,7 @@
<ID>2</ID>
<CATEGORY>
<ID>1</ID>
<NAME>Miscellaneous</NAME>
<NAME>Category 1</NAME>
</CATEGORY>
<PASSWORD></PASSWORD>
<FULLNAME>Course Fullname 101</FULLNAME>
+1 -1
View File
@@ -42,7 +42,7 @@
<ID>33</ID>
<CATEGORY>
<ID>1</ID>
<NAME>Miscellaneous</NAME>
<NAME>Category 1</NAME>
</CATEGORY>
<PASSWORD></PASSWORD>
<FULLNAME>Moodle 2.0 Test Restore</FULLNAME>
@@ -7,15 +7,15 @@ Feature: Enable the course_list block on a category page and view it's contents
Background:
Given the following "categories" exist:
| name | category | idnumber |
| Category 1 | 0 | CAT1 |
| Category 2 | 0 | CAT2 |
| Category 3 | CAT2 | CAT3 |
| Category A | 0 | CATA |
| Category B | 0 | CATB |
| Category C | CATB | CATC |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| Course 2 | C2 | CAT1 |
| Course 3 | C3 | CAT2 |
| Course 4 | C4 | CAT3 |
| Course 2 | C2 | CATA |
| Course 3 | C3 | CATB |
| Course 4 | C4 | CATC |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | First | teacher1@example.com |
@@ -30,30 +30,30 @@ Feature: Enable the course_list block on a category page and view it's contents
And I am on site homepage
And I turn editing mode on
And I am on course index
And I follow "Miscellaneous"
And I follow "Category 1"
And I add the "Courses" block
And I log out
When I log in as "teacher1"
And I am on course index
And I follow "Miscellaneous"
And I follow "Category 1"
Then I should see "Course 1" in the "My courses" "block"
And I should see "Course 2" in the "My courses" "block"
And I should see "Course 3" in the "My courses" "block"
And I should not see "Course 4" in the "My courses" "block"
And I follow "All courses"
And I should see "Miscellaneous"
And I should see "Category 1"
Scenario: Add the course list block on category page and navigate to another course
Given I log in as "admin"
And I am on site homepage
And I turn editing mode on
And I am on course index
And I follow "Miscellaneous"
And I follow "Category 1"
And I add the "Courses" block
And I log out
When I log in as "teacher1"
And I am on course index
And I follow "Miscellaneous"
And I follow "Category 1"
Then I should see "Course 1" in the "My courses" "block"
And I should see "Course 2" in the "My courses" "block"
And I should see "Course 3" in the "My courses" "block"
@@ -66,13 +66,13 @@ Feature: Enable the course_list block on a category page and view it's contents
And I am on site homepage
And I turn editing mode on
And I am on course index
And I follow "Miscellaneous"
And I follow "Category 1"
When I add the "Courses" block
Then I should see "Miscellaneous" in the "Course categories" "block"
And I should see "Category 1" in the "Course categories" "block"
And I should see "Category 2" in the "Course categories" "block"
And I should not see "Category 3" in the "Course categories" "block"
Then I should see "Category 1" in the "Course categories" "block"
And I should see "Category A" in the "Course categories" "block"
And I should see "Category B" in the "Course categories" "block"
And I should not see "Category C" in the "Course categories" "block"
And I should not see "Course 1" in the "Course categories" "block"
And I should not see "Course 2" in the "Course categories" "block"
And I follow "All courses"
And I should see "Miscellaneous"
And I should see "Category 1"
@@ -7,15 +7,15 @@ Feature: Enable the course_list block on a course page and view it's contents
Background:
Given the following "categories" exist:
| name | category | idnumber |
| Category 1 | 0 | CAT1 |
| Category 2 | 0 | CAT2 |
| Category 3 | CAT2 | CAT3 |
| Category A | 0 | CATA |
| Category B | 0 | CATB |
| Category C | CATB | CATC |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| Course 2 | C2 | CAT1 |
| Course 3 | C3 | CAT2 |
| Course 4 | C4 | CAT3 |
| Course 2 | C2 | CATA |
| Course 3 | C3 | CATB |
| Course 4 | C4 | CATC |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | First | teacher1@example.com |
@@ -34,7 +34,7 @@ Feature: Enable the course_list block on a course page and view it's contents
And I should see "Course 3" in the "My courses" "block"
And I should not see "Course 4" in the "My courses" "block"
And I follow "All courses"
And I should see "Miscellaneous"
And I should see "Category 1"
Scenario: Add the course list block on course page and navigate to another course
Given I log in as "teacher1"
@@ -51,14 +51,14 @@ Feature: Enable the course_list block on a course page and view it's contents
Given I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
When I add the "Courses" block
Then I should see "Miscellaneous" in the "Course categories" "block"
And I should see "Category 1" in the "Course categories" "block"
And I should see "Category 2" in the "Course categories" "block"
And I should not see "Category 3" in the "Course categories" "block"
Then I should see "Category 1" in the "Course categories" "block"
And I should see "Category A" in the "Course categories" "block"
And I should see "Category B" in the "Course categories" "block"
And I should not see "Category C" in the "Course categories" "block"
And I should not see "Course 1" in the "Course categories" "block"
And I should not see "Course 2" in the "Course categories" "block"
And I follow "All courses"
And I should see "Miscellaneous"
And I should see "Category 1"
Scenario: View the course list block on course page with hide all courses link enabled
Given the following config values are set as admin:
@@ -77,11 +77,11 @@ Feature: Enable the course_list block on a course page and view it's contents
And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
When I add the "Courses" block
Then I should not see "Miscellaneous" in the "My courses" "block"
And I should not see "Category 1" in the "My courses" "block"
And I should not see "Category 2" in the "My courses" "block"
And I should not see "Category 3" in the "My courses" "block"
Then I should not see "Category 1" in the "My courses" "block"
And I should not see "Category A" in the "My courses" "block"
And I should not see "Category B" in the "My courses" "block"
And I should not see "Category C" in the "My courses" "block"
And I should see "Course 1" in the "My courses" "block"
And I should not see "Course 2" in the "My courses" "block"
And I follow "All courses"
And I should see "Miscellaneous"
And I should see "Category 1"
@@ -7,15 +7,15 @@ Feature: Enable the course_list block on the dashboard and view it's contents
Background:
Given the following "categories" exist:
| name | category | idnumber |
| Category 1 | 0 | CAT1 |
| Category 2 | 0 | CAT2 |
| Category 3 | CAT2 | CAT3 |
| Category A | 0 | CATA |
| Category B | 0 | CATB |
| Category C | CATB | CATC |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| Course 2 | C2 | CAT1 |
| Course 3 | C3 | CAT2 |
| Course 4 | C4 | CAT3 |
| Course 2 | C2 | CATA |
| Course 3 | C3 | CATB |
| Course 4 | C4 | CATC |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | First | teacher1@example.com |
@@ -34,7 +34,7 @@ Feature: Enable the course_list block on the dashboard and view it's contents
And I should see "Course 3" in the "My courses" "block"
And I should not see "Course 4" in the "My courses" "block"
And I follow "All courses"
And I should see "Miscellaneous"
And I should see "Category 1"
Scenario: Add the course list block on the dashboard and navigate to another course
Given I log in as "teacher1"
@@ -51,11 +51,11 @@ Feature: Enable the course_list block on the dashboard and view it's contents
Given I log in as "admin"
And I press "Customise this page"
When I add the "Courses" block
Then I should see "Miscellaneous" in the "Course categories" "block"
And I should see "Category 1" in the "Course categories" "block"
And I should see "Category 2" in the "Course categories" "block"
And I should not see "Category 3" in the "Course categories" "block"
Then I should see "Category 1" in the "Course categories" "block"
And I should see "Category A" in the "Course categories" "block"
And I should see "Category B" in the "Course categories" "block"
And I should not see "Category C" in the "Course categories" "block"
And I should not see "Course 1" in the "Course categories" "block"
And I should not see "Course 2" in the "Course categories" "block"
And I follow "All courses"
And I should see "Miscellaneous"
And I should see "Category 1"
@@ -7,15 +7,15 @@ Feature: Enable the course_list block on the frontpage and view it's contents
Background:
Given the following "categories" exist:
| name | category | idnumber |
| Category 1 | 0 | CAT1 |
| Category 2 | 0 | CAT2 |
| Category 3 | CAT2 | CAT3 |
| Category A | 0 | CATA |
| Category B | 0 | CATB |
| Category C | CATB | CATC |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| Course 2 | C2 | CAT1 |
| Course 3 | C3 | CAT2 |
| Course 4 | C4 | CAT3 |
| Course 2 | C2 | CATA |
| Course 3 | C3 | CATB |
| Course 4 | C4 | CATC |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | First | teacher1@example.com |
@@ -38,7 +38,7 @@ Feature: Enable the course_list block on the frontpage and view it's contents
And I should see "Course 3" in the "My courses" "block"
And I should not see "Course 4" in the "My courses" "block"
And I follow "All courses"
And I should see "Miscellaneous"
And I should see "Category 1"
Scenario: Add the course list block on the frontpage page and navigate to another course
Given I log in as "admin"
@@ -60,14 +60,14 @@ Feature: Enable the course_list block on the frontpage and view it's contents
And I am on site homepage
And I navigate to "Turn editing on" in current page administration
When I add the "Courses" block
Then I should see "Miscellaneous" in the "Course categories" "block"
And I should see "Category 1" in the "Course categories" "block"
And I should see "Category 2" in the "Course categories" "block"
And I should not see "Category 3" in the "Course categories" "block"
Then I should see "Category 1" in the "Course categories" "block"
And I should see "Category A" in the "Course categories" "block"
And I should see "Category B" in the "Course categories" "block"
And I should not see "Category C" in the "Course categories" "block"
And I should not see "Course 1" in the "Course categories" "block"
And I should not see "Course 2" in the "Course categories" "block"
And I follow "All courses"
And I should see "Miscellaneous"
And I should see "Category 1"
Scenario: Add the course list block on the frontpage page and view as a guest
Given I log in as "admin"
@@ -76,11 +76,11 @@ Feature: Enable the course_list block on the frontpage and view it's contents
And I add the "Courses" block
And I log out
When I log in as "guest"
Then I should see "Miscellaneous" in the "Course categories" "block"
And I should see "Category 1" in the "Course categories" "block"
And I should see "Category 2" in the "Course categories" "block"
And I should not see "Category 3" in the "Course categories" "block"
Then I should see "Category 1" in the "Course categories" "block"
And I should see "Category A" in the "Course categories" "block"
And I should see "Category B" in the "Course categories" "block"
And I should not see "Category C" in the "Course categories" "block"
And I should not see "Course 1" in the "Course categories" "block"
And I should not see "Course 2" in the "Course categories" "block"
And I follow "All courses"
And I should see "Miscellaneous"
And I should see "Category 1"
@@ -29,7 +29,7 @@
"fullname": "course 3",
"hasprogress": true,
"progress": 10,
"coursecategory": "Miscellaneous",
"coursecategory": "Category 1",
"visible": true
}
]
@@ -29,7 +29,7 @@
"fullname": "course 3",
"hasprogress": true,
"progress": 10,
"coursecategory": "Miscellaneous",
"coursecategory": "Category 1",
"visible": true
}
]
@@ -30,7 +30,7 @@
"summary": "This course is about assignments",
"hasprogress": true,
"progress": 10,
"coursecategory": "Miscellaneous",
"coursecategory": "Category 1",
"visible": true
}
]
@@ -10,13 +10,13 @@ Feature: The recently accessed courses block allows users to easily access their
| student1 | Student | 1 | student1@example.com |
And the following "categories" exist:
| name | category | idnumber |
| Category 1 | 0 | CAT1 |
| Category A | 0 | CATA |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| Course 2 | C2 | 0 |
| Course 3 | C3 | 0 |
| Course 4 | C4 | CAT1 |
| Course 4 | C4 | CATA |
| Course 5 | C5 | 0 |
And the following "course enrolments" exist:
| user | course | role |
@@ -51,8 +51,8 @@ Feature: The recently accessed courses block allows users to easily access their
And I am on "Course 1" course homepage
And I am on "Course 4" course homepage
And I follow "Dashboard" in the user menu
And I should see "Miscellaneous" in the "Recently accessed courses" "block"
And I should see "Category 1" in the "Recently accessed courses" "block"
And I should see "Category A" in the "Recently accessed courses" "block"
Scenario: Hide course category name
Given the following config values are set as admin:
@@ -61,8 +61,8 @@ Feature: The recently accessed courses block allows users to easily access their
And I am on "Course 1" course homepage
And I am on "Course 4" course homepage
And I follow "Dashboard" in the user menu
And I should not see "Miscellaneous" in the "Recently accessed courses" "block"
And I should not see "Category 1" in the "Recently accessed courses" "block"
And I should not see "Category A" in the "Recently accessed courses" "block"
Scenario: Show short course name
Given the following config values are set as admin:
+1 -1
View File
@@ -66,7 +66,7 @@ Feature: Import and edit calendar events
| Calendar name | Test Import |
| Import from | Calendar file (.ics) |
| Type of event | Category |
| Category | Miscellaneous |
| Category | Category 1 |
And I upload "calendar/tests/fixtures/import.ics" file to "Calendar file (.ics)" filemanager
And I press "Import calendar"
And I should see "Category events"
+11 -11
View File
@@ -22,7 +22,7 @@ Feature: A privileged user can create cohorts using a CSV file
| name | idnumber | description | Context | visible | Status |
| cohort name 1 | cohortid1 | first description | System | 1 | |
| cohort name 2 | cohortid2 | | System | 1 | |
| cohort name 3 | cohortid3 | | Miscellaneous | 0 | |
| cohort name 3 | cohortid3 | | Category 1 | 0 | |
| cohort name 4 | cohortid4 | | Cat 1 | 1 | |
| cohort name 5 | cohortid5 | | Cat 2 | 0 | |
| cohort name 6 | cohortid6 | | Cat 3 | 1 | |
@@ -38,7 +38,7 @@ Feature: A privileged user can create cohorts using a CSV file
| Category | Name | Cohort ID | Description | Cohort size | Source |
| System | cohort name 1 | cohortid1 | first description | 0 | Created manually |
| System | cohort name 2 | cohortid2 | | 0 | Created manually |
| Miscellaneous | cohort name 3 | cohortid3 | | 0 | Created manually |
| Category 1 | cohort name 3 | cohortid3 | | 0 | Created manually |
| Cat 1 | cohort name 4 | cohortid4 | | 0 | Created manually |
| Cat 2 | cohort name 5 | cohortid5 | | 0 | Created manually |
| Cat 3 | cohort name 6 | cohortid6 | | 0 | Created manually |
@@ -62,7 +62,7 @@ Feature: A privileged user can create cohorts using a CSV file
| name | idnumber | description | Context | Status |
| cohort name 1 | cohortid1 | first description | Cat 3 | |
| cohort name 2 | cohortid2 | | Cat 3 | |
| cohort name 3 | cohortid3 | | Miscellaneous | |
| cohort name 3 | cohortid3 | | Category 1 | |
| cohort name 4 | cohortid4 | | Cat 1 | |
| cohort name 5 | cohortid5 | | Cat 2 | |
| cohort name 6 | cohortid6 | | Cat 3 | |
@@ -76,7 +76,7 @@ Feature: A privileged user can create cohorts using a CSV file
| Category | Name | Cohort ID | Description | Cohort size | Source |
| Cat 3 | cohort name 1 | cohortid1 | first description | 0 | Created manually |
| Cat 3 | cohort name 2 | cohortid2 | | 0 | Created manually |
| Miscellaneous | cohort name 3 | cohortid3 | | 0 | Created manually |
| Category 1 | cohort name 3 | cohortid3 | | 0 | Created manually |
| Cat 1 | cohort name 4 | cohortid4 | | 0 | Created manually |
| Cat 2 | cohort name 5 | cohortid5 | | 0 | Created manually |
| Cat 3 | cohort name 6 | cohortid6 | | 0 | Created manually |
@@ -100,7 +100,7 @@ Feature: A privileged user can create cohorts using a CSV file
| name | idnumber | description | Context | Status |
| cohort name 1 | cohortid1 | first description | Cat 1 | |
| cohort name 2 | cohortid2 | | Cat 1 | |
| cohort name 3 | cohortid3 | | Cat 1 | Category Miscellaneous not found or you don't have permission to create a cohort there. The default context will be used. |
| cohort name 3 | cohortid3 | | Cat 1 | Category Category 1 not found or you don't have permission to create a cohort there. The default context will be used. |
| cohort name 4 | cohortid4 | | Cat 1 | |
| cohort name 5 | cohortid5 | | Cat 1 | Category CAT2 not found or you don't have permission to create a cohort there. The default context will be used. |
| cohort name 6 | cohortid6 | | Cat 3 | |
@@ -122,7 +122,7 @@ Feature: A privileged user can create cohorts using a CSV file
| name | idnumber | description | Context | Status |
| cohort name 1 | cohortid1 | first description | System | |
| cohort name 2 | cohortid2 | | System | Cohort with the same ID number already exists |
| cohort name 3 | cohortid3 | | Miscellaneous | |
| cohort name 3 | cohortid3 | | Category 1 | |
| cohort name 4 | cohortid4 | | Cat 1 | |
| cohort name 5 | cohortid5 | | Cat 2 | |
| cohort name 6 | cohortid6 | | Cat 3 | |
@@ -137,11 +137,11 @@ Feature: A privileged user can create cohorts using a CSV file
And I click on "Preview" "button"
Then the following should exist in the "previewuploadedcohorts" table:
| name | idnumber | description | Context | Status |
| Specify category as name | cohortid1 | | Miscellaneous | |
| Specify category as name | cohortid1 | | Category 1 | |
| Specify category as idnumber | cohortid2 | | Cat 1 | |
| Specify category as id | cohortid3 | | Miscellaneous | |
| Specify category as id | cohortid3 | | Category 1 | |
| Specify category as path | cohortid4 | | Cat 3 | |
| Specify category_id | cohortid5 | | Miscellaneous | |
| Specify category_id | cohortid5 | | Category 1 | |
| Specify category_idnumber | cohortid6 | | Cat 1 | |
| Specify category_path | cohortid7 | | Cat 3 | |
And I should not see "not found or you"
@@ -173,7 +173,7 @@ Feature: A privileged user can create cohorts using a CSV file
| name | idnumber | description | Context | visible | theme | Status |
| cohort name 1 | cohortid1 | first description | System | 1 | boost | |
| cohort name 2 | cohortid2 | | System | 1 | | |
| cohort name 3 | cohortid3 | | Miscellaneous | 0 | boost | |
| cohort name 3 | cohortid3 | | Category 1 | 0 | boost | |
| cohort name 4 | cohortid4 | | Cat 1 | 1 | classic | |
| cohort name 5 | cohortid5 | | Cat 2 | 0 | | |
| cohort name 6 | cohortid6 | | Cat 3 | 1 | classic | |
@@ -189,7 +189,7 @@ Feature: A privileged user can create cohorts using a CSV file
| Category | Name | Cohort ID | Description | Cohort size | Source |
| System | cohort name 1 | cohortid1 | first description | 0 | Created manually |
| System | cohort name 2 | cohortid2 | | 0 | Created manually |
| Miscellaneous | cohort name 3 | cohortid3 | | 0 | Created manually |
| Category 1 | cohort name 3 | cohortid3 | | 0 | Created manually |
| Cat 1 | cohort name 4 | cohortid4 | | 0 | Created manually |
| Cat 2 | cohort name 5 | cohortid5 | | 0 | Created manually |
| Cat 3 | cohort name 6 | cohortid6 | | 0 | Created manually |
+1 -1
View File
@@ -1,7 +1,7 @@
name,idnumber,description,category,visible
cohort name 1,cohortid1,first description,,
cohort name 2,cohortid2,,,
cohort name 3,cohortid3,,Miscellaneous,no
cohort name 3,cohortid3,,Category 1,no
cohort name 4,cohortid4,,CAT1,yes
cohort name 5,cohortid5,,CAT2,0
cohort name 6,cohortid6,,CAT3,1
1 name idnumber description category visible
2 cohort name 1 cohortid1 first description
3 cohort name 2 cohortid2
4 cohort name 3 cohortid3 Miscellaneous Category 1 no
5 cohort name 4 cohortid4 CAT1 yes
6 cohort name 5 cohortid5 CAT2 0
7 cohort name 6 cohortid6 CAT3 1
+1 -1
View File
@@ -1,5 +1,5 @@
name,idnumber,description,category,category_id,category_idnumber,category_path
Specify category as name,cohortid1,,Miscellaneous,,,
Specify category as name,cohortid1,,Category 1,,,
Specify category as idnumber,cohortid2,,CAT1,,,
Specify category as id,cohortid3,,1,,,
Specify category as path,cohortid4,,Cat 1 / Cat 3,,,
1 name idnumber description category category_id category_idnumber category_path
2 Specify category as name cohortid1 Miscellaneous Category 1
3 Specify category as idnumber cohortid2 CAT1
4 Specify category as id cohortid3 1
5 Specify category as path cohortid4 Cat 1 / Cat 3
+1 -1
View File
@@ -1,7 +1,7 @@
name,idnumber,description,category,visible,theme
cohort name 1,cohortid1,first description,,,boost
cohort name 2,cohortid2,,,,
cohort name 3,cohortid3,,Miscellaneous,no,boost
cohort name 3,cohortid3,,Category 1,no,boost
cohort name 4,cohortid4,,CAT1,yes,classic
cohort name 5,cohortid5,,CAT2,0,
cohort name 6,cohortid6,,CAT3,1,classic
1 name idnumber description category visible theme
2 cohort name 1 cohortid1 first description boost
3 cohort name 2 cohortid2
4 cohort name 3 cohortid3 Miscellaneous Category 1 no boost
5 cohort name 4 cohortid4 CAT1 yes classic
6 cohort name 5 cohortid5 CAT2 0
7 cohort name 6 cohortid6 CAT3 1 classic
+1 -1
View File
@@ -1,7 +1,7 @@
name,idnumber,description,category
cohort name 1,cid1,first description,
cohort name 2,cid2,,
cohort name 3,cid3,,Miscellaneous
cohort name 3,cid3,,Category 1
cohort name 4,cid4,,CAT1
cohort name 5,cid5,,CAT2
cohort name 6,cid6,,CAT3
1 name idnumber description category
2 cohort name 1 cid1 first description
3 cohort name 2 cid2
4 cohort name 3 cid3 Miscellaneous Category 1
5 cohort name 4 cid4 CAT1
6 cohort name 5 cid5 CAT2
7 cohort name 6 cid6 CAT3
+6 -6
View File
@@ -823,7 +823,7 @@ class core_course_category implements renderable, cacheable_object, IteratorAggr
// No categories found.
// This may happen after upgrade of a very old moodle version.
// In new versions the default category is created on install.
$defcoursecat = self::create(array('name' => get_string('miscellaneous')));
$defcoursecat = self::create(array('name' => get_string('defaultcategoryname')));
set_config('defaultrequestcategory', $defcoursecat->id);
$all[0] = array($defcoursecat->id);
$all[$defcoursecat->id] = array();
@@ -2552,7 +2552,7 @@ class core_course_category implements renderable, cacheable_object, IteratorAggr
* Returns ids of all parents of the category. Last element in the return array is the direct parent
*
* For example, if you have a tree of categories like:
* Miscellaneous (id = 1)
* Category (id = 1)
* Subcategory (id = 2)
* Sub-subcategory (id = 4)
* Other category (id = 3)
@@ -2578,14 +2578,14 @@ class core_course_category implements renderable, cacheable_object, IteratorAggr
* List is cached for 10 minutes
*
* For example, if you have a tree of categories like:
* Miscellaneous (id = 1)
* Category (id = 1)
* Subcategory (id = 2)
* Sub-subcategory (id = 4)
* Other category (id = 3)
* Then after calling this function you will have
* array(1 => 'Miscellaneous',
* 2 => 'Miscellaneous / Subcategory',
* 4 => 'Miscellaneous / Subcategory / Sub-subcategory',
* array(1 => 'Category',
* 2 => 'Category / Subcategory',
* 4 => 'Category / Subcategory / Sub-subcategory',
* 3 => 'Other category');
*
* If you specify $requiredcapability, then only categories where the current
+1 -1
View File
@@ -29,7 +29,7 @@
"fullname": "course 3",
"hasprogress": true,
"progress": 10,
"coursecategory": "Miscellaneous"
"coursecategory": "Category 1"
}
]
}
+1 -1
View File
@@ -28,7 +28,7 @@
"courseimageurl": "https://moodlesite/pluginfile/123/course/overviewfiles/123.jpg",
"fullname": "course 3",
"isfavourite": true,
"coursecategory": "Miscellaneous"
"coursecategory": "Category 1"
}
]
}
+2 -2
View File
@@ -121,8 +121,8 @@ class behat_course extends behat_base {
// Ensure you are on course management page.
$this->execute("behat_course::i_should_see_the_courses_management_page", get_string('categories'));
// Select Miscellaneous category.
$this->i_click_on_category_in_the_management_interface(get_string('miscellaneous'));
// Select default course category.
$this->i_click_on_category_in_the_management_interface(get_string('defaultcategoryname'));
$this->execute("behat_course::i_should_see_the_courses_management_page", get_string('categoriesandcourses'));
// Click create new course.
@@ -195,7 +195,7 @@ Feature: Test category management actions
And "What to do" "select" should not exist
And "Move into" "select" should exist
And the "Move into" select box should contain "Cat 2"
And the "Move into" select box should contain "Miscellaneous"
And the "Move into" select box should contain "Category 1"
And I press "Cancel"
@javascript
@@ -230,7 +230,7 @@ Feature: Test category management actions
And "What to do" "select" should exist
And I expand the "Move into" autocomplete
And "Cat 2" "autocomplete_suggestions" should not exist
And "Miscellaneous" "autocomplete_selection" should be visible
And "Category 1" "autocomplete_selection" should be visible
And I set the field "What to do" to "Delete all - cannot be undone"
And "Move into" "select" should not be visible
And I press "Cancel"
@@ -44,7 +44,7 @@ Feature: Course category management interface performs as expected
And I start watching to see if a new page loads
And I should see the "Course categories and courses" management page
And I should see "Course categories" in the "#category-listing h3" "css_element"
And I should see "Miscellaneous" in the "#course-listing h3" "css_element"
And I should see "Category 1" in the "#course-listing h3" "css_element"
And I should see "Cat 1" in the "#category-listing" "css_element"
And I should see "No courses in this category" in the "#course-listing" "css_element"
And I click on category "Cat 1" in the management interface
+1 -1
View File
@@ -36,7 +36,7 @@ Feature: Managers can create courses
And I log in as "admin"
And I go to the courses management page
And I should see the "Categories" management page
And I click on category "Miscellaneous" in the management interface
And I click on category "Category 1" in the management interface
And I should see the "Course categories and courses" management page
And I click on "Create new course" "link" in the "#course-listing" "css_element"
When I set the following fields to these values:
+1 -1
View File
@@ -38,7 +38,7 @@ Feature: Users can request and approve courses
And I log in as "user2"
And I am on course index
And I press "Courses pending approval"
And I should see "Miscellaneous" in the "My new course" "table_row"
And I should see "Category 1" in the "My new course" "table_row"
And I click on "Approve" "button" in the "My new course" "table_row"
And I press "Save and return"
And I should see "There are no courses pending approval"
@@ -7,21 +7,21 @@ Feature: Front page displays items in different modes
Background:
Given the following "categories" exist:
| name | category | idnumber |
| Category 1 | 0 | CAT1 |
| Category 2 | 0 | CAT2 |
| Category 1 child | CAT1 | CAT11 |
| Category 2 child | CAT2 | CAT21 |
| Category 1 child child | CAT11 | CAT111 |
| Category 3 | 0 | CAT3 |
| Category A | 0 | CATA |
| Category B | 0 | CATB |
| Category A child | CATA | CATA1 |
| Category B child | CATB | CATB1 |
| Category A child child | CATA1 | CATA11 |
| Category C | 0 | CATC |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 1 | COURSE1_1 | CAT1 |
| Course 2 1 | COURSE2_1 | CAT2 |
| Course 11 1 | COURSE11_1 | CAT11 |
| Course 2 2 | COURSE2_2 | CAT2 |
| Course 21 1 | COURSE21_1 | CAT21 |
| Course 111 1 | COURSE111_1 | CAT111 |
| Course 111 2 | COURSE111_2 | CAT111 |
| Course 1 1 | COURSE1_1 | CATA |
| Course 2 1 | COURSE2_1 | CATB |
| Course 11 1 | COURSE11_1 | CATA1 |
| Course 2 2 | COURSE2_2 | CATB |
| Course 21 1 | COURSE21_1 | CATB1 |
| Course 111 1 | COURSE111_1 | CATA11 |
| Course 111 2 | COURSE111_2 | CATA11 |
And I log in as "admin"
@javascript
@@ -30,15 +30,15 @@ Feature: Front page displays items in different modes
| Front page items when logged in | List of categories |
| Maximum category depth | 2 |
And I am on site homepage
Then I should see "Category 1" in the "region-main" "region"
And I should see "Category 1 child" in the "region-main" "region"
And I should not see "Category 1 child child" in the "region-main" "region"
And I toggle "Category 1" category children visibility in frontpage
And I should not see "Category 1 child" in the "region-main" "region"
And I toggle "Category 1" category children visibility in frontpage
And I should see "Category 1 child" in the "region-main" "region"
And I toggle "Category 1 child" category children visibility in frontpage
And I should see "Category 1 child child" in the "region-main" "region"
Then I should see "Category A" in the "region-main" "region"
And I should see "Category A child" in the "region-main" "region"
And I should not see "Category A child child" in the "region-main" "region"
And I toggle "Category A" category children visibility in frontpage
And I should not see "Category A child" in the "region-main" "region"
And I toggle "Category A" category children visibility in frontpage
And I should see "Category A child" in the "region-main" "region"
And I toggle "Category A child" category children visibility in frontpage
And I should see "Category A child child" in the "region-main" "region"
@javascript
Scenario: Displays a combo list
@@ -46,17 +46,17 @@ Feature: Front page displays items in different modes
| Front page items when logged in | Combo list |
| Maximum category depth | 2 |
And I am on site homepage
Then I should see "Category 1" in the "region-main" "region"
And I should see "Category 1 child" in the "region-main" "region"
And I should not see "Category 1 child child" in the "region-main" "region"
Then I should see "Category A" in the "region-main" "region"
And I should see "Category A child" in the "region-main" "region"
And I should not see "Category A child child" in the "region-main" "region"
And I should see "Course 1 1" in the "region-main" "region"
And I should see "Course 2 2" in the "region-main" "region"
And I should not see "Course 11 1" in the "region-main" "region"
And I toggle "Category 1 child" category children visibility in frontpage
And I toggle "Category A child" category children visibility in frontpage
And I should see "Course 11 1" in the "region-main" "region"
And I should see "Category 1 child child" in the "region-main" "region"
And I toggle "Category 1" category children visibility in frontpage
And I should see "Category A child child" in the "region-main" "region"
And I toggle "Category A" category children visibility in frontpage
And I should not see "Course 1 1" in the "region-main" "region"
And I should not see "Category 1 child" in the "region-main" "region"
And I toggle "Category 1" category children visibility in frontpage
And I should not see "Category A child" in the "region-main" "region"
And I toggle "Category A" category children visibility in frontpage
And I should see "Course 11 1" in the "region-main" "region"
@@ -20,7 +20,7 @@ Feature: Browse course list and return back from enrolment page
Scenario: A user can return to the category page from enrolment page
When I log in as "user2"
And I am on course index
And I follow "Miscellaneous"
And I follow "Category 1"
And I follow "Sample course"
And I press "Continue"
Then I should see "Courses" in the ".breadcrumb" "css_element"
@@ -67,7 +67,7 @@ Feature: Browse course list and return back from enrolment page
And I log out
When I log in as "user1"
And I am on course index
And I follow "Miscellaneous"
And I follow "Category 1"
And I follow "Sample course"
And I follow "Test choice"
And I should see "Sorry, only enrolled users are allowed to make choices."
+1 -1
View File
@@ -330,7 +330,7 @@ class core_course_category_testcase extends advanced_testcase {
// $course4
// structure.
// Note that we also have default 'Miscellaneous' category and default 'site' course.
// Note that we also have default course category and default 'site' course.
$this->assertEquals(1, $DB->get_field_sql('SELECT count(*) FROM {course_categories} WHERE id > ?', array($initialcatid)));
$this->assertEquals($category1->id, $DB->get_field_sql('SELECT max(id) FROM {course_categories}'));
$this->assertEquals(1, $DB->get_field_sql('SELECT count(*) FROM {course} WHERE id <> ?', array(SITEID)));
@@ -42,7 +42,7 @@ Feature: Teachers can edit course custom fields
When I log in as "admin"
And I go to the courses management page
And I should see the "Categories" management page
And I click on category "Miscellaneous" in the management interface
And I click on category "Category 1" in the management interface
And I should see the "Course categories and courses" management page
And I click on "Create new course" "link" in the "#course-listing" "css_element"
And I set the following fields to these values:
+1 -1
View File
@@ -245,7 +245,7 @@ class core_files_externallib_testcase extends advanced_testcase {
'filearea' => null,
'itemid' => null,
'filepath' => null,
'filename' => 'Miscellaneous');
'filename' => get_string('defaultcategoryname'));
$testdata['parents']['2'] = array('contextid' => $coursecontext->id,
'component' => null,
'filearea' => null,
+1
View File
@@ -472,6 +472,7 @@ $string['days'] = 'days';
$string['decodinginternallinks'] = 'Decoding internal links';
$string['default'] = 'Default';
$string['defaulteditor'] = 'Default editor';
$string['defaultcategoryname'] = 'Category 1';
$string['defaultcompetencescale'] = 'Default competence scale';
$string['defaultcompetencescaledesc'] = 'A binary rating scale that provides no further information beyond whether someone has demonstrated proficiency or not.';
$string['defaultcompetencescalenotproficient'] = 'Not yet competent';
+2 -1
View File
@@ -105,7 +105,8 @@ function xmldb_main_install() {
throw new moodle_exception('generalexceptionmessage', 'error', '', 'Can not create default course category, categories already exist.');
}
$cat = new stdClass();
$cat->name = get_string('miscellaneous');
$cat->name = get_string('defaultcategoryname');
$cat->descriptionformat = FORMAT_HTML;
$cat->depth = 1;
$cat->sortorder = get_max_courses_in_category();
$cat->timemodified = time();
+18
View File
@@ -2717,5 +2717,23 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2021090200.01);
}
if ($oldversion < 2021091100.01) {
// Set the description field to HTML format for the Default course category.
$category = $DB->get_record('course_categories', ['id' => 1]);
if ($category->descriptionformat == FORMAT_MOODLE) {
// Format should be changed only if it's still set to FORMAT_MOODLE.
if (!is_null($category->description)) {
// If description is not empty, format the content to HTML.
$category->description = format_text($category->description, FORMAT_MOODLE);
}
$category->descriptionformat = FORMAT_HTML;
$DB->update_record('course_categories', $category);
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2021091100.01);
}
return true;
}
+1 -1
View File
@@ -328,7 +328,7 @@ class mnetservice_enrol_privacy_testcase extends provider_testcase {
$course->hostid = $this->mnethost->id;
$course->remoteid = $remoteid;
$course->categoryid = 1;
$course->categoryname = 'Miscellaneous';
$course->categoryname = get_string('defaultcategoryname');
$course->sortorder = 10001;
$course->fullname = 'Test Remote Course '.$remoteid;
$course->shortname = 'testremotecourse '.$remoteid;
+9 -9
View File
@@ -1370,7 +1370,7 @@ class moodle_content_writer_test extends advanced_testcase {
'System _.1' => [
'data.json',
'paper' => 'data.json',
'Category Miscellaneous _.' . $misccoursecxt->id => [
'Category Category 1 _.' . $misccoursecxt->id => [
'Course Test course 1 _.' . $coursecontext->id => [
'Chat Chat 1 _.' . $modulecontext->id => 'data.json',
'grades' => 'data.json'
@@ -1390,9 +1390,9 @@ class moodle_content_writer_test extends advanced_testcase {
$expectedlistoutput = [
'System _.1/data.json' => 'data_file_1',
'System _.1/paper/data.json' => 'data_file_2',
'System _.1/Category Miscellaneous _.' . $misccoursecxt->id . '/Course Test course 1 _.' .
'System _.1/Category Category 1 _.' . $misccoursecxt->id . '/Course Test course 1 _.' .
$coursecontext->id . '/Chat Chat 1 _.' . $modulecontext->id . '/data.json' => 'data_file_3',
'System _.1/Category Miscellaneous _.' . $misccoursecxt->id . '/Course Test course 1 _.' .
'System _.1/Category Category 1 _.' . $misccoursecxt->id . '/Course Test course 1 _.' .
$coursecontext->id . '/grades/data.json' => 'data_file_4',
'System _.1/Category Course category 1 _.' . $categorycontext->id . '/data.json' => 'data_file_5',
'System _.1/_files/tests/a.txt' => 'No var',
@@ -1403,9 +1403,9 @@ class moodle_content_writer_test extends advanced_testcase {
$expectedindex = [
'data_file_1' => 'System _.1/data.js',
'data_file_2' => 'System _.1/paper/data.js',
'data_file_3' => 'System _.1/Category Miscellaneous _.' . $misccoursecxt->id . '/Course Test course 1 _.' .
'data_file_3' => 'System _.1/Category Category 1 _.' . $misccoursecxt->id . '/Course Test course 1 _.' .
$coursecontext->id . '/Chat Chat 1 _.' . $modulecontext->id . '/data.js',
'data_file_4' => 'System _.1/Category Miscellaneous _.' . $misccoursecxt->id . '/Course Test course 1 _.' .
'data_file_4' => 'System _.1/Category Category 1 _.' . $misccoursecxt->id . '/Course Test course 1 _.' .
$coursecontext->id . '/grades/data.js',
'data_file_5' => 'System _.1/Category Course category 1 _.' . $categorycontext->id . '/data.js',
'data_file_6' => 'System _.1/Logs/Standard log/data.js'
@@ -1438,9 +1438,9 @@ class moodle_content_writer_test extends advanced_testcase {
]
]
],
'Category Miscellaneous _.' . $misccoursecxt->id => (object) [
'Category Category 1 _.' . $misccoursecxt->id => (object) [
'itemtype' => 'treeitem',
'name' => 'Category Miscellaneous ',
'name' => 'Category Category 1 ',
'context' => $misccoursecxt,
'children' => [
'Course Test course 1 _.' . $coursecontext->id => (object) [
@@ -1542,9 +1542,9 @@ class moodle_content_writer_test extends advanced_testcase {
'name' => 'System ',
'context' => \context_system::instance(),
'children' => [
'Category Miscellaneous _.' . $misccoursecxt->id => (object) [
'Category Category 1 _.' . $misccoursecxt->id => (object) [
'itemtype' => 'treeitem',
'name' => 'Category Miscellaneous ',
'name' => 'Category Category 1 ',
'context' => $misccoursecxt,
'children' => [
'Course Test course 1 _.' . $coursecontext->id => (object) [
@@ -44,23 +44,23 @@ Feature: Select content bank files using the content bank files repository
And I click on "Add..." "button"
And I should see "Content bank" in the ".fp-repo-area" "css_element"
When I select "Content bank" repository in file picker
Then I should see "System > Miscellaneous > MiscellaneousCourse1" breadcrumb navigation in repository
Then I should see "System > Category 1 > MiscellaneousCourse1" breadcrumb navigation in repository
And I should see "1" elements in repository content area
And I should see "filltheblanks.h5p" "file" in repository content area
And I click on "Miscellaneous" "link" in the ".file-picker .fp-pathbar" "css_element"
And I should see "System > Miscellaneous" breadcrumb navigation in repository
And I click on "Category 1" "link" in the ".file-picker .fp-pathbar" "css_element"
And I should see "System > Category 1" breadcrumb navigation in repository
And I should see "2" elements in repository content area
And I should see "MiscellaneousCourse1" "folder" in repository content area
And I should see "MiscellaneousCourse2" "folder" in repository content area
And I click on "MiscellaneousCourse2" "folder" in repository content area
And I should see "System > Miscellaneous > MiscellaneousCourse2" breadcrumb navigation in repository
And I should see "System > Category 1 > MiscellaneousCourse2" breadcrumb navigation in repository
And I should see "1" elements in repository content area
And I should see "find-the-words.h5p" "file" in repository content area
And I click on "System" "link" in the ".file-picker .fp-pathbar" "css_element"
And I should see "System" breadcrumb navigation in repository
And I should see "3" elements in repository content area
And I should see "filltheblanks.h5p" "file" in repository content area
And I should see "Miscellaneous" "folder" in repository content area
And I should see "Category 1" "folder" in repository content area
And I should see "Category1" "folder" in repository content area
And I click on "Category1" "folder" in repository content area
And I should see "System > Category1" breadcrumb navigation in repository
@@ -84,7 +84,7 @@ Feature: Select content bank files using the content bank files repository
And I click on "Add..." "button"
And I should see "Content bank" in the ".fp-repo-area" "css_element"
And I select "Content bank" repository in file picker
And I should see "System > Miscellaneous > MiscellaneousCourse1" breadcrumb navigation in repository
And I should see "System > Category 1 > MiscellaneousCourse1" breadcrumb navigation in repository
And I click on "System" "link" in the ".file-picker .fp-pathbar" "css_element"
And I click on "Category1" "folder" in repository content area
And I should see "ipsums.h5p" "file" in repository content area
@@ -100,18 +100,18 @@ Feature: Select content bank files using the content bank files repository
And I click on "Add..." "button"
And I should see "Content bank" in the ".fp-repo-area" "css_element"
When I select "Content bank" repository in file picker
Then I should see "System > Miscellaneous > MiscellaneousCourse1" breadcrumb navigation in repository
Then I should see "System > Category 1 > MiscellaneousCourse1" breadcrumb navigation in repository
And I should see "1" elements in repository content area
And I should see "filltheblanks.h5p" "file" in repository content area
And I click on "Miscellaneous" "link" in the ".file-picker .fp-pathbar" "css_element"
And I should see "System > Miscellaneous" breadcrumb navigation in repository
And I click on "Category 1" "link" in the ".file-picker .fp-pathbar" "css_element"
And I should see "System > Category 1" breadcrumb navigation in repository
And I should see "1" elements in repository content area
And I should see "MiscellaneousCourse1" "folder" in repository content area
And I click on "System" "link" in the ".file-picker .fp-pathbar" "css_element"
And I should see "System" breadcrumb navigation in repository
And I should see "2" elements in repository content area
And I should see "filltheblanks.h5p" "file" in repository content area
And I should see "Miscellaneous" "folder" in repository content area
And I should see "Category 1" "folder" in repository content area
Scenario: Editing teacher can select and re-use content bank files available to him using the content bank repository
Given I am on the Folder "Folder activity" page logged in as teacher1
@@ -119,7 +119,7 @@ Feature: Select content bank files using the content bank files repository
And I click on "Add..." "button"
And I should see "Content bank" in the ".fp-repo-area" "css_element"
And I select "Content bank" repository in file picker
And I should see "System > Miscellaneous > MiscellaneousCourse1" breadcrumb navigation in repository
And I should see "System > Category 1 > MiscellaneousCourse1" breadcrumb navigation in repository
And I click on "System" "link" in the ".file-picker .fp-pathbar" "css_element"
And I should see "filltheblanks.h5p" "file" in repository content area
And I click on "filltheblanks.h5p" "file" in repository content area
@@ -52,9 +52,9 @@ class repository_contentbank_browser_testcase extends advanced_testcase {
$coursecategory = $this->getDataGenerator()->create_category(['name' => 'Category']);
$coursecatcontext = \context_coursecat::instance($coursecategory->id);
// Get the default 'Miscellaneous' category.
$miscellaneouscat = \core_course_category::get(1);
$miscellaneouscatcontext = \context_coursecat::instance($miscellaneouscat->id);
// Get the default course category.
$defaultcat = \core_course_category::get(1);
$defaultcatcontext = \context_coursecat::instance($defaultcat->id);
// Create course.
$course = $this->getDataGenerator()->create_course(['category' => $coursecategory->id]);
@@ -77,12 +77,12 @@ class repository_contentbank_browser_testcase extends advanced_testcase {
$repositorycontentnodes = $browser->get_content();
// All content nodes should be available to the admin user.
// There should be a total of 5 nodes, 3 file nodes representing the existing content bank files in the
// system context and 2 folder nodes representing the default course category 'Miscellaneous' and 'Category'.
// system context and 2 folder nodes representing the default course category and 'Category'.
$this->assertCount(5, $repositorycontentnodes);
$contextfolders = [
[
'name' => 'Miscellaneous',
'contextid' => $miscellaneouscatcontext->id
'name' => get_string('defaultcategoryname'),
'contextid' => $defaultcatcontext->id
],
[
'name' => 'Category',
@@ -235,7 +235,7 @@ class repository_contentbank_browser_testcase extends advanced_testcase {
$category = $this->getDataGenerator()->create_category(['name' => 'Category']);
// Create course1 in 'Category'.
$course1 = $this->getDataGenerator()->create_course(['fullname' => 'Course1', 'category' => $category->id]);
// Create course2 in 'Miscellaneous' by default.
// Create course2 in default category by default.
$course2 = $this->getDataGenerator()->create_course(['fullname' => 'Course2']);
// Create a teacher enrolled in course1.
$teacher = $this->getDataGenerator()->create_and_enrol($course1, 'teacher');
+1 -1
View File
@@ -140,7 +140,7 @@ class repository_contentbank_search_testcase extends advanced_testcase {
public function test_get_search_contents_user_can_access_all_content() {
$this->resetAfterTest(true);
// Create a course in 'Miscellaneous' category by default.
// Create a course in default category by default.
$course = $this->getDataGenerator()->create_course();
$coursecontext = \context_course::instance($course->id);
// Create a course category without a course.
+2 -2
View File
@@ -769,7 +769,7 @@ JSON;
<token/>
<uid_file_owner>tech</uid_file_owner>
<displayname_file_owner>tech</displayname_file_owner>
<path>/System/Category Miscellaneous/Course Example Course/File morefiles/mod_resource/content/0/merge.txt</path>
<path>/System/Category Category 1/Course Example Course/File morefiles/mod_resource/content/0/merge.txt</path>
<item_type>file</item_type>
<mimetype>text/plain</mimetype>
<storage_id>home::tech</storage_id>
@@ -794,7 +794,7 @@ JSON;
<token/>
<uid_file_owner>tech</uid_file_owner>
<displayname_file_owner>tech</displayname_file_owner>
<path>/System/Category Miscellaneous/Course Example Course/File morefiles/mod_resource/content/0/merge.txt</path>
<path>/System/Category Category 1/Course Example Course/File morefiles/mod_resource/content/0/merge.txt</path>
<item_type>file</item_type>
<mimetype>text/plain</mimetype>
<storage_id>home::tech</storage_id>
+1 -1
View File
@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2021091100.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2021091100.01; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '4.0dev (Build: 20210911)'; // Human-friendly version name