PlagiarismCheck/moodle-plagiarism_pchkorg

plagiarism_plugin_pchkorg::get_links() should check if the $linkarray contains an assignment file before doing anything

danmarsden opened this issue · 4 comments

Your plugin only seems to support the moodle assign plugin. You should check $linkarray to see if it contains an assign record before you make any db calls/other api calls and just return without doing anything so that you do not impact on the page load times of the other plugins that support the plagiarism API.

Please also make it clear in your plugins db description on moodle.org that you only currently support the Moodle assign plugin.

you also need to add this to the get_form_elements_module function - you shouldn't be adding your settings to plugins you don't support.

Moodle core plugins that support plagiarism include:
assign
workshop
forum

there are also 3rd party plugins that have added plagiarism support - so you should use a check like

If not the assign module - return

instead of

if workshop or forum - return (

hopefully that makes sense.

you also need to do this in print_disclosure()

This issue has been fixed. Thank you for report.