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();
41 parent::__construct($a_parent_obj, $a_parent_cmd);
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.svg";
break;
127 case "failed": $pic =
"scorm/failed.svg";
break;
128 default: $pic =
"scorm/not_attempted.svg";
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.svg";
break;
159 case "failed": $pic =
"scorm/failed.svg";
break;
160 default: $pic =
"scorm/not_attempted.svg";
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",
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static _lookupName($a_user_id)
lookup user name
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
static getAssignmentDataOfExercise($a_exc_id)
Get assignments data of an exercise in an array.
lookupStatusOfUser($a_ass_id, $a_user_id)
was: getStatusByMember
_lookupMark($a_usr_id, $a_obj_id)
lookupMarkOfUser($a_ass_id, $a_user_id)
Lookup user mark.
__construct($a_parent_obj, $a_parent_cmd, $a_exc, $a_mem_obj)
Constructor.
numericOrdering($a_f)
Check whether field is numeric.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="")
Add a column to the header.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
_lookupComment($a_usr_id, $a_obj_id)
_lookupStatus($a_obj_id, $a_user_id)
Lookup current status (notgraded|passed|failed)
fillRow($d)
Fill table row.
setEnableHeader($a_enableheader)
Set Enable Header.
setEnableTitle($a_enabletitle)
Set Enable Title.
Exercise participant table.