Note: You are currently viewing documentation for Moodle 4.0. Up-to-date documentation for the latest stable version of Moodle may be available here: Turnitin's Moodle Direct Integration (Administrator Guide).

Turnitin's Moodle Direct Integration (Administrator Guide)

From MoodleDocs

Enabling the Moodle Direct Integration in Turnitin

In order to create the credentials necessary to run the Turnitin Moodle Direct integration activity module the account administrator should log into their Turnitin account at either or depending on your account settings.

To configure the Moodle code package follow these steps:

  1. Log in as the Turnitin account administrator at the Turnitin homepage and enter your email address and password.
  2. Click on the integrations button for the account, if your account is authorised to use integrations their will be a link in the integration column beside your account settings that says either 'unconfigured' or 'configured'. Click this link.
  3. Scroll down the list of integrations available to 'Moodle Direct' and click the 'configure' link
  4. Fill out the required fields:
    1. A shared key containing 8 alphanumerical characters
    2. Your Moodle installation's IP address or default
    3. An error call back URL or the default as stated below the input field
  5. Click submit to finalise the configuration of Moodle

Downloading the Moodle Direct Integration in Turnitin

To download the latest version of the plug in from within your Turnitin account follow steps 1 and 2 above, then:

  1. Scroll to the bottom of the page and click 'Download'
  2. Scroll down the page to the table containing the Moodle Direct packages
  3. Click the 'download' link in the 'Code Package' column

Installation and Configuration

The activity module follows standard Moodle installation guidelines, to install the code package unzip the code package and copy the directory 'turnitintool' to the 'mod' directory. A typical install would be in '/mod/turnitintool'.

More information on how to install an activity module can be found here.

The activity module requires cURL in order to initiate outbound communications to the Turnitin API, you will need to enable cURL functionality in PHP. In most cases enabling cURL is done by uncommenting the following line in your php.ini file:


Remove the semi-colon at the start of the line to activate the library and restart your web server service to make the changes active.

More information about cURL and more detailed instructions for installing it can be found here:

Recommended Moodle Settings

The activity module performs better when dbpersist is turned off, to do this in the config.php file for your Moodle install add the following line:


Configuring the Module within Moodle

Log in to Moodle as Administrator and navigate to:

Site Administration -> Modules -> Activities -> Turnitin Assignment

Configure the plug in:

  1. Enter your Turnitin Account ID
  2. Enter your Turnitin Secret Key
  3. Enter the Turnitin API, for UK users enter and for other users enter
  4. Choose whether to enable GradeMark functionality by using the drop down menu. If your account has purchased WriteCycle or GradeMark select Yes.
  5. Select whether to use Anonymous Marking. Anonymous Marking is only available for TurnitinUK users.
  6. Enter a disclaimer/agreement in the text box. Student's will have to check a box agreeing to this statement before submitting a paper.
  7. To stop students being sent an email that enables them to log in to the Turnitin website select No. The default is Yes.
  8. Diagnostic mode prints extra diagnostic information in error messages and produces log files to track communication with the API. Do not select Yes for Enable Diagnostic Mode option unless asked to by Turnitin Support. The default is No.
  9. Click on the 'Save Changes button to save your changes.

Testing your installation

To test your installation navigate to:

Site Administration -> Modules -> Activities -> Turnitin Assignment

Click the 'Run Connectivity Test' link, Moodle will attempt to connect to your Turnitin account based on the settings you enter in the configuration screen mentioned above. If Moodle successfully connects to Turnitin you will see a message that says, "Moodle has successfully connected to Turnitin". If the connection test fails you will receive a descriptive error message that may contain information as to the reason for the failure, in the event of connection failure check you configuration data and retry the test.


The activity module has a number of mechanisms for tracking down problems:

  1. Show Data Dump / Save Data Dump is used to map out the database entries for the activity module, this information can be useful for checking Moodle to Turnitin data relationships and may be requested when reporting problems to Turnitin Support.
  2. Unlink Users is used to remove the tie between the Moodle user and the Turnitin user. The activity module maps the Moodle Internal User ID with the Turnitin User ID in rare cases it is necessary to break that tie so the system can remake the tie on the next user communication. You should not use this feature unless specifically requested to do so by Turnitin Support.
  3. Diagnostic Mode can be enabled to help Turnitin Support to track down issues. When you enable this mode a communication log is produced in /moodledata/temp/turnitintool/logs this log may be requested by Turntin Support to help track down communication issues. Diagnostic mode also adds file and line number information to error messages to help the support team to track down scripting errors.

Time Zones

The integration operates in the timezone of your Moodle server, in order for Turnitin to represent the same assignment start, due and post dates you must ensure that your Turnitin account is operating in the same time zone as your Moodle server.

Paper Repository Options

The Turnitin administrator can select paper repository options to allow instructors to have access to paper repository options when setting up an assignment. To change these options:

  1. Log in to Turnitin as the administrator and click the edit icon to the right of the account you wish to edit.
  2. Select one of the three options
  3. Click on submit to save your changes