Turnitin moodle plugin

Turnitin moodle plugin

by EDZ - -
Number of replies: 33
I have recently set up the turnitin plugin for moodle 1.65, but it doesnt work perfectly.
Whenever I try to delete an assignment it gives me the following error:

"could not open XML input"

To delete an assignment, I'd have to change its type then delete it.
Any suggestions?
Average of ratings: Useful (1)
In reply to EDZ -

Re: Turnitin moodle plugin

by David Monllaó -
We have the same problem.

In the integration google group they say we must activate the php.ini allow_url_fopen option.
In reply to David Monllaó

Re: Turnitin moodle plugin

by EDZ - -
We have it allowed but still we have that problem. Did you find a way to make it work?
In reply to EDZ -

Re: Turnitin moodle plugin

by David Monllaó -
No...

In turnitin integration google groups they say:

- openssl installed
- allow_url_fopen set to ON
- enable "extension=php_openssl.dll "


We have that configuration but the turnitin type assignment can't be deleted. Someone in forums says that we can change the assignment type and then delete, but there must be a better solution.

They say it can also be a php or apache version configuration. We are using php 4.3.11 and apache 1.3.
In reply to EDZ -

Re: Turnitin moodle plugin

by R S -

Hi there...

We had exactly the same problem where we were unable to delete the turnitin type assignment from a moodle course. It turned out that it was our proxy server blocking the connection.

As our IT department were not prepared to alter how the proxy server worked (and we got very limited support from the developers), we decided to try to alter the code ourselves. We managed to get it to work by altering the following code within tiirequest.class.php (bold signifies where the changes have occured):

 function TIIRequest($apiCall) {
  $opts = array('http'=>array('request_full_uri'=>true,'proxy'=>'tcp://your.proxyserver.ac.uk:yourproxyportnumber'));
  $context = stream_context_create($opts);
        $this->_xml_parser = xml_parser_create();
     
      if (!($this->_fp = fopen($apiCall, "r", false, $context))) {
  die("could not open XML input [$apiCall]");
     }
        $this->_data ='';
        while (!feof($this->_fp)) {
            $this->_data .= fread($this->_fp, 8192);
        }
       
        fclose($this->_fp);

        xml_parse_into_struct($this->_xml_parser, $this->_data, $this->_vals, $this->_index);
        xml_parser_free($this->_xml_parser);
    }

Please note this fix will only work with php 5.1.0 or later as this is when they integrated proxy support for the fopen function.

Another thing we have noticed is when using turnitin with moodle 1.9, if you have AJAX turned on (the drag and drop functionality) it seems to break the deleting which I assume will affect everybody.

Best Regards
- Richard Sanders
Newman University College

In reply to R S

Re: Turnitin moodle plugin

by John Fitchett -

Is there any other way to delete a turnitin assignment without hacking code?

Also - changing assignment type (as mentioned above)...

How do you do that?

In reply to John Fitchett

Re: Turnitin moodle 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 John,

I thought turnitin had fixed this - make sure you have the latest version of their plugin from their site. what version of Moodle are you running, and what version of the plugin do you have?

smile

Dan
In reply to John Fitchett

Re: Turnitin moodle plugin

by David Wu -
Hi John,

What do you mean by hacking code?
What suggestions have been made to you?
What error are you receiving when you are trying to delete a Turnitin Assignment?

The most common error people have is a "could not open XML input" error. That can usually be solved by trying the following:

* Make sure that the php.ini file that your apache/Moodle instance uses has the "allow_url_fopen" option set to "On"
* make sure that you have openssl installed on your Moodle server
* To get PHP to use open ssl. The php.ini file needs to have the extension added: extension=php_openssl.dll

Also, please make sure that your Moodle server can make outgoing https calls to our Turnitin servers.
If all of that is enabled/works, and you still get the "could not open XML input" error, please let me know.

Also, I think changing the assignment type is only something that can be done pre-Moodle 1.8. After 1.8, it doesn't look like it's possible to change an assignment type after it's been created.

Hope this helps.

Thanks,
Dave

In reply to David Wu

Re: Turnitin moodle plugin

by John Fitchett -

Hi Dave! I have been in conact with you in the past! Thanks for your reply!

I have gone through some old emails from you and have found my turnitin plugin was for Moodle 1.8.1. (I now use 1.9.1)

How can i get the latest version of the plugin? I notice it is not listed on the Moodle plugins page?

Many thanks

John

In reply to John Fitchett

Re: Turnitin moodle 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
log in to your account on turnitin.com

under the account listed, click the button for "update"

then down the bottom of the page click "add/modify API integration information"

download link should be at the bottom somewhere...


...or you could wait for my new integration which will be released for testing by the end of this week

smile

Dan
In reply to David Wu

Re: Turnitin moodle plugin

by John Fitchett -

Hi Dave

I have now downloaded and installed the latest Moodle plugin. But when I try to delete a course that has a Turnitin assignment in it, I get the following message:

Error on API Deletion!

And the course is not deleted. Any suggestions? I now have about 5 courses that need deleting...

Many thanks!

In reply to John Fitchett

Re: Turnitin moodle plugin

by David Wu -
Hi John,

That's interesting - I wouldn't think deleting a course would recursively try and delete systematically all the content in the course, including Turnitin Assignments. I wasn't aware that Moodle did this.

I'm not sure what the error is that is occurring. Is it possible that you can give me access to your Moodle system and the steps with which I can reproduce the error and investigate more?

Perhaps we can continue this conversation through direct email, and upon discovering the solution, we can post that here.

davidw@iparadigms.com

Thanks,
Dave
In reply to David Wu

Re: Turnitin moodle plugin

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Dave - As I understand it (off the top of my head and not verified) when deleting a Moodle user the user is marked as deleted but remains in the database along with all of the student's data. So simply unenrolling a student from a course is not a problem since they can be re-enrolled and the data is still there. However, deleting a course is a different matter. All of the data associated with that course is deleted. This brings up another issue (at least in my mind that we may wish to keep an eye on, namely, what happens when a course with a TII assignment is restored. Might some special steps need to be taken to ensure that it is added to TII via the API? Thanks for your continued work on this the TII plugin. Peace - Anthony
In reply to Anthony Borrow

Re: Turnitin moodle plugin

by David Wu -
Hi Anthony,

That's interesting.
Yes, that is an issue we need to watch - I'm not sure what happens when Tii Assignment is restored. I'm thinking if there is a way to not have the Tii Assignments deleted if the course is deleted, and that way when the course is restored along with the Tii Assignments, as long as they have the same IDs, then it should still be accessible as normal.

Thanks,
Dave

p.s. Any chance of looking at that rebuild_course_cache issue?
In reply to David Wu

Re: Turnitin moodle plugin

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
David - I agree that the backup/restore issues will be something to keep an eye on and to consider carefully. I'm sorry but I've been doing so much traveling that I've not had a chance to begin going through my to do list. I'm just trying to keep from becoming too inundated from incoming stuff. I'm driving from New Orleans to Dallas today so hopefully once I get to Dallas I can start taking a look at things in my follow up folder. My plan is to look at it before July 1 so keep reminding me over the next couple of weeks. Peace - Anthony
In reply to David Wu

Re: Turnitin moodle plugin

by michelle bowie -

You all might have figured this out, but I didn't find your solution posted. We have 1.9 and the latest Turnitin plugin. When we attempt to delete (empty) Tii assignments, we receive the API error. Someone suggested turning AJAX off on the profile. Even when individual profs turn that off, it still will not all them to delete the assignments. What was the suggested solution for this?

thanks for any help! mb

In reply to michelle bowie

Re: Turnitin moodle plugin

by David Wu -
Hi Michelle,

What kind of API error are you receiving? Are you getting an error code and an error message?

Is it possible to get an instructor login to your system and the particular course/assignments having the problem to try and reproduce the problem?

Thanks,
Dave

In reply to David Wu

Re: Turnitin moodle plugin

by michelle bowie -

hi david- we get an "api integration" error message. --no code.

yes, i have an instructor log in, and can give you the particulars of the assignment. email me if you can help and need the info.

(fyi- someone here read ajax could be the problem, and suggested we disable it on the profile level when we need to delete a tii assignment. that did not help.)

thanks. mb

In reply to EDZ -

Re: Turnitin moodle plugin

by Jeff Rothenberger Mr. -
How do you delete turnitin assignments in Moodle? In previous versions, you could change the type of assignment from Turnitin to a different type of assignment and then delete. That option is now gone. Any suggestions?
In reply to Jeff Rothenberger Mr.

Re: Turnitin moodle plugin

by David Wu -
Hi Jeff,

Actually, changing the type of the assignment from type Turnitin to a different type of assignment shouldn't be what you have to do to delete a Turnitin Assignment. You should be able to just delete a Turnitin Assignment the same way you would with a normal assignment.

If that's not working, can you describe the behavior? Are you getting an error code and/or error message? Based on that, we should be able to help you get to the point where you can delete a Turnitin Assignment just like a normal assignment.

Please let me know.

Thanks,
Dave
In reply to David Wu

Re: Turnitin moodle plugin

by Jeff Rothenberger Mr. -
Hi Dave,
We don't even have the option anymore (not visible) to change to a different kind of assignment. There is no delete button on the assignment that we can find - See image at bottom. Our moodle server is running PHP 4.4.4.
There are no error messages -- If I click on the X See image: 78Course_%20Ms.%20Toren%20AP%20English.jpg

Nothing happens.
Here is an image shot of the assignment page:
78TorenAPEnglish_%20Editing%20Assignment.jpg
Thanks,
Jeff
In reply to Jeff Rothenberger Mr.

Re: Turnitin moodle plugin

by David Wu -
Hi Jeff,

I don't think you are supposed to delete assignments from this screen.

You need to delete them from the course homepage in editing mode. When you are in editing mode, there should be an "X" next to several other icons for that particular assignment. (See attached image).

If you hit that "X" that should try to delete that assignment, as it would any other content item in your course. Please give that a try and let us know what happens.

Thanks,
Dave


Attachment moodle1.jpg
In reply to David Wu

Re: Turnitin moodle plugin

by Jeff Rothenberger Mr. -
I did -- See Image below -- Every time I refresh the page the assignment returns.
78Course_%20Ms.%20Toren%20AP%20English-1.jpg
In reply to Jeff Rothenberger Mr.

Re: Turnitin moodle plugin

by David Wu -
Hi Jeff,

I see... what version of Moodle are you using exactly? I think this may have to do with the feature of having the "AJAX and Javascript" option in the user profile set to "Yes: use advanced features". I saw this error happen with an early version of Moodle 1.9, but when I tried to reproduce it on my own test box after having installed the latest version of Moodle 1.9, I could not reproduce the error anymore.

I would recommend trying to upgrade your version of Moodle (depending on what version you are using right now), or try changing that user setting to "No: use basic web features".

Hope that helps,
Dave

In reply to David Wu

Re: Turnitin moodle plugin

by John Fitchett -

Hi David

I am having trouble deleting Turnitin assignements again. This time the error message is:

could not open XML input

Any suggestions?

In reply to John Fitchett

Re: Turnitin moodle plugin

by David Wu -
Hi John,

Can you check and try these things?

Do you think you can check to see if this setting is on? If not, can you change it to "On" and then let's see if the error goes away or not.

- Make sure that the php.ini file that your apache/Moodle instance uses has the "allow_url_fopen" option set to "On"
- make sure that you have openssl installed on your Moodle server
- To get PHP to use open ssl. The php.ini file needs to have the extension added: extension=php_openssl.dll

If this is all set, please also check to see if you can make outgoing connections to www.turnitin.com or api.turnitin.com directly from your Moodle server. You can use whatever method you like to test that (ping, wget, etc.), but successful communication is necessary in order for it to work.

Thanks,
Dave
In reply to David Wu

Re: Turnitin moodle plugin

by John Fitchett -

Hi David

I have checked those things.

  1. "allow_url_fopen" option set to "On"
  2. We have successfully pinged your site, so communication is not the problem. In fact teachers can still create Turnitin assignments successfully (and students ubmit their work). The onlye problem is we cannot delete Turnitin assignments.
  3. We do not have openssl on our server. Our server manager says he tried to install opensll but it wouldn't work on our server (we have a very new windows server)

This problem of not being able to delete assignments happened to us in the past. At that time you gave me an alternate assignment.class.php. This allowed us to delete assignments at that time, but not anymore.

Could the problem be related to this? Or has a new version of the plugin been released?

I am attaching the modified assignment.class.php file that you gave me before.

Many thanks!

John

In reply to John Fitchett

Re: Turnitin moodle plugin

by John Fitchett -

David - We have now installed opensll

It 'works' as such... but our windows server also has regular sll

Anyway, since we have installed opensll, the error message has changed to:

Error on API Deletion!

Any ideas

Thank you!

In reply to John Fitchett

Re: Turnitin moodle plugin

by David Wu -
Hi John,

Hmmm, did you change the plugin at all?
Does the assignment.class.php in the turnitin folder still have that modification I asked you to make before?

If it does and you are still getting the error, can you provide me a temporary login with which I can reproduce the error?

Thanks,
Dave

In reply to David Wu

Re: Turnitin moodle plugin

by John Fitchett -

Hi David

I haven't changed the plugin. I have tried both the modified and the original assignment.class.php file and it seems to make no difference either way.

Yes I'd be happy to give you a temproary login. I have emailed it to you. Please let me know if you don't get my email as I am using a possibly older email address!

Many thanks!

John

In reply to John Fitchett

Re: Turnitin moodle plugin

by David Wu -
Hi John,

Yes, I did get your email and will be taking a look at it shortly.

I find it odd that with the modified assignment.class.php file, you are unable to delete the Turnitin Assignments.

I will take a look and let you know what I find.

Thanks,
Dave
In reply to David Wu

Re: Turnitin moodle plugin

by Ben Goodwin -
i am expereincing ther same problem when deleting turnitin assigmnents. I have open ssl etc setup, and am trying to delete without ajax. I have tried the modified class that is available and i stil get the "could not open XML input" error. I have downloaded and installed the latest turnitin plugin etc and still no luck. Can anyone help please? Thanks. Ben