turnitin / moodle-plagiarism_turnitin

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

Fix for modals doesn't work #701

Open sharpchi opened 3 months ago

sharpchi commented 3 months ago

Hi, I'm just testing the fix for the modals (https://github.com/turnitin/moodle-plagiarism_turnitin/commit/8cf0d4f8dbad46a36079c5f4b77ea294a1dcf8cc) for peermark and quickmark launch (I'm testing on Moodle 4.1, but I think there's an issue with newer versions too).

This is the error I'm getting image

Essentially, the files are missing. From the following lines https://github.com/turnitin/moodle-plagiarism_turnitin/blob/8cf0d4f8dbad46a36079c5f4b77ea294a1dcf8cc/lib.php#L582

I'm pretty sure the calls should match the filenames so:

$PAGE->requires->js_call_amd('plagiarism_turnitin/eulaLaunch', 'eulaLaunch');
$PAGE->requires->js_call_amd('plagiarism_turnitin/peermarkLaunch', 'peermarkLaunch');
$PAGE->requires->js_call_amd('plagiarism_turnitin/rubric', 'rubric');

should be

$PAGE->requires->js_call_amd('plagiarism_turnitin/eula', 'eulaLaunch');
$PAGE->requires->js_call_amd('plagiarism_turnitin/peermark', 'peermarkLaunch');
$PAGE->requires->js_call_amd('plagiarism_turnitin/rubric', 'rubric');

or the file names should be changed to match the call

sharpchi commented 3 months ago

I'm wondering if you're doing a different build process. Using Moodle's Grunt process, files named peermark.js get compiled with a module name of "plagiarism_turnitin/peermark" and a build filename of peermark.min.js. But your build has a module name of "plagiarism_turnitin/peermarkLaunch". So there's an inconsistency with the naming, somehow.

I got it working in M4.1 with this update: https://github.com/ltu-solent/moodle-plagiarism_turnitin/commit/549af63ae7d664fedbba8eca4f723adde42fabc4 where I renamed the amd calls and rebuilt the amd files affected.

But haven't attempted with any other versions of Moodle, so I won't do a pull request.

giorgosmic commented 2 weeks ago

@sharpchi We are having the same issue we are getting 404 error for the files.

Do you know when there will be a fix?

thepurpleblob commented 1 week ago

Same issue. This is serious guys... Turnitin plugin is unusable on Moodle 4.3 and 4.4.