onno-schuit / copycheck Goto Github PK
View Code? Open in Web Editor NEWCopyCheck plagiarism plugin for Moodle
CopyCheck plagiarism plugin for Moodle
https://github.com/onno-schuit/copycheck/blob/master/moodle-plagiarism_copycheck/lib.php#L151
This should be moved until after the isset($data->copycheck_use) so that it isn't called unnecessarily and cause a load on the database when not required.
The call to plagiarism::get_links() is made in the core code in a lot of different places but as your code only supports the assignment module you should add a sanity check to ensure it comes from the assignment module before making a db call:
https://github.com/onno-schuit/copycheck/blob/master/moodle-plagiarism_copycheck/lib.php#L54
FYI - In Moodle 3.1 (not yet released) plagiarism plugins that call the plagiarism_plugin::cron() function will throw a debugging warning stating that the cron function is now deprecated - plugins should move to using the newer "scheduled tasks" process instead. Eventually the function will be removed from a future Moodle release which may prevent your plugin from working unless you have converted to using scheduled tasks.
It looks like the copycheck plugin doesn't actually use the cron() function (but unfortunately versions prior to 3.1 will require the function to exist) - you will probably just be able to publish a version for 3.1 and higher that removes the empty "cron()" function from your code.
More information on this change is available in https://tracker.moodle.org/browse/MDL-52702
Developer documentation on scheduled tasks is available here:
https://docs.moodle.org/dev/Task_API
an example of a plagiarism plugin that has converted to the new scheduled tasks is the URKUND plugin - feel free to copy/borrow/re-use the code here:
https://github.com/danmarsden/moodle-plagiarism_urkund/blob/master/db/tasks.php
https://github.com/danmarsden/moodle-plagiarism_urkund/tree/master/classes/task
The settings page should check to see if the client code entered is valid and provide feedback directly to the admin.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.