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_mem_obj)
26 $this->exc_id = $this->exc->getId();
28 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
29 $this->
setId(
"exc_grades_".$this->exc_id);
31 $this->mem_obj = $a_mem_obj;
33 $mems = $this->mem_obj->getMembers();
47 $this->
setTitle($lng->txt(
"exc_grades"));
52 $this->
addColumn($this->lng->txt(
"name"),
"lastname");
54 foreach ($this->ass_data as $ass)
56 $ilCtrl->setParameter($this->parent_obj,
"ass_id", $ass[
"id"]);
57 $cnt_str =
'<a href="'.$ilCtrl->getLinkTarget($this->parent_obj,
"members").
'">'.$cnt.
'</a>';
58 if ($ass[
"mandatory"])
60 $this->
addColumn(
"<u>".$cnt_str.
"</u>",
"",
"",
false,
"", $ass[
"title"].
" ".
61 "(".$lng->txt(
"exc_mandatory").
")");
65 $this->
addColumn($cnt_str,
"",
"",
false,
"", $ass[
"title"]);
69 $ilCtrl->setParameter($this->parent_obj,
"ass_id",
"");
70 $this->
addColumn($this->lng->txt(
"exc_total_exc"),
"");
71 $this->
addColumn($this->lng->txt(
"exc_comment_for_learner"),
"",
"1%");
81 $this->
setRowTemplate(
"tpl.exc_grades_row.html",
"Modules/Exercise");
97 if (in_array($a_f, array(
"order_val")))
113 $user_id =
$d[
"user_id"];
115 foreach ($this->ass_data as $ass)
118 $this->tpl->setCurrentBlock(
"grade");
120 $this->tpl->setVariable(
"SEL_".strtoupper($status),
' selected="selected" ');
121 $this->tpl->setVariable(
"TXT_NOTGRADED", $lng->txt(
"exc_notgraded"));
122 $this->tpl->setVariable(
"TXT_PASSED", $lng->txt(
"exc_passed"));
123 $this->tpl->setVariable(
"TXT_FAILED", $lng->txt(
"exc_failed"));
126 case "passed": $pic =
"scorm/passed.png";
break;
127 case "failed": $pic =
"scorm/failed.png";
break;
128 default: $pic =
"scorm/not_attempted.png";
break;
131 $this->tpl->setVariable(
"ALT_STATUS", $lng->txt(
"exc_".$status));
135 $this->tpl->setVariable(
"VAL_ONLY_MARK", $mark);
137 $this->tpl->parseCurrentBlock();
143 $this->tpl->setCurrentBlock(
"mark_input");
144 $this->tpl->setVariable(
"TXT_MARK", $lng->txt(
"exc_mark"));
145 $this->tpl->setVariable(
"NAME_MARK",
146 "mark[".$user_id.
"]");
147 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
149 $this->tpl->setVariable(
"VAL_MARK",
151 $this->tpl->parseCurrentBlock();
153 $this->tpl->setCurrentBlock(
"grade");
155 $this->tpl->setVariable(
"SEL_".strtoupper($status),
' selected="selected" ');
158 case "passed": $pic =
"scorm/passed.png";
break;
159 case "failed": $pic =
"scorm/failed.png";
break;
160 default: $pic =
"scorm/not_attempted.png";
break;
163 $this->tpl->setVariable(
"ALT_STATUS", $lng->txt(
"exc_".$status));
173 $this->tpl->parseCurrentBlock();
176 $this->tpl->setVariable(
"TXT_NAME",
177 $d[
"lastname"].
", ".
$d[
"firstname"].
" [".
$d[
"login"].
"]");
178 $this->tpl->setVariable(
"VAL_ID", $user_id);
179 $ilCtrl->setParameter($this->parent_obj,
"part_id", $user_id);
180 $this->tpl->setVariable(
"LINK_NAME",
181 $ilCtrl->getLinkTarget($this->parent_obj,
"showParticipant"));
184 $this->tpl->setVariable(
"ID_COMMENT", $user_id);
186 $this->tpl->setVariable(
"VAL_COMMENT",