Permalink
Browse files

MDL-36826: Group assignment - Feedback files are not sent entire group

  • Loading branch information...
1 parent 93e4906 commit 41d3bc0ca0a2f90cf8984c537bfc345c0ae4e755 @damyon damyon committed Nov 26, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 mod/assign/feedback/file/locallib.php
@@ -194,8 +194,12 @@ public function update_file_count($grade) {
public function save(stdClass $grade, stdClass $data) {
$fileoptions = $this->get_file_options();
- $userid = $grade->userid;
- $elementname = 'files_' . $userid;
+ // The element name may have been for a different user.
+ foreach ($data as $key => $value) {
+ if (strpos($key, 'files_') === 0 && strpos($key, '_filemanager')) {
+ $elementname = substr($key, 0, strpos($key, '_filemanager'));
+ }
+ }
$data = file_postupdate_standard_filemanager($data,
$elementname,

0 comments on commit 41d3bc0

Please sign in to comment.