-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
2.8.1
-
MOODLE_28_STABLE
Currently the plagiarism API has a call to plagiarism_get_links()
/**
|
* displays the similarity score and provides a link to the full report if allowed.
|
*
|
* @param object $linkarray contains all relevant information for the plugin to generate a link
|
* @return string - url to allow login/viewing of a similarity report
|
*/
|
function plagiarism_get_links($linkarray)
|
This does not describe what is expected in the linkarray. This means that the plugins adding plagiarism support, each pass different custom data, and the plagiarism plugins each get custom coded to work with specific modules only.
Current known abuses are "mod/assign/submission/onlinetext/locallib.php" passing the entire "assignment" record, and mod_forum passing the entire forum record.
We should deprecate the passing of these module specific data structures, and insist on the magic 4 "context/component/area/itemid" passing through this API always (as well as "content" or "file" params).
This is an API change - so master only at first and we can consider backporting just some phpdocs to say not to use this wrong data.