3 // This file is part of Moodle - http://moodle.org/
5 // Moodle is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
10 // Moodle is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
19 * lib.php - Contains Plagiarism base class used by plugins.
23 * @subpackage plagiarism
24 * @copyright 2010 Dan Marsden http://danmarsden.com
25 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
28 if (!defined('MOODLE_INTERNAL')) {
29 die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
32 //dummy class - all plugins should be based off this.
33 class plagiarism_plugin
{
35 * hook to allow plagiarism specific information to be displayed beside a submission
36 * @param array $linkarraycontains all relevant information for the plugin to generate a link
40 public function get_links($linkarray) {
44 * hook to add plagiarism specific settings to a module settings page
45 * @param object $mform - Moodle form
46 * @param object $context - current context
48 public function get_form_elements_module($mform, $context) {
50 /* hook to save plagiarism specific settings on a module settings page
51 * @param object $data - data from an mform submission.
53 public function save_form_elements($data) {
56 * hook to allow a disclosure to be printed notifying users what will happen with their submission
57 * @param int $cmid - course module id
60 public function print_disclosure($cmid) {
63 * hook to allow status of submitted files to be updated - called on grading/report pages.
65 * @param object $course - full Course object
66 * @param object $cm - full cm object
68 public function update_status($course, $cm) {
74 public function plagiarism_cron() {