assignment MDL-23684 renamed a variable causing confusion
authorAparup Banerjee <nebgor@gmail.com>
Fri, 6 Aug 2010 03:49:11 +0000 (03:49 +0000)
committerAparup Banerjee <nebgor@gmail.com>
Fri, 6 Aug 2010 03:49:11 +0000 (03:49 +0000)
mod/assignment/lib.php

index 7ff052d..95d58e5 100644 (file)
@@ -1796,12 +1796,12 @@ class assignment_base {
     /**
      * Count the files uploaded by a given user
      *
-     * @param $userid int The user id
+     * @param $itemid int The submission's id as the file's itemid.
      * @return int
      */
-    function count_user_files($userid) {
+    function count_user_files($itemid) {
         $fs = get_file_storage();
-        $files = $fs->get_area_files($this->context->id, 'mod_assignment', 'submission', $userid, "id", false);
+        $files = $fs->get_area_files($this->context->id, 'mod_assignment', 'submission', $itemid, "id", false);
         return count($files);
     }