diff --git a/admin/tool/behat/tests/behat/data_generators.feature b/admin/tool/behat/tests/behat/data_generators.feature
index 9423a39d6d6..17b94f52422 100644
--- a/admin/tool/behat/tests/behat/data_generators.feature
+++ b/admin/tool/behat/tests/behat/data_generators.feature
@@ -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
diff --git a/admin/tool/capability/tests/behat/show_contexts.feature b/admin/tool/capability/tests/behat/show_contexts.feature
index f61ca9e1c79..053f5932f87 100644
--- a/admin/tool/capability/tests/behat/show_contexts.feature
+++ b/admin/tool/capability/tests/behat/show_contexts.feature
@@ -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"
diff --git a/admin/tool/componentlibrary/content/moodle/components/coursecards.md b/admin/tool/componentlibrary/content/moodle/components/coursecards.md
index c4d0e15c232..ca449302845 100644
--- a/admin/tool/componentlibrary/content/moodle/components/coursecards.md
+++ b/admin/tool/componentlibrary/content/moodle/components/coursecards.md
@@ -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
},
diff --git a/admin/tool/moodlenet/templates/view-cards.mustache b/admin/tool/moodlenet/templates/view-cards.mustache
index da742ffe671..31820a6b629 100644
--- a/admin/tool/moodlenet/templates/view-cards.mustache
+++ b/admin/tool/moodlenet/templates/view-cards.mustache
@@ -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
}
]
diff --git a/analytics/tests/manager_test.php b/analytics/tests/manager_test.php
index 582c45740a2..846485b5fb4 100644
--- a/analytics/tests/manager_test.php
+++ b/analytics/tests/manager_test.php
@@ -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'));
}
diff --git a/analytics/tests/prediction_test.php b/analytics/tests/prediction_test.php
index 43af3a6cb33..30b57e4bc95 100644
--- a/analytics/tests/prediction_test.php
+++ b/analytics/tests/prediction_test.php
@@ -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();
diff --git a/backup/cc/sheets/course_header.xml b/backup/cc/sheets/course_header.xml
index ed35f0a39d3..69fa46ca918 100644
--- a/backup/cc/sheets/course_header.xml
+++ b/backup/cc/sheets/course_header.xml
@@ -1,7 +1,7 @@
1
1
- Miscellaneous
+ Category 1
[#course_name#]
diff --git a/backup/cc/sheets/moodle_blti_export.xml b/backup/cc/sheets/moodle_blti_export.xml
index e87ff0c8309..ae4ba820a90 100644
--- a/backup/cc/sheets/moodle_blti_export.xml
+++ b/backup/cc/sheets/moodle_blti_export.xml
@@ -1378,7 +1378,7 @@
2
1
- Miscellaneous
+ Category 1
Course Fullname 101
diff --git a/backup/converter/moodle1/tests/fixtures/moodle.xml b/backup/converter/moodle1/tests/fixtures/moodle.xml
index ff4679cb43b..1d26478c779 100644
--- a/backup/converter/moodle1/tests/fixtures/moodle.xml
+++ b/backup/converter/moodle1/tests/fixtures/moodle.xml
@@ -42,7 +42,7 @@
33
1
- Miscellaneous
+ Category 1
Moodle 2.0 Test Restore
diff --git a/blocks/course_list/tests/behat/block_course_list_category.feature b/blocks/course_list/tests/behat/block_course_list_category.feature
index 3c03721f725..53ec6cc0da4 100644
--- a/blocks/course_list/tests/behat/block_course_list_category.feature
+++ b/blocks/course_list/tests/behat/block_course_list_category.feature
@@ -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"
diff --git a/blocks/course_list/tests/behat/block_course_list_course.feature b/blocks/course_list/tests/behat/block_course_list_course.feature
index 8a14d9ef7bf..e88161bec23 100644
--- a/blocks/course_list/tests/behat/block_course_list_course.feature
+++ b/blocks/course_list/tests/behat/block_course_list_course.feature
@@ -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"
diff --git a/blocks/course_list/tests/behat/block_course_list_dashboard.feature b/blocks/course_list/tests/behat/block_course_list_dashboard.feature
index f31ae948072..873208b477d 100644
--- a/blocks/course_list/tests/behat/block_course_list_dashboard.feature
+++ b/blocks/course_list/tests/behat/block_course_list_dashboard.feature
@@ -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"
diff --git a/blocks/course_list/tests/behat/block_course_list_frontpage.feature b/blocks/course_list/tests/behat/block_course_list_frontpage.feature
index 93dfa54ec97..0a897ba84b9 100644
--- a/blocks/course_list/tests/behat/block_course_list_frontpage.feature
+++ b/blocks/course_list/tests/behat/block_course_list_frontpage.feature
@@ -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"
diff --git a/blocks/myoverview/templates/view-cards.mustache b/blocks/myoverview/templates/view-cards.mustache
index 03196b9896a..c354a646777 100644
--- a/blocks/myoverview/templates/view-cards.mustache
+++ b/blocks/myoverview/templates/view-cards.mustache
@@ -29,7 +29,7 @@
"fullname": "course 3",
"hasprogress": true,
"progress": 10,
- "coursecategory": "Miscellaneous",
+ "coursecategory": "Category 1",
"visible": true
}
]
diff --git a/blocks/myoverview/templates/view-list.mustache b/blocks/myoverview/templates/view-list.mustache
index 82ce492371f..38079f0cb1d 100644
--- a/blocks/myoverview/templates/view-list.mustache
+++ b/blocks/myoverview/templates/view-list.mustache
@@ -29,7 +29,7 @@
"fullname": "course 3",
"hasprogress": true,
"progress": 10,
- "coursecategory": "Miscellaneous",
+ "coursecategory": "Category 1",
"visible": true
}
]
diff --git a/blocks/myoverview/templates/view-summary.mustache b/blocks/myoverview/templates/view-summary.mustache
index aecd376dbf5..33a69ff5cbf 100644
--- a/blocks/myoverview/templates/view-summary.mustache
+++ b/blocks/myoverview/templates/view-summary.mustache
@@ -30,7 +30,7 @@
"summary": "This course is about assignments",
"hasprogress": true,
"progress": 10,
- "coursecategory": "Miscellaneous",
+ "coursecategory": "Category 1",
"visible": true
}
]
diff --git a/blocks/recentlyaccessedcourses/tests/behat/block_recentlyaccessedcourses_dashboard.feature b/blocks/recentlyaccessedcourses/tests/behat/block_recentlyaccessedcourses_dashboard.feature
index 731e1efc670..5e9ae8c8621 100644
--- a/blocks/recentlyaccessedcourses/tests/behat/block_recentlyaccessedcourses_dashboard.feature
+++ b/blocks/recentlyaccessedcourses/tests/behat/block_recentlyaccessedcourses_dashboard.feature
@@ -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:
diff --git a/calendar/tests/behat/calendar_import.feature b/calendar/tests/behat/calendar_import.feature
index f495281ff43..f42cdf3aced 100644
--- a/calendar/tests/behat/calendar_import.feature
+++ b/calendar/tests/behat/calendar_import.feature
@@ -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"
diff --git a/cohort/tests/behat/upload_cohorts.feature b/cohort/tests/behat/upload_cohorts.feature
index c94e2625bde..4143f5c61d4 100644
--- a/cohort/tests/behat/upload_cohorts.feature
+++ b/cohort/tests/behat/upload_cohorts.feature
@@ -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 |
diff --git a/cohort/tests/fixtures/uploadcohorts1.csv b/cohort/tests/fixtures/uploadcohorts1.csv
index 8fe77ed628f..a1d0c41a65f 100644
--- a/cohort/tests/fixtures/uploadcohorts1.csv
+++ b/cohort/tests/fixtures/uploadcohorts1.csv
@@ -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
diff --git a/cohort/tests/fixtures/uploadcohorts2.csv b/cohort/tests/fixtures/uploadcohorts2.csv
index f2fd9f3e1ce..c3ff6171c29 100644
--- a/cohort/tests/fixtures/uploadcohorts2.csv
+++ b/cohort/tests/fixtures/uploadcohorts2.csv
@@ -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,,,
diff --git a/cohort/tests/fixtures/uploadcohorts4.csv b/cohort/tests/fixtures/uploadcohorts4.csv
index 61dc609c656..9b773d05622 100644
--- a/cohort/tests/fixtures/uploadcohorts4.csv
+++ b/cohort/tests/fixtures/uploadcohorts4.csv
@@ -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
diff --git a/cohort/tests/fixtures/uploadcohorts_test.csv b/cohort/tests/fixtures/uploadcohorts_test.csv
index 567732c7905..fbae0b7f412 100644
--- a/cohort/tests/fixtures/uploadcohorts_test.csv
+++ b/cohort/tests/fixtures/uploadcohorts_test.csv
@@ -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
diff --git a/course/classes/category.php b/course/classes/category.php
index a92e6d202bf..1733d520cf3 100644
--- a/course/classes/category.php
+++ b/course/classes/category.php
@@ -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
diff --git a/course/templates/coursecards.mustache b/course/templates/coursecards.mustache
index 88ae6be5961..f7ba6ed1850 100644
--- a/course/templates/coursecards.mustache
+++ b/course/templates/coursecards.mustache
@@ -29,7 +29,7 @@
"fullname": "course 3",
"hasprogress": true,
"progress": 10,
- "coursecategory": "Miscellaneous"
+ "coursecategory": "Category 1"
}
]
}
diff --git a/course/templates/view-cards.mustache b/course/templates/view-cards.mustache
index ba0d63cce4a..60563b3640d 100644
--- a/course/templates/view-cards.mustache
+++ b/course/templates/view-cards.mustache
@@ -28,7 +28,7 @@
"courseimageurl": "https://moodlesite/pluginfile/123/course/overviewfiles/123.jpg",
"fullname": "course 3",
"isfavourite": true,
- "coursecategory": "Miscellaneous"
+ "coursecategory": "Category 1"
}
]
}
diff --git a/course/tests/behat/behat_course.php b/course/tests/behat/behat_course.php
index a7a26dc918d..a477f391041 100644
--- a/course/tests/behat/behat_course.php
+++ b/course/tests/behat/behat_course.php
@@ -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.
diff --git a/course/tests/behat/category_management.feature b/course/tests/behat/category_management.feature
index 14ad0b238dd..9b1c9f163eb 100644
--- a/course/tests/behat/category_management.feature
+++ b/course/tests/behat/category_management.feature
@@ -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"
diff --git a/course/tests/behat/course_category_management_listing.feature b/course/tests/behat/course_category_management_listing.feature
index 18319fb0d94..42e0987b69c 100644
--- a/course/tests/behat/course_category_management_listing.feature
+++ b/course/tests/behat/course_category_management_listing.feature
@@ -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
diff --git a/course/tests/behat/course_creation.feature b/course/tests/behat/course_creation.feature
index 57d844e2ee9..23d20c84635 100644
--- a/course/tests/behat/course_creation.feature
+++ b/course/tests/behat/course_creation.feature
@@ -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:
diff --git a/course/tests/behat/course_request.feature b/course/tests/behat/course_request.feature
index 19fa9534ea2..6fc76aa271c 100644
--- a/course/tests/behat/course_request.feature
+++ b/course/tests/behat/course_request.feature
@@ -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"
diff --git a/course/tests/behat/frontpage_display_modes.feature b/course/tests/behat/frontpage_display_modes.feature
index c736f3a457f..f2664bbac30 100644
--- a/course/tests/behat/frontpage_display_modes.feature
+++ b/course/tests/behat/frontpage_display_modes.feature
@@ -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"
diff --git a/course/tests/behat/navigate_course_list.feature b/course/tests/behat/navigate_course_list.feature
index 4f7be585d40..c027e62c98d 100644
--- a/course/tests/behat/navigate_course_list.feature
+++ b/course/tests/behat/navigate_course_list.feature
@@ -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."
diff --git a/course/tests/category_test.php b/course/tests/category_test.php
index 467f89d028d..9ed5fb9c00e 100644
--- a/course/tests/category_test.php
+++ b/course/tests/category_test.php
@@ -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)));
diff --git a/customfield/tests/behat/edit_fields_settings.feature b/customfield/tests/behat/edit_fields_settings.feature
index d101de646fa..23839e2cf5f 100644
--- a/customfield/tests/behat/edit_fields_settings.feature
+++ b/customfield/tests/behat/edit_fields_settings.feature
@@ -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:
diff --git a/files/tests/externallib_test.php b/files/tests/externallib_test.php
index 3e951d7d918..a627077a824 100644
--- a/files/tests/externallib_test.php
+++ b/files/tests/externallib_test.php
@@ -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,
diff --git a/lang/en/moodle.php b/lang/en/moodle.php
index 549e25ba965..40ff7e97c45 100644
--- a/lang/en/moodle.php
+++ b/lang/en/moodle.php
@@ -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';
diff --git a/lib/db/install.php b/lib/db/install.php
index 5d4d5565f0e..c67a582675f 100644
--- a/lib/db/install.php
+++ b/lib/db/install.php
@@ -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();
diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php
index 9a5cced14a6..d45f29e542a 100644
--- a/lib/db/upgrade.php
+++ b/lib/db/upgrade.php
@@ -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;
}
diff --git a/mnet/service/enrol/tests/privacy_test.php b/mnet/service/enrol/tests/privacy_test.php
index 795ec779845..d44cf4daa19 100644
--- a/mnet/service/enrol/tests/privacy_test.php
+++ b/mnet/service/enrol/tests/privacy_test.php
@@ -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;
diff --git a/privacy/tests/moodle_content_writer_test.php b/privacy/tests/moodle_content_writer_test.php
index e08bbdef980..d40736d1d4f 100644
--- a/privacy/tests/moodle_content_writer_test.php
+++ b/privacy/tests/moodle_content_writer_test.php
@@ -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) [
diff --git a/repository/contentbank/tests/behat/select_content.feature b/repository/contentbank/tests/behat/select_content.feature
index 4c1d6278f5a..9a2d29980d6 100644
--- a/repository/contentbank/tests/behat/select_content.feature
+++ b/repository/contentbank/tests/behat/select_content.feature
@@ -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
diff --git a/repository/contentbank/tests/browser_test.php b/repository/contentbank/tests/browser_test.php
index 7de26e25975..036dfe94917 100644
--- a/repository/contentbank/tests/browser_test.php
+++ b/repository/contentbank/tests/browser_test.php
@@ -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');
diff --git a/repository/contentbank/tests/search_test.php b/repository/contentbank/tests/search_test.php
index f4f0a646942..bd3867c807a 100644
--- a/repository/contentbank/tests/search_test.php
+++ b/repository/contentbank/tests/search_test.php
@@ -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.
diff --git a/repository/nextcloud/tests/lib_test.php b/repository/nextcloud/tests/lib_test.php
index 0554fecaf55..8028ffdc01b 100644
--- a/repository/nextcloud/tests/lib_test.php
+++ b/repository/nextcloud/tests/lib_test.php
@@ -769,7 +769,7 @@ JSON;
tech
tech
- /System/Category Miscellaneous/Course Example Course/File morefiles/mod_resource/content/0/merge.txt
+ /System/Category Category 1/Course Example Course/File morefiles/mod_resource/content/0/merge.txt
file
text/plain
home::tech
@@ -794,7 +794,7 @@ JSON;
tech
tech
- /System/Category Miscellaneous/Course Example Course/File morefiles/mod_resource/content/0/merge.txt
+ /System/Category Category 1/Course Example Course/File morefiles/mod_resource/content/0/merge.txt
file
text/plain
home::tech
diff --git a/version.php b/version.php
index af26bdf6b63..28de62df36b 100644
--- a/version.php
+++ b/version.php
@@ -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