Guide to installing Turnitin Content Review Service 0.7+

Many thanks to Chuck Hedrick for identifying the security issue with the previous install instructions, and to the gurus at Longsight for helping us resolve the problem.

 

May 2013: Turnitin have created a brand new API that will replace the incumbent API which is used by Content Review Service (CRS) 0.7. (The current API will be eventually be withdrawn.) Turnitin have also produced an SDK that should be used rather than directly accessing the new API. The University of Oxford is about to start work a new implementation of the CRS using the SDK. More to follow.

Description

This document will walk you through the steps necessary to install either of the following:

  • TurnItIn Content Review Service 0.7 with Sakai 2.9 or 2.8
  • TurnItIn Content Review Service 10.x branch with Sakai 10
  • TurnItIn Content Review Service 11.x-legacy branch with Sakai 11

For more details on the Content Review service please see the original document for version 0.5

These instructions have been tested in the following environments:

Content Review version

Content Review Impl version (TII)

Sakai version

Assignments version

2.9.30.72.9.1assignments-2.9.1

2.9.x

0.7

2.8.x

assignment-2.8.x_features_backport (Longsight's Assignment1 backport)

10.3sakai-10.x branch10.310.3
11.3sakai-11.x-legacy branch11.311.3

Installation for Sakai 11

Stop Tomcat.

Check out the sakai-11.x-legacy branch of the content review implementation into your source tree:

  1. cd <sakai-src>/content-review
  2. git clone https://github.com/sakaicontrib/turnitin/tree/sakai-11.x-legacy
  3. add <module>contentreview-impl> to <sakai-src>/content-review/pom.xml in the <modules> section
  4. if necessary, change pom versions to the specific version of Sakai you're deploying to, ie. 11.3
  5. set up the content review federated service to be aware of the Turnitin content review service impl
    1. edit the file content-review/contentreview-federated/pack/src/webapp/WEB-INF/components.xml
    2. find the section with id="contentReviewProviders", it will look something like this:

      <util:list id="contentReviewProviders">
              <!--ref bean="org.sakaiproject.contentreview.service.ContentReviewServiceTii"/>
              <ref bean="org.sakaiproject.contentreview.service.ContentReviewServiceVeriCite"/>
              <ref bean="org.sakaiproject.contentreview.service.ContentReviewServiceCompilatio"/>
              <ref bean="org.sakaiproject.contentreview.service.ContentReviewServiceUrkund"/>
              -->
      </util:list>
    3. modify the section to uncomment the Turnitin content review service, so that it looks something like this:

      <util:list id="contentReviewProviders">
              <ref bean="org.sakaiproject.contentreview.service.ContentReviewServiceTii"/>
              <!--ref bean="org.sakaiproject.contentreview.service.ContentReviewServiceVeriCite"/>
              <ref bean="org.sakaiproject.contentreview.service.ContentReviewServiceCompilatio"/>
              <ref bean="org.sakaiproject.contentreview.service.ContentReviewServiceUrkund"/>
              -->
      </util:list>

Installation for Sakai 10

Stop Tomcat.

Check out the sakai-10.x branch of the content review implementation into your source tree

  1. cd <sakai-src>/content-review
  2. svn co https://source.sakaiproject.org/contrib/turnitin/branches/sakai-10.x/contentreview-impl
  3. add <module>contentreview-impl</modules> to <sakai-src>/content-review/pom.xml in the <modules> section

Continue to the Deployment section.

Installation for Sakai 2.9

Stop Tomcat.

Check out the 0.7 tag of the content review implementation into your source tree:

  1. cd <sakai-src>/contentreview
  2. svn co https://source.sakaiproject.org/contrib/turnitin/tags/content-review-0.7/contentreview-impl
  3. add <module>contentreview-impl</modules> to <sakai-src>/contentreview/pom.xml in the <modules> section

Continue to the Deployment section.

Installation for Sakai 2.8

 Click here to expand...

Stop Tomcat.

Old jar files from previous versions of the content review service may exist in your Tomcat installation and will likely cause problems. Check the <CATALINA_HOME>/shared/lib folder for jars beginning with the names listed below and delete any you find:

  • contentreview-model-api
  • contentreview-service-api
  • sakai-contentreview-hbm

Checkout the 2.9.x branch of the contentreview tool into your source tree:

  1. cd <sakai-src>
  2. svn co https://source.sakaiproject.org/svn/content-review/branches/contentreview-2.9.x/ contentreview
  3. cd contentreview

Build and deploy with Maven:

GNU/Linux

Windows

mvn clean install sakai:deploy -Dmaven.tomcat.home=$CATALINA_HOME

mvn clean install sakai:deploy -Dmaven.tomcat.home=%CATALINA_HOME%

If you do not have the CATALINA_HOME environment variable set, substitute the full path to your Tomcat installation (ie. /opt/tomcat).

Checkout the 0.7 tag of the content review implementation into your source tree:

  1. cd <sakai-src>
  2. cd contentreview
  3. svn co https://source.sakaiproject.org/contrib/turnitin/tags/content-review-0.7/ contentreview-impl
  4. cd contentreview-impl
  5. Build and deploy with Maven, as before

Checkout Longsight's back-ported 2.8.x Assignment1 project into your source tree:

  1. cd <sakai-src>
  2. rm -rf assignment (remove the current assignment project)
  3. svn co https://source.sakaiproject.org/svn/msub/longsight.com/assignment/assignment-2.8.x_features_backport/ assignment
  4. cd assignment
  5. Build and deploy with Maven (two options):
    1. Using the same Maven command as before, but add the following switch: -Dsakai.contentreview.version=2.9.2-SNAPSHOT
    2. OR, modify the entry in the master project's pom.xml file:
      1. cd <sakai-src>
      2. cd master
      3. edit file: pom.xml
      4. locate the following section:

        <sakai.contentreview.version>2.8.6</sakai.contentreview.version>
      5. change '2.8.6' to '2.9.2-SNAPSHOT' (without quotes)
      6. Build and deploy with Maven, as before
  6. Check for duplicate .jar files in Tomcat, specifically assignment

Deployment

Build and deploy with Maven:

GNU/Linux

Windows

mvn clean install sakai:deploy -Dmaven.tomcat.home=$CATALINA_HOME

mvn clean install sakai:deploy -Dmaven.tomcat.home=%CATALINA_HOME%

If you do not have the CATALINA_HOME environment variable set, substitute the full path to your Tomcat installation (ie. /opt/tomcat).

Configuration

You will need to edit your sakai.properties file ($CATALINA_HOME/sakai/sakai.properties) to include the Turnitin settings specific to your institution. Add the following lines, filling in the appropriate data:

We are making use of the Assignments 2 Turnitin API here, even though we're using the Assignments 1 tool.

# TURNITIN CONFIG SETTINGS (v0.7)
turnitin.enable.assignment2=true
turnitin.apiURL=https://www.turnitin.com/api.asp?
turnitin.secretKey=[yourAccountIdPassword]
turnitin.said=[yourSubAccountID]
turnitin.aid=[repeatYourSubAccountID]
turnitin.useSourceParameter=true
turnitin.option.institution_check=false
assignment.useContentReview=true

It is recommended that you turn on logging for the content review service, at least during the testing phase, as there are some errors that can only be detected by examining the log. Add the following lines to your sakai.properties:

# CUSTOM LOGGER COUNT
log.config.count=2
# TURNITIN LOGGING
log.config.1 = DEBUG.org.sakaiproject.contentreview.impl.turnitin
log.config.2 = DEBUG.org.sakaiproject.turnitin.util.TurnitinAPIUtil.apicalltrace

It is also recommended that you disable the option for "Institution Paper Repository" if your institution does not have one, to avoid errors.

# sets the available repositories. 0=none; 1=standard; 2=institutional
turnitin.repository.setting.count=2
turnitin.repository.setting.1=0
turnitin.repository.setting.2=1

Finally, if you wish to change the repository that is selected by default, you can do so with this property:

# Sets the default repository. 0=none; 1=standard; 2=institutional
turnitin.repository.setting.value=0

 

Startup and testing

Start Tomcat. The content review service uses a scheduled job to send submissions to Turnitin periodically. Follow these instructions to set up that job:

  1. Login to sakai as an admin
  2. Go to 'Job Scheduler'
  3. Click 'Jobs'
  4. Click 'New job'
  5. Select 'Process Content Review Queue' from the drop down menu and provide a name for the job
  6. Click 'Post'
  7. Click 'Triggers(0)' for the job you just posted
  8. Click 'New Trigger'
  9. Provide a name for the trigger, and enter a cron expression. The recommended interval is every 5 minutes (ie. 0 0/5 * * * ?)
  10. Click 'Post'
  11. Repeat steps 2-10 for job type 'Process Content Review Reports', using the same cron expression used above
  12. Repeat steps 2-10 for job type 'Process Turnitin Content Review Roster Sync', using the cron expression for every 1 minute (ie. 0 0/1 * * * ?)

To verify that everything is installed correctly, create a new assignment and check for the existence of the "Turnitin Service" options, as illustrated below:

Test that the integration works by submitting to the assignment.

Troubleshooting

Since some errors will not be presented to the user, check your log file and keep in mind the following limitations:

  • Submissions must be in the form of an attachment
  • Attachments must have a file extension
  • Attachments must be an approved type:
    • Valid types are: MS Word (DOC, DOCX), Acrobat PDF, PostScript, Plain Text, HTML, WordPerfect (WPD) and Rich Text Format
  • Attachments must be under a certain file size (we don't know the exact limit but 14MB is too large)
  • Attachments must contain at least 20 words of text
  • This setup utilizes the Assignments 2 API, so you must therefore enable the "Sakai" option on your Turnitin account (even though this API is only meant for Assignment 2)
  • There appears to be a problem if there is a difference between the Turnitin server's timezone and yours. If your assignment start time is "in the future" for Turnitin's servers, they will reject submissions and an error message will be presented in the GUI for anyone who tries to retrieve the originality report. However, the assignment submission will eventually be accepted once the Turnitin servers catch up to the start time.
  • Creating an assignment immediately after creating the site may result in an error saving the Turnitin settings. Simply refresh the tool, edit the assignment, and re-post it to resolve the error. You can also just delete the assignment and create a new one.
  • When specifying what repository to send papers to (under "Submit papers to the following repository:") selecting 'Institution Paper Repository' (if you haven't disabled this option) will result in an error when students try to submit their work if your institution doesn't have one, or doesn't have it configured for this integration. The instructor can avoid this problem by selecting 'None'. 'Standard Paper Repository' seems to work as well in most cases. Unfortunately, the TurnItIn settings of an assignment can not be changed once the assignment has been submitted to TurnItIn and the due date has passed. If this is the case, the instructor must recreate the assignment and resubmit (or have their students resubmit) the files
  • If you are an instructor/maintainer in a site that uses Turnitin assignments, but have not created a Turnitin assignment yourself, you may receive Error 212 (essentially, user does not exist) when attempting to view originality reports. The easiest way to fix this is to create a Turnitin assignment in that site. This will create an account for you with Turnitin.
  • Do not use the character '&' in the assignment title, as it will cause an error when creating the assignment. The character '%' may also be a problem. To be on the safe side one should only use ASCII characters in assignment titles, some non-ACSII characters do not cause a problem but it is difficult to work out what the 'blacklist' actually is.
  • Do not allow resubmissions, this will result in errors retrieving the originality report for any students that resubmit.

Resources