Currently the plagiarism API has a call to plagiarism_get_links()
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.