mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 10:56:56 +02:00
MDL-36804 mod_assign - allow students to resubmit work and display a submission + grading history
This is based on work by Davo Smith with input from Fernando Oliveira (Thanks guys!).
This commit is contained in:
parent
bf6c1d0997
commit
df211804f1
26 changed files with 1839 additions and 262 deletions
|
@ -99,6 +99,8 @@ class assign_upgrade_manager {
|
|||
$data->requireallteammemberssubmit = 0;
|
||||
$data->teamsubmissiongroupingid = 0;
|
||||
$data->blindmarking = 0;
|
||||
$data->attemptreopenmethod = 'none';
|
||||
$data->maxattempts = ASSIGN_UNLIMITED_ATTEMPTS;
|
||||
|
||||
$newassignment = new assign(null, null, null);
|
||||
|
||||
|
@ -247,7 +249,14 @@ class assign_upgrade_manager {
|
|||
$grade->timemodified = $oldsubmission->timemarked;
|
||||
$grade->timecreated = $oldsubmission->timecreated;
|
||||
$grade->grade = $oldsubmission->grade;
|
||||
$grade->mailed = $oldsubmission->mailed;
|
||||
if ($oldsubmission->mailed) {
|
||||
// The mailed flag goes in the flags table.
|
||||
$flags = new stdClass();
|
||||
$flags->userid = $oldsubmission->userid;
|
||||
$flags->assignment = $newassignment->get_instance()->id;
|
||||
$flags->mailed = 1;
|
||||
$DB->insert_record('assign_user_flags', $flags);
|
||||
}
|
||||
$grade->id = $DB->insert_record('assign_grades', $grade);
|
||||
if (!$grade->id) {
|
||||
$log .= get_string('couldnotinsertgrade', 'mod_assign', $grade->userid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue