Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.
/plagiarism/ -> lib.php (source)

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 401 and 402] [Versions 401 and 403]

lib.php - Contains Plagiarism base class used by plugins.

Copyright: 2010 Dan Marsden http://danmarsden.com
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 109 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

plagiarism_plugin:: (7 methods):
  get_configs()
  get_links()
  get_file_results()
  get_form_elements_module()
  save_form_elements()
  print_disclosure()
  update_status()


Class: plagiarism_plugin  - X-Ref

Plagiarism base class used by plugins.

get_configs()   X-Ref
Return the list of form element names.

return: array contains the form element names.

get_links($linkarray)   X-Ref
hook to allow plagiarism specific information to be displayed beside a submission

param: array  $linkarraycontains all relevant information for the plugin to generate a link
return: string

get_file_results($cmid, $userid, $file)   X-Ref
hook to allow plagiarism specific information to be returned unformatted

param: int $cmid
param: int $userid
param: $file file object
return: array containing at least:

get_form_elements_module($mform, $context, $modulename = "")   X-Ref
hook to add plagiarism specific settings to a module settings page

param: object $mform  - Moodle form
param: object $context - current context
param: string $modulename - Name of the module

save_form_elements($data)   X-Ref
hook to save plagiarism specific settings on a module settings page

param: object $data - data from an mform submission.

print_disclosure($cmid)   X-Ref
hook to allow a disclosure to be printed notifying users what will happen with their submission

param: int $cmid - course module id
return: string

update_status($course, $cm)   X-Ref
hook to allow status of submitted files to be updated - called on grading/report pages.

param: object $course - full Course object
param: object $cm - full cm object