Non-core contributed modules

Plagiarism detection module

Details

  • Type: New Feature New Feature
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9, 1.9.1, 1.9.2, 1.9.3
  • Fix Version/s: None
  • Component/s: Block: Crot
  • Labels:
    None
  • Environment:
    Linux, PHP5, MySQL
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_19_STABLE

Description

Crot: a new block for plagiarism detection.
The plug-in is based on the document fingerprinting technologies for pair-wise document comparison and MSN Live search engine to perform global search.

Crot can solve the next problems:
1. Local plagiarism detection: it will search for similarities in the local submissions.
2. Internet plagiarism detection: it will look for similar documents on the web

  1. crot.tgz
    31/Dec/08 3:18 PM
    17 kB
    Sergey Butakov
  2. crot.tgz
    23/Dec/08 3:46 PM
    17 kB
    Sergey Butakov

Activity

Hide
Anthony Borrow added a comment -

Sergey - Thanks for sharing this code with the Moodle community. I will try to take a look at it tomorrow. Before I start I wanted to see if there was any particular reason why you pegged this as a minor security issue. I like the idea of comparing local submissions and using an internet check. Again, having not looked at the code but aware that some folks prefer to use different search engines might it be possible to develop something for say a google check, yahoo check, etc.? Peace - Anthony

Show
Anthony Borrow added a comment - Sergey - Thanks for sharing this code with the Moodle community. I will try to take a look at it tomorrow. Before I start I wanted to see if there was any particular reason why you pegged this as a minor security issue. I like the idea of comparing local submissions and using an internet check. Again, having not looked at the code but aware that some folks prefer to use different search engines might it be possible to develop something for say a google check, yahoo check, etc.? Peace - Anthony
Hide
Anthony Borrow added a comment -

Sergey - I did catch on syntax error in crot_crone.php the line should read:

print_error("exception in FP calc\n");

Peace - Anthony

Show
Anthony Borrow added a comment - Sergey - I did catch on syntax error in crot_crone.php the line should read: print_error("exception in FP calc\n"); Peace - Anthony
Hide
Anthony Borrow added a comment -

p.s. what is the purpose of the html2textrc file? I seems a bit strange and I'll be looking at the code to see what I can make of it. I try to get the file names resolved and worked out before making an initial commit just because CVS does not technically allow for a file to be deleted. Let me know your thoughts.

Show
Anthony Borrow added a comment - p.s. what is the purpose of the html2textrc file? I seems a bit strange and I'll be looking at the code to see what I can make of it. I try to get the file names resolved and worked out before making an initial commit just because CVS does not technically allow for a file to be deleted. Let me know your thoughts.
Hide
Anthony Borrow added a comment -

Notice: Undefined index: globals in /home/arborrow/Moodle/code/19stable/blocks/crot/savesettings.php on line 26

I would make sure to check that the variables are initialized before using. For example,

if (isset($_REQUEST['locals'])) { $locals = $_REQUEST['locals']; } else { $locals = NULL; }
if (isset($_REQUEST['globals'])) { $globals = $_REQUEST['globals']; } else { $globals = NULL; }

Show
Anthony Borrow added a comment - Notice: Undefined index: globals in /home/arborrow/Moodle/code/19stable/blocks/crot/savesettings.php on line 26 I would make sure to check that the variables are initialized before using. For example, if (isset($_REQUEST['locals'])) { $locals = $_REQUEST['locals']; } else { $locals = NULL; } if (isset($_REQUEST['globals'])) { $globals = $_REQUEST['globals']; } else { $globals = NULL; }
Hide
Anthony Borrow added a comment -

Warning: Invalid argument supplied for foreach() in /home/arborrow/Moodle/code/19stable/blocks/crot/index.php on line 91

I would recommend turning debugging mode to show All reasonable errors and notices (not developer mode as that might be too strict) but when I test code I do have debugging set to on so that I can see any and all php notices.

For this one I used an if (!empty($subs)) {
before the foreach and if there are no submissions I returned an error(get_string('noattempts','assignment'));
which is consistent with how the assignment module displays when there are no attempts yet on the assignment

One last question, what does crot stand for? Before I upload it to CONTRIB, I want to make sure we are not going to have to rename anything as that can be a bit of a challenge with CVS.

Peace - Anthony

Show
Anthony Borrow added a comment - Warning: Invalid argument supplied for foreach() in /home/arborrow/Moodle/code/19stable/blocks/crot/index.php on line 91 I would recommend turning debugging mode to show All reasonable errors and notices (not developer mode as that might be too strict) but when I test code I do have debugging set to on so that I can see any and all php notices. For this one I used an if (!empty($subs)) { before the foreach and if there are no submissions I returned an error(get_string('noattempts','assignment')); which is consistent with how the assignment module displays when there are no attempts yet on the assignment One last question, what does crot stand for? Before I upload it to CONTRIB, I want to make sure we are not going to have to rename anything as that can be a bit of a challenge with CVS. Peace - Anthony
Hide
Sergey Butakov added a comment -

Anthony, thank you for checking the code.
I did some changes in the code and uploaded the new version here.

Below I'll try to answer your concerns:
1. Well I put minor security issue by mistake. There is no known security issues in the plug-in. Of course since the block downloads files from the remote locations it maybe a bit dangerous but it uses the well tested programs such as antiword and curl to download and process external files.

MSN is the only search engine that provides search API through SOAP. As far as I know Google prohibits parsing the search results it returns.
From our extensive experiments on the large set of students essays MSN search works OK. We didn't run many experiments with documents in languages other than English but some trials with essays in Russian indicated that MSN search also works fine. We hope that community help us to test it with other languages.

2. print_error()"exception in FP calc\n");
changed to
print_error("exception in FP calc\n");
thank you

3. html2textrc file is not required. I deleted it. Thank you for pointing this out.

4. I inserted checking for variables to be initialized before using in savesettings.php as you suggested. Thank you.

5. I inserted
if (empty($subs)) { error(get_string('noattempts','assignment')); }
before the foreach statement as you suggested.

The answer to the last question is pretty simple: crot is transliteration of Russian word for mole - small creature that lives under the ground (http://en.wikipedia.org/wiki/Mole). In Russian this word sometimes refers to kind of agent who works under the cover

Again, thank you for reviewing the code and Happy New Year!

Show
Sergey Butakov added a comment - Anthony, thank you for checking the code. I did some changes in the code and uploaded the new version here. Below I'll try to answer your concerns: 1. Well I put minor security issue by mistake. There is no known security issues in the plug-in. Of course since the block downloads files from the remote locations it maybe a bit dangerous but it uses the well tested programs such as antiword and curl to download and process external files. MSN is the only search engine that provides search API through SOAP. As far as I know Google prohibits parsing the search results it returns. From our extensive experiments on the large set of students essays MSN search works OK. We didn't run many experiments with documents in languages other than English but some trials with essays in Russian indicated that MSN search also works fine. We hope that community help us to test it with other languages. 2. print_error()"exception in FP calc\n"); changed to print_error("exception in FP calc\n"); thank you 3. html2textrc file is not required. I deleted it. Thank you for pointing this out. 4. I inserted checking for variables to be initialized before using in savesettings.php as you suggested. Thank you. 5. I inserted if (empty($subs)) { error(get_string('noattempts','assignment')); } before the foreach statement as you suggested. The answer to the last question is pretty simple: crot is transliteration of Russian word for mole - small creature that lives under the ground (http://en.wikipedia.org/wiki/Mole). In Russian this word sometimes refers to kind of agent who works under the cover Again, thank you for reviewing the code and Happy New Year!
Hide
Sergey Butakov added a comment -

updated source code

Show
Sergey Butakov added a comment - updated source code
Hide
Anthony Borrow added a comment -

Sergey - Thanks for your prompt responsiveness to my questions and suggestions. Another variable you may want to make sure to check is $mega in the /blocks/crot/index.php file. You seem to populate it with the exec but just in case something happens it might be good to make sure it is set or otherwise initialized to avoid a PHP notice. A trivial thing that I find helpful when editing language files is to keep the strings in alphabetical order. This is certainly not a requirement just something that I find helpful. To call it a suggestion would be too strong. I have upload the files to CVS and will create a component in the tracker and bump your privileges so that you can manage issues related to the crot block. That way folks can simply create bug requests, feature requests, etc. and they will be automatically assigned to you. Next, I need you to apply for CVS write access so that we can give you write access to contrib/plugins/blocks/crot. Again, please do not hesitate if there is anything I can do to be helpful and thanks again for sharing your creativity, time, code, and talent with the Moodle community. Peace - Anthony

Show
Anthony Borrow added a comment - Sergey - Thanks for your prompt responsiveness to my questions and suggestions. Another variable you may want to make sure to check is $mega in the /blocks/crot/index.php file. You seem to populate it with the exec but just in case something happens it might be good to make sure it is set or otherwise initialized to avoid a PHP notice. A trivial thing that I find helpful when editing language files is to keep the strings in alphabetical order. This is certainly not a requirement just something that I find helpful. To call it a suggestion would be too strong. I have upload the files to CVS and will create a component in the tracker and bump your privileges so that you can manage issues related to the crot block. That way folks can simply create bug requests, feature requests, etc. and they will be automatically assigned to you. Next, I need you to apply for CVS write access so that we can give you write access to contrib/plugins/blocks/crot. Again, please do not hesitate if there is anything I can do to be helpful and thanks again for sharing your creativity, time, code, and talent with the Moodle community. Peace - Anthony
Hide
Anthony Borrow added a comment -

Sergey - One last recommendation - could you review [[Developer:Guidelines_for_contributed_code]] and ensure that you have covered the points there about adding an entry to Modules and Plugins database on Moodle.org and documentation. I think it really will help users as they get familiar with the code. It also covers the details of using the Moodle download server to create automated zip files easing the administrative burden so that you can focus on the code. I like the idea here and hope this block catches on in popularity. You may want to add a forum post on Moodle.org announcing it's availability and requesting translations into other languages. Peace - Anthony

Show
Anthony Borrow added a comment - Sergey - One last recommendation - could you review [[Developer:Guidelines_for_contributed_code]] and ensure that you have covered the points there about adding an entry to Modules and Plugins database on Moodle.org and documentation. I think it really will help users as they get familiar with the code. It also covers the details of using the Moodle download server to create automated zip files easing the administrative burden so that you can focus on the code. I like the idea here and hope this block catches on in popularity. You may want to add a forum post on Moodle.org announcing it's availability and requesting translations into other languages. Peace - Anthony
Hide
Sergey Butakov added a comment -

Anthony, thank you for your reply.
I need some help to start . I am new to CVS, I didn't use it before. How do I apply for CVS write access?
I was trying to check out the Moodle code using the instructions provided at the "Development:Setting up Eclipse" page and my user name and password for tracker, but it seems that it doesn't work for me. How do I apply for CVS user name and password?
Thanks,
Sergey

Show
Sergey Butakov added a comment - Anthony, thank you for your reply. I need some help to start . I am new to CVS, I didn't use it before. How do I apply for CVS write access? I was trying to check out the Moodle code using the instructions provided at the "Development:Setting up Eclipse" page and my user name and password for tracker, but it seems that it doesn't work for me. How do I apply for CVS user name and password? Thanks, Sergey
Hide
Anthony Borrow added a comment -

Sergey - No problem, I was new to CVS too. Simply go to http://moodle.org/cvs/ to apply for CVS write access to contrib/plugins/blocks/crot. Before going there you may want to take a look at http://docs.moodle.org/en/CVS_(developer) which should cover most of the initial questions. If you have others just let me know (keeping in mind that I leave for 3 weeks in Nepal this evening so do not be alarmed if I do not respond until February). Also, I noticed the link to http://docs.moodle.org/en/Development:Guidelines_for_contributed_code did not show up as I had hoped in a previous post. Happy Moodling! Peace - Anthony

Show
Anthony Borrow added a comment - Sergey - No problem, I was new to CVS too. Simply go to http://moodle.org/cvs/ to apply for CVS write access to contrib/plugins/blocks/crot. Before going there you may want to take a look at http://docs.moodle.org/en/CVS_(developer) which should cover most of the initial questions. If you have others just let me know (keeping in mind that I leave for 3 weeks in Nepal this evening so do not be alarmed if I do not respond until February). Also, I noticed the link to http://docs.moodle.org/en/Development:Guidelines_for_contributed_code did not show up as I had hoped in a previous post. Happy Moodling! Peace - Anthony
Hide
Dan Marsden added a comment -

Hi Sergey

FYI - there's a plagiarism plugin template for Moodle 2.0 here:
http://github.com/danmarsden/moodle-plagiarism_new

would be great to see this as a 2.0 plagiarism plugin at some point in future!

To see how it's implemented there's a Turnitin plugin available here (although there are still a couple of bugs with this that need fixing)
http://github.com/danmarsden/moodle-plagiarism_turnitin

Show
Dan Marsden added a comment - Hi Sergey FYI - there's a plagiarism plugin template for Moodle 2.0 here: http://github.com/danmarsden/moodle-plagiarism_new would be great to see this as a 2.0 plagiarism plugin at some point in future! To see how it's implemented there's a Turnitin plugin available here (although there are still a couple of bugs with this that need fixing) http://github.com/danmarsden/moodle-plagiarism_turnitin
Hide
Sergey Butakov added a comment -

Hi Anthony,

we are almost ready to submit the new version of the plugin for Moodle 2.x.
Could you please create a space for us on CVS to do that?

thank you.

cheers,
Sergey

Show
Sergey Butakov added a comment - Hi Anthony, we are almost ready to submit the new version of the plugin for Moodle 2.x. Could you please create a space for us on CVS to do that? thank you. cheers, Sergey
Hide
Dan Marsden added a comment -

Anthony - this will be a new plagiarism plugin so we might need a new /plugins/plagiarism folder to put crot in:
/plugins/plagiarism/crot

thanks!

Show
Dan Marsden added a comment - Anthony - this will be a new plagiarism plugin so we might need a new /plugins/plagiarism folder to put crot in: /plugins/plagiarism/crot thanks!
Hide
Sergey Butakov added a comment -

Hi Anthony, thank you for the reply. We renamed it to crot2 only to highlight that the new version is aimed for the new plagiarism API. But we can keep the name and create a branch. You advise will be appreciated.

Show
Sergey Butakov added a comment - Hi Anthony, thank you for the reply. We renamed it to crot2 only to highlight that the new version is aimed for the new plagiarism API. But we can keep the name and create a branch. You advise will be appreciated.
Hide
Anthony Borrow added a comment -

I think we would be best to keep it as Dan suggests and stick with crot rather than crot2. After all, we don't want to have to rename the plugin when Moodle 3.0 comes out. Peace - Anthony

Show
Anthony Borrow added a comment - I think we would be best to keep it as Dan suggests and stick with crot rather than crot2. After all, we don't want to have to rename the plugin when Moodle 3.0 comes out. Peace - Anthony
Hide
Sergey Butakov added a comment -

OK, sounds good to me. Does it mean that it is going to be /plugins/plagiarism/crot folder accessible with write access from my account?

Show
Sergey Butakov added a comment - OK, sounds good to me. Does it mean that it is going to be /plugins/plagiarism/crot folder accessible with write access from my account?
Hide
Anthony Borrow added a comment -

Dan - Yes, I agree with the location. You should have access to create it. Once it is created we should be able to give Sergey access through cvsadmin module on Moodle.org. Let me know if you need anything. Peace - Anthony

Show
Anthony Borrow added a comment - Dan - Yes, I agree with the location. You should have access to create it. Once it is created we should be able to give Sergey access through cvsadmin module on Moodle.org. Let me know if you need anything. Peace - Anthony
Hide
Dan Marsden added a comment -

Hi Sergey/Anthony,

I've just created the plagiarism/crot folder in contrib cvs - Anthony, can you please give Sergey access to write to contrib/plugins/plagiarism/crot

thanks!

Show
Dan Marsden added a comment - Hi Sergey/Anthony, I've just created the plagiarism/crot folder in contrib cvs - Anthony, can you please give Sergey access to write to contrib/plugins/plagiarism/crot thanks!
Hide
Anthony Borrow added a comment -

Dan - Many thanks for adding the code to the server. I've just added Sergey's privileges via the cvsadmin module. We will use him as a test case to see if the synchronization is working with the CVS server. Peace - Anthony

Show
Anthony Borrow added a comment - Dan - Many thanks for adding the code to the server. I've just added Sergey's privileges via the cvsadmin module. We will use him as a test case to see if the synchronization is working with the CVS server. Peace - Anthony
Hide
Sergey Butakov added a comment -

Hi Anthony,

I've just tried to update a test file and got the following message:

        • Access denied: Insufficient Karma (sergey.butakov|contrib/plugins/plagiarism/crot)
          cvs commit: Pre-commit check failed
          cvs [commit aborted]: correct above errors first!

Could you please have a look on my access rights again?

Cheers,
Sergey

Show
Sergey Butakov added a comment - Hi Anthony, I've just tried to update a test file and got the following message:
        • Access denied: Insufficient Karma (sergey.butakov|contrib/plugins/plagiarism/crot) cvs commit: Pre-commit check failed cvs [commit aborted]: correct above errors first!
Could you please have a look on my access rights again? Cheers, Sergey
Hide
Anthony Borrow added a comment -

Sergey - Thanks for giving it a shot. I suspect that MDLSITE-1214 has not been resolved. Hopefully Jordan will have some time to take a look at making sure that contrib privileges get synchronized with the CVS server. The permissions are listed in the cvsadmin module which should be enough to initiate things; however, I never received an email notification indicating that the change was actually made. Your message confirms that the sync is not taking place. We'll continue to work on it and I'll let you know what we have it worked out so that you can try again. Peace - Anthony

Show
Anthony Borrow added a comment - Sergey - Thanks for giving it a shot. I suspect that MDLSITE-1214 has not been resolved. Hopefully Jordan will have some time to take a look at making sure that contrib privileges get synchronized with the CVS server. The permissions are listed in the cvsadmin module which should be enough to initiate things; however, I never received an email notification indicating that the change was actually made. Your message confirms that the sync is not taking place. We'll continue to work on it and I'll let you know what we have it worked out so that you can try again. Peace - Anthony
Hide
Sergey Butakov added a comment -

Hi Anthony,

thank you for following up. Maybe there is a way to add access privileges directly on cvs? We are ready for the new version upload , just waiting for the access right.

Cheers,
Sergey

Show
Sergey Butakov added a comment - Hi Anthony, thank you for following up. Maybe there is a way to add access privileges directly on cvs? We are ready for the new version upload , just waiting for the access right. Cheers, Sergey
Hide
Jordan Tomkinson added a comment -

Give it a try now Sergey

Anthony I will need to talk to you on jabber about the sync issues

Show
Jordan Tomkinson added a comment - Give it a try now Sergey Anthony I will need to talk to you on jabber about the sync issues
Hide
Sergey Butakov added a comment - - edited

Thank you, Jordan. It works now.
I have question:
what will be the link to the zip file?
is it http://download.moodle.org/download.php/plugins/plagiarism/crot.zip ?

Show
Sergey Butakov added a comment - - edited Thank you, Jordan. It works now. I have question: what will be the link to the zip file? is it http://download.moodle.org/download.php/plugins/plagiarism/crot.zip ?
Hide
Anthony Borrow added a comment -

Sergey - In theory that link should work but let's give it 24 hours to see if it gets automatically created or not. If not I will follow up on it. Peace - Anthony

Thanks Jordan for getting Sergey setup. I'll keep an eye out for you on jabber.

Show
Anthony Borrow added a comment - Sergey - In theory that link should work but let's give it 24 hours to see if it gets automatically created or not. If not I will follow up on it. Peace - Anthony Thanks Jordan for getting Sergey setup. I'll keep an eye out for you on jabber.
Hide
Anthony Borrow added a comment -

Eloy - I've added you to this issue to see if you can check and see what may be happening with http://download.moodle.org/download.php/plugins/plagiarism/crot.zip. The plagiarism directory is new to plugins so it may just need to be added to the script that creates the zip files. Thanks for your help in looking into this. Peace - Anthony

Show
Anthony Borrow added a comment - Eloy - I've added you to this issue to see if you can check and see what may be happening with http://download.moodle.org/download.php/plugins/plagiarism/crot.zip. The plagiarism directory is new to plugins so it may just need to be added to the script that creates the zip files. Thanks for your help in looking into this. Peace - Anthony
Hide
Sergey Butakov added a comment -

Thank you Anthony. The issue has been resolved: link to crot.zip file works. One thing though: block is hidden from users in downloads (http://moodle.org/mod/data/view.php?d=13&rid=2141) - it is not approved yet. Hope it will be approved soon.

cheers,
Sergey

Show
Sergey Butakov added a comment - Thank you Anthony. The issue has been resolved: link to crot.zip file works. One thing though: block is hidden from users in downloads (http://moodle.org/mod/data/view.php?d=13&rid=2141) - it is not approved yet. Hope it will be approved soon. cheers, Sergey
Hide
Sergey Butakov added a comment -

Hi Anthony,

could you please re-approve the first version:
(http://moodle.org/mod/data/view.php?d=13&rid=2141) ?

It is listed as not approved yet because I made some changes in the description.

thank you.
cheers,
Sergey

Show
Sergey Butakov added a comment - Hi Anthony, could you please re-approve the first version: (http://moodle.org/mod/data/view.php?d=13&rid=2141) ? It is listed as not approved yet because I made some changes in the description. thank you. cheers, Sergey

People

Vote (0)
Watch (7)

Dates

  • Created:
    Updated:
    Resolved: