/**
  * Fill table row
  */
 protected function fillRow($member)
 {
     global $lng, $ilCtrl;
     include_once "./Services/Object/classes/class.ilObjectFactory.php";
     $member_id = $member["usr_id"];
     if (!($mem_obj = ilObjectFactory::getInstanceByObjId($member_id, false))) {
         return;
     }
     // mail sent
     if ($this->sent_col) {
         if (ilExAssignment::lookupStatusSentOfUser($this->ass_id, $member_id)) {
             $this->tpl->setCurrentBlock("mail_sent");
             if (($st = ilExAssignment::lookupSentTimeOfUser($this->ass_id, $member_id)) > 0) {
                 $this->tpl->setVariable("TXT_MAIL_SENT", sprintf($lng->txt("exc_sent_at"), ilDatePresentation::formatDate(new ilDateTime($st, IL_CAL_DATE))));
             } else {
                 $this->tpl->setVariable("TXT_MAIL_SENT", $lng->txt("sent"));
             }
             $this->tpl->parseCurrentBlock();
         } else {
             $this->tpl->setCurrentBlock("mail_sent");
             $this->tpl->setVariable("TXT_MAIL_SENT", " ");
             $this->tpl->parseCurrentBlock();
         }
     }
     // checkbox
     $this->tpl->setVariable("VAL_CHKBOX", ilUtil::formCheckbox(0, "member[{$member_id}]", 1));
     $this->tpl->setVariable("VAL_ID", $member_id);
     // name and login
     if (!isset($member["team"])) {
         $this->tpl->setVariable("TXT_NAME", $member["name"]);
         $this->tpl->setVariable("TXT_LOGIN", "[" . $member["login"] . "]");
         // image
         $this->tpl->setVariable("USR_IMAGE", $mem_obj->getPersonalPicturePath("xxsmall"));
         $this->tpl->setVariable("USR_ALT", $lng->txt("personal_picture"));
     } else {
         $this->tpl->setCurrentBlock("team_member");
         asort($member["team"]);
         foreach ($member["team"] as $member_name) {
             $this->tpl->setVariable("TXT_MEMBER_NAME", $member_name);
             $this->tpl->parseCurrentBlock();
         }
         $ilCtrl->setParameter($this->parent_obj, "lmem", $member_id);
         $this->tpl->setVariable("HREF_LOG", $ilCtrl->getLinkTarget($this->parent_obj, "showTeamLog"));
         $this->tpl->setVariable("TXT_LOG", $lng->txt("exc_team_log"));
         $ilCtrl->setParameter($this->parent_obj, "lmem", "");
     }
     // submission:
     // see if files have been resubmmited after solved
     $last_sub = ilExAssignment::getLastSubmission($this->ass_id, $member_id);
     if ($last_sub) {
         $last_sub = ilDatePresentation::formatDate(new ilDateTime($last_sub, IL_CAL_DATETIME));
     } else {
         $last_sub = "---";
     }
     if (ilExAssignment::lookupUpdatedSubmission($this->ass_id, $member_id) == 1) {
         $last_sub = "<b>" . $last_sub . "</b>";
     }
     $this->tpl->setVariable("VAL_LAST_SUBMISSION", $last_sub);
     $this->tpl->setVariable("TXT_LAST_SUBMISSION", $lng->txt("exc_last_submission"));
     switch ($this->type) {
         case ilExAssignment::TYPE_UPLOAD_TEAM:
             // data is merged by team - see above
             // fallthrough
         // data is merged by team - see above
         // fallthrough
         case ilExAssignment::TYPE_UPLOAD:
             // nr of submitted files
             $this->tpl->setVariable("TXT_SUBMITTED_FILES", $lng->txt("exc_files_returned"));
             //$sub_cnt = count($this->exc->getDeliveredFiles($member_id, $this->ass_id));
             $sub_cnt = count(ilExAssignment::getDeliveredFiles($this->exc_id, $this->ass_id, $member_id));
             $new = ilExAssignment::lookupNewFiles($this->ass_id, $member_id);
             if (count($new) > 0) {
                 $sub_cnt .= " " . sprintf($lng->txt("cnt_new"), count($new));
             }
             $this->tpl->setVariable("VAL_SUBMITTED_FILES", $sub_cnt);
             // download command
             $ilCtrl->setParameter($this->parent_obj, "member_id", $member_id);
             if ($sub_cnt > 0) {
                 $this->tpl->setCurrentBlock("download_link");
                 $this->tpl->setVariable("LINK_DOWNLOAD", $ilCtrl->getLinkTarget($this->parent_obj, "downloadReturned"));
                 if (count($new) <= 0) {
                     $this->tpl->setVariable("TXT_DOWNLOAD", $lng->txt("exc_download_files"));
                 } else {
                     $this->tpl->setVariable("TXT_DOWNLOAD", $lng->txt("exc_download_all"));
                 }
                 $this->tpl->parseCurrentBlock();
                 // download new files only
                 if (count($new) > 0) {
                     $this->tpl->setCurrentBlock("download_link");
                     $this->tpl->setVariable("LINK_NEW_DOWNLOAD", $ilCtrl->getLinkTarget($this->parent_obj, "downloadNewReturned"));
                     $this->tpl->setVariable("TXT_NEW_DOWNLOAD", $lng->txt("exc_download_new"));
                     $this->tpl->parseCurrentBlock();
                 }
             }
             break;
         case ilExAssignment::TYPE_BLOG:
             $has_submitted = false;
             $this->tpl->setVariable("TXT_SUBMITTED_FILES", $lng->txt("exc_blog_returned"));
             $blogs = ilExAssignment::getDeliveredFiles($this->exc_id, $this->ass_id, $member_id);
             if ($blogs) {
                 $blogs = array_pop($blogs);
                 if ($blogs && substr($blogs["filename"], -1) != "/") {
                     $has_submitted = true;
                     $this->tpl->setVariable("VAL_SUBMITTED_FILES", 1);
                     $ilCtrl->setParameter($this->parent_obj, "member_id", $member_id);
                     $this->tpl->setCurrentBlock("download_link");
                     $this->tpl->setVariable("LINK_DOWNLOAD", $ilCtrl->getLinkTarget($this->parent_obj, "downloadReturned"));
                     $this->tpl->setVariable("TXT_DOWNLOAD", $lng->txt("exc_download_files"));
                     $this->tpl->parseCurrentBlock();
                 }
             }
             if (!$has_submitted) {
                 $this->tpl->setVariable("VAL_SUBMITTED_FILES", "---");
             }
             break;
         case ilExAssignment::TYPE_PORTFOLIO:
             $has_submitted = false;
             $this->tpl->setVariable("TXT_SUBMITTED_FILES", $lng->txt("exc_portfolio_returned"));
             $portfolios = ilExAssignment::getDeliveredFiles($this->exc_id, $this->ass_id, $member_id);
             if ($portfolios) {
                 $portfolios = array_pop($portfolios);
                 if ($portfolios && substr($portfolios["filename"], -1) != "/") {
                     $has_submitted = true;
                     $this->tpl->setVariable("VAL_SUBMITTED_FILES", 1);
                     $ilCtrl->setParameter($this->parent_obj, "member_id", $member_id);
                     $this->tpl->setCurrentBlock("download_link");
                     $this->tpl->setVariable("LINK_DOWNLOAD", $ilCtrl->getLinkTarget($this->parent_obj, "downloadReturned"));
                     $this->tpl->setVariable("TXT_DOWNLOAD", $lng->txt("exc_download_files"));
                     $this->tpl->parseCurrentBlock();
                 }
             }
             if (!$has_submitted) {
                 $this->tpl->setVariable("VAL_SUBMITTED_FILES", "---");
             }
             break;
     }
     // note
     $this->tpl->setVariable("TXT_NOTE", $lng->txt("note"));
     $this->tpl->setVariable("NAME_NOTE", "notice[{$member_id}]");
     $this->tpl->setVariable("VAL_NOTE", ilUtil::prepareFormOutput(ilExAssignment::lookupNoticeOfUser($this->ass_id, $member_id)));
     // comment for learner
     $this->tpl->setVariable("TXT_LCOMMENT", $lng->txt("exc_comment_for_learner"));
     $this->tpl->setVariable("NAME_LCOMMENT", "lcomment[{$member_id}]");
     $lpcomment = ilExAssignment::lookupCommentForUser($this->ass_id, $member_id);
     $this->tpl->setVariable("VAL_LCOMMENT", ilUtil::prepareFormOutput($lpcomment));
     // solved
     //$this->tpl->setVariable("CHKBOX_SOLVED",
     //	ilUtil::formCheckbox($this->exc->members_obj->getStatusByMember($member_id),"solved[$member_id]",1));
     $status = ilExAssignment::lookupStatusOfUser($this->ass_id, $member_id);
     $this->tpl->setVariable("SEL_" . strtoupper($status), ' selected="selected" ');
     $this->tpl->setVariable("TXT_NOTGRADED", $lng->txt("exc_notgraded"));
     $this->tpl->setVariable("TXT_PASSED", $lng->txt("exc_passed"));
     $this->tpl->setVariable("TXT_FAILED", $lng->txt("exc_failed"));
     if (($sd = ilExAssignment::lookupStatusTimeOfUser($this->ass_id, $member_id)) > 0) {
         $this->tpl->setCurrentBlock("status_date");
         $this->tpl->setVariable("TXT_LAST_CHANGE", $lng->txt("last_change"));
         $this->tpl->setVariable('VAL_STATUS_DATE', ilDatePresentation::formatDate(new ilDateTime($sd, IL_CAL_DATETIME)));
         $this->tpl->parseCurrentBlock();
     }
     switch ($status) {
         case "passed":
             $pic = "scorm/passed.png";
             break;
         case "failed":
             $pic = "scorm/failed.png";
             break;
         default:
             $pic = "scorm/not_attempted.png";
             break;
     }
     $this->tpl->setVariable("IMG_STATUS", ilUtil::getImagePath($pic));
     $this->tpl->setVariable("ALT_STATUS", $lng->txt("exc_" . $status));
     // mark
     $this->tpl->setVariable("TXT_MARK", $lng->txt("exc_mark"));
     $this->tpl->setVariable("NAME_MARK", "mark[{$member_id}]");
     $mark = ilExAssignment::lookupMarkOfUser($this->ass_id, $member_id);
     $this->tpl->setVariable("VAL_MARK", ilUtil::prepareFormOutput($mark));
     // feedback
     $ilCtrl->setParameter($this->parent_obj, "member_id", $member_id);
     if (($ft = ilExAssignment::lookupFeedbackTimeOfUser($this->ass_id, $member_id)) > 0) {
         $this->tpl->setCurrentBlock("feedback_date");
         $this->tpl->setVariable("TXT_FEEDBACK_MAIL_SENT", sprintf($lng->txt("exc_sent_at"), ilDatePresentation::formatDate(new ilDateTime($ft, IL_CAL_DATETIME))));
         $this->tpl->parseCurrentBlock();
     }
     // feedback mail
     $this->tpl->setVariable("LINK_FEEDBACK", $ilCtrl->getLinkTarget($this->parent_obj, "redirectFeedbackMail"));
     $this->tpl->setVariable("TXT_FEEDBACK", $lng->txt("exc_send_mail"));
     if ($this->type == ilExAssignment::TYPE_UPLOAD_TEAM) {
         $feedback_id = "t" . $member["team_id"];
     } else {
         $feedback_id = $member_id;
     }
     // file feedback
     $cnt_files = $this->storage->countFeedbackFiles($feedback_id);
     $ilCtrl->setParameter($this->parent_obj, "fsmode", "feedback");
     $this->tpl->setVariable("LINK_FILE_FEEDBACK", $ilCtrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"));
     if ($cnt_files == 0) {
         $this->tpl->setVariable("TXT_FILE_FEEDBACK", $lng->txt("exc_add_feedback_file"));
     } else {
         $this->tpl->setVariable("TXT_FILE_FEEDBACK", $lng->txt("exc_fb_files") . " (" . $cnt_files . ")");
     }
     $this->tpl->parseCurrentBlock();
 }
 /**
  * attach marking tag to member for given assignment
  *
  * @param int $user_id
  * @param int $assignment_id
  */
 private function attachMarking($user_id, $assignment_id)
 {
     $amark = ilExAssignment::lookupMarkOfUser($assignment_id, $user_id);
     $astatus = ilExAssignment::lookupStatusOfUser($assignment_id, $user_id);
     $acomment = ilExAssignment::lookupCommentForUser($assignment_id, $user_id);
     $anotice = ilExAssignment::lookupNoticeOfUser($assignment_id, $user_id);
     if ($astatus == "notgraded") {
         $status = ilExerciseXMLWriter::$STATUS_NOT_GRADED;
     } elseif ($astatus == "failed") {
         $status = ilExerciseXMLWriter::$STATUS_FAILED;
     } else {
         $status = ilExerciseXMLWriter::$STATUS_PASSED;
     }
     $this->xmlStartTag("Marking", array("status" => $status));
     $this->xmlElement("Mark", null, $amark);
     $this->xmlElement("Notice", null, $anotice);
     $this->xmlElement("Comment", null, $acomment);
     $this->xmlEndTag("Marking");
 }
 /**
  * Fill table row
  */
 protected function fillRow($d)
 {
     global $lng, $ilCtrl;
     $this->tpl->setVariable("TXT_ASS_TITLE", $d["title"]);
     if ($d["type"] == ilExAssignment::TYPE_UPLOAD_TEAM) {
         $members = ilExAssignment::getTeamMembersByAssignmentId($d["id"], $this->part_id);
         $this->tpl->setCurrentBlock("ass_members");
         foreach ($members as $member_id) {
             $this->tpl->setVariable("TXT_MEMBER_NAME", ilObjUser::_lookupFullname($member_id));
             $this->tpl->parseCurrentBlock();
         }
         $ilCtrl->setParameter($this->parent_obj, "lpart", $this->part_id);
         $this->tpl->setVariable("HREF_LOG", $ilCtrl->getLinkTarget($this->parent_obj, "showTeamLog"));
         $this->tpl->setVariable("TXT_LOG", $lng->txt("exc_team_log"));
         $ilCtrl->setParameter($this->parent_obj, "lpart", "");
     }
     $this->tpl->setVariable("VAL_CHKBOX", ilUtil::formCheckbox(0, "assid[" . $d["id"] . "]", 1));
     $this->tpl->setVariable("VAL_ID", $d["id"]);
     // submission:
     // see if files have been resubmmited after solved
     $last_sub = ilExAssignment::getLastSubmission($d["id"], $this->part_id);
     if ($last_sub) {
         $last_sub = ilDatePresentation::formatDate(new ilDateTime($last_sub, IL_CAL_DATETIME));
     } else {
         $last_sub = "---";
     }
     if (ilExAssignment::lookupUpdatedSubmission($d["id"], $this->part_id) == 1) {
         $last_sub = "<b>" . $last_sub . "</b>";
     }
     $this->tpl->setVariable("VAL_LAST_SUBMISSION", $last_sub);
     $this->tpl->setVariable("TXT_LAST_SUBMISSION", $lng->txt("exc_last_submission"));
     // nr of submitted files
     $this->tpl->setVariable("TXT_SUBMITTED_FILES", $lng->txt("exc_files_returned"));
     $sub_cnt = count(ilExAssignment::getDeliveredFiles($this->exc_id, $d["id"], $this->part_id));
     $new = ilExAssignment::lookupNewFiles($d["id"], $this->part_id);
     if (count($new) > 0) {
         $sub_cnt .= " " . sprintf($lng->txt("cnt_new"), count($new));
     }
     $this->tpl->setVariable("VAL_SUBMITTED_FILES", $sub_cnt);
     // download command
     $ilCtrl->setParameter($this->parent_obj, "ass_id", $d["id"]);
     $ilCtrl->setParameter($this->parent_obj, "member_id", $this->part_id);
     if ($sub_cnt > 0) {
         $this->tpl->setCurrentBlock("download_link");
         $this->tpl->setVariable("LINK_DOWNLOAD", $ilCtrl->getLinkTarget($this->parent_obj, "downloadReturned"));
         if (count($new) <= 0) {
             $this->tpl->setVariable("TXT_DOWNLOAD", $lng->txt("exc_download_files"));
         } else {
             $this->tpl->setVariable("TXT_DOWNLOAD", $lng->txt("exc_download_all"));
         }
         $this->tpl->parseCurrentBlock();
         // download new files only
         if (count($new) > 0) {
             $this->tpl->setCurrentBlock("download_link");
             $this->tpl->setVariable("LINK_NEW_DOWNLOAD", $ilCtrl->getLinkTarget($this->parent_obj, "downloadNewReturned"));
             $this->tpl->setVariable("TXT_NEW_DOWNLOAD", $lng->txt("exc_download_new"));
             $this->tpl->parseCurrentBlock();
         }
     }
     // note
     $this->tpl->setVariable("TXT_NOTE", $lng->txt("note"));
     $this->tpl->setVariable("NAME_NOTE", "notice[" . $d["id"] . "]");
     $this->tpl->setVariable("VAL_NOTE", ilUtil::prepareFormOutput(ilExAssignment::lookupNoticeOfUser($d["id"], $this->part_id)));
     // comment for learner
     $this->tpl->setVariable("TXT_LCOMMENT", $lng->txt("exc_comment_for_learner"));
     $this->tpl->setVariable("NAME_LCOMMENT", "lcomment[" . $d["id"] . "]");
     $lpcomment = ilExAssignment::lookupCommentForUser($d["id"], $this->part_id);
     $this->tpl->setVariable("VAL_LCOMMENT", ilUtil::prepareFormOutput($lpcomment));
     // solved
     //$this->tpl->setVariable("CHKBOX_SOLVED",
     //	ilUtil::formCheckbox($this->exc->members_obj->getStatusByMember($member_id),"solved[$member_id]",1));
     $status = ilExAssignment::lookupStatusOfUser($d["id"], $this->part_id);
     $this->tpl->setVariable("SEL_" . strtoupper($status), ' selected="selected" ');
     $this->tpl->setVariable("TXT_NOTGRADED", $lng->txt("exc_notgraded"));
     $this->tpl->setVariable("TXT_PASSED", $lng->txt("exc_passed"));
     $this->tpl->setVariable("TXT_FAILED", $lng->txt("exc_failed"));
     if (($sd = ilExAssignment::lookupStatusTimeOfUser($d["id"], $this->part_id)) > 0) {
         $this->tpl->setCurrentBlock("status_date");
         $this->tpl->setVariable("TXT_LAST_CHANGE", $lng->txt("last_change"));
         $this->tpl->setVariable('VAL_STATUS_DATE', ilDatePresentation::formatDate(new ilDateTime($sd, IL_CAL_DATETIME)));
         $this->tpl->parseCurrentBlock();
     }
     switch ($status) {
         case "passed":
             $pic = "scorm/passed.png";
             break;
         case "failed":
             $pic = "scorm/failed.png";
             break;
         default:
             $pic = "scorm/not_attempted.png";
             break;
     }
     $this->tpl->setVariable("IMG_STATUS", ilUtil::getImagePath($pic));
     $this->tpl->setVariable("ALT_STATUS", $lng->txt("exc_" . $status));
     // mark
     $this->tpl->setVariable("TXT_MARK", $lng->txt("exc_mark"));
     $this->tpl->setVariable("NAME_MARK", "mark[" . $d["id"] . "]");
     $mark = ilExAssignment::lookupMarkOfUser($d["id"], $this->part_id);
     $this->tpl->setVariable("VAL_MARK", ilUtil::prepareFormOutput($mark));
     // feedback
     $ilCtrl->setParameter($this->parent_obj, "member_id", $this->part_id);
     if (($ft = ilExAssignment::lookupFeedbackTimeOfUser($d["id"], $this->part_id)) > 0) {
         $this->tpl->setCurrentBlock("feedback_date");
         $this->tpl->setVariable("TXT_FEEDBACK_MAIL_SENT", sprintf($lng->txt("exc_sent_at"), ilDatePresentation::formatDate(new ilDateTime($ft, IL_CAL_DATETIME))));
         $this->tpl->parseCurrentBlock();
     }
     $ilCtrl->setParameter($this, "rcp_to", $this->user->getLogin());
     $this->tpl->setVariable("LINK_FEEDBACK", $ilCtrl->getLinkTarget($this->parent_obj, "redirectFeedbackMail"));
     //"ilias.php?baseClass=ilMailGUI&type=new&rcp_to=".$mem_obj->getLogin());
     $this->tpl->setVariable("TXT_FEEDBACK", $lng->txt("exc_send_mail"));
     $ilCtrl->setParameter($this->parent_obj, "rcp_to", "");
     if ($d["type"] == ilExAssignment::TYPE_UPLOAD_TEAM) {
         $feedback_id = "t" . ilExAssignment::getTeamIdByAssignment($d["id"], $this->part_id);
     } else {
         $feedback_id = $this->part_id;
     }
     $storage = new ilFSStorageExercise($this->exc_id, $d["id"]);
     $cnt_files = $storage->countFeedbackFiles($feedback_id);
     $ilCtrl->setParameter($this->parent_obj, "fsmode", "feedbackpart");
     $this->tpl->setVariable("LINK_FILE_FEEDBACK", $ilCtrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"));
     if ($cnt_files == 0) {
         $this->tpl->setVariable("TXT_FILE_FEEDBACK", $lng->txt("exc_add_feedback_file"));
     } else {
         $this->tpl->setVariable("TXT_FILE_FEEDBACK", $lng->txt("exc_fb_files") . " (" . $cnt_files . ")");
     }
     $ilCtrl->setParameter($this->parent_obj, "ass_id", $_GET["ass_id"]);
 }
 /**
  * Fill table row
  */
 protected function fillRow($d)
 {
     global $lng, $ilCtrl;
     $this->tpl->setVariable("TXT_ASS_TITLE", $d["title"]);
     $file_info = ilExAssignment::getDownloadedFilesInfoForTableGUIS($this->parent_obj, $this->exc_id, $d["type"], $d["id"], $this->part_id, $this->parent_cmd);
     $has_no_team_yet = false;
     if ($d["type"] == ilExAssignment::TYPE_UPLOAD_TEAM) {
         $members = ilExAssignment::getTeamMembersByAssignmentId($d["id"], $this->part_id);
         // #11957
         if (sizeof($members)) {
             $this->tpl->setCurrentBlock("ass_members");
             foreach ($members as $member_id) {
                 $this->tpl->setVariable("TXT_MEMBER_NAME", ilObjUser::_lookupFullname($member_id));
                 $this->tpl->parseCurrentBlock();
             }
             $ilCtrl->setParameter($this->parent_obj, "lpart", $this->part_id);
             $this->tpl->setVariable("HREF_LOG", $ilCtrl->getLinkTarget($this->parent_obj, "showTeamLog"));
             $this->tpl->setVariable("TXT_LOG", $lng->txt("exc_team_log"));
             $ilCtrl->setParameter($this->parent_obj, "lpart", "");
         } else {
             // #11957
             $has_no_team_yet = true;
             $this->tpl->setCurrentBlock("team_info");
             $this->tpl->setVariable("TXT_TEAM_INFO", $lng->txt("exc_no_team_yet"));
             $this->tpl->setVariable("TXT_CREATE_TEAM", $lng->txt("exc_create_team"));
             $ilCtrl->setParameter($this->parent_obj, "ass_id", $d["id"]);
             $ilCtrl->setParameter($this->parent_obj, "lpart", $this->part_id);
             $this->tpl->setVariable("URL_CREATE_TEAM", $ilCtrl->getLinkTarget($this->getParentObject(), "createSingleMemberTeam"));
             $ilCtrl->setParameter($this->parent_obj, "lpart", "");
             $ilCtrl->setParameter($this->parent_obj, "ass_id", "");
             if ($file_info["files"]["count"]) {
                 $this->tpl->setVariable("TEAM_FILES_INFO", "<br />" . $file_info["files"]["txt"] . ": " . $file_info["files"]["count"]);
             }
             $this->tpl->parseCurrentBlock();
         }
     }
     if (!$has_no_team_yet) {
         $this->tpl->setVariable("VAL_CHKBOX", ilUtil::formCheckbox(0, "assid[" . $d["id"] . "]", 1));
         $this->tpl->setVariable("VAL_ID", $d["id"]);
         $this->tpl->setVariable("VAL_LAST_SUBMISSION", $file_info["last_submission"]["value"]);
         $this->tpl->setVariable("TXT_LAST_SUBMISSION", $file_info["last_submission"]["txt"]);
         $this->tpl->setVariable("TXT_SUBMITTED_FILES", $file_info["files"]["txt"]);
         $this->tpl->setVariable("VAL_SUBMITTED_FILES", $file_info["files"]["count"]);
         if ($file_info["files"]["download_url"]) {
             $this->tpl->setCurrentBlock("download_link");
             $this->tpl->setVariable("LINK_DOWNLOAD", $file_info["files"]["download_url"]);
             $this->tpl->setVariable("TXT_DOWNLOAD", $file_info["files"]["download_txt"]);
             $this->tpl->parseCurrentBlock();
         }
         if ($file_info["files"]["download_new_url"]) {
             $this->tpl->setCurrentBlock("download_link");
             $this->tpl->setVariable("LINK_NEW_DOWNLOAD", $file_info["files"]["download_new_url"]);
             $this->tpl->setVariable("TXT_NEW_DOWNLOAD", $file_info["files"]["download_new_txt"]);
             $this->tpl->parseCurrentBlock();
         }
         // note
         $this->tpl->setVariable("TXT_NOTE", $lng->txt("exc_note_for_tutor"));
         $this->tpl->setVariable("NAME_NOTE", "notice[" . $d["id"] . "]");
         $this->tpl->setVariable("VAL_NOTE", ilUtil::prepareFormOutput(ilExAssignment::lookupNoticeOfUser($d["id"], $this->part_id)));
         // comment for learner
         $lcomment_value = ilExAssignment::lookupCommentForUser($d["id"], $this->part_id);
         $overlay_id = "excasscomm_" . $d["id"] . "_" . $this->part_id;
         $overlay_trigger_id = $overlay_id . "_tr";
         $overlay = new ilOverlayGUI($overlay_id);
         $overlay->setAnchor($overlay_trigger_id);
         $overlay->setTrigger($overlay_trigger_id, "click", $overlay_trigger_id);
         $overlay->add();
         $this->tpl->setVariable("LCOMMENT_ID", $overlay_id . "_snip");
         $this->tpl->setVariable("LCOMMENT_SNIPPET", ilUtil::shortenText($lcomment_value, 25, true));
         $this->tpl->setVariable("COMMENT_OVERLAY_TRIGGER_ID", $overlay_trigger_id);
         $this->tpl->setVariable("COMMENT_OVERLAY_TRIGGER_TEXT", $lng->txt("exc_comment_for_learner_edit"));
         $lcomment_form = new ilPropertyFormGUI();
         $lcomment_form->setId($overlay_id);
         $lcomment_form->setPreventDoubleSubmission(false);
         $lcomment = new ilTextAreaInputGUI($lng->txt("exc_comment_for_learner"), "lcomment_" . $d["id"] . "_" . $this->part_id);
         $lcomment->setInfo($lng->txt("exc_comment_for_learner_info"));
         $lcomment->setValue($lcomment_value);
         $lcomment->setCols(45);
         $lcomment->setRows(5);
         $lcomment_form->addItem($lcomment);
         //$lcomment_form->addCommandButton("save", $lng->txt("save"));
         // $lcomment_form->addCommandButton("cancel", $lng->txt("cancel"));
         $this->overlay_tpl->setCurrentBlock("overlay_bl");
         $this->overlay_tpl->setVariable("COMMENT_OVERLAY_ID", $overlay_id);
         $this->overlay_tpl->setVariable("COMMENT_OVERLAY_FORM", $lcomment_form->getHTML());
         $this->overlay_tpl->parseCurrentBlock();
         /*			
         $this->tpl->setVariable("TXT_LCOMMENT", $lng->txt("exc_comment_for_learner"));
         $this->tpl->setVariable("NAME_LCOMMENT",
         	"lcomment[".$d["id"]."]");
         $lpcomment = ilExAssignment::lookupCommentForUser($d["id"], $this->part_id);
         $this->tpl->setVariable("VAL_LCOMMENT",
         	ilUtil::prepareFormOutput($lpcomment));
         */
         // solved
         //$this->tpl->setVariable("CHKBOX_SOLVED",
         //	ilUtil::formCheckbox($this->exc->members_obj->getStatusByMember($member_id),"solved[$member_id]",1));
         $status = ilExAssignment::lookupStatusOfUser($d["id"], $this->part_id);
         $this->tpl->setVariable("SEL_" . strtoupper($status), ' selected="selected" ');
         $this->tpl->setVariable("TXT_NOTGRADED", $lng->txt("exc_notgraded"));
         $this->tpl->setVariable("TXT_PASSED", $lng->txt("exc_passed"));
         $this->tpl->setVariable("TXT_FAILED", $lng->txt("exc_failed"));
         if (($sd = ilExAssignment::lookupStatusTimeOfUser($d["id"], $this->part_id)) > 0) {
             $this->tpl->setCurrentBlock("status_date");
             $this->tpl->setVariable("TXT_LAST_CHANGE", $lng->txt("last_change"));
             $this->tpl->setVariable('VAL_STATUS_DATE', ilDatePresentation::formatDate(new ilDateTime($sd, IL_CAL_DATETIME)));
             $this->tpl->parseCurrentBlock();
         }
         switch ($status) {
             case "passed":
                 $pic = "scorm/passed.svg";
                 break;
             case "failed":
                 $pic = "scorm/failed.svg";
                 break;
             default:
                 $pic = "scorm/not_attempted.svg";
                 break;
         }
         $this->tpl->setVariable("IMG_STATUS", ilUtil::getImagePath($pic));
         $this->tpl->setVariable("ALT_STATUS", $lng->txt("exc_" . $status));
         // mark
         $this->tpl->setVariable("TXT_MARK", $lng->txt("exc_mark"));
         $this->tpl->setVariable("NAME_MARK", "mark[" . $d["id"] . "]");
         $mark = ilExAssignment::lookupMarkOfUser($d["id"], $this->part_id);
         $this->tpl->setVariable("VAL_MARK", ilUtil::prepareFormOutput($mark));
         // feedback
         $ilCtrl->setParameter($this->parent_obj, "member_id", $this->part_id);
         if (($ft = ilExAssignment::lookupFeedbackTimeOfUser($d["id"], $this->part_id)) > 0) {
             $this->tpl->setCurrentBlock("feedback_date");
             $this->tpl->setVariable("TXT_FEEDBACK_MAIL_SENT", sprintf($lng->txt("exc_sent_at"), ilDatePresentation::formatDate(new ilDateTime($ft, IL_CAL_DATETIME))));
             $this->tpl->parseCurrentBlock();
         }
         $ilCtrl->setParameter($this, "rcp_to", $this->user->getLogin());
         $this->tpl->setVariable("LINK_FEEDBACK", $ilCtrl->getLinkTarget($this->parent_obj, "redirectFeedbackMail"));
         //"ilias.php?baseClass=ilMailGUI&type=new&rcp_to=".$mem_obj->getLogin());
         $this->tpl->setVariable("TXT_FEEDBACK", $lng->txt("exc_send_mail"));
         $ilCtrl->setParameter($this->parent_obj, "rcp_to", "");
         if ($d["type"] == ilExAssignment::TYPE_UPLOAD_TEAM) {
             $feedback_id = "t" . ilExAssignment::getTeamIdByAssignment($d["id"], $this->part_id);
         } else {
             $feedback_id = $this->part_id;
         }
         $storage = new ilFSStorageExercise($this->exc_id, $d["id"]);
         $cnt_files = $storage->countFeedbackFiles($feedback_id);
         $ilCtrl->setParameter($this->parent_obj, "fsmode", "feedbackpart");
         $this->tpl->setVariable("LINK_FILE_FEEDBACK", $ilCtrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"));
         if ($cnt_files == 0) {
             $this->tpl->setVariable("TXT_FILE_FEEDBACK", $lng->txt("exc_add_feedback_file"));
         } else {
             $this->tpl->setVariable("TXT_FILE_FEEDBACK", $lng->txt("exc_fb_files") . " (" . $cnt_files . ")");
         }
         // peer review / rating
         if ($d["type"] != ilExAssignment::TYPE_UPLOAD_TEAM && $d["peer"]) {
             $this->tpl->setCurrentBlock("peer_review_bl");
             $this->tpl->setVariable("TXT_PEER_REVIEW", $lng->txt("exc_peer_review_show"));
             $ilCtrl->setParameter($this->parent_obj, "grd", 2);
             $this->tpl->setVariable("LINK_PEER_REVIEW", $ilCtrl->getLinkTarget($this->parent_obj, "showPersonalPeerReview"));
             $ilCtrl->setParameter($this->parent_obj, "grd", "");
             $rating = new ilRatingGUI();
             $rating->setObject($d["id"], "ass", $this->part_id, "peer");
             $rating->setUserId(0);
             $this->tpl->setVariable("VAL_RATING", $rating->getHTML(true, false));
             $this->tpl->parseCurrentBlock();
         }
         $ilCtrl->setParameter($this->parent_obj, "ass_id", $_GET["ass_id"]);
     } else {
         $this->tpl->touchBlock("member_has_no_team_bl");
     }
 }
 /**
  * Fill table row
  */
 protected function fillRow($member)
 {
     global $lng, $ilCtrl;
     include_once "./Services/Object/classes/class.ilObjectFactory.php";
     $member_id = $member["usr_id"];
     if (!($mem_obj = ilObjectFactory::getInstanceByObjId($member_id, false))) {
         return;
     }
     $has_no_team_yet = substr($member["team_id"], 0, 3) == "nty";
     if (!$has_no_team_yet) {
         // mail sent
         if ($this->sent_col) {
             if (ilExAssignment::lookupStatusSentOfUser($this->ass_id, $member_id)) {
                 $this->tpl->setCurrentBlock("mail_sent");
                 if (($st = ilExAssignment::lookupSentTimeOfUser($this->ass_id, $member_id)) > 0) {
                     $this->tpl->setVariable("TXT_MAIL_SENT", sprintf($lng->txt("exc_sent_at"), ilDatePresentation::formatDate(new ilDateTime($st, IL_CAL_DATETIME))));
                 } else {
                     $this->tpl->setVariable("TXT_MAIL_SENT", $lng->txt("sent"));
                 }
                 $this->tpl->parseCurrentBlock();
             } else {
                 $this->tpl->setCurrentBlock("mail_sent");
                 $this->tpl->setVariable("TXT_MAIL_SENT", "&nbsp;");
                 $this->tpl->parseCurrentBlock();
             }
         }
         // checkbox
         $this->tpl->setVariable("VAL_CHKBOX", ilUtil::formCheckbox(0, "member[{$member_id}]", 1));
         $this->tpl->setVariable("VAL_ID", $member_id);
     }
     $file_info = ilExAssignment::getDownloadedFilesInfoForTableGUIS($this->parent_obj, $this->exc_id, $this->type, $this->ass_id, $member_id, $this->parent_cmd);
     // name and login
     if (!isset($member["team"])) {
         $this->tpl->setVariable("TXT_NAME", $member["name"]);
         if (in_array("login", $this->selected)) {
             $this->tpl->setVariable("TXT_LOGIN", "[" . $member["login"] . "]");
         }
         if (in_array("image", $this->selected)) {
             // image
             $this->tpl->setVariable("USR_IMAGE", $mem_obj->getPersonalPicturePath("xxsmall"));
             $this->tpl->setVariable("USR_ALT", $lng->txt("personal_picture"));
         }
     } else {
         $this->tpl->setCurrentBlock("team_member");
         asort($member["team"]);
         foreach ($member["team"] as $member_name) {
             $this->tpl->setVariable("TXT_MEMBER_NAME", $member_name);
             $this->tpl->parseCurrentBlock();
         }
         if (!$has_no_team_yet) {
             $this->tpl->setCurrentBlock("team_log");
             $ilCtrl->setParameter($this->parent_obj, "lmem", $member_id);
             $this->tpl->setVariable("HREF_LOG", $ilCtrl->getLinkTarget($this->parent_obj, "showTeamLog"));
             $this->tpl->setVariable("TXT_LOG", $lng->txt("exc_team_log"));
             $ilCtrl->setParameter($this->parent_obj, "lmem", "");
             $this->tpl->parseCurrentBlock();
         } else {
             // #11957
             $this->tpl->setCurrentBlock("team_info");
             $this->tpl->setVariable("TXT_TEAM_INFO", $lng->txt("exc_no_team_yet"));
             $this->tpl->setVariable("TXT_CREATE_TEAM", $lng->txt("exc_create_team"));
             $ilCtrl->setParameter($this->parent_obj, "lmem", $member_id);
             $this->tpl->setVariable("URL_CREATE_TEAM", $ilCtrl->getLinkTarget($this->getParentObject(), "createSingleMemberTeam"));
             $ilCtrl->setParameter($this->parent_obj, "lmem", "");
             if ($file_info["files"]["count"]) {
                 $this->tpl->setVariable("TEAM_FILES_INFO", "<br />" . $file_info["files"]["txt"] . ": " . $file_info["files"]["count"]);
             }
             $this->tpl->parseCurrentBlock();
         }
     }
     if (!$has_no_team_yet) {
         $this->tpl->setVariable("VAL_LAST_SUBMISSION", $file_info["last_submission"]["value"]);
         $this->tpl->setVariable("TXT_LAST_SUBMISSION", $file_info["last_submission"]["txt"]);
         $this->tpl->setVariable("TXT_SUBMITTED_FILES", $file_info["files"]["txt"]);
         $this->tpl->setVariable("VAL_SUBMITTED_FILES", $file_info["files"]["count"]);
         if ($file_info["files"]["download_url"]) {
             $this->tpl->setCurrentBlock("download_link");
             $this->tpl->setVariable("LINK_DOWNLOAD", $file_info["files"]["download_url"]);
             $this->tpl->setVariable("TXT_DOWNLOAD", $file_info["files"]["download_txt"]);
             $this->tpl->parseCurrentBlock();
         }
         if ($file_info["files"]["download_new_url"]) {
             $this->tpl->setCurrentBlock("download_link");
             $this->tpl->setVariable("LINK_NEW_DOWNLOAD", $file_info["files"]["download_new_url"]);
             $this->tpl->setVariable("TXT_NEW_DOWNLOAD", $file_info["files"]["download_new_txt"]);
             $this->tpl->parseCurrentBlock();
         }
         // note
         $this->tpl->setVariable("TXT_NOTE", $lng->txt("exc_note_for_tutor"));
         $this->tpl->setVariable("NAME_NOTE", "notice[{$member_id}]");
         $this->tpl->setVariable("VAL_NOTE", ilUtil::prepareFormOutput(ilExAssignment::lookupNoticeOfUser($this->ass_id, $member_id)));
         // comment for learner
         $lcomment_value = ilExAssignment::lookupCommentForUser($this->ass_id, $member_id);
         $overlay_id = "excasscomm_" . $this->ass_id . "_" . $member_id;
         $overlay_trigger_id = $overlay_id . "_tr";
         $overlay = new ilOverlayGUI($overlay_id);
         $overlay->setAnchor($overlay_trigger_id);
         $overlay->setTrigger($overlay_trigger_id, "click", $overlay_trigger_id);
         $overlay->add();
         $this->tpl->setVariable("LCOMMENT_ID", $overlay_id . "_snip");
         $this->tpl->setVariable("LCOMMENT_SNIPPET", ilUtil::shortenText($lcomment_value, 25, true));
         $this->tpl->setVariable("COMMENT_OVERLAY_TRIGGER_ID", $overlay_trigger_id);
         $this->tpl->setVariable("COMMENT_OVERLAY_TRIGGER_TEXT", $lng->txt("exc_comment_for_learner_edit"));
         $lcomment_form = new ilPropertyFormGUI();
         $lcomment_form->setId($overlay_id);
         $lcomment_form->setPreventDoubleSubmission(false);
         $lcomment = new ilTextAreaInputGUI($lng->txt("exc_comment_for_learner"), "lcomment_" . $this->ass_id . "_" . $member_id);
         $lcomment->setInfo($lng->txt("exc_comment_for_learner_info"));
         $lcomment->setValue($lcomment_value);
         $lcomment->setCols(45);
         $lcomment->setRows(10);
         $lcomment_form->addItem($lcomment);
         $lcomment_form->addCommandButton("save", $lng->txt("save"));
         // $lcomment_form->addCommandButton("cancel", $lng->txt("cancel"));
         $this->overlay_tpl->setCurrentBlock("overlay_bl");
         $this->overlay_tpl->setVariable("COMMENT_OVERLAY_ID", $overlay_id);
         $this->overlay_tpl->setVariable("COMMENT_OVERLAY_FORM", $lcomment_form->getHTML());
         $this->overlay_tpl->parseCurrentBlock();
         // solved
         //$this->tpl->setVariable("CHKBOX_SOLVED",
         //	ilUtil::formCheckbox($this->exc->members_obj->getStatusByMember($member_id),"solved[$member_id]",1));
         $status = ilExAssignment::lookupStatusOfUser($this->ass_id, $member_id);
         $this->tpl->setVariable("SEL_" . strtoupper($status), ' selected="selected" ');
         $this->tpl->setVariable("TXT_NOTGRADED", $lng->txt("exc_notgraded"));
         $this->tpl->setVariable("TXT_PASSED", $lng->txt("exc_passed"));
         $this->tpl->setVariable("TXT_FAILED", $lng->txt("exc_failed"));
         if (($sd = ilExAssignment::lookupStatusTimeOfUser($this->ass_id, $member_id)) > 0) {
             $this->tpl->setCurrentBlock("status_date");
             $this->tpl->setVariable("TXT_LAST_CHANGE", $lng->txt("last_change"));
             $this->tpl->setVariable('VAL_STATUS_DATE', ilDatePresentation::formatDate(new ilDateTime($sd, IL_CAL_DATETIME)));
             $this->tpl->parseCurrentBlock();
         }
         switch ($status) {
             case "passed":
                 $pic = "scorm/passed.svg";
                 break;
             case "failed":
                 $pic = "scorm/failed.svg";
                 break;
             default:
                 $pic = "scorm/not_attempted.svg";
                 break;
         }
         $this->tpl->setVariable("IMG_STATUS", ilUtil::getImagePath($pic));
         $this->tpl->setVariable("ALT_STATUS", $lng->txt("exc_" . $status));
         // mark
         $this->tpl->setVariable("TXT_MARK", $lng->txt("exc_mark"));
         $this->tpl->setVariable("NAME_MARK", "mark[{$member_id}]");
         $mark = ilExAssignment::lookupMarkOfUser($this->ass_id, $member_id);
         $this->tpl->setVariable("VAL_MARK", ilUtil::prepareFormOutput($mark));
         // feedback
         $ilCtrl->setParameter($this->parent_obj, "member_id", $member_id);
         if (($ft = ilExAssignment::lookupFeedbackTimeOfUser($this->ass_id, $member_id)) > 0) {
             $this->tpl->setCurrentBlock("feedback_date");
             $this->tpl->setVariable("TXT_FEEDBACK_MAIL_SENT", sprintf($lng->txt("exc_sent_at"), ilDatePresentation::formatDate(new ilDateTime($ft, IL_CAL_DATETIME))));
             $this->tpl->parseCurrentBlock();
         }
         // feedback mail
         $this->tpl->setVariable("LINK_FEEDBACK", $ilCtrl->getLinkTarget($this->parent_obj, "redirectFeedbackMail"));
         $this->tpl->setVariable("TXT_FEEDBACK", $lng->txt("exc_send_mail"));
         if ($this->type == ilExAssignment::TYPE_UPLOAD_TEAM) {
             $feedback_id = "t" . $member["team_id"];
         } else {
             $feedback_id = $member_id;
         }
         // file feedback
         $cnt_files = $this->storage->countFeedbackFiles($feedback_id);
         $ilCtrl->setParameter($this->parent_obj, "fsmode", "feedback");
         $this->tpl->setVariable("LINK_FILE_FEEDBACK", $ilCtrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"));
         if ($cnt_files == 0) {
             $this->tpl->setVariable("TXT_FILE_FEEDBACK", $lng->txt("exc_add_feedback_file"));
         } else {
             $this->tpl->setVariable("TXT_FILE_FEEDBACK", $lng->txt("exc_fb_files") . " (" . $cnt_files . ")");
         }
         // peer review / rating
         if (!isset($member["team"]) && $this->peer_review) {
             $this->tpl->setCurrentBlock("peer_review_bl");
             $this->tpl->setVariable("TXT_PEER_REVIEW", $lng->txt("exc_peer_review_show"));
             $ilCtrl->setParameter($this->parent_obj, "grd", 1);
             $this->tpl->setVariable("LINK_PEER_REVIEW", $ilCtrl->getLinkTarget($this->parent_obj, "showPersonalPeerReview"));
             $ilCtrl->setParameter($this->parent_obj, "grd", "");
             $rating = new ilRatingGUI();
             $rating->setObject($this->ass_id, "ass", $member_id, "peer");
             $rating->setUserId(0);
             $this->tpl->setVariable("VAL_RATING", $rating->getHTML(true, false));
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->parseCurrentBlock();
     } else {
         $this->tpl->touchBlock("member_has_no_team_bl");
     }
 }