'.$this->print_student_answer($auser->id)
+// Get the user's groups.
+// If the user is in more than one group, get the submissions for all the groups.
+ $auser_groups = groups_get_user_groups($this->course->id, $auser->id);
+ if (($this->assignment->groupassignment) && (count($auser_groups[0]) > 1)) {
+ $studentmodified = '
';
+ foreach ($auser_groups[0] as $auser_group) {
+ $submission = $this->get_submission($auser->id, false, false, $auser_group, true);
+ if ($submission) {
+ $groupsubmissionindicator = '' . get_string("groupsubmissionindicator", "assignment") . ': ' .groups_get_group_name($auser_group). '';
+ if ($submission->timemodified > 0) {
+ $studentmodified = $studentmodified
+ . $groupsubmissionindicator
+ . $this->print_student_answer($auser->id, false, $auser_group)
+ . userdate($submission->timemodified).'
';
+ } else {
+ $studentmodified = $studentmodified . ' ';
+ }
+ }
+ }
+ $studentmodified = $studentmodified . '
';
+ } else {
+ if (!empty($auser->submissionid)) {
+ ///Prints student answer and student modified date
+ ///attach file or print link to student answer, depending on the type of the assignment.
+ ///Refer to print_student_answer in inherited classes.
+ if ($auser->groupid > 0) {
+ $groupsubmissionindicator = ''
+ . $groupsubmissionindicator
+ . $this->print_student_answer($auser->id)
. userdate($auser->timemodified).'
';
- } else {
- $studentmodified = ''
+ . $groupsubmissionindicator
+ . $this->print_student_answer($auser->id)
+ . userdate($auser->timemodified).'
';
+ } else {
+ $studentmodified = '