Turnitin Integration beta release!

Re: Turnitin Integration beta release!

by Wen Hao Chuang -
Number of replies: 33
Hi Dan, thanks so much for the promptly reply. I guess I'm still a little bit confused about what point 2.7 was referring to:

"Set a username, email-address, firstname and surname of a user that does not already exist in your Turnitin account. Turnitin only allows 1 teacher to be assigned to a course, so the integration needs to use a "global teacher" usercode that becomes the default Teacher (Turnitin refer to teachers as "instructors") to all assignments created in your moodle install." - Are these required?

This is kind of different from the old style plugin where I just need to need to put in information for TII_SHAREDKEY, TII_WEBSERVICEURL, and TII_AID in the /mod/assignment/type/turnitin/lib.php. Attached please find my current setting (I made sure that this account is not existing on the current turnitin system), but I still got this error message. Although I put in some username, email-address, and firstname/surname information I'm still getting an error message:


Attachment turnitin_local.png
In reply to Wen Hao Chuang

Re: Turnitin Integration beta release!

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 Wen,

that's saying that your server cannot connect to api.turnitin.com - I'm guessing there's a firewall blocking it? - the server will need to be allowed to make outgoing requests to api.turnitin.com

yes. - this plugin is very different to the one provided from turnitin. - yes all those settings are required.

The old turnitin assignement plugin tried to "pre-fill" some of that data previously, and didn't allow for as much flexibility. - you could get problems if the key was installed on more than 1 moodle site with the same users and the same course names etc.

thanks,

smile

Dan

In reply to Dan Marsden

Re: Turnitin Integration beta release!

by Wen Hao Chuang -
Hi Dan, there is no firewall I believe, and I was testing it on my local dev machine. When I replace it with the "old" (official) plugin provided by turnitin, it works on my local dev machine (which has a fixed ip). Any other idea what might be the cause of this? Thanks! smile
In reply to Wen Hao Chuang

Re: Turnitin Integration beta release!

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 Wen,

the old plugin uses the "clients" browser to connect to turnitin, so any proxy settings etc are taken from the users's browser. the version I've written it's the server itself that makes the call.

initially it uses the function in filelib: download_file_content which takes note of any proxy settings you have set up in admin >server> HTTP
this call is what is failing for you. - are you sure that you don't have a proxy or a firewall that prevents outgoing connections directly from your server to the outside world?

BUT - this function isn't used for ALL tii api calls as the function doesn't support POST which is needed for some api calls

Some calls are made using an internal lib function which doesn't take note of your proxy settings. - I need to create a new function which does this and allows POST with a similar function to download_file_content()

thanks,

smile

Dan

...so at this stage, the code requires unrestricted outgoing http access without using a proxy.


In reply to Dan Marsden

Re: Turnitin Integration beta release!

by A. H. -
Hello Dan,

I have a linux server running Moodle19.

When i installed this plugin, i was gettingi the error:

https://api.turnitin.com/api.asp?username=hh49%40aub.edu.lb&uem=hh49@aub.edu.lb&ufn=Hossein&uln=Hamam&uid=hh49%40aub.edu.lb&utp=2&cid=MoodleTII&ctl=MoodleTII&fcmd=2&fid=1&dis=1&encrypt=0&diagnostic=0&tem=hh49@aub.edu.lb&upw=&cpw=&ced=&dtdue=&dtstart=&newassign=&newupw=&oid=&pfn=&pln=&ptl=&ptype=&said=&assignid=&assign=&gmtime=20080922072&aid=37366&version=Moodle_19&md5=52f91bac2428160dae18020002a27f1f&;

Though i bypassed the server from our proxy..

However, i thought of filling up the credentials in server--> http

Then i went back to saving the turnitin settings, it now gives blank page instead of the above error.

What is the problem now?

thnx,
amer
In reply to A. H.

Re: Turnitin Integration beta release!

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 Amer,

what you've posted there isn't the "error" but some text in the error that states the url it was trying to access at the time.

make sure you have full debug turned on with display errors and it might show more info.


My guess without seeing your error is that your problem is with curl - see above:
http://moodle.org/mod/forum/discuss.php?d=98199#p445818

depending on the flavour of linux, you may just be able to use:
apt-get install ca-certificates
and be sorted.
Average of ratings: Useful (1)
In reply to Dan Marsden

Re: Turnitin Integration beta release!

by A. H. -
Hello Dan,

This is the error after i turned debug on:

Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Entity: line 1: parser error : Start tag expected, '<' not found in /web/edited19x/lib/turnitinlib.php on line 175

Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: HTTP/1.0 200 OK in /web/edited19x/lib/turnitinlib.php on line 175

Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: ^ in /web/edited19x/lib/turnitinlib.php on line 175

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /web/edited19x/lib/turnitinlib.php:175 Stack trace: #0 /web/edited19x/lib/turnitinlib.php(175): SimpleXMLElement->__construct('HTTP/1.0 200 OK...') #1 /web/edited19x/lib/turnitinlib.php(216): tii_get_xml('https://api.tur...') #2 /web/edited19x/admin/turnitin.php(61): tii_post_to_api(Array, 11, 'GET', '', false) #3 {main} thrown in /web/edited19x/lib/turnitinlib.php on line 175


Moreover:
I didnt undesrstand what ca-certificate is to install (i have red hat 5), i already have certificate issued to this server for https to be valid.

curl:
rpm -qa | grep -i curl
curl-7.15.5-2.el5
curl-devel-7.15.5-2.el5

Hope the above error gives more on what the issue is.


thnx for your help and hints you provided, really appreciated!
amer
In reply to A. H.

Re: Turnitin Integration beta release!

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 Amer,

I'd suggest making sure you have the latest version of the 1.9 plugin - download it again from the link in the modules and plugins database and overwrite your files.

then go to the admin/activities/turnitin page and re-save the settings - this page should give some feedback that the teacher account has been created - if not, what errors does this particular page give?
In reply to Dan Marsden

Re: Turnitin Integration beta release!

by Hossein Hamam -
Hi Dan,

Following up On Amer's post. We reinstalled the plugin. Below are the warnings and errors that we get when we save the settings in Turnitin.

*Warning*: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct

<http://moodletest.aub.edu.lb/edited19x/admin/function.SimpleXMLElement---construct>]:

Entity: line 1: parser error : Start tag expected, '<' not found in

*/web/edited19x/lib/turnitinlib.php* on line *175*

*Warning*: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct

<http://moodletest.aub.edu.lb/edited19x/admin/function.SimpleXMLElement---construct>]:

HTTP/1.0 200 OK in */web/edited19x/lib/turnitinlib.php* on line *175*

*Warning*: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct

<http://moodletest.aub.edu.lb/edited19x/admin/function.SimpleXMLElement---construct>]:

^ in */web/edited19x/lib/turnitinlib.php* on line *175*

*Fatal error*: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /web/edited19x/lib/turnitinlib.php:175 Stack

trace: #0 /web/edited19x/lib/turnitinlib.php(175):

SimpleXMLElement->__construct('HTTP/1.0 200 OK...') #1

/web/edited19x/lib/turnitinlib.php(216):

tii_get_xml('https://api.tur...') #2

/web/edited19x/admin/turnitin.php(61): tii_post_to_api(Array, 11, 'GET', '', false) #3 {main} thrown in */web/edited19x/lib/turnitinlib.php* on line *175


Please advise.

Thanks!

In reply to Hossein Hamam

Re: Turnitin Integration beta release!

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 There,

does it display any other information? - can you turn on developer debugging, and post a screenshot of all the errors that appear? - does it also display a url that it was trying to access when it caused the error? - can you paste that url into your browser and check to see what is returned?

thanks,

smile

Dan
In reply to Dan Marsden

Re: Turnitin Integration beta release!

by Hossein Hamam -
Hi Dan,
Thank you for your reply. Bellow is a screen shot of the error. When i copy paste the URL in a new browser, i am getting this "success" message:

<!-- Turnitin API Return Data -->
<returndata>
<rmessage>Successful!</rmessage>
<userid>3294182</userid>
<rcode>11</rcode>
</returndata>

Even though, when we leave "proxy host" in Server/HTTP empty, we are getting this error. But if we enter a proxy, we are getting the error that i posted before.

PS: The server we are using is already by passing proxy.

Please advise smile

Thanks!
Hossein
Attachment Error.jpg
In reply to Hossein Hamam

Re: Turnitin Integration beta release!

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
this has to be a problem with your server or a firewall blocking the external connection, but here's a suggestion I found via google....

do you have etc/resolv.conf in your chroot?
see:
http://groups.google.co.nz/group/lucky.openbsd.misc/browse_thread/thread/ca2a2831a21de3e7/372453b2ae2addc3?hl=en&lnk=st&q=cURL+couldn%27t+resolve+host#372453b2ae2addc3

smile

Dan
In reply to Dan Marsden

Re: Turnitin Integration beta release!

by Hossein Hamam -

Dear Dan,

Thank you so much for your continous feedback and suggestions. I went through the steps again, there is nothing blocking the external connection. And CURL is fine based on my testing and the settings i have.

So what we are facing right now is this fatal error:

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /web/edited19x/lib/turnitinlib.php:175 Stack trace: #0 /web/edited19x/lib/turnitinlib.php(175): SimpleXMLElement->__construct('HTTP/1.0 200 OK...') #1 /web/edited19x/lib/turnitinlib.php(216): tii_get_xml('https://api.tur...') #2 /web/edited19x/admin/turnitin.php(61): tii_post_to_api(Array, 11, 'GET', '', false) #3 {main} thrown in /web/edited19x/lib/turnitinlib.php on line 175

I will continue testing for now, if i find anything i will tell you. And i would appreciate any Suggestions! smile

Thanks!

In reply to Hossein Hamam

Re: Turnitin Integration beta release!

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
I'd just try echoing the response of the download_file_content call

in turnitinlib.php

the call to:
$xml = new SimpleXMLElement($fp);

put something like a print_object($fp) just before the call to see what is returned from the url call. - It's supposed to be an XML file, but maybe the turnitin api site is returning an error in html instead?

good luck!

smile

Dan
In reply to Dan Marsden

Re: Turnitin Integration beta release!

by Andrew Yong -

Hi Dan

I'm having a similar problem with Hossein. I've done a var_dump($fp) and this is what's showing up when I view the source:

HTTP/1.0 200 OK
Date: Tue, 18 Nov 2008 06:00:19 GMT
Server: Apache
Set-Cookie: session-id=020224ce38ed818459ae20e91e98ab65; path=/
Pragma: no-cache
Last-Modified: Mon, 28 Jul 2014 23:30:00 GMT
P3P: CP=CAO OSA OUR
Content-Length: 181
Expires: Sat, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-cache, no-store, must-revalidate, post-check=0, pre-check=0
Connection: close
Content-Type: text/xml

<?xml version="1.0" encoding="UTF-8"?>
<!-- Turnitin API Return Data -->

<returndata>
 <rmessage>Successful!</rmessage>
 <userid>14609142</userid>
 <rcode>11</rcode>
</returndata>

It looks as though it is trying to parse the header info returned from turnitin which is what is generating the errors.

Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Entity: line 1: parser error : Start tag expected, '<' not found in /var/www/html/moodle19/lib/turnitinlib.php on line 178

Warning: SimpleXMLElement::__construct() [
function.SimpleXMLElement---construct]: HTTP/1.0 200 OK in /var/www/html/moodle19/lib/turnitinlib.php on line 178

Warning: SimpleXMLElement::__construct() [
function.SimpleXMLElement---construct]: ^ in /var/www/html/moodle19/lib/turnitinlib.php on line 178

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /var/www/html/moodle19/lib/turnitinlib.php:178 Stack trace: #0 /var/www/html/moodle19/lib/turnitinlib.php(178): SimpleXMLElement->__construct('HTTP/1.0 200 OK...') #1 /var/www/html/moodle19/lib/turnitinlib.php(220): tii_get_xml('https://api.tur...') #2 /var/www/html/moodle19/admin/turnitin.php(61): tii_post_to_api(Array, 11, 'GET', '', false) #3 {main} thrown in /var/www/html/moodle19/lib/turnitinlib.php on line 178

When I strip off all the header info and just hardcode the xml section in,

<?xml version="1.0" encoding="UTF-8"?>
<!-- Turnitin API Return Data -->

<returndata>
 <rmessage>Successful!</rmessage>
 <userid>14609142</userid>
 <rcode>11</rcode>
</returndata>

it returns a proper success message..

Turnitin Settings Saved, and Teacher account created

Any ideas for a fix or a workaround?

Andrew

In reply to Andrew Yong

Re: Turnitin Integration beta release!

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
hmmm....well that's strange - because Afaik download_file_content should just return the content of the file as a string.... Do you have cURL installed on your server? - I wonder if it's falling back on snoopy to get the file contents and returning headers as well?
In reply to Andrew Yong

Re: Turnitin Integration beta release!

by Darren James Harkness -
Andrew - try turning off Moodle's debug/error messages. It's possible that Moodle is inserting an unrelated warning into the XML that the script is trying to read.
In reply to Darren James Harkness

Re: Turnitin Integration beta release!

by Andrew Yong -

Hi Darren / Dan - turning debugging off didn't resolve anything as it is an error. And we did have cURL turned on. We did however, discove that the problem was with moodle\lib\filelib.php (function download_file_content).

Because it was going through our proxy it had to perform another strip to the header - see fix below:

  if (!empty($CFG->proxyhost)) {
     $data = explode("\r\n\r\n", $data, $info['redirect_count'] + 3);
  } else {
     $data = explode("\r\n\r\n", $data, $info['redirect_count'] + 2);
  }

That seems to have resolved the issue. We'll do more testing before we submit the code to moodle.

In reply to Andrew Yong

Re: Turnitin Integration beta release!

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
interesting! - good spotting! - let us know you've tested some more and created a new bug in the tracker so we can add ourselves as watchers.....
In reply to Dan Marsden

Re: Turnitin Integration beta release!

by Andrew Yong -

Hi all

Have logged a tracker issue...

http://tracker.moodle.org/browse/MDL-17320

One of our other programmers has refined the patch further to reduce any unwanted side-effects.

CHeers Andrew

In reply to Andrew Yong

Re: Turnitin Integration beta release!

by Andrew Yong -

We've in the final stages of getting this plugin going. However I've just hit a snag... when we run the cron job to send the files off to Turnitin, we immediately receive an originality score of 0% for the assignments that have been submitted. On querying the table, it also changed the status from "pending" to "success" almost immediately. The originality report doesn't appear to have been created yet.

The program appears to have

1. uploaded successfully and changed the code from "pending" to "51"

2. in the next step of the cron job which was to retrieve the results, it picked up the same file because it has a code of 51 and on retrieving no result, assigned a 0% and changed the status to "success". 

Hence the status change appears to be instantaneous.

When the report is ready, I can retrieve the originality report by clicking on the link AND it does appear to be reporting correctly but it does not update the orignality score when I rerun the cron job.

Is anyone else experiencing this problem? Is there something I've not configured correctly?

Andrew.

In reply to Andrew Yong

Re: Turnitin Integration beta release!

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
is it possible that the file is completely original (or that turnitin hasn't previously indexed a similar file) - also make sure you have the latest version of the code from CVS - it's been through a few changes over the past couple of weeks.
In reply to Hossein Hamam

Re: Turnitin Integration beta release!

by Darren James Harkness -
Hi Hossein - I had something very similar happen, and it was because my server was configured to display PHP warnings and errors , which it added to the incoming XML feed. Try turning display_errors off and see if it's still there.
In reply to Darren James Harkness

Re: Turnitin Integration beta release!

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
Thanks Darren, good thinking! - It would be good to know what those errors are so I can get them sorted though.
In reply to Wen Hao Chuang

Re: Turnitin Integration beta release!

by Jason Cashel -
Hi Wen,
I got a message like this initially when testing on WAMP server, but had no such problem under Linux.

Jason
In reply to Jason Cashel

Re: Turnitin Integration beta release!

by Wen Hao Chuang -
Jason, thanks for the heads-up. The problem is that both of our testing and staging server are running on OSX and do not have support for curl (sys admin had some trouble to compile it), so I'm stuck with testing in on my local WAMP server. sad
In reply to Jason Cashel

Re: Turnitin Integration beta release!

by Wen Hao Chuang -
Hi Jason, is it possible to get a teacher account on your testing box so that I could help out testing this new Turnitin integration patch? I also emailed Dan about this. I'm still waiting for our system admin to complete our VM (virtual machine) setup, and currently I don't have a linux box to play with (two testing servers are running on OSX, and had some trouble compiling curl with php, oh boy).

By the way, we are at the point to decide whether we will use this new patch in our upcoming 1.9 upgrade project (due soon!), or try to spend some time to fix the "old" (official) plugin to make it work with Moodle 1.9. Currently the "old" plugin does NOT work with the new 1.9 gradebook. Some quick questions. Have you done some testing with the following areas? What were your first impression?

1. Does the new TII patch work with the new moodle 1.9 gradebook? That is, does this patch also work with the current turnitin "gradebook" module?

2. Have you tried out backup/restore with TurnItIn assignments with the new patch?

3. If I remember correctly, the TII server side API require a "starting" and "ending" dates, but for default typical assignments, users actually could "disable" the starting and due date (see screenshot). Have you tested this to see if there is any problem associated with this?

Thanks! I studied Dan's codes a little bit (nice work Dan!), and can't wait to get it to work and start testing it!

Peace and love, Wen
Attachment assignment_disable_dates.png
In reply to Wen Hao Chuang

Re: Turnitin Integration beta release!

by Jason Cashel -
Hi Wen,
Sorry for the late reply.

My test server is unfortunately not internet accessible. Though may be over the next month.

At present in very much in beta release. We are at the moment considering whether or not to have a small test group of students use Turnitin through Moodle but I think I might wait a term.

To answer the other questions:
1. Yes it is integrated with Gradebook.
2. Does not work with backup and restore.
3. There is a bug in the zip file attached to this discussion where if the dates are "Disabled" the course is not created on Turnitin upon the initial creation of the Turnitin assignment. I submitted a patch for this, http://tracker.moodle.org/browse/CONTRIB-548, and Dan has integrated it into his git development server.

Please note that Dan's git server has patches that the zip file attached above does not.

Jason

In reply to Wen Hao Chuang

Re: Turnitin Integration beta release!

by Darren James Harkness -
I get a similar error to Wen's, on both my development server and an external server. Here's a little more information:

--- 8< ---

This is what the TII module reports back when I attempt to add a new assignment with TII enabled.

cURL request for "https://api.turnitin.com/api.asp?username=autiiadmin&uem=dar...@athabascau.ca&ufn=Darren&uln=Harkness&uid=autiiadmin&utp=2&cid=AUResearchTest6CF101&ctl=AUResearchTest6CF101&fcmd=2&fid=1&encrypt=0&diagnostic=0&tem=dar...@athabascau.ca&upw=&cpw=&ced=&dtdue=&dtstart=&newassign=&newupw=&oid=&pfn=&pln=&ptl=&ptype=&said=&assignid=&assign=&gmtime=20080708161&aid=48635&dis=1&version=Moodle_19&md5=d9f4cdf8b8dbf726410ed31cd6989d1b&;" 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 193 of lib/filelib.php: call to debugging()
  • line 159 of lib/turnitinlib.php: call to download_file_content()
  • line 202 of lib/turnitinlib.php: call to tii_get_xml()
  • line 396 of mod/assignment/lib.php: call to tii_post_to_api()
  • line 2137 of mod/assignment/lib.php: call to assignment_base->add_instance()
  • line 279 of course/modedit.php: call to assignment_add_instance()
--- 8< ---

If I load the URL the TII module is attempting to contact, I get the following XML:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Turnitin API Return Data -->

<returndata>
 <rmessage>MD5 not authenticated - the MD5 in the URL does not match the MD5 calculated</rmessage>
 <rcode>302</rcode>
</returndata>
--- 8< ---

Thoughts?
In reply to Darren James Harkness

Re: Turnitin Integration beta release!

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
that looks like an issue with Curl on your server, it may not have any root certs installed - see here for details:

http://curl.haxx.se/docs/sslcerts.html

would be great if you manage to solve this using the above link if you could add some stuff to the docs to explain how to fix it!

thanks,

smile

Dan
In reply to Dan Marsden

Re: Turnitin Integration beta release!

by Wen Hao Chuang -

Dan, looks like I'm getting exactly the same error message (when creating a new TII assignment) that Darren experienced. I tried to follow the instruction (with the site you mentioned) on http://curl.haxx.se/docs/sslcerts.html, here is what I did:

1. Seems that #5 on the above site is the easiest approach. So I went to

http://curl.haxx.se/docs/caextract.html then downloaded the cacert.pem (I don't know much about what's a .pem file format, but it's a text file). It looks like the lib/mk-ca-bundle.pl will convert a certdata.txt to a .pem (cacert.pem) file. As there are cacert.pem file available on the above site already, so I saved this file (cacert.pem) to my local c:\windows and renamed the file to curl-ca-bundle.crt (see #4 on the site) => it's not working.

Any idea what I did wrong? Thanks! smile

In reply to Wen Hao Chuang

Re: Turnitin Integration beta release!

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 Wen,

I found that page via a google search when I saw the above error, have no idea how to help past there sorry! - seems to work fine on my Ubuntu machine, and it worked on the win2003 IIS machine @ my old work! - disapointed to hear it won't be simple to get working under wamp!

would be interested to hear how you go!

smile

Dan
In reply to Dan Marsden

Re: Turnitin Integration beta release!

by Darren James Harkness -
Thanks Dan, that solves the first part of the problem, however, I now get the following error:

--- 8< ---

Error occured in Turnitin System:MD5 not authenticated - the MD5 in the URL does not match the MD5 calculated tiicode:302
  • line 242 of lib/turnitinlib.php: call to debugging()
  • line 396 of mod/assignment/lib.php: call to tii_post_to_api()
  • line 2137 of mod/assignment/lib.php: call to assignment_base->add_instance()
  • line 279 of course/modedit.php: call to assignment_add_instance()
//<![CDATA[ setTimeout('fix_column_widths()', 20); function openpopup(url,name,options,fullscreen) { fullurl = "http://twinky/aumoodle19" + url; windowobj = window.open(fullurl,name,options); if (fullscreen) { windowobj.moveTo(0,0); windowobj.resizeTo(screen.availWidth,screen.availHeight); } windowobj.focus(); return false; } function uncheckall() { void(d=document); void(el=d.getElementsByTagName('INPUT')); for(i=0;i<el.length;i++) { void(el[i].checked=0); } } function checkall() { void(d=document); void(el=d.getElementsByTagName('INPUT')); for(i=0;i<el.length;i++) { void(el[i].checked=1); } } function inserttext(text) { text = ' ' + text + ' '; if ( opener.document.forms['theform'].message.createTextRange && opener.document.forms['theform'].message.caretPos) { var caretPos = opener.document.forms['theform'].message.caretPos; caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text; } else { opener.document.forms['theform'].message.value += text; } opener.document.forms['theform'].message.focus(); } function getElementsByClassName(oElm, strTagName, oClassNames){ var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName); var arrReturnElements = new Array(); var arrRegExpClassNames = new Array(); if(typeof oClassNames == "object"){ for(var i=0; i<oClassNames.length; i++){ arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)")); } } else{ arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)")); } var oElement; var bMatchesAll; for(var j=0; j<arrElements.length; j++){ oElement = arrElements[j]; bMatchesAll = true; for(var k=0; k<arrRegExpClassNames.length; k++){ if(!arrRegExpClassNames[k].test(oElement.className)){ bMatchesAll = false; break; } } if(bMatchesAll){ arrReturnElements.push(oElement); } } return (arrReturnElements) } //]]>
Error output, so disabling automatic redirect.

--- 8< ---

Any thoughts?
In reply to Darren James Harkness

Re: Turnitin Integration beta release!

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 Wen,

sorry - been crazy busy!

1. - doesn't affect the plugin as it uses existing assignment types which are already compatible with the gradebook.
2. - backup restore of the normal stuff works, but it doesn't backup/restore the new turnitin tables with originality scores....yet.
3 - Jason found a bug related to this, and I'd placed the code to generate TII stuff in the wrong place, but it should be fine now. - theoretically the dates set inside the moodle assignment shouldn't make any difference to the turnitin system.

the major outstanding work for my patch is the backup/restore - (which you don't get much of in the old turnitin system anyway!) and the only stuff that doesn't backup/restore is just the originaluty scores and links to the full report.

will have a look at that md5 error later on today when I've finished going through all the e-mail and blinking windows!

smile

Dan