diff --git a/admin/tool/behat/tests/behat/data_generators.feature b/admin/tool/behat/tests/behat/data_generators.feature index 19bf84211d0..3f0458e763c 100644 --- a/admin/tool/behat/tests/behat/data_generators.feature +++ b/admin/tool/behat/tests/behat/data_generators.feature @@ -160,7 +160,6 @@ Feature: Set up contextual data for tests And the following "activities" exist: | activity | name | intro | course | idnumber | | assign | Test assignment name | Test assignment description | C1 | assign1 | - | assignment | Test assignment22 name | Test assignment22 description | C1 | assignment1 | | book | Test book name | Test book description | C1 | book1 | | chat | Test chat name | Test chat description | C1 | chat1 | | choice | Test choice name | Test choice description | C1 | choice1 | diff --git a/favourites/classes/local/service/user_favourite_service.php b/favourites/classes/local/service/user_favourite_service.php index 0246373f267..66ab2621050 100644 --- a/favourites/classes/local/service/user_favourite_service.php +++ b/favourites/classes/local/service/user_favourite_service.php @@ -114,7 +114,7 @@ class user_favourite_service { * Find a list of favourites, by multiple types within a component. * * E.g. "Find all favourites in the activity chooser" might result in: - * $favcourses = find_all_favourites('core_course', ['contentitem_mod_assign','contentitem_mod_assignment'); + * $favcourses = find_all_favourites('core_course', ['contentitem_mod_assign'); * * @param string $component the frankenstyle component name. * @param array $itemtypes optional the type of the favourited item. diff --git a/grade/grading/form/lib.php b/grade/grading/form/lib.php index 9c94f0d5dad..21605ff776b 100644 --- a/grade/grading/form/lib.php +++ b/grade/grading/form/lib.php @@ -695,7 +695,7 @@ abstract class gradingform_controller { * to the nearest int. Positive $gradingtype means that range 0..$gradingtype * is used for the grades and in this case grade does not have to be rounded. * - * Sometimes modules always expect grade to be rounded (like mod_assignment does). + * Sometimes modules always expect grade to be rounded (like mod_assign does). * * @param array $graderange array where first _key_ is the minimum grade and the * last key is the maximum grade. diff --git a/grade/grading/lib.php b/grade/grading/lib.php index 3615e98e8ae..beeade0fcf6 100644 --- a/grade/grading/lib.php +++ b/grade/grading/lib.php @@ -38,7 +38,7 @@ use core_grades\component_gradeitems; * @category grading * @example $manager = get_grading_manager($areaid); * @example $manager = get_grading_manager(context_system::instance()); - * @example $manager = get_grading_manager($context, 'mod_assignment', 'submission'); + * @example $manager = get_grading_manager($context, 'mod_assign', 'submission'); * @param stdClass|int|null $context_or_areaid if $areaid is passed, no other parameter is needed * @param string|null $component the frankenstyle name of the component * @param string|null $area the name of the gradable area diff --git a/lib/classes/plugin_manager.php b/lib/classes/plugin_manager.php index 0af212945ad..70691271183 100644 --- a/lib/classes/plugin_manager.php +++ b/lib/classes/plugin_manager.php @@ -1721,6 +1721,7 @@ class core_plugin_manager { // Moodle 2.3 supports upgrades from 2.2.x only. $plugins = array( 'qformat' => array('blackboard', 'learnwise', 'examview'), + 'assignment' => array('offline', 'online', 'upload', 'uploadsingle'), 'auth' => array('radius', 'fc', 'nntp', 'pam', 'pop3', 'imap'), 'block' => array('course_overview', 'messages', 'community', 'participants', 'quiz_results'), 'cachestore' => array('memcache', 'memcached', 'mongodb'), @@ -1731,6 +1732,7 @@ class core_plugin_manager { 'portfolio' => array('picasa', 'boxnet'), 'qformat' => array('webct'), 'message' => array('jabber'), + 'mod' => array('assignment'), 'quizaccess' => array('safebrowser'), 'report' => array('search'), 'repository' => array('alfresco', 'picasa', 'skydrive', 'boxnet'), @@ -1776,10 +1778,6 @@ class core_plugin_manager { 'title', 'underline', 'undo', 'unorderedlist', 'h5p', 'emojipicker', ), - 'assignment' => array( - 'offline', 'online', 'upload', 'uploadsingle' - ), - 'assignsubmission' => array( 'comments', 'file', 'onlinetext' ), @@ -1931,7 +1929,7 @@ class core_plugin_manager { ), 'mod' => array( - 'assign', 'assignment', 'bigbluebuttonbn', 'book', 'chat', 'choice', 'data', 'feedback', 'folder', + 'assign', 'bigbluebuttonbn', 'book', 'chat', 'choice', 'data', 'feedback', 'folder', 'forum', 'glossary', 'h5pactivity', 'imscp', 'label', 'lesson', 'lti', 'page', 'quiz', 'resource', 'scorm', 'survey', 'url', 'wiki', 'workshop' ), diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 4169d0086a6..66b822cc5de 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -3201,5 +3201,19 @@ privatefiles,moodle|/user/files.php'; upgrade_main_savepoint(true, 2023031400.02); } + if ($oldversion < 2023032800.01) { + // If mod_assignment is no longer present, remove it. + if (!file_exists($CFG->dirroot . '/mod/assignment/version.php')) { + uninstall_plugin('assignment', 'offline'); + uninstall_plugin('assignment', 'online'); + uninstall_plugin('assignment', 'upload'); + uninstall_plugin('assignment', 'uploadsingle'); + uninstall_plugin('mod', 'assignment'); + } + + // Main savepoint reached. + upgrade_main_savepoint(true, 2023032800.01); + } + return true; } diff --git a/lib/externallib.php b/lib/externallib.php index 01b427d0065..8358fc21204 100644 --- a/lib/externallib.php +++ b/lib/externallib.php @@ -103,7 +103,7 @@ function external_create_service_token($servicename, $contextid) { /** * Delete all pre-built services (+ related tokens) and external functions information defined in the specified component. * - * @param string $component name of component (moodle, mod_assignment, etc.) + * @param string $component name of component (moodle, etc.) */ function external_delete_descriptions($component) { util::delete_service_descriptions($component); diff --git a/lib/grade/tests/grade_item_test.php b/lib/grade/tests/grade_item_test.php index 7ea4734aa4b..8f243a70065 100644 --- a/lib/grade/tests/grade_item_test.php +++ b/lib/grade/tests/grade_item_test.php @@ -602,7 +602,7 @@ class grade_item_test extends \grade_base_testcase { } protected function sub_test_refresh_grades() { - // Testing with the grade item for a mod_assignment instance. + // Testing with the grade item for a mod_assign instance. $grade_item = new \grade_item($this->grade_items[0], false); $this->assertTrue(method_exists($grade_item, 'refresh_grades')); $this->assertTrue($grade_item->refresh_grades()); diff --git a/lib/portfoliolib.php b/lib/portfoliolib.php index e2201d06e32..383d1af68fc 100644 --- a/lib/portfoliolib.php +++ b/lib/portfoliolib.php @@ -1200,7 +1200,7 @@ function portfolio_format_text_options() { * looks through preg_replace matches and replaces content with whatever the active portfolio export format says * * @param int $contextid module context id - * @param string $component module name (eg:mod_assignment) + * @param string $component module name (eg:mod_assign) * @param string $filearea normal file_area arguments * @param int $itemid component item id * @param portfolio_format $format exporter format type diff --git a/version.php b/version.php index 650fd0c9ac0..b9ca2a4e2c9 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2023032800.00; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2023032800.01; // YYYYMMDD = weekly release date of this DEV branch. // RR = release increments - 00 in DEV branches. // .XX = incremental changes. $release = '4.2dev+ (Build: 20230328)'; // Human-friendly version name