4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
5 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
21 function __construct($a_parent_obj, $a_parent_cmd, $a_exc, $a_ass_id)
26 $this->exc_id = $this->exc->getId();
27 $this->
setId(
"exc_mem_".$a_ass_id);
30 include_once(
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
32 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
34 $this->ass_id = $a_ass_id;
38 $this->
setTitle($lng->txt(
"exc_assignment").
": ".
55 foreach(
$data as $item)
57 $team_id = $team_map[$item[
"usr_id"]];
65 $team_id =
"nty".$item[
"usr_id"];
68 if(!isset($tmp[$team_id]))
70 $tmp[$team_id] = $item;
73 $tmp[$team_id][
"team"][$item[
"usr_id"]] = $item[
"name"];
74 $tmp[$team_id][
"team_id"] = $team_id;
87 $this->
addColumn($this->lng->txt(
"image"),
"",
"1");
88 $this->
addColumn($this->lng->txt(
"name"),
"name");
89 $this->
addColumn($this->lng->txt(
"login"),
"login");
93 $this->
addColumn($this->lng->txt(
"exc_team"));
99 $this->
addColumn($this->lng->txt(
"exc_exercise_sent"),
"sent_time");
101 $this->
addColumn($this->lng->txt(
"exc_submission"),
"submission");
102 $this->
addColumn($this->lng->txt(
"exc_grading"),
"solved_time");
103 $this->
addColumn($this->lng->txt(
"feedback"),
"feedback_time");
110 $this->
setRowTemplate(
"tpl.exc_members_row.html",
"Modules/Exercise");
116 $this->
addMultiCommand(
"redirectFeedbackMail", $lng->txt(
"exc_send_mail"));
117 $this->
addMultiCommand(
"sendMembers", $lng->txt(
"exc_send_assignment"));
118 $this->
addMultiCommand(
"confirmDeassignMembers", $lng->txt(
"exc_deassign_members"));
123 $this->
addCommandButton(
"downloadAll", $lng->txt(
"download_all_returned_files"));
134 include_once
"./Services/Object/classes/class.ilObjectFactory.php";
135 $member_id = $member[
"usr_id"];
142 $has_no_team_yet = (substr($member[
"team_id"], 0, 3) ==
"nty");
144 if(!$has_no_team_yet)
151 $this->tpl->setCurrentBlock(
"mail_sent");
155 $this->tpl->setVariable(
"TXT_MAIL_SENT",
156 sprintf($lng->txt(
"exc_sent_at"),
161 $this->tpl->setVariable(
"TXT_MAIL_SENT",
164 $this->tpl->parseCurrentBlock();
168 $this->tpl->setCurrentBlock(
"mail_sent");
169 $this->tpl->setVariable(
"TXT_MAIL_SENT",
171 $this->tpl->parseCurrentBlock();
176 $this->tpl->setVariable(
"VAL_CHKBOX",
178 $this->tpl->setVariable(
"VAL_ID",
183 if(!isset($member[
"team"]))
185 $this->tpl->setVariable(
"TXT_NAME",
187 $this->tpl->setVariable(
"TXT_LOGIN",
188 "[".$member[
"login"].
"]");
191 $this->tpl->setVariable(
"USR_IMAGE",
192 $mem_obj->getPersonalPicturePath(
"xxsmall"));
193 $this->tpl->setVariable(
"USR_ALT", $lng->txt(
"personal_picture"));
198 $this->tpl->setCurrentBlock(
"team_member");
199 asort($member[
"team"]);
200 foreach($member[
"team"] as $member_name)
202 $this->tpl->setVariable(
"TXT_MEMBER_NAME", $member_name);
203 $this->tpl->parseCurrentBlock();
206 if(!$has_no_team_yet)
208 $this->tpl->setCurrentBlock(
"team_log");
209 $ilCtrl->setParameter($this->parent_obj,
"lmem", $member_id);
210 $this->tpl->setVariable(
"HREF_LOG",
211 $ilCtrl->getLinkTarget($this->parent_obj,
"showTeamLog"));
212 $this->tpl->setVariable(
"TXT_LOG", $lng->txt(
"exc_team_log"));
213 $ilCtrl->setParameter($this->parent_obj,
"lmem",
"");
214 $this->tpl->parseCurrentBlock();
219 $this->tpl->setCurrentBlock(
"team_info");
220 $this->tpl->setVariable(
"TXT_TEAM_INFO", $lng->txt(
"exc_no_team_yet"));
221 $this->tpl->setVariable(
"TXT_CREATE_TEAM", $lng->txt(
"exc_create_team"));
223 $ilCtrl->setParameter($this->parent_obj,
"lmem", $member_id);
224 $this->tpl->setVariable(
"URL_CREATE_TEAM",
225 $ilCtrl->getLinkTarget($this->getParentObject(),
"createSingleMemberTeam"));
226 $ilCtrl->setParameter($this->parent_obj,
"lmem",
"");
231 $this->tpl->setVariable(
"TEAM_FILES_INFO",
"<br />".
232 $lng->txt(
"exc_files_returned").
": ".$files_nr);
234 $this->tpl->parseCurrentBlock();
238 if(!$has_no_team_yet)
254 $last_sub =
"<b>".$last_sub.
"</b>";
256 $this->tpl->setVariable(
"VAL_LAST_SUBMISSION", $last_sub);
257 $this->tpl->setVariable(
"TXT_LAST_SUBMISSION",
258 $lng->txt(
"exc_last_submission"));
268 $this->tpl->setVariable(
"TXT_SUBMITTED_FILES",
269 $lng->txt(
"exc_files_returned"));
275 $sub_cnt.=
" ".sprintf($lng->txt(
"cnt_new"),count($new));
277 $this->tpl->setVariable(
"VAL_SUBMITTED_FILES",
281 $ilCtrl->setParameter($this->parent_obj,
"member_id", $member_id);
284 $this->tpl->setCurrentBlock(
"download_link");
285 $this->tpl->setVariable(
"LINK_DOWNLOAD",
286 $ilCtrl->getLinkTarget($this->parent_obj,
"downloadReturned"));
287 if (count($new) <= 0)
289 $this->tpl->setVariable(
"TXT_DOWNLOAD",
290 $lng->txt(
"exc_download_files"));
294 $this->tpl->setVariable(
"TXT_DOWNLOAD",
295 $lng->txt(
"exc_download_all"));
297 $this->tpl->parseCurrentBlock();
302 $this->tpl->setCurrentBlock(
"download_link");
303 $this->tpl->setVariable(
"LINK_NEW_DOWNLOAD",
304 $ilCtrl->getLinkTarget($this->parent_obj,
"downloadNewReturned"));
305 $this->tpl->setVariable(
"TXT_NEW_DOWNLOAD",
306 $lng->txt(
"exc_download_new"));
307 $this->tpl->parseCurrentBlock();
313 $has_submitted =
false;
314 $this->tpl->setVariable(
"TXT_SUBMITTED_FILES",
315 $lng->txt(
"exc_blog_returned"));
319 $blogs = array_pop($blogs);
320 if($blogs && substr($blogs[
"filename"], -1) !=
"/")
322 $has_submitted =
true;
323 $this->tpl->setVariable(
"VAL_SUBMITTED_FILES", 1);
325 $ilCtrl->setParameter($this->parent_obj,
"member_id", $member_id);
326 $this->tpl->setCurrentBlock(
"download_link");
327 $this->tpl->setVariable(
"LINK_DOWNLOAD",
328 $ilCtrl->getLinkTarget($this->parent_obj,
"downloadReturned"));
329 $this->tpl->setVariable(
"TXT_DOWNLOAD",
330 $lng->txt(
"exc_download_files"));
331 $this->tpl->parseCurrentBlock();
336 $this->tpl->setVariable(
"VAL_SUBMITTED_FILES",
"---");
341 $has_submitted =
false;
342 $this->tpl->setVariable(
"TXT_SUBMITTED_FILES",
343 $lng->txt(
"exc_portfolio_returned"));
347 $portfolios = array_pop($portfolios);
348 if($portfolios && substr($portfolios[
"filename"], -1) !=
"/")
350 $has_submitted =
true;
351 $this->tpl->setVariable(
"VAL_SUBMITTED_FILES", 1);
353 $ilCtrl->setParameter($this->parent_obj,
"member_id", $member_id);
354 $this->tpl->setCurrentBlock(
"download_link");
355 $this->tpl->setVariable(
"LINK_DOWNLOAD",
356 $ilCtrl->getLinkTarget($this->parent_obj,
"downloadReturned"));
357 $this->tpl->setVariable(
"TXT_DOWNLOAD",
358 $lng->txt(
"exc_download_files"));
359 $this->tpl->parseCurrentBlock();
364 $this->tpl->setVariable(
"VAL_SUBMITTED_FILES",
"---");
372 $this->tpl->setVariable(
"TXT_NOTE", $lng->txt(
"note"));
373 $this->tpl->setVariable(
"NAME_NOTE",
374 "notice[$member_id]");
375 $this->tpl->setVariable(
"VAL_NOTE",
379 $this->tpl->setVariable(
"TXT_LCOMMENT", $lng->txt(
"exc_comment_for_learner"));
380 $this->tpl->setVariable(
"NAME_LCOMMENT",
381 "lcomment[$member_id]");
383 $this->tpl->setVariable(
"VAL_LCOMMENT",
390 $this->tpl->setVariable(
"SEL_".strtoupper($status),
' selected="selected" ');
391 $this->tpl->setVariable(
"TXT_NOTGRADED", $lng->txt(
"exc_notgraded"));
392 $this->tpl->setVariable(
"TXT_PASSED", $lng->txt(
"exc_passed"));
393 $this->tpl->setVariable(
"TXT_FAILED", $lng->txt(
"exc_failed"));
396 $this->tpl->setCurrentBlock(
"status_date");
397 $this->tpl->setVariable(
"TXT_LAST_CHANGE", $lng->txt(
"last_change"));
398 $this->tpl->setVariable(
'VAL_STATUS_DATE',
400 $this->tpl->parseCurrentBlock();
404 case "passed": $pic =
"scorm/passed.png";
break;
405 case "failed": $pic =
"scorm/failed.png";
break;
406 default: $pic =
"scorm/not_attempted.png";
break;
409 $this->tpl->setVariable(
"ALT_STATUS", $lng->txt(
"exc_".$status));
412 $this->tpl->setVariable(
"TXT_MARK", $lng->txt(
"exc_mark"));
413 $this->tpl->setVariable(
"NAME_MARK",
416 $this->tpl->setVariable(
"VAL_MARK",
420 $ilCtrl->setParameter($this->parent_obj,
"member_id", $member_id);
423 $this->tpl->setCurrentBlock(
"feedback_date");
424 $this->tpl->setVariable(
"TXT_FEEDBACK_MAIL_SENT",
425 sprintf($lng->txt(
"exc_sent_at"),
427 $this->tpl->parseCurrentBlock();
431 $this->tpl->setVariable(
"LINK_FEEDBACK",
432 $ilCtrl->getLinkTarget($this->parent_obj,
"redirectFeedbackMail"));
433 $this->tpl->setVariable(
"TXT_FEEDBACK",
434 $lng->txt(
"exc_send_mail"));
438 $feedback_id =
"t".$member[
"team_id"];
442 $feedback_id = $member_id;
446 $cnt_files = $this->storage->countFeedbackFiles($feedback_id);
447 $ilCtrl->setParameter($this->parent_obj,
"fsmode",
"feedback");
448 $this->tpl->setVariable(
"LINK_FILE_FEEDBACK",
449 $ilCtrl->getLinkTargetByClass(
"ilfilesystemgui",
"listFiles"));
452 $this->tpl->setVariable(
"TXT_FILE_FEEDBACK",
453 $lng->txt(
"exc_add_feedback_file"));
457 $this->tpl->setVariable(
"TXT_FILE_FEEDBACK",
458 $lng->txt(
"exc_fb_files").
" (".$cnt_files.
")");
461 $this->tpl->parseCurrentBlock();
465 $this->tpl->touchBlock(
"member_has_no_team_bl");