turnitin / moodle-plagiarism_turnitin

Turnitin Plagiarism plugin for Moodle
http://www.turnitin.com
45 stars 69 forks source link

a bug - show to ‘Turnitin plagiarism plugin settings’ in assignment activity #527

Closed yezi08 closed 4 years ago

yezi08 commented 4 years ago

I just upgraded the Turnitin plugin plagiarism_turnitin 2020070801 on your Moodle system (Moodle 3.7.5) last week. And we found a terrible bug. In the setting of assignment activity, the ‘Turnitin plagiarism plugin settings’ section appears twice, as shown in the screen shot below. Moreover, teachers need to enable Turnitin in BOTH sections to successfully enable Turnitin. It is really confusing to teachers. Could you solve it as soon as possible, please?

turnitin
jmcgettrick commented 4 years ago

Thanks for reporting @yezi08 - see #528

thepurpleblob commented 4 years ago

Just a "me too". We're seeing the same thing

thepurpleblob commented 4 years ago

Worse - only the lower tab actually seems to work.

thepurpleblob commented 4 years ago

I noticed you had made some updates and implemented the latest code from github but it doesn't help. I'm running 3.8.4

I'm assuming his isn't news to you but you seem to have tried to move the settings into function plagiarism_turnitin_coursemodule_standard_elements

However, Assignment is still calling the 'old' method for adding plagiarism settings. Turnitin is doing both of them :(

jmcgettrick commented 4 years ago

Thanks @thepurpleblob - yes we're going to release a patch to fix it to only show once.

thepurpleblob commented 4 years ago

It seems to be the $CFG->branch > 39 check that's causing the problem on my site. I'm not sure what that does? Anyway, taking out that check and it works.

Yeh - you've picked the wrong version. The standard elements extension must have started in 3.8, that needs changed to > 38

if ($source != "new_method" && $CFG->branch >= 38) {

or - judging by the OP - even earlier.

CharlotteSpinks commented 4 years ago

Hi @yezi08 @thepurpleblob This is resolved in the latest release.

thepurpleblob commented 4 years ago

@CharlotteSpinks if you mean the code that's currently here in Github then I beg to differ.

It doesn't work on 3.8 (and probably 3.7) because the $CFG->branch check is wrong.

In fact the 'extend_standard_elements' call which you seem to have started using was added way back in 3.1 (https://tracker.moodle.org/browse/MDL-52534) so the branch check really makes no sense at all.

CharlotteSpinks commented 4 years ago

Hey @thepurpleblob Are you referring to an earlier commit? I have removed the branch check in #531 and this code is now live.

thepurpleblob commented 4 years ago

@CharlotteSpinks sorry - missed your update. I see now