4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
 
    5 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
 
    6 include_once(
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
 
   22         function __construct($a_parent_obj, $a_parent_cmd, $a_exc, $a_part_id)
 
   27                 $this->exc_id = $this->exc->getId();
 
   29                 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
 
   31                 $this->part_id = $a_part_id;
 
   33                 $this->
setId(
"exc_part_".$this->exc_id.
"_".$this->part_id);
 
   35                 include_once(
"./Services/User/classes/class.ilObjUser.php");
 
   37                 if ($this->part_id > 0)
 
   40                         $this->user = 
new ilObjUser($this->part_id);
 
   51                 if ($this->part_id > 0)
 
   53                         $this->
setTitle($lng->txt(
"exc_participant").
": ".
 
   54                                 $name[
"lastname"].
", ".$name[
"firstname"].
" [".$name[
"login"].
"]");
 
   58                         $this->
setTitle($lng->txt(
"exc_participant"));
 
   65                 $this->
addColumn($this->lng->txt(
"exc_assignment"), 
"order_val");
 
   66                 $this->
addColumn($this->lng->txt(
"exc_submission"), 
"submission");
 
   67                 $this->
addColumn($this->lng->txt(
"exc_grading"), 
"solved_time");
 
   69                 $this->
addColumn($this->lng->txt(
"feedback"), 
"feedback_time");
 
   76                 $this->
setRowTemplate(
"tpl.exc_participant_row.html", 
"Modules/Exercise");
 
   81                 if ($this->part_id > 0)
 
   83                         $this->
addCommandButton(
"saveStatusParticipant", $lng->txt(
"exc_save_changes"));
 
   92                 if (in_array($a_f, array(
"order_val")))
 
  107                 $this->tpl->setVariable(
"TXT_ASS_TITLE", 
$d[
"title"]);
 
  109                 $has_no_team_yet = 
false;
 
  117                                 $this->tpl->setCurrentBlock(
"ass_members");
 
  118                                 foreach($members as $member_id)
 
  120                                         $this->tpl->setVariable(
"TXT_MEMBER_NAME", 
 
  122                                         $this->tpl->parseCurrentBlock();                                        
 
  125                                 $ilCtrl->setParameter($this->parent_obj, 
"lpart", $this->part_id);
 
  126                                 $this->tpl->setVariable(
"HREF_LOG", 
 
  127                                         $ilCtrl->getLinkTarget($this->parent_obj, 
"showTeamLog"));
 
  128                                 $this->tpl->setVariable(
"TXT_LOG", $lng->txt(
"exc_team_log"));
 
  129                                 $ilCtrl->setParameter($this->parent_obj, 
"lpart", 
"");
 
  134                                 $has_no_team_yet = 
true;
 
  135                                 $this->tpl->setCurrentBlock(
"team_info");
 
  136                                 $this->tpl->setVariable(
"TXT_TEAM_INFO", $lng->txt(
"exc_no_team_yet"));
 
  137                                 $this->tpl->setVariable(
"TXT_CREATE_TEAM", $lng->txt(
"exc_create_team"));
 
  139                                 $ilCtrl->setParameter($this->parent_obj, 
"ass_id", 
$d[
"id"]);
 
  140                                 $ilCtrl->setParameter($this->parent_obj, 
"lpart", $this->part_id);
 
  141                                 $this->tpl->setVariable(
"URL_CREATE_TEAM",                                              
 
  142                                         $ilCtrl->getLinkTarget($this->getParentObject(), 
"createSingleMemberTeam"));
 
  143                                 $ilCtrl->setParameter($this->parent_obj, 
"lpart", 
"");
 
  144                                 $ilCtrl->setParameter($this->parent_obj, 
"ass_id", 
"");
 
  149                                         $this->tpl->setVariable(
"TEAM_FILES_INFO", 
"<br />".
 
  150                                                 $lng->txt(
"exc_files_returned").
": ".$cnt);
 
  152                                 $this->tpl->parseCurrentBlock();
 
  156                 if(!$has_no_team_yet)
 
  158                         $this->tpl->setVariable(
"VAL_CHKBOX",
 
  160                         $this->tpl->setVariable(
"VAL_ID",
 
  177                                 $last_sub = 
"<b>".$last_sub.
"</b>";
 
  179                         $this->tpl->setVariable(
"VAL_LAST_SUBMISSION", $last_sub);
 
  180                         $this->tpl->setVariable(
"TXT_LAST_SUBMISSION",
 
  181                                 $lng->txt(
"exc_last_submission"));
 
  184                         $this->tpl->setVariable(
"TXT_SUBMITTED_FILES",
 
  185                                 $lng->txt(
"exc_files_returned"));
 
  190                                 $sub_cnt.= 
" ".sprintf($lng->txt(
"cnt_new"),count($new));
 
  192                         $this->tpl->setVariable(
"VAL_SUBMITTED_FILES",
 
  196                         $ilCtrl->setParameter($this->parent_obj, 
"ass_id", 
$d[
"id"]);
 
  197                         $ilCtrl->setParameter($this->parent_obj, 
"member_id", $this->part_id);
 
  200                                 $this->tpl->setCurrentBlock(
"download_link");
 
  201                                 $this->tpl->setVariable(
"LINK_DOWNLOAD",
 
  202                                         $ilCtrl->getLinkTarget($this->parent_obj, 
"downloadReturned"));
 
  203                                 if (count($new) <= 0)
 
  205                                         $this->tpl->setVariable(
"TXT_DOWNLOAD",
 
  206                                                 $lng->txt(
"exc_download_files"));
 
  210                                         $this->tpl->setVariable(
"TXT_DOWNLOAD",
 
  211                                                 $lng->txt(
"exc_download_all"));
 
  213                                 $this->tpl->parseCurrentBlock();
 
  218                                         $this->tpl->setCurrentBlock(
"download_link");
 
  219                                         $this->tpl->setVariable(
"LINK_NEW_DOWNLOAD",
 
  220                                                 $ilCtrl->getLinkTarget($this->parent_obj, 
"downloadNewReturned"));
 
  221                                         $this->tpl->setVariable(
"TXT_NEW_DOWNLOAD",
 
  222                                                 $lng->txt(
"exc_download_new"));
 
  223                                         $this->tpl->parseCurrentBlock();
 
  228                         $this->tpl->setVariable(
"TXT_NOTE", $lng->txt(
"note"));
 
  229                         $this->tpl->setVariable(
"NAME_NOTE",
 
  230                                 "notice[".
$d[
"id"].
"]");
 
  231                         $this->tpl->setVariable(
"VAL_NOTE",
 
  235                         $this->tpl->setVariable(
"TXT_LCOMMENT", $lng->txt(
"exc_comment_for_learner"));
 
  236                         $this->tpl->setVariable(
"NAME_LCOMMENT",
 
  237                                 "lcomment[".
$d[
"id"].
"]");
 
  239                         $this->tpl->setVariable(
"VAL_LCOMMENT",
 
  246                         $this->tpl->setVariable(
"SEL_".strtoupper($status), 
' selected="selected" ');
 
  247                         $this->tpl->setVariable(
"TXT_NOTGRADED", $lng->txt(
"exc_notgraded"));
 
  248                         $this->tpl->setVariable(
"TXT_PASSED", $lng->txt(
"exc_passed"));
 
  249                         $this->tpl->setVariable(
"TXT_FAILED", $lng->txt(
"exc_failed"));
 
  252                                 $this->tpl->setCurrentBlock(
"status_date");
 
  253                                 $this->tpl->setVariable(
"TXT_LAST_CHANGE", $lng->txt(
"last_change"));
 
  254                                 $this->tpl->setVariable(
'VAL_STATUS_DATE',
 
  256                                 $this->tpl->parseCurrentBlock();
 
  260                                 case "passed":  $pic = 
"scorm/passed.png"; 
break;
 
  261                                 case "failed":  $pic = 
"scorm/failed.png"; 
break;
 
  262                                 default:                $pic = 
"scorm/not_attempted.png"; 
break;
 
  265                         $this->tpl->setVariable(
"ALT_STATUS", $lng->txt(
"exc_".$status));
 
  268                         $this->tpl->setVariable(
"TXT_MARK", $lng->txt(
"exc_mark"));
 
  269                         $this->tpl->setVariable(
"NAME_MARK",
 
  270                                 "mark[".
$d[
"id"].
"]");
 
  272                         $this->tpl->setVariable(
"VAL_MARK",
 
  276                         $ilCtrl->setParameter($this->parent_obj, 
"member_id", $this->part_id);
 
  279                                 $this->tpl->setCurrentBlock(
"feedback_date");
 
  280                                 $this->tpl->setVariable(
"TXT_FEEDBACK_MAIL_SENT",
 
  281                                         sprintf($lng->txt(
"exc_sent_at"),
 
  283                                 $this->tpl->parseCurrentBlock();
 
  285                         $ilCtrl->setParameter($this, 
"rcp_to", $this->user->getLogin());
 
  286                         $this->tpl->setVariable(
"LINK_FEEDBACK",
 
  287                                 $ilCtrl->getLinkTarget($this->parent_obj, 
"redirectFeedbackMail"));
 
  289                         $this->tpl->setVariable(
"TXT_FEEDBACK",
 
  290                                 $lng->txt(
"exc_send_mail"));
 
  291                         $ilCtrl->setParameter($this->parent_obj, 
"rcp_to", 
"");
 
  295                                 $feedback_id = 
"t".ilExAssignment::getTeamIdByAssignment(
$d[
"id"], $this->part_id);
 
  299                                 $feedback_id = $this->part_id;
 
  303                         $cnt_files = $storage->countFeedbackFiles($feedback_id);
 
  304                         $ilCtrl->setParameter($this->parent_obj, 
"fsmode", 
"feedbackpart");
 
  305                         $this->tpl->setVariable(
"LINK_FILE_FEEDBACK",
 
  306                                 $ilCtrl->getLinkTargetByClass(
"ilfilesystemgui", 
"listFiles"));
 
  309                                 $this->tpl->setVariable(
"TXT_FILE_FEEDBACK",
 
  310                                         $lng->txt(
"exc_add_feedback_file"));
 
  314                                 $this->tpl->setVariable(
"TXT_FILE_FEEDBACK",
 
  315                                         $lng->txt(
"exc_fb_files").
" (".$cnt_files.
")");
 
  319                         $ilCtrl->setParameter($this->parent_obj, 
"ass_id", 
$_GET[
"ass_id"]);
 
  323                         $this->tpl->touchBlock(
"member_has_no_team_bl");