Git Product home page Git Product logo

moodle-plagiarism_urkund's Introduction

Ouriginal Plagiarism plugin for Moodle

Note: This plugin is no longer mainted by Dan Marsden and is now maintained by the Turnitin Development team

Ouriginal (Previously called Urkund) is a commercial plagiarism prevention product - you must have a paid subscription to be able to use this plugin.

Supported branches

The git branches here support the following versions.

Moodle version Branch PHP Support
Moodle 3.5 to 3.8 MOODLE_38_STABLE 7.0+ Security fixes only - these versions are no longer supported by Moodle.
Moodle 3.9 to 3.11 MOODLE_39_STABLE 7.2+
Moodle 4.0 MOODLE_400_STABLE 7.2+

Quiz - Essay question support for versions prior to 3.10

The latest version of this plugin provides support for essay questions within the quiz activity, however Moodle versions prior to 3.10 don't provide a way for you to view the score/report. To allow the report to be viewed in older releases you must add a patch to the core Moodle code-base. More information on this is in the Moodle tracker: MDL-32226 For a direct link to the patch required see: https://github.com/moodle/moodle/commit/dfe73fadfcf0bae603aa58707e48182a221eea5a

If you are unfamiliar with using a git patch, you may need to wait unti Moodle includes this in the core release.

QUICK INSTALL

  1. Place these files in a new folder in your Moodle install under /plagiarism/urkund
  2. Visit the Notifications page in Moodle to trigger the upgrade scripts
  3. Enable the Plagiarism API under admin > Advanced Features
  4. Configure the Ouriginal plugin under admin > plugins > Plagiarism > Ouriginal

For more information see: https://docs.moodle.org/en/Plagiarism_Prevention_Ouriginal

moodle-plagiarism_urkund's People

Contributors

alexmorrisnz avatar danmarsden avatar germanvaleroelizondo avatar jpahullo avatar juancs avatar kanikagoyal avatar manyim16 avatar peterbulmer avatar polothy avatar schach avatar thepurpleblob avatar tristanmurdoch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

moodle-plagiarism_urkund's Issues

Reset/resend all option please...

I'm a bit vague on this but I'm hoping it makes some sense...

We noticed that if there is any kind of failure (e.g. an Urkund server outage) the submissions drop into an error state and are shown on the debug page (although we think perhaps not all are). Anyway, this is difficult to deal with as there is no 'resend all' option.

More fundamentally, we are wondering why the plugin doesn't just retry with an increasing backoff time (same sort of idea as SMTP implementations) when there is a failure?

Please add some mtrace(...) into the scheduled task

Currently, the cron stuff for Urkund is completely silent. It would be really useful to add some mtrace(..) stuff so that we can see what it is doing (or trying to do). The likes of "Urkund: sending file xyz.doc" etc. would be really useful in debugging problems.

Add an email warning if 'old' submissions in queue

Firstly, I haven't thought this out terribly well but... it would be very useful if the plugin sent an alert (preferably to a nominated user or email address) if it looked like Urkund had ceased to receive submissions for some period of time. We're really looking to get an alert if there's a reasonably possibility that submissions are not getting processed.

Submitting 'on behalf of' a student doesn't seem to work

  • Log in as admin/teacher
  • Pick a 'victim' student and edit their assignment. Submit a new file (on their behalf)

Urkund now behaves as though the 'submitter' (i.e. the admin/teacher) had submitted the work, not the student. No Urkund indicator appears next to the student's filename, the confirmation email is sent to the submitter and the mdl_plagiarism_urkund_files tables records the submission with the userid of the submitter not the student.

store config in plagiarism_urkund instead of 'plagiarism'

urkund site level settings are stored in 'plagiarism' instead of 'plagiarism_urkund' - this is partly due to the core Plagiarism api looking for "urkund_use" in the "plagiarism" space - I should tidy this up in core at some point.... but we should probably use the 'plagiarism_urkund' space for all other config items.

Analyzed report does not show in assignment results

We've had reports of a few of these. Here's a real example. As it's on our live server it's difficult to debug. Any thoughts?

Database says...

screen shot 2015-12-21 at 14 20 25

Assignment says no...

screen shot 2015-12-21 at 14 23 45

definitely the matching coursemoduleid and userid :(

Have option to only process file on final submit

At the moment the file is sent for scoring every time a the file is uploaded into assignment. There's effectively no limit on this and a student can keep uploading their paper until they get a suitably low score - then submitting for grading.

It would be very nice to have an (instance) option that only submitted to Urkund when the paper was finally submitted for grading. Some academics are keen that they only get one shot at receiving a plagiarism score.

group submit fails when multiple users submit

if user A submits an assignment then user B submits a new version the version from user B fails.

The code tries to submit the file as the "same" user to URKUND - so a subsequent submission from a different user is linked to the same user account and the previous submission doesn't get flagged as plagiarised. This check needs to move from the queue to the actual sending of the files.

Prefix event handling functions

Hey Dan,

Was checking your plugin out and noticed that the event handler functions in the lib.php file were not prefixed with "urkund_". Would have to update the db/events.php, the lib.php and bump the version.

I can help with the fix, but I didn't want to step on any toes.

I created a PR for the template: danmarsden/moodle-plagiarism_new#1

Cheers, Mark

In latest master, submitting files seems to be broken

We can't get it to recognise any filetypes...

File submitted to cm:301764 with an extension docx This assignment is configured to ignore this filetype, only files of type:0 are accepted

line 918 of /plagiarism/urkund/lib.php: call to debugging()
line 679 of /plagiarism/urkund/lib.php: call to urkund_queue_file()
line 37 of /plagiarism/urkund/classes/observer.php: call to plagiarism_plugin_urkund->event_handler()
line ? of unknownfile: call to plagiarism_urkund_observer::assignsubmission_file_uploaded()
line 155 of /lib/classes/event/manager.php: call to call_user_func()
line 75 of /lib/classes/event/manager.php: call to core\event\manager::process_buffers()
line 721 of /lib/classes/event/base.php: call to core\event\manager::dispatch()
line 238 of /mod/assign/submission/file/locallib.php: call to core\event\base->trigger()
line 5851 of /mod/assign/locallib.php: call to assign_submission_file->save()
line 5920 of /mod/assign/locallib.php: call to assign->save_submission()
line 404 of /mod/assign/locallib.php: call to assign->process_save_submission()
line 53 of /mod/assign/view.php: call to assign->view()

and...

File submitted to cm:301764 with an extension pdf This assignment is configured to ignore this filetype, only files of type:0 are accepted

line 918 of /plagiarism/urkund/lib.php: call to debugging()
line 679 of /plagiarism/urkund/lib.php: call to urkund_queue_file()
line 37 of /plagiarism/urkund/classes/observer.php: call to plagiarism_plugin_urkund->event_handler()
line ? of unknownfile: call to plagiarism_urkund_observer::assignsubmission_file_uploaded()
line 155 of /lib/classes/event/manager.php: call to call_user_func()
line 75 of /lib/classes/event/manager.php: call to core\event\manager::process_buffers()
line 721 of /lib/classes/event/base.php: call to core\event\manager::dispatch()
line 238 of /mod/assign/submission/file/locallib.php: call to core\event\base->trigger()
line 5851 of /mod/assign/locallib.php: call to assign_submission_file->save()
line 5920 of /mod/assign/locallib.php: call to assign->save_submission()
line 404 of /mod/assign/locallib.php: call to assign->process_save_submission()
line 53 of /mod/assign/view.php: call to assign->view()

etc.

on debug page column sort shows incorrect

if you return to the debug page after previously sorting a column on the page it will show an incorrect column as the one being sorted. the sort either needs to be rewritten to use flexible table correctly with the sort function or stop using flexible table.

Urkund settings don't survive backup and restore (in Assignment anyway)

I have no idea if this is an Urkund plugin, plagiarism plugins (in general) or Assignment issue. However...

Backup a course with Urkund enabled and restore it. Urkund is now disabled in all Assignments and any settings in the Urkund part of the Assignment configuration are also lost.

Type settings needed for urkund_get_form_elements() in lib.php

Currently (with debugging on) throws...

Did you remember to call setType() for 'use_urkund'? Defaulting to PARAM_RAW cleaning.
line 1312 of /lib/formslib.php: call to debugging()
line 284 of /lib/formslib.php: call to moodleform->detectMissingSetType()
line 202 of /lib/formslib.php: call to moodleform->_process_submission()
line 86 of /course/moodleform_mod.php: call to moodleform->moodleform()
line 254 of /course/modedit.php: call to moodleform_mod->moodleform_mod()
Did you remember to call setType() for 'urkund_show_student_score'? Defaulting to PARAM_RAW cleaning.
line 1312 of /lib/formslib.php: call to debugging()
line 284 of /lib/formslib.php: call to moodleform->detectMissingSetType()
line 202 of /lib/formslib.php: call to moodleform->_process_submission()
line 86 of /course/moodleform_mod.php: call to moodleform->moodleform()
line 254 of /course/modedit.php: call to moodleform_mod->moodleform_mod()
Did you remember to call setType() for 'urkund_show_student_report'? Defaulting to PARAM_RAW cleaning.
line 1312 of /lib/formslib.php: call to debugging()
line 284 of /lib/formslib.php: call to moodleform->detectMissingSetType()
line 202 of /lib/formslib.php: call to moodleform->_process_submission()
line 86 of /course/moodleform_mod.php: call to moodleform->moodleform()
line 254 of /course/modedit.php: call to moodleform_mod->moodleform_mod()
Did you remember to call setType() for 'urkund_draft_submit'? Defaulting to PARAM_RAW cleaning.
line 1312 of /lib/formslib.php: call to debugging()
line 284 of /lib/formslib.php: call to moodleform->detectMissingSetType()
line 202 of /lib/formslib.php: call to moodleform->_process_submission()
line 86 of /course/moodleform_mod.php: call to moodleform->moodleform()
line 254 of /course/modedit.php: call to moodleform_mod->moodleform_mod()
Did you remember to call setType() for 'urkund_receiver'? Defaulting to PARAM_RAW cleaning.
line 1312 of /lib/formslib.php: call to debugging()
line 284 of /lib/formslib.php: call to moodleform->detectMissingSetType()
line 202 of /lib/formslib.php: call to moodleform->_process_submission()
line 86 of /course/moodleform_mod.php: call to moodleform->moodleform()
line 254 of /course/modedit.php: call to moodleform_mod->moodleform_mod()
Did you remember to call setType() for 'urkund_studentemail'? Defaulting to PARAM_RAW cleaning.
line 1312 of /lib/formslib.php: call to debugging()
line 284 of /lib/formslib.php: call to moodleform->detectMissingSetType()
line 202 of /lib/formslib.php: call to moodleform->_process_submission()
line 86 of /course/moodleform_mod.php: call to moodleform->moodleform()
line 254 of /course/modedit.php: call to moodleform_mod->moodleform_mod()

Settings for pulling intervals

The cron-job that pulls results from Urkund seems to launch at times specified by code in lib.php. This code seems to create a function that grows larger over time; depending on the amount of attempts earlier tried and a waiting-time constant.

Would it be able to promote some of these constants to settings in the plugin? Specifically I'm interested in URKUND_MAX_STATUS_DELAY, which seems to be the upper bound for how long there can be between pulling intervals.

issue with group submission when user not in a group.

Handler function of component plagiarism_urkund: s:26:"urkund_event_file_uploaded"; threw exception :Fel vid läsning av databas

  • line 1080 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1305 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 622 of /plagiarism/urkund/lib.php: call to moodle_database->get_records_select()
  • line 739 of /plagiarism/urkund/lib.php: call to plagiarism_plugin_urkund->event_handler()
  • line ? of unknownfile: call to urkund_event_file_uploaded()
  • line 299 of /lib/eventslib.php: call to call_user_func()
  • line 343 of /lib/eventslib.php: call to events_dispatch()
  • line 450 of /lib/eventslib.php: call to events_process_queued_handler()
  • line 45 of /lib/classes/task/events_cron_task.php: call to events_cron()
  • line 74 of /lib/cronlib.php: call to core\task\events_cron_task->execute()
  • line 61 of /admin/cli/cron.php: call to cron_run()
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY id' at line 1
    SELECT * FROM mdl_plagiarism_urkund_files WHERE cm = ? AND userid IN () ORDER BY id
    [array (
    0 => '177347',
    )]

Improve and simplify attempt check function

the function used to determine the attempt timeout is overly complex and the delay between each check is not always ideal - it would be good to simplify the function (to make it easier to understand) and make sure that the number of attempts and the delay between each attempt is appropriate.

intervals in urkund_check_attempt_timeout

Hi Dan.

Had a look into moodle-plagiarism_urkund lib.php's urkund_check_attempt_timeout -function to see what kind of intervals it produces.
It seems to behave differently to what is described in the comments: Initial delay, doubled each time a check is made until the max_status_delay is met.

In case of submissions it is (in minutes):
$plagiarismfile->attempt: 0, $wait: 15
$plagiarismfile->attempt: 1, $wait: 15
$plagiarismfile->attempt: 2, $wait: 60
$plagiarismfile->attempt: 3, $wait: 180
$plagiarismfile->attempt: 4, $wait: 240
$plagiarismfile->attempt: 5, $wait: 300

... and for status (in minutes):
$plagiarismfile->attempt: 0, $wait: 30
$plagiarismfile->attempt: 1, $wait: 30
$plagiarismfile->attempt: 2, $wait: 120
$plagiarismfile->attempt: 3, $wait: 810
$plagiarismfile->attempt: 4, $wait: 5760
$plagiarismfile->attempt: 5, $wait: 7200
$plagiarismfile->attempt: 6, $wait: 8640
$plagiarismfile->attempt: 7, $wait: 10080
$plagiarismfile->attempt: 8, $wait: 11520
$plagiarismfile->attempt: 9, $wait: 12960

Notice the interval between attempt 3 and 4.

Urkund queue blocked

We are currently running the older version on our production server and the queue has 'stuck' (again). I wanted to make sure the new updates will prevent this. The debugging page is currently showing this under "Held events"...

stdClass Object
(
[id] => 1649727
[status] => 83
[timemodified] => 1448993261
[eventdata] => stdClass Object
(
[modulename] => assign
[cmid] => 378438
[itemid] => 207236
[courseid] => 6861
[userid] => 53757
[file] => Array
(
[30d99f09083aa36841c9f3f52400bfffc6de3607] => stored_file Object
(
[fs:stored_file:private] => file_storage Object
(
[filedir:file_storage:private] => /moodledata/moodle2/filedir
[trashdir:file_storage:private] => /moodledata/moodle2/trashdir
[tempdir:file_storage:private] => /moodledata/moodle2/temp/filestorage
[dirpermissions:file_storage:private] => 511
[filepermissions:file_storage:private] => 438
)

                        [file_record:stored_file:private] => stdClass Object
                            (
                                [id] => 5709902
                                [contenthash] => 0aaef4e476010cb899416436ba8effeb8126aca3
                                [pathnamehash] => 30d99f09083aa36841c9f3f52400bfffc6de3607
                                [contextid] => 648536
                                [component] => assignsubmission_file
                                [filearea] => submission_files
                                [itemid] => 207236
                                [filepath] => /
                                [filename] => ACCFIN5017_Group11.pdf
                                [userid] => 53757
                                [filesize] => 1988123
                                [mimetype] => application/pdf
                                [status] => 0
                                [source] => ACCFIN5017_Group11.pdf
                                [author] => Kristy Mcilwain
                                [license] => allrightsreserved
                                [timecreated] => 1448978339
                                [timemodified] => 1448978341
                                [sortorder] => 0
                                [referencefileid] => 
                                [repositoryid] => 
                                [reference] => 
                                [referencelastsync] => 
                            )

                        [filedir:stored_file:private] => /moodledata/moodle2/filedir
                        [repository:stored_file:private] => 
                    )

            )

        [pathnamehashes] => Array
            (
                [0] => 30d99f09083aa36841c9f3f52400bfffc6de3607
            )

    )

[stackdump] => line 726 of lib/classes/event/base.php: call to events_trigger_legacy()

line 238 of mod/assign/submission/file/locallib.php: call to core\event\base->trigger()
line 5851 of mod/assign/locallib.php: call to assign_submission_file->save()
line 5920 of mod/assign/locallib.php: call to assign->save_submission()
line 404 of mod/assign/locallib.php: call to assign->process_save_submission()
line 53 of mod/assign/view.php: call to assign->view()

[userid] => 53757
[eventname] => assessable_file_uploaded
[component] => plagiarism_urkund
[handlerfile] => /plagiarism/urkund/lib.php
[handlerfunction] => s:26:"urkund_event_file_uploaded";

)

There is nothing in mdl_plagiarism_urkund_files for userid=53757

Digging that out of the queue...

select * from mdl_events_queue_handlers where id=1649727\G
*************************** 1. row ***************************
id: 1649727
queuedeventid: 1649732
handlerid: 43
status: 90
errormessage: Handler function of component plagiarism_urkund: s:26:"urkund_event_file_uploaded"; threw exception :Error reading from database

  • line 1080 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1307 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 626 of /plagiarism/urkund/lib.php: call to moodle_database->get_records_select()
  • line 743 of /plagiarism/urkund/lib.php: call to plagiarism_plugin_urkund->event_handler()
  • line ? of unknownfile: call to urkund_event_file_uploaded()
  • line 299 of /lib/eventslib.php: call to call_user_func()
  • line 343 of /lib/eventslib.php: call to events_dispatch()
  • line 450 of /lib/eventslib.php: call to events_process_queued_handler()
  • line 45 of /lib/classes/task/events_cron_task.php: call to events_cron()
  • line 74 of /lib/cronlib.php: call to core\task\events_cron_task->execute()
  • line 61 of /admin/cli/cron.php: call to cron_run()
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY id' at line 1
    SELECT * FROM mdl_plagiarism_urkund_files WHERE cm = ? AND userid IN () ORDER BY id
    [array (
    0 => '378438',
    )]
    timemodified: 1448994583
    1 row in set (0.00 sec)

So, the lack of that entry appears to be the sticking point.

The big question is does the new version fix whatever this is?

Improve group handling

When groups are enabled in an assignment each subsequent submission may come from a different member in the group so the reports get overwritten. It would make sense for the plugin to detect that groups were being used and to use the original submitters identity for each subsequent submission.

Switching off plagiarism/urkund:enable capability breaks Assignment settings page

To reproduce...

  1. Create a course and a user. Add the user to the course as a teacher
  2. Modify the Teacher role so that plagiarism/urkund:enable is NOT allowed
  3. Log into Moodle as the user and go to the course
  4. Create a new assignment
  • On the setting page, go to 'Restrictions' and open it. Note that this should be a javascript popup but only a textarea box is displayed. If you run the Javascript Console you will see that a javascript error is thrown...

screen shot 2015-01-16 at 15 07 09

The Urkund error seems to be stopping the rest of the javascript on the page. If a user inadvertently types something into that box then they'll get a JSON error and it won't save (this is actually an assignment bug-ette I suppose).

We found this because we wanted to restrict the use of Urkund to certain users for a pilot study.

After upgrade, don't seem to be able to resubmit 613 errors

Get this message...

"URKUND fileid:39869 no files found with this record URKUND fileid:39874 sending to URKUND"

Also, trying a few individual ones... while a few 'work' the result for the others is a mostly a variation on the above or (with debugging on) the following...

Fatal error: Call to a member function get_filename() on a non-object in /var/www/html/moodle/plagiarism/urkund/lib.php on line 943

I also tried to resubmit 'Pending' submissions and this also fails...
Fatal error: Call to undefined method stdClass::get_content() in /var/www/html/moodle/plagiarism/urkund/lib.php on line 975

I'm getting a bit lost, but I'm assuming that these are pre-upgrade submissions that have somehow got orphaned as part of the upgrade process. Bit worried to be honest.

assignment online text report not showing to students

Unconfirmed report:
in Assignment (2.3), the contents of Online text is sent to Urkund
but the Moodle user interface does not visualise that to the student nor
the teacher, i.e. there is no information for the student about the
submission being sent to Urkund and there is no result percentage or
report link for the teacher. The report can be found in the Urkund
interface, though, and the student receives the submission confirmation
email from Urkund.

On debug page, column sort direction doesn't do anything

If you click a column name multiple times the direction arrow flips up and down but the table sort-order doesn't change. Nor does the URL associated with the header - I don't know the tablelib thing all that well but I would expect to see a parameter for the sort direction.

teacher 'submit file for grading' option doesn't seem to work

  • set up an assignment such that the students must press the submit button for marking and that Urkund is set so that their file is only processed when the submit button is pressed.
  • submit a file.
  • as a teacher, revert the file to draft, submit a new file and then 'submit file for grading' all through the teacher/grading interface.

The file is not submitted to Urkund :(

'retry' schedule (seems to) result in long delays

I'm not sure if I have this right but I assume that the plugin employs some kind of increasing backoff time if uploads fail.

We had an issue the other day when the server was down for a big chunk of the weekend. However, when the service was restored it took maybe as much as 24 hours before many of the queued submissions got sent.

If this is so, I would suggest that the maximum retry is too long and it would also be really great to have a 'resend queue now' button somewhere to reset them all.

Cannot upgrade to this version of the plugin due to existing unprocessed data

Tried to upgrade on our production site and got the above. Huh?

If there are special requirements for doing to upgrade it should be properly flagged up somewhere and/or it should just deal with them. We, effectively, have a load of grief to deal with now.

EDIT:
OK, I finally found this... https://docs.moodle.org/30/en/Plagiarism_Prevention_URKUND_Settings#Installation_failed_due_to_unprocessed_data

I think this is going to catch people out (like me) who haven't seen that documentation update. Either get Urkund to tell people or (even better) figure out a way to deal with the old queue as part of the upgrade. Or something else... but something :)

Group submit doesn't work in some circumstances

This is from one of our QA testers. I hope it makes sense...

Group submit tests x3 = first broken and other 2 work

Create a course
Add 4 students to the course
Create 2 groups with 2 students
Create an assignment
Enable submit button for submission
Enable group submission
Enable URKUND where report is generated once student submits work for marking.
Login as student and make submission
'''Expect to see URKUND cog icon but nothing visible beside file.'''

Create a course
Add 4 students to the course
Create 2 groups with 2 students
Create an assignment
Enable group submission
Enable URKUND where report is generated straight away.
Enable blind marking
Login as student and make submission
'''Expect to see URKUND cog icon – cog icon now visible and working.'''

Create a course
Add 4 students to the course
Create 2 groups with 2 students
Create an assignment
Enable group submission
Enable URKUND where report is generated straight away.
Login as student and make submission
'''Expect to see URKUND cog icon – cog icon visible and working.'''

Looks like having student submit file for marking before getting report breaks it.

'debug' messages very hard to read when resubmitting

When resubmitting submissions in an error condition through the debug page the resulting messages are very hard to read. They might well contain something interesting :)

Here's a real example of submitting some in 'Error' status...

URKUND fileid:46333 assignment found URKUND fileid:46333 Check component:assignsubmission_file Filearea:submission_files Submission286708 URKUND fileid:46333 check fileid:5949470 URKUND fileid:46333 Check component:assignsubmission_onlinetext Filearea:submissions_onlinetext Submission286708 URKUND fileid:46333 no files found with this record URKUND fileid:46350 assignment found URKUND fileid:46350 Check component:assignsubmission_file Filearea:submission_files Submission295009 URKUND fileid:46350 check fileid:5941016 URKUND fileid:46350 found fileid:5941016 URKUND fileid:46350 sending to URKUND URKUND fileid:46350 returned status: 202 URKUND fileid:46351 assignment found URKUND fileid:46351 Check component:assignsubmission_file Filearea:submission_files Submission291815 URKUND fileid:46351 check fileid:5844565 URKUND fileid:46351 check fileid:5941029 URKUND fileid:46351 found fileid:5941029 URKUND fileid:46351 sending to URKUND URKUND fileid:46351 returned status: 202 URKUND fileid:46352 assignment found URKUND fileid:46352 Check component:assignsubmission_file Filearea:submission_files Submission211441 URKUND fileid:46352 check fileid:5941460 URKUND fileid:46352 found fileid:5941460 URKUND fileid:46352 sending to URKUND URKUND fileid:46352 returned status: 202 URKUND fileid:46353 assignment found URKUND fileid:46353 Check component:assignsubmission_file Filearea:submission_files Submission290679 URKUND fileid:46353 check fileid:5941492 URKUND fileid:46353 found fileid:5941492 URKUND fileid:46353 sending to URKUND URKUND fileid:46353 returned status: 202 URKUND fileid:46354 assignment found URKUND fileid:46354 Check component:assignsubmission_file Filearea:submission_files Submission297640 URKUND fileid:46354 check fileid:5941524 URKUND fileid:46354 found fileid:5941524 URKUND fileid:46354 sending to URKUND URKUND fileid:46354 returned status: 202

debugging page error messages

You need to update your sql to include additional name fields in the user object.
line 3577 of \lib\moodlelib.php: call to debugging()
line 177 of \plagiarism\urkund\urkund_debug.php: call to fullname()
You need to update your sql to include additional name fields in the user object.
line 3577 of \lib\moodlelib.php: call to debugging()
line 177 of \plagiarism\urkund\urkund_debug.php: call to fullname()

File not sent to Urkund unless submit is required

When teacher sets the assignment settings so that "Require students click submit button" is set to "No" and "When should the file be submitted to URKUND" is set to "Submit file when first uploaded", the file is never sent to Urkund. The file is sent only if, students are required to click the submit button and the file is sent for Urkund after submitting.

I've tried this several times, but can't get it to work. We have Moodle 2.9.2+ (Build: 20150918) and the plugin version is 1.7.6 (2015052100).

urkund1
urkund2

"final" submissions don't work (sometimes?) because of missing constant 'ASSIGNSUBMISSION_FILE_FILEAREA'

We found that files 'finalised' but student pressing submit button did not get sent to Urkund. Checking cron logs...

finalise

Notice: Use of undefined constant ASSIGNSUBMISSION_FILE_FILEAREA - assumed     'ASSIGNSUBMISSION_FILE_FILEAREA' in /var/www/html/moodle/plagiarism/urkund/lib.php on line 555

This would make sense as this would prevent the files being read from the assignment file area. The plugin links mod/assign/locallib.php just before this but this constant is not defined in that file. It's defined in mod/assign/submission/file/locallib.php - which should be included by the constructor in assignments class but for some reason has not been.

This works on our test box but not on our production box.

I'm not sure if this is a local issue (assignment works fine) or something very subtle in the way these plugins work or with permissions on our server.

Anyway - do you think this might be made more robust as a lot of steps have to work properly for that constant to exist and it's game over if it does not.

EDIT:
Before you ask what I would ask. We checked file permissions et al very carefully and cannot see any obvious reason for this sub-plugin to be skipped during cron execution. Thinking about it some more, should the code for the assignment file uploads not simply include mod/assign/submission/file/locallib.php directly to avoid any possible issues.

Language string changes to studentdisclosuredefault not taking effect when adding new discussion topic

Hi Dan, we're implementing this plugin to use URKUND here at de Souza Institute, and I'm reversing the meaning of the "opt-out" link through the language strings, since we've asked for our documents to be exempted from analysis by other organizations by default.

The problem is I can't find one string to modify. When we click "Add new Discussion" in a Forum, it automatically adds the below text, just above the "Your new discussion topic" header:

"All files uploaded will be submitted to the plagiarism detection service URKUND,
If you wish to prevent your document from being used as a source for analysis outside this site by other organisations you can use the opt-out link provided after the report has been generated."

This looks to be the "plagiarism_urkund - studentdisclosuredefault" string, but even though I've modified it, it's not updating when I click add new discussion. I've saved the changes to the language pack and I've purged all caches. I know the overall language pack changes ARE taking effect, as I had also renamed "Opt-out" to "Opt-in" and that properly shows up.

Sending pending files appears to be broken...

In cron output....

Execute scheduled task: Send queued files
... started 10:48:57. Current memory use 52MB.
URKUND fileid:42397 sending for processing
URKUND fileid:42397 file not found
URKUND fileid:42405 sending for processing
URKUND fileid:42405 file not found
URKUND fileid:42406 sending for processing
URKUND fileid:42406 file not found
URKUND fileid:42410 sending for processing
URKUND fileid:42410 file not found
URKUND fileid:42560 sending for processing
URKUND fileid:42560 file not found
URKUND fileid:42594 sending for processing
URKUND fileid:42594 file not found
URKUND fileid:42603 sending for processing
URKUND fileid:42603 file not found
URKUND fileid:42645 sending for processing
URKUND fileid:42645 file not found
URKUND fileid:42703 sending for processing
URKUND fileid:42703 file not found
URKUND fileid:42707 sending for processing
URKUND fileid:42707 file not found
URKUND fileid:42739 sending for processing
URKUND fileid:42739 file not found
URKUND fileid:42750 sending for processing
URKUND fileid:42750 file not found
URKUND fileid:42872 sending for processing
URKUND fileid:42872 file not found
URKUND fileid:43036 sending for processing
URKUND fileid:43036 file not found
URKUND fileid:43051 sending for processing
URKUND fileid:43051 file not found
URKUND fileid:43529 sending for processing
URKUND fileid:43529 file not found
URKUND fileid:43546 sending for processing
URKUND fileid:43546 file not found
URKUND fileid:43669 sending for processing
URKUND fileid:43669 file not found
URKUND fileid:43835 sending for processing
URKUND fileid:43835 file not found
URKUND fileid:43986 sending for processing
URKUND fileid:43986 file not found
URKUND fileid:44078 sending for processing
URKUND fileid:44078 file not found
URKUND fileid:44106 sending for processing
URKUND fileid:44106 file not found
URKUND fileid:44536 sending for processing
URKUND fileid:44536 file not found
URKUND fileid:44569 sending for processing
URKUND fileid:44569 file not found
URKUND fileid:44590 sending for processing
URKUND fileid:44590 file not found
URKUND fileid:44616 sending for processing
URKUND fileid:44616 file not found
URKUND fileid:44692 sending for processing
URKUND fileid:44692 file not found
URKUND fileid:45000 sending for processing
URKUND fileid:45000 file not found
URKUND fileid:45001 sending for processing
URKUND fileid:45001 file not found
URKUND fileid:45012 sending for processing
URKUND fileid:45012 file not found
URKUND fileid:45042 sending for processing
URKUND fileid:45042 file not found
URKUND fileid:45117 sending for processing
URKUND fileid:45117 file not found
URKUND fileid:45119 sending for processing
URKUND fileid:45119 file not found
URKUND fileid:45140 sending for processing
URKUND fileid:45140 file not found
URKUND fileid:45221 sending for processing
URKUND fileid:45221 file not found
URKUND fileid:45340 sending for processing
URKUND fileid:45340 file not found
URKUND fileid:45414 sending for processing
URKUND fileid:45414 file not found
URKUND fileid:45415 sending for processing
URKUND fileid:45415 file not found
URKUND fileid:45658 sending for processing
URKUND fileid:45658 file not found
URKUND fileid:45750 sending for processing
URKUND fileid:45750 file not found
URKUND fileid:45811 sending for processing
URKUND fileid:45811 file not found
URKUND fileid:45842 sending for processing
URKUND fileid:45842 file not found
URKUND fileid:45978 sending for processing
URKUND fileid:45978 file not found
URKUND fileid:45994 sending for processing
URKUND fileid:45994 file not found
URKUND fileid:45998 sending for processing
URKUND fileid:45998 file not found
URKUND fileid:46033 sending for processing
URKUND fileid:46033 file not found
URKUND fileid:46065 sending for processing
URKUND fileid:46065 file not found
URKUND fileid:46241 sending for processing
URKUND fileid:46241 file not found
URKUND fileid:46242 sending for processing
URKUND fileid:46242 file not found
URKUND fileid:46243 sending for processing
URKUND fileid:46243 file not found
URKUND fileid:46244 sending for processing
URKUND fileid:46244 file not found
URKUND fileid:46260 sending for processing
URKUND fileid:46260 sending to URKUND
URKUND fileid:46260 returned status: 202

Just taking the last broken one as an example however...

select * from mdl_plagiarism_urkund_files where id=46244\G
*************************** 1. row ***************************
id: 46244
cm: 390161
userid: 52365
identifier: 5ec76a53c50d6a172fb1d55ef5b2fe1e19a07c4b
filename: 2225216.docx
reporturl: NULL
optout: NULL
statuscode: pending
similarityscore: 0
attempt: 0
errorresponse: NULL
timesubmitted: 1450714034
1 row in set (0.10 sec)

mysql> select * from mdl_files where filename='2225216.docx'\G
*************************** 1. row ***************************
id: 5930511
contenthash: 5ec76a53c50d6a172fb1d55ef5b2fe1e19a07c4b
pathnamehash: 9daaff8c8e89c4d02d5411100027e66252af30d1
contextid: 351944
component: user
filearea: draft
itemid: 788603797
filepath: /
filename: 2225216.docx
userid: 52365
filesize: 32473
mimetype: application/vnd.openxmlformats-officedocument.wordprocessingml.document
status: 0
source: O:8:"stdClass":1:{s:6:"source";s:12:"2225216.docx";}
author: Diane Carr
license: allrightsreserved
timecreated: 1450714033
timemodified: 1450714033
sortorder: 0
referencefileid: NULL
*************************** 2. row ***************************
id: 5930512
contenthash: 5ec76a53c50d6a172fb1d55ef5b2fe1e19a07c4b
pathnamehash: f2cb56167c3acf3a3eb5067d1e7261144d9a7f69
contextid: 679835
component: assignsubmission_file
filearea: submission_files
itemid: 289877
filepath: /
filename: 2225216.docx
userid: 52365
filesize: 32473
mimetype: application/vnd.openxmlformats-officedocument.wordprocessingml.document
status: 0
source: 2225216.docx
author: Diane Carr
license: allrightsreserved
timecreated: 1450714033
timemodified: 1450714034
sortorder: 0
referencefileid: NULL
2 rows in set (5.59 sec)

This one was submitted about 4pm yesterday so it's a current issue.

Resubmitting 'pending' through the error page has the same result - mass of 'file not found' errors.

The code in plagiarism_urkund_get_file_object is not exactly trivial so I'm struggling to see what might have gone wrong but it doesn't seem to be finding any pending files.

Just to note that I attempted to reproduce this on my test system (identical code base) and it all works as expected. Submission is 'pending' and then 'Resubmit all pending' from the debugging page transforms it into a 202.

first cron run gives php notice

Notice: Undefined property: stdClass::$lastupdatedfiletypes in /home/cesmcyey/www/moodle/plagiarism/urkund/lib.php on line

Don't understand why debug fills up with 202 'errors'

I came in this morning to c. 20 pages of submissions in 202 state and complaints of scores/reports not being available.

On this occasion, clicking the 'Get scores' button seems to have got scores for most of them. However, I'm not at all happy about this. Isn't the plugin meant to keep trying for outstanding scores until they become available? Or have I misunderstood how it works? Also, what's special about these submissions that their reports/scores don't come back without manual intervention.

If this had been over a weekend we would have been very unpopular.

Can something be done to make this more robust?

warn users when activating a plugin that previous submissions won't be sent.

If an assignment has submissions we should warn users that activating the plugin will not send previously submitted files. maybe using some text like:
"This option must be turned on BEFORE files are submitted to the assignment. Turning it on afterwards will NOT affect previously submitted files. These files will NOT be sent to URKUND retroactively."

Add logging for curl activity

We had some issues with mysterious 613 HTTP codes coming back. Urkund support really wanted to see that data packets but there's no facility for this. It would be useful to have a log option to dump the data being sent to urkund at that being returned so that HTTP issues can be investigated.

error handling improvments.

feedback from Samuel:
I think I have found a problem with the way the plug-in handles errors when submitting documents. If a submission can’t succeed, for example if the receiver account is incorrectly configured on our end, the plug-in will retry multiple times with that single document but will give up completely after a while rather than to continue with the other documents in the queue.

So instead of stalling the entire submission process I think the failing document should be skipped and the plugin should continue with the rest. I also think the logging and reporting of these errors might need some improvement.

click submit button can be removed while Submit file when student sends for marking is enabled

It is possible remove the submit but still have the file set to only send to URKUND once submit button is clicked. This means files have not been sent to URKUND for checking.

How to reproduce:

Submission settings
In Require students click submit button select Yes from the drop-down.

URKUND plagiarism plugin
In Enable URKUND select Yes from the drop-down
In When should the file be submitted to URKUND select Submit file when student sends for marking

Now return to Submission settings
In Require students click submit button select No from the drop-down.

Notify unsupported file type immediately

We have noticed a problem with some students renaming files in Moodle and inadvertently removing the file extension when they do so (see https://tracker.moodle.org/browse/MDL-49544).

If the above happens or the student otherwise uploads an unsupported type they don't know about it until the next time cron processes the Urkund plugin event. In most cases, they have navigated away and they first they know is when no email has arrived after some time. Even if they spot the error message it isn't always immediately obvious to them what the problem is (particularly if the extension is missing).

Some thoughts...

  • Can the missing extension be made a special case and a more appropriate error message be given?
  • I know this isn't easy, but is there any possibility that the file validity can be checked in 'real time' when the file is uploaded or edited?

In debug screen add filter to exclude 'old' data

You have added buttons to resubmit various error codes but (for the ones that will never get sent - e.g. incorrect file formats) it would be very useful to have 'Delete all with status xxx'.

They accumulate and the only way to get rid seems to be directly from the database table which isn't ideal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.