From 3ec209133d99be31ab53dbed41ba5b87c2cd764c Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Tue, 8 May 2012 11:02:25 +0800 Subject: [PATCH] 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. --- mod/assign/locallib.php | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index a193b56e189..b6224265a62 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -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