Note: You are currently viewing documentation for Moodle 2.2. Up-to-date documentation for the latest stable version is available here: Programming Code Plagiarism Plugin.

Programming Code Plagiarism Plugin: Difference between revisions

From MoodleDocs
Line 52: Line 52:
MOSS Userid: the userid emailed to you when registered for MOSS. If you find it difficult to locate the userid in that email. Just copy the entire email to the textbox below (you need either find the user id or copy the email. You don't need to do both)
MOSS Userid: the userid emailed to you when registered for MOSS. If you find it difficult to locate the userid in that email. Just copy the entire email to the textbox below (you need either find the user id or copy the email. You don't need to do both)


[[Media:plugin_config.png]]
[[File:plugin_config.png]]


== Assignment configuration ==
== Assignment configuration ==

Revision as of 04:32, 13 June 2012

Introduction

This plugin integrates two well-known source code plagiarism detectors MOSS and JPlag into Moodle to compare the similarities of programming assignments of students within the same course. By integrating these detectors seamlessly into Moodle, it eliminates the overhead of manually preparing the assignments to feed into these detectors, present the reports with an interactive interface and, more importantly, serve as an educational tool to provide feedback to students and raise their awareness of plagiarism.

Please note: - It only scans for similarities between students in the same course (as MOSS and JPlag do) - It is for academic use only (see the term and condition of MOSS and JPlag)

Registration for JPlag and MOSS account

This plugin relies on JPlag and MOSS engine in the background to carry out the scanning for similarity.

Create a JPlag account: Go to https://www.ipd.uni-karlsruhe.de/jplag/ and click on register. Only academics can register for an account. A notification email will be sent to the subscribed person when the account is granted.

Create MOSS account: email to moss@moss.stanford.edu a message containing 2 lines

 registeruser
 mail username@domain

in which username@domain is your email address. You will receive reply containing a perl script to use MOSS. Visit http://theory.stanford.edu/~aiken/moss/ for more information.

Adding code to server

Extract the zip file containing the code of the plugin and put it to the directory <moodle_dir>/plagiarism/. Leave the directory name, which is "programming", intact. A correct directory structure should look like the following: <moodle_root> ... plagiarism programming coursesetting db jplag lang

             ...

Server configuration

The plugin should run on any platform that Moodle runs, and the installation process should happen smoothly. Please ensure the followings (which are all the conditions of a proper Moodle installation):

+ Make sure that the process on which Apache run have sufficient right to read all the files in the new directory (which is <moodle_dir>/plagiarism/programming/*).

+ Make sure the cron service is configured properly to call the script <moodle_dir>/admin/cron.php periodically. A guide to install the cron service could be found on Moodle website https://docs.moodle.org/20/en/Cron_with_UNIX. This cron service is necessary for scheduling the submission of all students' code to JPlag and MOSS service.

Plugin installation

Login to Moodle as an administrator and visit the notification page (go to Site Administration → Notification or visit the url http://<moodle_url>/admin/index.php), the plugin installation page of Moodle will appear with the programming plagiarism plugin in the list as follows: File:install.png

Click upgrade button to install the plugin to Moodle. The installation should be successful.

Plugin configuration

First, plagiarism plugins should be enabled on your Moodle (see Managing_plagiarism_prevention)

Go to Site Administrator → Plugin → Plagiarism Prevention → Programming Assignment to configure the plugin for the whole Moodle installation. The following options are provided: Use source code plagiarism detection checkbox: enable or disable the plugin for all the assignments Enable this plugin for the whole Moodle: every assignment created will see the configuration block for code similarity matching. Enable this plugin at the course level: just assignments of the specified courses will see the configuration block for code similarity matching. Once this option is selected, a dialog box will appear allowing users to select which course to enable. JPlag Username: user name of the JPlag account (registered at the beginning) JPlag Password: password of the JPlag account MOSS Userid: the userid emailed to you when registered for MOSS. If you find it difficult to locate the userid in that email. Just copy the entire email to the textbox below (you need either find the user id or copy the email. You don't need to do both)

plugin config.png

Assignment configuration

Once the plugin is enabled for the whole Moodle or for the course (see the previous section), users will see the following block when creating or editing an assignment, near the bottom of the assignment configuration page: This block offers the following parameters: Programming assignment: enable the plugin for the current assignment if checked. Programming language: select the programming language for this assignment. Currently, just one programming language is supported for each assignment. Submit date: the date when all the submission is scanned for similarity. This date should be after the assignment due date, and also should take into account late submissions. Detection tools: select which detection tool to use. At least one tool must be selected. Publish scanning result to students: if checked, students could see the similarity report comparing their work with others (see part d below). Display notification: if checked, students are notified that this assignment will be checked for plagiarism in the assignment page. Notification text: this box is enabled when display notification is checked, and enables specification of the message to students

assignment config.png

Manual scanning

Viewing the report

In the assignment page, teachers can click on “Rescan” button to trigger the scanning at anytime after the assignment is created (even before its due date).

After the scanning process finishes, a link to the report page will appears. Click on the link to see the report: The report consists of a graph of similarity rate distribution of every pairs, and a table listing similar pairs in descending order. Several options are offered to view the report, including: Similarity filter: display only the pairs having similarities above the specified value Similarity type: choosing between average similarity and maximum similarity. Since the length of each student’s code may vary a lot, the percentage of the similar portions between the two codes differs. Average similarity takes the average rate between the two as the rate of the pair and maximum similarity takes the maximum rate between the two as the rate of the pair. For example, if student A has 50% of code similar to student B and student B has 30% of code similar to student A (because B’s code is longer than A’s code), average similarity rate is 40% and maximum similarity rate is 50%. Detector: choose between MOSS and JPlag (if the scanning is run with both detectors) Display Grouping students: a table with each row containing similarities between students having with one student in the first cell Ordered table: a simple list of pairs in descending similarity rate

Clicking on the bars of the chart will also show the pairs of which similarity rate belong to that range. Clicking on the percentage value will bring the comparison view. Comparison view enables to compare the similarity of a pair of students as well as similar portions of one students with all the others. Lecturers can mark a pair if they think there are too much similarities to each other.


Comparison between two students' work