MDL-32768: Remove unused function count_files from mod_assign
This is implemented in the plugins and is not used in the base assign class. This was also using a constant from the assignsubmission_file plugin which is bad form.
This commit is contained in:
@@ -2366,25 +2366,6 @@ class assign {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* count the number of files in the file area
|
||||
*
|
||||
* @param int $userid
|
||||
* @param string $area
|
||||
* @return int
|
||||
*/
|
||||
private function count_files($userid = 0, $area = ASSIGN_FILEAREA_SUBMISSION_FILES) {
|
||||
global $USER;
|
||||
|
||||
if (!$userid) {
|
||||
$userid = $USER->id;
|
||||
}
|
||||
|
||||
$fs = get_file_storage();
|
||||
$files = $fs->get_area_files($this->context->id, 'mod_assign', $area, $userid, "id", false);
|
||||
|
||||
return count($files);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if this users grade is locked or overridden
|
||||
|
||||
Reference in New Issue
Block a user