mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-72350 mod: Remove mod_assignment
The Assignment 2.2 activity module was disabled in 2012 but kept to enable pre-2.2 backups to be restored and have the assignments auto-converted to new assignments. After almost 10 years, it's time to remove it from Moodle core.
This commit is contained in:
parent
26d78531e7
commit
1147a9fe9d
@ -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 |
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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'
|
||||
),
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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());
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user