Moodle version 2.9
I need to duplicate the learners assignment submission to another assignment in order two get two separate grades for it. The current process is to connect as administrator and manually copy each submission to the second assignment.
To avoid the manual process, I am get an assignment submission saved to two separate assignments automatically. Ideally this should be done with an assign submission plugin to avoid editing the moodle core. I tried this:
$metadatasubmission->submission = $submission->id;
$metadatasubmission->assignment = '119';
return $DB->insert_record('assignsubmission_doublesubmission', $metadatasubmission) > 0;
using a hardcoded assignment id, but it doesn't work as it doesn't trigger the submission.
Can anyone help?