@@ -82,65 +82,6 @@ function plagiarism_get_file_results($cmid, $userid, $file) {
82
82
return $ allresults ;
83
83
}
84
84
85
- /**
86
- * saves/updates plagiarism settings from a modules config page - called by course/modedit.php
87
- *
88
- * @deprecated Since Moodle 3.9. MDL-65835 Please use {plugin name}_coursemodule_edit_post_actions() instead.
89
- * @todo MDL-67526 This is to be moved from here to deprecatedlib.php in Moodle 4.1
90
- * @param object $data - form data
91
- */
92
- function plagiarism_save_form_elements ($ data ) {
93
- global $ CFG ;
94
- if (empty ($ CFG ->enableplagiarism )) {
95
- return '' ;
96
- }
97
- $ plagiarismplugins = plagiarism_load_available_plugins ();
98
- foreach ($ plagiarismplugins as $ plugin => $ dir ) {
99
- require_once ($ dir .'/lib.php ' );
100
- $ plagiarismclass = "plagiarism_plugin_ $ plugin " ;
101
- $ plagiarismplugin = new $ plagiarismclass ;
102
-
103
- $ reflectionmethod = new ReflectionMethod ($ plagiarismplugin , 'save_form_elements ' );
104
- if ($ reflectionmethod ->getDeclaringClass ()->getName () == get_class ($ plagiarismplugin )) {
105
- $ text = 'plagiarism_plugin::save_form_elements() is deprecated. ' ;
106
- $ text .= ' Use plagiarism_ ' . $ plugin . '_coursemodule_edit_post_actions() instead ' ;
107
- debugging ($ text , DEBUG_DEVELOPER );
108
- }
109
-
110
- $ plagiarismplugin ->save_form_elements ($ data );
111
- }
112
- }
113
-
114
- /**
115
- * adds the list of plagiarism settings to a form - called inside modules that have enabled plagiarism
116
- *
117
- * @deprecated Since Moodle 3.9. MDL-65835 Please use {plugin name}_coursemodule_standard_elements() instead.
118
- * @todo MDL-67526 This is to be moved from here to deprecatedlib.php in Moodle 4.1
119
- * @param object $mform - Moodle form object
120
- * @param object $context - context object
121
- * @param string $modulename - Name of the module
122
- */
123
- function plagiarism_get_form_elements_module ($ mform , $ context , $ modulename = "" ) {
124
- global $ CFG ;
125
- if (empty ($ CFG ->enableplagiarism )) {
126
- return '' ;
127
- }
128
- $ plagiarismplugins = plagiarism_load_available_plugins ();
129
- foreach ($ plagiarismplugins as $ plugin => $ dir ) {
130
- require_once ($ dir .'/lib.php ' );
131
- $ plagiarismclass = "plagiarism_plugin_ $ plugin " ;
132
- $ plagiarismplugin = new $ plagiarismclass ;
133
-
134
- $ reflectionmethod = new ReflectionMethod ($ plagiarismplugin , 'get_form_elements_module ' );
135
- if ($ reflectionmethod ->getDeclaringClass ()->getName () == get_class ($ plagiarismplugin )) {
136
- $ text = 'plagiarism_plugin::get_form_elements_module() is deprecated. ' ;
137
- $ text .= ' Use plagiarism_ ' . $ plugin . '_coursemodule_standard_elements() instead ' ;
138
- debugging ($ text , DEBUG_DEVELOPER );
139
- }
140
-
141
- $ plagiarismplugin ->get_form_elements_module ($ mform , $ context , $ modulename );
142
- }
143
- }
144
85
/**
145
86
* Allows a plagiarism plugin to print a button/link at the top of activity overview report pages.
146
87
*
@@ -197,12 +138,10 @@ function plagiarism_print_disclosure($cmid) {
197
138
/**
198
139
* Helper function - also loads lib file of plagiarism plugin
199
140
*
200
- * @todo MDL-67872 the deprecated code in this function to be removed in Moodle 4.1
201
141
* @return array of available plugins
202
142
*/
203
143
function plagiarism_load_available_plugins () {
204
144
global $ CFG ;
205
- static $ showndeprecatedmessage = array (); // Only show message once per page load.
206
145
207
146
if (empty ($ CFG ->enableplagiarism )) {
208
147
return array ();
@@ -211,18 +150,7 @@ function plagiarism_load_available_plugins() {
211
150
$ availableplugins = array ();
212
151
foreach ($ plagiarismplugins as $ plugin => $ dir ) {
213
152
// Check this plugin is enabled and a lib file exists.
214
- if (get_config ('plagiarism ' , $ plugin ."_use " )) {
215
- // Deprecated Since Moodle 3.9.
216
- $ pluginenabled = true ;
217
- if (empty ($ showndeprecatedmessage [$ plugin ])) {
218
- $ text = 'The setting plagiarism: ' .$ plugin .'_use is deprecated. ' ;
219
- $ text .= ' Use plagiarism_ ' . $ plugin . ':enabled instead ' ;
220
- debugging ($ text , DEBUG_DEVELOPER );
221
- $ showndeprecatedmessage [$ plugin ] = true ;
222
- }
223
- } else {
224
- $ pluginenabled = get_config ('plagiarism_ ' .$ plugin , 'enabled ' );
225
- }
153
+ $ pluginenabled = get_config ('plagiarism_ ' .$ plugin , 'enabled ' );
226
154
if ($ pluginenabled && file_exists ($ dir ."/lib.php " )) {
227
155
require_once ($ dir .'/lib.php ' );
228
156
$ plagiarismclass = "plagiarism_plugin_ $ plugin " ;
0 commit comments