mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
Merge branch 'MDL-65886-MOODLE-master' of https://github.com/kristian-94/moodle
This commit is contained in:
commit
52070868a8
1 changed files with 6 additions and 0 deletions
|
@ -314,12 +314,18 @@ class assign_submission_file extends assign_submission_plugin {
|
|||
* @return boolean
|
||||
*/
|
||||
public function remove(stdClass $submission) {
|
||||
global $DB;
|
||||
$fs = get_file_storage();
|
||||
|
||||
$fs->delete_area_files($this->assignment->get_context()->id,
|
||||
'assignsubmission_file',
|
||||
ASSIGNSUBMISSION_FILE_FILEAREA,
|
||||
$submission->id);
|
||||
|
||||
$currentsubmission = $this->get_file_submission($submission->id);
|
||||
$currentsubmission->numfiles = 0;
|
||||
$DB->update_record('assignsubmission_file', $currentsubmission);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue