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").
": ".
44 $this->
addColumn($this->lng->txt(
"image"),
"",
"1");
45 $this->
addColumn($this->lng->txt(
"name"),
"name");
46 $this->
addColumn($this->lng->txt(
"login"),
"login");
50 $this->
addColumn($this->lng->txt(
"exc_exercise_sent"),
"sent_time");
52 $this->
addColumn($this->lng->txt(
"exc_submission"),
"submission");
53 $this->
addColumn($this->lng->txt(
"exc_grading"),
"solved_time");
54 $this->
addColumn($this->lng->txt(
"feedback"),
"feedback_time");
61 $this->
setRowTemplate(
"tpl.exc_members_row.html",
"Modules/Exercise");
67 $this->
addMultiCommand(
"redirectFeedbackMail", $lng->txt(
"exc_send_mail"));
68 $this->
addMultiCommand(
"sendMembers", $lng->txt(
"exc_send_assignment"));
69 $this->
addMultiCommand(
"confirmDeassignMembers", $lng->txt(
"exc_deassign_members"));
74 $this->
addCommandButton(
"downloadAll", $lng->txt(
"download_all_returned_files"));
87 include_once
"./classes/class.ilObjectFactory.php";
88 $member_id = $member[
"usr_id"];
100 $this->tpl->setCurrentBlock(
"mail_sent");
104 $this->tpl->setVariable(
"TXT_MAIL_SENT",
105 sprintf($lng->txt(
"exc_sent_at"),
110 $this->tpl->setVariable(
"TXT_MAIL_SENT",
113 $this->tpl->parseCurrentBlock();
117 $this->tpl->setCurrentBlock(
"mail_sent");
118 $this->tpl->setVariable(
"TXT_MAIL_SENT",
120 $this->tpl->parseCurrentBlock();
125 $this->tpl->setVariable(
"VAL_CHKBOX",
127 $this->tpl->setVariable(
"VAL_ID",
131 $this->tpl->setVariable(
"TXT_NAME",
133 $this->tpl->setVariable(
"TXT_LOGIN",
134 "[".$member[
"login"].
"]");
137 $this->tpl->setVariable(
"USR_IMAGE",
138 $mem_obj->getPersonalPicturePath(
"xxsmall"));
139 $this->tpl->setVariable(
"USR_ALT", $lng->txt(
"personal_picture"));
155 $last_sub =
"<b>".$last_sub.
"</b>";
157 $this->tpl->setVariable(
"VAL_LAST_SUBMISSION", $last_sub);
158 $this->tpl->setVariable(
"TXT_LAST_SUBMISSION",
159 $lng->txt(
"exc_last_submission"));
165 $this->tpl->setVariable(
"TXT_SUBMITTED_FILES",
166 $lng->txt(
"exc_files_returned"));
172 $sub_cnt.=
" ".sprintf($lng->txt(
"cnt_new"),count($new));
174 $this->tpl->setVariable(
"VAL_SUBMITTED_FILES",
178 $ilCtrl->setParameter($this->parent_obj,
"member_id", $member_id);
181 $this->tpl->setCurrentBlock(
"download_link");
182 $this->tpl->setVariable(
"LINK_DOWNLOAD",
183 $ilCtrl->getLinkTarget($this->parent_obj,
"downloadReturned"));
184 if (count($new) <= 0)
186 $this->tpl->setVariable(
"TXT_DOWNLOAD",
187 $lng->txt(
"exc_download_files"));
191 $this->tpl->setVariable(
"TXT_DOWNLOAD",
192 $lng->txt(
"exc_download_all"));
194 $this->tpl->parseCurrentBlock();
199 $this->tpl->setCurrentBlock(
"download_link");
200 $this->tpl->setVariable(
"LINK_NEW_DOWNLOAD",
201 $ilCtrl->getLinkTarget($this->parent_obj,
"downloadNewReturned"));
202 $this->tpl->setVariable(
"TXT_NEW_DOWNLOAD",
203 $lng->txt(
"exc_download_new"));
204 $this->tpl->parseCurrentBlock();
210 $has_submitted =
false;
211 $this->tpl->setVariable(
"TXT_SUBMITTED_FILES",
212 $lng->txt(
"exc_blog_returned"));
216 $blogs = array_pop($blogs);
217 if($blogs && substr($blogs[
"filename"], -1) !=
"/")
219 $has_submitted =
true;
220 $this->tpl->setVariable(
"VAL_SUBMITTED_FILES", 1);
222 $ilCtrl->setParameter($this->parent_obj,
"member_id", $member_id);
223 $this->tpl->setCurrentBlock(
"download_link");
224 $this->tpl->setVariable(
"LINK_DOWNLOAD",
225 $ilCtrl->getLinkTarget($this->parent_obj,
"downloadReturned"));
226 $this->tpl->setVariable(
"TXT_DOWNLOAD",
227 $lng->txt(
"exc_download_files"));
228 $this->tpl->parseCurrentBlock();
233 $this->tpl->setVariable(
"VAL_SUBMITTED_FILES",
"---");
238 $has_submitted =
false;
239 $this->tpl->setVariable(
"TXT_SUBMITTED_FILES",
240 $lng->txt(
"exc_portfolio_returned"));
244 $portfolios = array_pop($portfolios);
245 if($portfolios && substr($portfolios[
"filename"], -1) !=
"/")
247 $has_submitted =
true;
248 $this->tpl->setVariable(
"VAL_SUBMITTED_FILES", 1);
250 $ilCtrl->setParameter($this->parent_obj,
"member_id", $member_id);
251 $this->tpl->setCurrentBlock(
"download_link");
252 $this->tpl->setVariable(
"LINK_DOWNLOAD",
253 $ilCtrl->getLinkTarget($this->parent_obj,
"downloadReturned"));
254 $this->tpl->setVariable(
"TXT_DOWNLOAD",
255 $lng->txt(
"exc_download_files"));
256 $this->tpl->parseCurrentBlock();
261 $this->tpl->setVariable(
"VAL_SUBMITTED_FILES",
"---");
269 $this->tpl->setVariable(
"TXT_NOTE", $lng->txt(
"note"));
270 $this->tpl->setVariable(
"NAME_NOTE",
271 "notice[$member_id]");
272 $this->tpl->setVariable(
"VAL_NOTE",
276 $this->tpl->setVariable(
"TXT_LCOMMENT", $lng->txt(
"exc_comment_for_learner"));
277 $this->tpl->setVariable(
"NAME_LCOMMENT",
278 "lcomment[$member_id]");
280 $this->tpl->setVariable(
"VAL_LCOMMENT",
287 $this->tpl->setVariable(
"SEL_".strtoupper($status),
' selected="selected" ');
288 $this->tpl->setVariable(
"TXT_NOTGRADED", $lng->txt(
"exc_notgraded"));
289 $this->tpl->setVariable(
"TXT_PASSED", $lng->txt(
"exc_passed"));
290 $this->tpl->setVariable(
"TXT_FAILED", $lng->txt(
"exc_failed"));
293 $this->tpl->setCurrentBlock(
"status_date");
294 $this->tpl->setVariable(
"TXT_LAST_CHANGE", $lng->txt(
"last_change"));
295 $this->tpl->setVariable(
'VAL_STATUS_DATE',
297 $this->tpl->parseCurrentBlock();
301 case "passed": $pic =
"scorm/passed.gif";
break;
302 case "failed": $pic =
"scorm/failed.gif";
break;
303 default: $pic =
"scorm/not_attempted.gif";
break;
306 $this->tpl->setVariable(
"ALT_STATUS", $lng->txt(
"exc_".$status));
309 $this->tpl->setVariable(
"TXT_MARK", $lng->txt(
"exc_mark"));
310 $this->tpl->setVariable(
"NAME_MARK",
313 $this->tpl->setVariable(
"VAL_MARK",
317 $ilCtrl->setParameter($this->parent_obj,
"member_id", $member_id);
320 $this->tpl->setCurrentBlock(
"feedback_date");
321 $this->tpl->setVariable(
"TXT_FEEDBACK_MAIL_SENT",
322 sprintf($lng->txt(
"exc_sent_at"),
324 $this->tpl->parseCurrentBlock();
328 $ilCtrl->setParameter($this,
"rcp_to", $mem_obj->getLogin());
329 $this->tpl->setVariable(
"LINK_FEEDBACK",
330 $ilCtrl->getLinkTarget($this->parent_obj,
"redirectFeedbackMail"));
331 $this->tpl->setVariable(
"TXT_FEEDBACK",
332 $lng->txt(
"exc_send_mail"));
333 $ilCtrl->setParameter($this->parent_obj,
"rcp_to",
"");
336 $cnt_files = $this->storage->countFeedbackFiles($member_id);
337 $ilCtrl->setParameter($this->parent_obj,
"fsmode",
"feedback");
338 $this->tpl->setVariable(
"LINK_FILE_FEEDBACK",
339 $ilCtrl->getLinkTargetByClass(
"ilfilesystemgui",
"listFiles"));
342 $this->tpl->setVariable(
"TXT_FILE_FEEDBACK",
343 $lng->txt(
"exc_add_feedback_file"));
347 $this->tpl->setVariable(
"TXT_FILE_FEEDBACK",
348 $lng->txt(
"exc_fb_files").
" (".$cnt_files.
")");
351 $this->tpl->parseCurrentBlock();