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 $this->tpl->setVariable(
"VAL_CHKBOX",
111 $this->tpl->setVariable(
"VAL_ID",
128 $last_sub =
"<b>".$last_sub.
"</b>";
130 $this->tpl->setVariable(
"VAL_LAST_SUBMISSION", $last_sub);
131 $this->tpl->setVariable(
"TXT_LAST_SUBMISSION",
132 $lng->txt(
"exc_last_submission"));
135 $this->tpl->setVariable(
"TXT_SUBMITTED_FILES",
136 $lng->txt(
"exc_files_returned"));
141 $sub_cnt.=
" ".sprintf($lng->txt(
"cnt_new"),count($new));
143 $this->tpl->setVariable(
"VAL_SUBMITTED_FILES",
147 $ilCtrl->setParameter($this->parent_obj,
"ass_id",
$d[
"id"]);
148 $ilCtrl->setParameter($this->parent_obj,
"member_id", $this->part_id);
151 $this->tpl->setCurrentBlock(
"download_link");
152 $this->tpl->setVariable(
"LINK_DOWNLOAD",
153 $ilCtrl->getLinkTarget($this->parent_obj,
"downloadReturned"));
154 if (count($new) <= 0)
156 $this->tpl->setVariable(
"TXT_DOWNLOAD",
157 $lng->txt(
"exc_download_files"));
161 $this->tpl->setVariable(
"TXT_DOWNLOAD",
162 $lng->txt(
"exc_download_all"));
164 $this->tpl->parseCurrentBlock();
169 $this->tpl->setCurrentBlock(
"download_link");
170 $this->tpl->setVariable(
"LINK_NEW_DOWNLOAD",
171 $ilCtrl->getLinkTarget($this->parent_obj,
"downloadNewReturned"));
172 $this->tpl->setVariable(
"TXT_NEW_DOWNLOAD",
173 $lng->txt(
"exc_download_new"));
174 $this->tpl->parseCurrentBlock();
179 $this->tpl->setVariable(
"TXT_NOTE", $lng->txt(
"note"));
180 $this->tpl->setVariable(
"NAME_NOTE",
181 "notice[".
$d[
"id"].
"]");
182 $this->tpl->setVariable(
"VAL_NOTE",
186 $this->tpl->setVariable(
"TXT_LCOMMENT", $lng->txt(
"exc_comment_for_learner"));
187 $this->tpl->setVariable(
"NAME_LCOMMENT",
188 "lcomment[".
$d[
"id"].
"]");
190 $this->tpl->setVariable(
"VAL_LCOMMENT",
197 $this->tpl->setVariable(
"SEL_".strtoupper($status),
' selected="selected" ');
198 $this->tpl->setVariable(
"TXT_NOTGRADED", $lng->txt(
"exc_notgraded"));
199 $this->tpl->setVariable(
"TXT_PASSED", $lng->txt(
"exc_passed"));
200 $this->tpl->setVariable(
"TXT_FAILED", $lng->txt(
"exc_failed"));
203 $this->tpl->setCurrentBlock(
"status_date");
204 $this->tpl->setVariable(
"TXT_LAST_CHANGE", $lng->txt(
"last_change"));
205 $this->tpl->setVariable(
'VAL_STATUS_DATE',
207 $this->tpl->parseCurrentBlock();
211 case "passed": $pic =
"scorm/passed.gif";
break;
212 case "failed": $pic =
"scorm/failed.gif";
break;
213 default: $pic =
"scorm/not_attempted.gif";
break;
216 $this->tpl->setVariable(
"ALT_STATUS", $lng->txt(
"exc_".$status));
219 $this->tpl->setVariable(
"TXT_MARK", $lng->txt(
"exc_mark"));
220 $this->tpl->setVariable(
"NAME_MARK",
221 "mark[".
$d[
"id"].
"]");
223 $this->tpl->setVariable(
"VAL_MARK",
227 $ilCtrl->setParameter($this->parent_obj,
"member_id", $this->part_id);
230 $this->tpl->setCurrentBlock(
"feedback_date");
231 $this->tpl->setVariable(
"TXT_FEEDBACK_MAIL_SENT",
232 sprintf($lng->txt(
"exc_sent_at"),
234 $this->tpl->parseCurrentBlock();
236 $ilCtrl->setParameter($this,
"rcp_to", $this->user->getLogin());
237 $this->tpl->setVariable(
"LINK_FEEDBACK",
238 $ilCtrl->getLinkTarget($this->parent_obj,
"redirectFeedbackMail"));
240 $this->tpl->setVariable(
"TXT_FEEDBACK",
241 $lng->txt(
"exc_send_mail"));
242 $ilCtrl->setParameter($this->parent_obj,
"rcp_to",
"");
245 $cnt_files = $storage->countFeedbackFiles($this->part_id);
246 $ilCtrl->setParameter($this->parent_obj,
"fsmode",
"feedbackpart");
247 $this->tpl->setVariable(
"LINK_FILE_FEEDBACK",
248 $ilCtrl->getLinkTargetByClass(
"ilfilesystemgui",
"listFiles"));
251 $this->tpl->setVariable(
"TXT_FILE_FEEDBACK",
252 $lng->txt(
"exc_add_feedback_file"));
256 $this->tpl->setVariable(
"TXT_FILE_FEEDBACK",
257 $lng->txt(
"exc_fb_files").
" (".$cnt_files.
")");
261 $ilCtrl->setParameter($this->parent_obj,
"ass_id",
$_GET[
"ass_id"]);