mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +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
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function remove(stdClass $submission) {
|
public function remove(stdClass $submission) {
|
||||||
|
global $DB;
|
||||||
$fs = get_file_storage();
|
$fs = get_file_storage();
|
||||||
|
|
||||||
$fs->delete_area_files($this->assignment->get_context()->id,
|
$fs->delete_area_files($this->assignment->get_context()->id,
|
||||||
'assignsubmission_file',
|
'assignsubmission_file',
|
||||||
ASSIGNSUBMISSION_FILE_FILEAREA,
|
ASSIGNSUBMISSION_FILE_FILEAREA,
|
||||||
$submission->id);
|
$submission->id);
|
||||||
|
|
||||||
|
$currentsubmission = $this->get_file_submission($submission->id);
|
||||||
|
$currentsubmission->numfiles = 0;
|
||||||
|
$DB->update_record('assignsubmission_file', $currentsubmission);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue