Moodle assignment with Turnitin plugin

Moodle assignment with Turnitin plugin

by Eva Adam -
Number of replies: 34

Hi,

I would like to use all the features of the Moodle assignments (I have version 2.3.1) with plagiarism detection provided by Turnitin (or similar other, but at the moment our school has an account here). I would like to keep our teachers and students within our Moodle site when they handle their assignments, which are checked once in Turnitin and the originality report is somehow passed back to Moodle.

I have downloaded and configured Turnitin Moodle Direct, but the options with this activity module are limited (I could not find, for example, how to set up the rubrics grading with the Turnitin assignment in Moodle, and the layout of the Turnitin assignment is not so user friendly as the Moodle assignment module).

I tried to configure crot but it seems not to work with the new Bing API version (although 5000 search per month is still free).

I have also read this: http://docs.moodle.org/23/en/Plagiarism_Prevention_Turnitin_Settings and I think that Dan Marsden Moodle plugin is what I would most probably need, but unfortunately I could not find this in the list of the integration configurations on the Turnitin website any more. sad

Can you please advise me a plagiarism tool that can be configured and used currently in Moodle?

Thanks,

Éva

Average of ratings: -
In reply to Eva Adam

Re: Moodle assignment with Turnitin plugin

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

HI Eva,

several people are running my plugin succesfully on their 2.3 installations - the latest code is in my git repository here:

https://github.com/danmarsden/moodle-plagiarism_turnitin

the code in the master branch is currently the best version to use for Moodle 2.3 but I'll be branching that in git sometime soon into a MOODLE_23_STABLE branch as we might land some of the work my GSOC student has been doing for Moodle 2.4 to integrate plagiarism with the workshop and forum modules.

you should be aware that my plugin is planned for replacement by a new plugin from Turnitin at some point - as per my blog post here:
http://danmarsden.com/blog/2012/03/06/future-of-moodle-turnitin-plugins/

In the meantime you can still use my plugin but you will need to send an e-mail to Turnitin asking them to enable your account to use my integration - see step 2 on the page you linked to above:
http://docs.moodle.org/23/en/Plagiarism_Prevention_Turnitin_Settings#Activation_of_your_Turnitin_Account

The new code in that repository should work fine with the new assignment module in 2.3 but keep an eye on the commits for any updates/bug fixes.

In reply to Dan Marsden

Re: Moodle assignment with Turnitin plugin

by Eva Adam -

Hi Dan,

Thanks a lot  for the links smile

My concern is that I cannot see your plugin in Turnitin when I log in...  I guess that your plugin won't work if I cannot set it up in Turnitin. Shall I contact Turnitin or do you have any idea why it is missing from the list?

Éva

Attachment Turnitin_config.jpg
In reply to Eva Adam

Re: Moodle assignment with Turnitin plugin

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

yes - that's why step 2 on the link you found is needed.

you need to email Turnitin support (with the text you see in step 2) asking them to enable the plugin so you can see the link in your screen.

In reply to Dan Marsden

Re: Moodle assignment with Turnitin plugin

by Eva Adam -

oh yes, thanks. There are two step 2 in the doc and I was focusing the 2nd step 2...

Can I leave the current Moodle Direct plugin on our Moodle site or it is better to delete it before starting to configure yours?

É

In reply to Eva Adam

Re: Moodle assignment with Turnitin plugin

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

the plugins are completely independant so you can keep them both on the same install.

In reply to Dan Marsden

Re: Moodle assignment with Turnitin plugin

by Eva Adam -

Thanks a lot. I have installed your plugin. The problem at the moment is the following: when I save the settings in Site administration/ Plugins/ Plagiarism prevention/ Turnitin, I receive the following error message:

cURL request for "https://api.turnitin.com/api.asp?...&;" failed with: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (60)•line 1269 of \lib\filelib.php: call to debugging()

•line 1709 of \plagiarism\turnitin\lib.php: call to download_file_content()

•line 87 of \plagiarism\turnitin\settings.php: call to plagiarism_get_xml()

error trying to open plagiarism XML file! https://api.turnitin.com/api.asp?...

Both links on the top (Login to Turnitin as Admin / Login to Turnitin as Teacher) are OK.

Our Server is Win2008R2, Apache 2.4.2, PHP 5.4.4 (cURL enabled), Moodle 2.3.1. We do not use SSL in our Moodle. The other Turnitin module (Turnitin Direct) works properly.

Éva

 

 

In reply to Eva Adam

Re: Moodle assignment with Turnitin plugin

by Eva Adam -

Update on my status:

I have managed to solve the SSL problem after finding this in a moodle forum discussionsmile

To work around this:

  1. You need to be running minimum PHP 5.3.7 (http://uk3.php.net/manual/en/curl.configuration.php)
  2. Download a certificate bundle from somewhere and save to somewhere on the server that the webserver will be able to access. I saved mine into the Moodle installation directory but maybe the moodledata folder might eb a better location. I used the bundle provided at http://curl.haxx.se/docs/caextract.html
  3. Create a new entry in your php.ini file called curl.cainfo and set its value to the path of your downloaded certificate bundle. eg curl.cainfo = D:\iiswebsites\moodle\cacert.pem
  4. Create a reminder for yourself to update the certificate bundle on a semi-regular basis as this config will stop working if some of the CA certificates in the bundle expire or new CA certs are issues and you don't have them in the bundle.

Admin settings now worked fine smile, so I created an assignment in my test Moodle course with Turnitin enabled to see how it works.  Cron created the new assignment in Turnitin but the dates were different in Moodle and Turnitin! Moodle start date was 30 Aug 2012 18:45, due date was 30 Aug 2012 19:45; Turnitin start date was the date/time when cron ran: 30 Aug 2012 7:01 PM and Turnitin due date was 30 Aug 2013 6:51 PM (+1 year - 10 minutes). I submitted a paper from Moodle from a student account, but I could not see the student disclosure message when I uploaded the file.  When should that message appear? I also received the error 1001 when the next cron tried to upload the file to Turnitin...

I created another assignment in Moodle and when the next cron ran, it created the new assignment in Turnitin but the Turnitin start and due dates were modified exactly the same way as earlier: start date: time of cron run; due date: start date + 1 year - 10 minutes. I would prefer if the Turnitin dates/times were the same as what I set in Moodle (post date = due date).

Did anyone had similar problems with Turnitin dates?

Éva

Attachment Turnitin_Assignment.jpg
In reply to Eva Adam

Re: Moodle assignment with Turnitin plugin

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

The Turnitin API has a hissy fit if you try to create an assignment with a start date in the past - so the integration code won't allow creation with a date in the past. AFAIK they are improving this with their new api so the new version of the plugin that Turnitin are developing may not have this issue.

The due date is usually a bit more manageable - the code checks to make sure the date is greater than the time the assignment was created via cron + 10min and if not extends the due date to 1yr from now (probably a bigger extension than is needed!) If you had set a later due date by a couple of hours or days it would probably have used that date.

the code that manages dates is slightly better in the latest code in my git repo compared to the zip that is available in the plugins db.

In reply to Dan Marsden

Re: Moodle assignment with Turnitin plugin

by Eva Adam -

Thanks, this also explains why I received the error message in the case of the first submission (it was within 10 minutes, I ran the cron manually - normally our cron is scheduled every 15 minutes, so we won't have this problem in the producton site).

My last question (at the moment) is why I cannot see the student disclosure message when I upload an assignment with Turnitin enabled (in a student account)?

I have to tell you that your plugin is much better than Turnitin Direct smile Thank you for all your help.

Éva

In reply to Eva Adam

Re: Moodle assignment with Turnitin plugin

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

nice to hear it's been useful for you - there are still a few issues with the code partly due to the complexities of using the existing Turnitin api - hopefully the new version being developed by Turnitin will be even better!

what assignment type are you using? - the new one in Moodle 2.3 or the old assignment from 2.2? - can you take a screenshot of the page the user sees when submitting a file? - are you logged in as a real student or using the "student view" option in Moodle?

In reply to Dan Marsden

Re: Moodle assignment with Turnitin plugin

by Eva Adam -

I use the new 2.3 assignment type (Moodle 2.3.1 Build: 20120706). I log in with a real student account (not using log in as or student view)

The student only sees the assignment description and the file upload area. Nothing pops up, no extra message appears anywhere even when I click the "Save changes" to upload the file. The submission status table shows the normal Moodle things only, I cannot see the discaimer anywhere. When and where does it suppose to show up?

Attachment Turnitin_Student_upload.jpg
In reply to Eva Adam

Re: Moodle assignment with Turnitin plugin

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

have you enabled Turnitin for that particular assignment? - the disclosure will only appear if turnitin is enabled in the settings for that assignment.

I've just checked on my 2.3Stable install and it displays on that page in my install fine.

If you have enabled Turnitin for the assignment - check to make sure you have the lastest code for 2.3 (in the master branch in my git repo) and that you have the latest 2.3Stable code installed - not sure what else could cause it to not be shown.

In reply to Dan Marsden

Re: Moodle assignment with Turnitin plugin

by Eva Adam -

Yes, I have enabled the plugin for the assignment I tested. I will install the latest Moodle 2.3.1+ (I have also experienced that the assignment feedback disappears when you modify the grade - noted by others in anoher discussion in this forum)

In reply to Eva Adam

Re: Moodle assignment with Turnitin plugin

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
now I remember - it's fixed in 2.3.2 - see MDL-34258 for the details.
In reply to Dan Marsden

Re: Moodle assignment with Turnitin plugin

by Eva Adam -

I have installed the latest stable 2.3.1+ on our test server and both my current problems are solved. Plagiarism disclosure appears in a box when students upload the assignment and teachers' comments (re)appear in the text feedback area when they regrade the assignment.

Thanks again Dan smile

Éva

In reply to Dan Marsden

Re: Moodle assignment with Turnitin plugin

by Eva Adam -

I have had a closer look at how the plugin creates the assignment in Turnitin via cron. I have found that the switch whether I would like to allow / prevent late submissions does not go through Turnitin, as all assignments created by the plugin are set to prevent late submissions (regardless of how it was set in Moodle). The start date and the due date is never what I set in Moodle but the cron run time (+10 mins and +1 year) as if the code could not get access to the Moodle assignment data.

Dan, when you refer to the new code Turnitin will develop, will it be similar to the Moodle Direct (separate module) or your current plagiarism plugin (can work together with the Moodle assignment module)?

In reply to Eva Adam

Re: Moodle assignment with Turnitin plugin

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

prevent late submissions should be going through - although there are complications using that setting and the way the Turnitin api handles dates.

The plugin was originally designed to be the only place where students/teachers interacted with Turnitin - The insitution I worked at wasn't interested in Grademark and didn't allow students to log directly into Turnitin. Since then various other people have contributed development time on the plugin to improve it's support for the other Turnitin products.

It is possible to make the dates match between Moodle->Turnitin but this requires a bit of development work and significantly decreases the reliability of file submissions against the Turnitin API.

Information on the new plugin Turnitin are developing is available on my blog - I haven't seen any code from them so can't comment further than the information on my blog:
http://danmarsden.com/blog/2012/03/06/future-of-moodle-turnitin-plugins/

In reply to Dan Marsden

Re: Moodle assignment with Turnitin plugin

by Teddy Aprilianto -

Hi Dan ,

We're using version 2012050901 and moodle 2.3.1 

Our "Dan Marsden Moodle" is green in turnitin site.

When we create turnitin assignment , the assignment submitted succesfully to turnitin but when student upload submission, their submission not transferred to turtinitn site . I have checked the table mdl_plagiarism_files but empty.

Any suggestions about it ?  Thanks much

Teddy

 

 

In reply to Teddy Aprilianto

Re: Moodle assignment with Turnitin plugin

by Teddy Aprilianto -

Another infomation ,

I just read this like http://docs.moodle.org/23/en/Plagiarism_Prevention_Turnitin_Settings#Activation_of_your_Turnitin_Account

on debugging section that mentioned about mdl_tii_files table , I can't find it on database ... or because I'm using latest version ? in settings.php if the table exist it would be renamed to mdl_tii_files_legacy ?

 

Thanks

TA

In reply to Teddy Aprilianto

Re: Moodle assignment with Turnitin plugin

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

yeah - those are old table names - you should be looking at mdl_plagiarism_turnitin_files

In reply to Teddy Aprilianto

Re: Moodle assignment with Turnitin plugin

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

have you previously installed any other plagiarism plugins and then deleted them from the file system? - if you run cron manually does it show any errors?

make sure you have the latest code from my github repo here:

https://github.com/danmarsden/moodle-plagiarism_turnitin

use the "master" branch for 2.3 at the moment - but I'll be branching that to a MOODLE_23_STABLE branch sometime soon so if you see a MOODLE_23_STABLE branch use that instead (at the moment only MOODLE_22_STABLE and master branches exist)

In reply to Dan Marsden

Re: Moodle assignment with Turnitin plugin

by Teddy Aprilianto -

Yes Dan ,

We had Moodle Direct but deleted from the system .  The cron seems work fine , when I enable debug mode , it only show header error/warning or something like that.

I have used your latest codes .  

A question , after student submitted their work into turnitin assigment , would it be saved into mdl_plagiarism_files ?  I have checked this table but empty ...

Thanks

TA

 

 

In reply to Teddy Aprilianto

Re: Moodle assignment with Turnitin plugin

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

when a student uploads a file it triggers an event.
when cron runs it sees that event and if turnitin is enabled for that assignment it will add a record to the plagiarism_turnitin_files table for that file and will submit the file to turnitin.

If you have previously installed another plagiarism plugin like crot/urkund/compilatio/moss that go into the /plagiarism directory but you have deleted the files there may be an event handler in your database that is holding up the event from being handled by Turnitin. The handlers in the table look for the code that created the handler (eg crot/urkund/compilatio) and if it can't find the code it causes that event type to "hang" completely in your database. the fix is either to restore the deleted files in which case it will see that the assignment hasn't been configured to use that plugin and clear or you will need to manually remove the invalid handlers from the handlers table.

The latest turnitin code will show an error on the turnitin settings page if there are any invalid handlers in the db.

IF the students submitted the files before you enabled turnitin inside the assignment - those files will not be sent to Turnitin - only files uploaded after turnitin was enabled in the assignment will be sent.

In reply to Dan Marsden

Re: Moodle assignment with Turnitin plugin

by Teddy Aprilianto -

Hi Dan ,

We used Moodle Basic then changed to Moodle Direct in Moodle 1.9 .17+  

Then we upgraded into moodle 2.2.3  => 2.3.1   .  After that we found your plugin then installed it .   

No errors on turnitin settings page tab .

Do you know what the handlers table is ?    

Thanks

In reply to Teddy Aprilianto

Re: Moodle assignment with Turnitin plugin

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

If you've never installed crot/urkund/compilatio/moss/programming plagiarism plugins in the plagiarism directory then the eventhandlers won't be the issue. You will either have an issue with your Turnitin configuration settings - try resaving that page and make sure you have a succesful notification of connection to Turnitin and if that works fine re-check that your cron process is not getting stuck somewhere.

then try creating a new assignment in Moodle, enable turnitin within that assignment and then login as a student, submit a file, make sure cron is running every 15min or so - and then in an hour or more re-check the asssignment to see if the file has been sent and a report has been generated.

In reply to Dan Marsden

Re: Moodle assignment with Turnitin plugin

by Mary O'Donnell -

Hi Dan;

I hope you can help me, I have checked and researched many of the forums and unfortunately I just can't see how staff or students can view origionality reports with your Turnitin plugin, I have successfully installed your plugin and also have all the assignment settings checked and rechecked.

 

Can you please advise?

Thank you very much.

 

Mary

In reply to Mary O'Donnell

Re: Moodle assignment with Turnitin plugin

by Mary O'Donnell -
Hi Dan; I am just checking the cron info from the last post here, this sounds like it could be my issue.
In reply to Dan Marsden

Re: Moodle assignment with Turnitin plugin

by Teddy Aprilianto -
Hi Dan, I'm still trying to solve my problem . When I run the cron job , I got like this Starting processing the event queue... ++ failed to upload assignment errorcode1001 ++ * line 999 of /plagiarism/turnitin/lib.php: call to debugging() * line 589 of /plagiarism/turnitin/lib.php: call to turnitin_send_file() * line 1706 of /plagiarism/turnitin/lib.php: call to plagiarism_plugin_turnitin->event_handler() * line ? of unknownfile: call to turnitin_event_file_uploaded() * line 299 of /lib/eventslib.php: call to call_user_func() * line 343 of /lib/eventslib.php: call to events_dispatch() * line 448 of /lib/eventslib.php: call to events_process_queued_handler() * line 314 of /lib/cronlib.php: call to events_cron() * line 88 of /admin/cron.php: call to cron_run() ++ failed to upload assignment errorcode1001 ++ * line 999 of /plagiarism/turnitin/lib.php: call to debugging() * line 589 of /plagiarism/turnitin/lib.php: call to turnitin_send_file() * line 1706 of /plagiarism/turnitin/lib.php: call to plagiarism_plugin_turnitin->event_handler() * line ? of unknownfile: call to turnitin_event_file_uploaded() * line 299 of /lib/eventslib.php: call to call_user_func() * line 343 of /lib/eventslib.php: call to events_dispatch() * line 448 of /lib/eventslib.php: call to events_process_queued_handler() * line 314 of /lib/cronlib.php: call to events_cron() * line 88 of /admin/cron.php: call to cron_run() . . . . . ++ failed to upload assignment errorcode1009 ++ * line 999 of /plagiarism/turnitin/lib.php: call to debugging() * line 589 of /plagiarism/turnitin/lib.php: call to turnitin_send_file() * line 1706 of /plagiarism/turnitin/lib.php: call to plagiarism_plugin_turnitin->event_handler() * line ? of unknownfile: call to turnitin_event_file_uploaded() * line 299 of /lib/eventslib.php: call to call_user_func() * line 343 of /lib/eventslib.php: call to events_dispatch() * line 448 of /lib/eventslib.php: call to events_process_queued_handler() * line 314 of /lib/cronlib.php: call to events_cron() * line 88 of /admin/cron.php: call to cron_run() finalise Notice: Undefined property: stdClass::$pathnamehashes in /moodle/plagiarism/turnitin/lib.php on line 573 Warning: Invalid argument supplied for foreach() in /moodle/plagiarism/turnitin/lib.php on line 573 finalise Notice: Undefined property: stdClass::$pathnamehashes in /moodle/plagiarism/turnitin/lib.php on line 573 Warning: Invalid argument supplied for foreach() in /moodle/plagiarism/turnitin/lib.php on line 573 finalise Notice: Undefined property: stdClass::$pathnamehashes in /moodle/plagiarism/turnitin/lib.php on line 573 Warning: Invalid argument supplied for foreach() in /moodle/plagiarism/turnitin/lib.php on line 573 finalise Notice: Undefined property: stdClass::$pathnamehashes in /moodle/plagiarism/turnitin/lib.php on line 5 Do you have any idea about it ? My moodle version 2.3.2+ Thanks TA
In reply to Teddy Aprilianto

Re: Moodle assignment with Turnitin plugin

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
some of that (hard to read) looks like you might have an old version of the code installed? - can you make sure you've got a copy of the MOODLE_23_STABLE branch from my git repo?
In reply to Dan Marsden

Re: Moodle assignment with Turnitin plugin

by Teddy Aprilianto -
Hi Dan , My Turnitin is better now , at least table mdl_plagiarism_files is not empty anymore. The problem was cron wasn't working properly. But I have another problem now . When students submit their submission , we got error A site configuration error occured when attempting to send this file to Turnitin(1001) For example a student sent on 31 oct . Submission allow from 1st Oct , due date 10th nov . Do you have any suggestion what I should check or what's wrong with this ? Thanks Teddy
In reply to Teddy Aprilianto

Re: Moodle assignment with Turnitin plugin

by Sarah Honeychurch -
Hi Dan We are wanting to assess your plugin to see if it's better that the Moodle Direct plugin (well, it would be hard to be worse, really!). Can you let me know what the situation is with regard to Grademark? A lot of our academics use this, and as far as I could see on the version we have enabled this is not integrated. Am I wrong? We use both Moodle 1.9 and 2.3, and ideally we'd like to use it on both, but even if it just worked on Moodle 2.3 that would be a major step forward. Thanks from the University of Glasgow. Best, Sarah
In reply to Sarah Honeychurch

Re: Moodle assignment with Turnitin plugin

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

well - I think it's better smile

but.. it uses the same API as Turnitin Direct and it hasn't had much love for a while as Turnitin have plans to develop a new plugin that provides the same functionality as mine so I haven't spent any volunteer time on it and have advised most of our clients not to invest $$ in something that will be deprecated - but I did think Turnitin would have released their new plugin by now!

If you're already using the Direct plugin I wouldn't advise shifting to mine at this stage as when the "new" plugin from Turnitin gets released you would need to shift again. Best to suffer using the existing Moodle Direct plugin and wait for the "new" version from Turnitin.

In reply to Dan Marsden

Re: Moodle assignment with Turnitin plugin

by Teddy Aprilianto -
Hi Dan, Not sure what happened with my turnitin now , I have created an assignment , but not sent to turnitin when I ran the cron I got like this : class already exists on Turnitin Error: 126 Date start and date due is required for function [] class already exists on Turnitin Error: 439 The institutional check is not available for this account. Please set the institution_check parameter to 0 [SUBMIT YOUR POEM HERE-124005] done. getting Turnitin scores !!! error trying to open plagiarism XML file! https://api.turnitin.com/api.asp? bla bla bla......... !!! Please help what I shoudl check ... Thanks TA
In reply to Teddy Aprilianto

Re: Moodle assignment with Turnitin plugin

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

Hi Teddy,


the insitutional check error is because you have ticked the "institutionnode" checkbox on the turnitin settings page - uncheck it and save.

the class already exists error is harder to get rid of - easiest option is to create a new Moodle course based on your old one and delete the old one. Harder options involve modifying the database and a good knowledge of the Turnitin API and the code.