VPL - similarity always 0 results

VPL - similarity always 0 results

by Garth Brady -
Number of replies: 6

Greetings all,

The similarity function in VPL does not seem to be working for me.  I always get 0 results even if 2 students submit identical code...  I've resorted to using an alternative plagiarism detection method.  Is there a php function that must be enabled?  It's odd that no error is reported despite the constant 0 results.

Average of ratings: -
In reply to Garth Brady

Re: VPL - similarity always 0 results

by Juan Carlos Rodríguez-del-Pino -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Dear Garth,
notice that similarity features are available for these languages: C, CPP, Java, Scala, Ada, Scheme, Python, Prolog, Matlab, and HTML.
what programming languages are using the students?

Best regards,
juan carlos.
In reply to Juan Carlos Rodríguez-del-Pino

Re: VPL - similarity always 0 results

by Garth Brady -
The students are using php... It's worked in the past but unfortunately that does not seem to be on the list sad Can I add it somehow?
In reply to Garth Brady

Re: VPL - similarity always 0 results

by Juan Carlos Rodríguez-del-Pino -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Garth.
I have added "Support of PHP similarity search" on the TODO list.
Best regards,
Juan Carlos.


In reply to Juan Carlos Rodríguez-del-Pino

Re: VPL - similarity always 0 results

by Garth Brady -
It's strange because the Similarity function used to work for php but it doesn't any longer. Is this a file I can tweak myself? It looks like I just need to create tokenizer_php.php and similarity_php.php files... If I use cpp as a model, is this likely to work?
In reply to Garth Brady

Re: VPL - similarity always 0 results

by Juan Carlos Rodríguez-del-Pino -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Garth,
to use the C++ parser with php files you only need to modify the similarity/similarity_factory_class.php adding the key/value 'php' => 'cpp' to the $sstr array.

Please,  Let me know if its worth to use in the official VPL version.

Best regards and apologies for the delayed answer.
Juan Carlos.

In reply to Juan Carlos Rodríguez-del-Pino

Re: VPL - similarity always 0 results

by Garth Brady -
Hi Juan,

Yes, that worked flawlessly! Thank you so much! It's such a useful tool! Again, very much appreciated!