Skip to content

Commit

Permalink
MDL-36826: Group assignment - Feedback files are not sent entire group
Browse files Browse the repository at this point in the history
  • Loading branch information
Damyon Wiese committed Nov 26, 2012
1 parent 93e4906 commit 41d3bc0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mod/assign/feedback/file/locallib.php
Expand Up @@ -194,8 +194,12 @@ public function update_file_count($grade) {
public function save(stdClass $grade, stdClass $data) { public function save(stdClass $grade, stdClass $data) {
$fileoptions = $this->get_file_options(); $fileoptions = $this->get_file_options();


$userid = $grade->userid; // The element name may have been for a different user.
$elementname = 'files_' . $userid; 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, $data = file_postupdate_standard_filemanager($data,
$elementname, $elementname,
Expand Down

0 comments on commit 41d3bc0

Please sign in to comment.