|
19 | 19 | * lib.php - Contains Plagiarism base class used by plugins.
|
20 | 20 | *
|
21 | 21 | * @since Moodle 2.0
|
22 |
| - * @package moodlecore |
23 |
| - * @subpackage plagiarism |
| 22 | + * @package core_plagiarism |
24 | 23 | * @copyright 2010 Dan Marsden http://danmarsden.com
|
25 | 24 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
26 | 25 | */
|
|
29 | 28 | die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
|
30 | 29 | }
|
31 | 30 |
|
32 |
| -//dummy class - all plugins should be based off this. |
33 |
| -class plagiarism_plugin { |
| 31 | + |
| 32 | +/** |
| 33 | + * Plagiarism base class used by plugins. |
| 34 | + * |
| 35 | + * @since Moodle 2.0 |
| 36 | + * @package core_plagiarism |
| 37 | + * @copyright 2010 Dan Marsden http://danmarsden.com |
| 38 | + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
| 39 | + */ |
| 40 | +abstract class plagiarism_plugin { |
34 | 41 |
|
35 | 42 | /**
|
36 | 43 | * Return the list of form element names.
|
@@ -90,10 +97,17 @@ public function print_disclosure($cmid) {
|
90 | 97 | */
|
91 | 98 | public function update_status($course, $cm) {
|
92 | 99 | }
|
| 100 | + |
93 | 101 | /**
|
94 |
| - * hook for cron |
| 102 | + * Deprecated cron method. |
| 103 | + * |
| 104 | + * This method was added by mistake in the previous versions of Moodle, do not override it since it is never called. |
| 105 | + * To implement cron you need to register a scheduled task, see https://docs.moodle.org/dev/Task_API. |
| 106 | + * For backward compatibility with the old cron API the method cron() from this class can also be used. |
95 | 107 | *
|
| 108 | + * @deprecated since Moodle 3.1 MDL-52702 - please use scheduled tasks instead. |
96 | 109 | */
|
97 | 110 | public function plagiarism_cron() {
|
| 111 | + debugging('plagiarism_plugin::plagiarism_cron() is deprecated. Please use scheduled tasks instead', DEBUG_DEVELOPER); |
98 | 112 | }
|
99 | 113 | }
|
0 commit comments