Making the official TurnItIn plugin (v2.0.0) work with gradebook in Moodle 1.9?

Making the official TurnItIn plugin (v2.0.0) work with gradebook in Moodle 1.9?

by Wen Hao Chuang -
Number of replies: 4
Dear all, how are you doing?

Just a quick question. As we are approaching our 1.9 upgrade deadline (codename: cranberry) and still 140+ bugs to be fixed. Just wonder if anyone out there that have modified the official TurnItIn plugin (v2.0.0, that was designed for Moodle 1.8.x), to work with the new Moodle 1.9 gradebook and backup/restore? Any information would be highly appreciated. smile

Peace and love,
Wen
Average of ratings: -
In reply to Wen Hao Chuang

OTP: Re: Making the official TurnItIn plugin (v2.0.0) work with gradebook in Moodle 1.9?

by Ray Lawrence -
(codename: cranberry)

Really?

This conjures up so many James Bond / Austin Powers images...
In reply to Ray Lawrence

Re: OTP: Re: Making the official TurnItIn plugin (v2.0.0) work with gradebook in Moodle 1.9?

by Wen Hao Chuang -
smile

Yeah we have internal code names for our major releases of iLearn (based on moodle), apple is for Moodle 1.5.4+, blueberry for Moodle 1.8.x, and now (upcoming) cranberry for Moodle 1.9.x.

By the way, I dig into the 1.8 and 1.9 code base a little bit more. I did a quick comparison. When you use the tii-moodle official plugin on Moodle 1.8.x, if you create an turnitin assignment, it will create an entry on the Moodle 1.8.x gradebook (see screenshot) right away. While on Moodle 1.9.x gradebook, it will not (Moodle 1.9 gradebook does not recognize the tii assignment as an assignment). When creating either a tii assignment or an "upload a single file" assignment, both will update the mdl_assignment table right away. I'm still studying the new 1.9 gradebook, but could anyone tell me what's the major differences between 1.8 gradebook and 1.9 gradebook in terms of how this is handled differently? Does anyone know which part of the codes (or which function) that handle this part? Many thanks! smile
Attachment mdl18_gradebook_recognize_tii_assignments.png
In reply to Wen Hao Chuang

Re: OTP: Re: Making the official TurnItIn plugin (v2.0.0) work with gradebook in Moodle 1.9?

by David Wu -
Hi all,

Just a quick update... I think I've almost got it all sorted out. Still doing some more tests, but I thing I got most of the gradebook integrations in Moodle 1.9 with the Turnitin Assignment to work.

Regarding the issue you mentioned below with isadmin and isteacher, I would change the code to the has_capability functions, but those files that us the deprecated functions are their own classes and don't have the right context or a user associated with the context in order to be able to call that function, and I don't know of a way to get that information. Actually, this is the same problem that we have with the rebuild_course_cache issue and trying to create a Turnitin Assignment when there are other hidden items/assignments in the course, because I think it comes down to a permission error which I'm not sure how to bypass without modifying core code, which is something that I don't want to do. So the better solution would be a way to get the right permissions/capabilities at those points, but I'm not sure how to do that. Any ideas?

Thanks,
Dave

>By the way, not sure if it's you guys or the Northumbria Learning guys who are handling >the Moodle 1.9 compatibility issues. In the most recent plugin (v2.0.0 adapted for >Moodle 1.8.x), I have noticed that in /type/turnitin/tiiapi.class.php it was still using >isadmin() and isteacher() functions (which are now considered as "deprecated" functions >in 1.8 and 1.9 now, it should now be handled using has_capability() in moodle 1.8 and >1.9). So when you guys look into 1.9 compatibility you might also want to pay attention >to these, thanks!

In reply to David Wu

Re: OTP: Re: Making the official TurnItIn plugin (v2.0.0) work with gradebook in Moodle 1.9?

by David Wu -
Hi all,

I'd like to announce that we have made our plugin compatible with Moodle 1.9 (hopefully)!
It is available for download if you login to Turnitin directly as your administrator and click the "edit" or "update" button for your account depending on which version of the UI you are using, and then clicking on the "add/modify API integration information " link.

Here are the release notes for it:

RELEASE NOTES for Moodle Integration Version 2.0.3
--------------------------

Changes in version 2.0.3:

- Turnitin Assignment and Moodle Gradebook compatibility with Moodle 1.9 and later; creating Turnitin Assignments will now again add a column to the gradebook, and grading through the Turnitin Assignment inbox screen will transfer the grades to the gradebook as well
- Breadcrumb bars on Turnitin Assignment related pages cleaned up and made more accurate

Known Issues:

- When changing the total number of points available for a Turnitin Assignment that has submissions that have already been graded, and the value is lowered below grades that have been assigned, the grades for those submissions will be set to the max possible score rather than scaled accordingly. Behavior differs between Moodle 1.9 and Moodle 1.9.2+
- If there are elements within your course homepage that are hidden/not visible, any attempts to create a Turnitin Assignment or modify an existing Turnitin Assignment will fail. You must unhide all elements in order to successfully create or modify a Turnitin Assignment. Otherwise, other actions with existing Turnitin Assignments with hidden elements present should still work.


DISCLAIMER:
Any of the information and suggestions made in this file are "try at your own risk" and iParadigms/Turnitin cannot be held responsible for any actions you take.

Please let me know if you have any problems or issues with it.

Thanks,
Dave