From: mjollnir_ Date: Fri, 5 Sep 2008 12:44:46 +0000 (+0000) Subject: MDL-15758 - remove dependence on 'userid' callback parameter in assignment portfolio... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=797b81d95616b05c520ea7950809a06b0f545ba5;p=moodle.git MDL-15758 - remove dependence on 'userid' callback parameter in assignment portfolio caller as it's handled by the parent class --- diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php index 566ee4c92f..8f248aea62 100644 --- a/mod/assignment/lib.php +++ b/mod/assignment/lib.php @@ -1706,7 +1706,6 @@ class assignment_base { if ($files = $fs->get_area_files($this->context->id, 'assignment_submission', $userid, "timemodified", false)) { $p = array( - 'userid' => $userid, 'assignmentid' => $this->cm->id, ); foreach ($files as $file) { @@ -3167,7 +3166,8 @@ class assignment_portfolio_caller extends portfolio_module_caller_base { if (!$this->assignment->portfolio_exportable()) { throw new portfolio_caller_exception('notexportable', 'portfolio', $this->get_return_url()); } - $this->userid = $callbackargs['userid']; + global $USER; + $this->userid = $USER->id; $this->file = (array_key_exists('file', $callbackargs)) ? $callbackargs['file'] : null; } diff --git a/mod/assignment/type/upload/assignment.class.php b/mod/assignment/type/upload/assignment.class.php index 65686cca74..922986bb93 100644 --- a/mod/assignment/type/upload/assignment.class.php +++ b/mod/assignment/type/upload/assignment.class.php @@ -343,7 +343,6 @@ class assignment_upload extends assignment_base { if ($files = $fs->get_area_files($this->context->id, 'assignment_submission', $userid, "timemodified", false)) { $p = array( - 'userid' => $userid, 'assignmentid' => $this->cm->id, ); foreach ($files as $file) {