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.ilExAssignmentMemberStatus.php");
22 function __construct($a_parent_obj, $a_parent_cmd, $a_exc, $a_mem_obj)
27 $this->exc_id = $this->exc->getId();
29 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
30 $this->
setId(
"exc_grades_".$this->exc_id);
32 $this->mem_obj = $a_mem_obj;
34 $mems = $this->mem_obj->getMembers();
42 parent::__construct($a_parent_obj, $a_parent_cmd);
48 $this->
setTitle($lng->txt(
"exc_grades"));
53 $this->
addColumn($this->lng->txt(
"name"),
"lastname");
55 foreach ($this->ass_data as $ass)
57 $ilCtrl->setParameter($this->parent_obj,
"ass_id", $ass->getId());
58 $cnt_str =
'<a href="'.$ilCtrl->getLinkTarget($this->parent_obj,
"members").
'">'.$cnt.
'</a>';
59 if ($ass->getMandatory())
61 $this->
addColumn(
"<u>".$cnt_str.
"</u>",
"",
"",
false,
"", $ass->getTitle().
" ".
62 "(".$lng->txt(
"exc_mandatory").
")");
66 $this->
addColumn($cnt_str,
"",
"",
false,
"", $ass->getTitle());
70 $ilCtrl->setParameter($this->parent_obj,
"ass_id",
"");
72 $this->
addColumn($this->lng->txt(
"exc_total_exc"),
"");
73 $this->lng->loadLanguageModule(
"trac");
74 $this->
addColumn($this->lng->txt(
"trac_comment"));
84 $this->
setRowTemplate(
"tpl.exc_grades_row.html",
"Modules/Exercise");
100 if (in_array($a_f,
array(
"order_val")))
115 $user_id =
$d[
"user_id"];
117 foreach ($this->ass_data as $ass)
122 $this->tpl->setCurrentBlock(
"grade");
124 $this->tpl->setVariable(
"SEL_".strtoupper($status),
' selected="selected" ');
125 $this->tpl->setVariable(
"TXT_NOTGRADED", $lng->txt(
"exc_notgraded"));
126 $this->tpl->setVariable(
"TXT_PASSED", $lng->txt(
"exc_passed"));
127 $this->tpl->setVariable(
"TXT_FAILED", $lng->txt(
"exc_failed"));
128 $pic = $member_status->getStatusIcon();
130 $this->tpl->setVariable(
"ALT_STATUS", $lng->txt(
"exc_".$status));
133 $mark = $member_status->getMark();
134 $this->tpl->setVariable(
"VAL_ONLY_MARK", $mark);
136 $this->tpl->parseCurrentBlock();
142 $this->tpl->setCurrentBlock(
"mark_input");
143 $this->tpl->setVariable(
"TXT_MARK", $lng->txt(
"exc_mark"));
144 $this->tpl->setVariable(
"NAME_MARK",
145 "mark[".$user_id.
"]");
146 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
148 $this->tpl->setVariable(
"VAL_MARK",
150 $this->tpl->parseCurrentBlock();
152 $this->tpl->setCurrentBlock(
"grade");
154 $this->tpl->setVariable(
"SEL_".strtoupper($status),
' selected="selected" ');
157 case "passed": $pic =
"scorm/passed.svg";
break;
158 case "failed": $pic =
"scorm/failed.svg";
break;
159 default: $pic =
"scorm/not_attempted.svg";
break;
162 $this->tpl->setVariable(
"ALT_STATUS", $lng->txt(
"exc_".$status));
172 $this->tpl->parseCurrentBlock();
175 $this->tpl->setVariable(
"TXT_NAME",
176 $d[
"lastname"].
", ".
$d[
"firstname"].
" [".
$d[
"login"].
"]");
177 $this->tpl->setVariable(
"VAL_ID", $user_id);
180 $ilCtrl->setParameter($this->parent_obj,
"part_id", $user_id);
181 $url = $ilCtrl->getLinkTarget($this->parent_obj,
"showParticipant");
182 $ilCtrl->setParameter($this->parent_obj,
"part_id",
"");
184 $this->tpl->setVariable(
"LINK_NAME",
$url);
187 $this->tpl->setVariable(
"ID_COMMENT", $user_id);
189 $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
Exercise assignment member status.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
__construct($a_parent_obj, $a_parent_cmd, $a_exc, $a_mem_obj)
Constructor.
for($col=0; $col< 50; $col++) $d
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)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _lookupStatus($a_obj_id, $a_user_id)
Lookup current status (notgraded|passed|failed)
static getInstancesByExercise($a_exc_id)
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
fillRow($d)
Fill table row.
setEnableHeader($a_enableheader)
Set Enable Header.
static _lookupMark($a_usr_id, $a_obj_id)
static _lookupComment($a_usr_id, $a_obj_id)
setEnableTitle($a_enabletitle)
Set Enable Title.
Exercise participant table.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.