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 public function __construct($a_parent_obj, $a_parent_cmd, $a_exc, $a_mem_obj)
26 $this->ctrl = $DIC->ctrl();
27 $this->lng = $DIC->language();
29 $lng = $DIC->language();
32 $this->exc_id = $this->exc->getId();
34 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
35 $this->
setId(
"exc_grades_" . $this->exc_id);
37 $this->mem_obj = $a_mem_obj;
39 $mems = $this->mem_obj->getMembers();
40 $mems =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
41 'edit_submissions_grades',
42 'edit_submissions_grades',
43 $this->exc->getRefId(),
48 foreach ($mems as
$d) {
54 parent::__construct($a_parent_obj, $a_parent_cmd);
64 $this->
addColumn($this->lng->txt(
"name"),
"name");
66 foreach ($this->ass_data as $ass) {
67 $ilCtrl->setParameter($this->parent_obj,
"ass_id", $ass->getId());
68 $cnt_str =
'<a href="' .
$ilCtrl->getLinkTarget($this->parent_obj,
"members") .
'">' . $cnt .
'</a>';
69 if ($ass->getMandatory()) {
70 $this->
addColumn(
"<u>" . $cnt_str .
"</u>",
"",
"",
false,
"", $ass->getTitle() .
" " .
71 "(" .
$lng->txt(
"exc_mandatory") .
")");
73 $this->
addColumn($cnt_str,
"",
"",
false,
"", $ass->getTitle());
77 $ilCtrl->setParameter($this->parent_obj,
"ass_id",
"");
79 $this->
addColumn($this->lng->txt(
"exc_total_exc"),
"");
80 $this->lng->loadLanguageModule(
"trac");
81 $this->
addColumn($this->lng->txt(
"trac_comment"));
91 $this->
setRowTemplate(
"tpl.exc_grades_row.html",
"Modules/Exercise");
96 if (count($mems) > 0) {
106 if (in_array($a_f, array(
"order_val"))) {
121 $user_id =
$d[
"user_id"];
123 foreach ($this->ass_data as $ass) {
127 $this->tpl->setCurrentBlock(
"grade");
129 $this->tpl->setVariable(
"SEL_" . strtoupper($status),
' selected="selected" ');
130 $this->tpl->setVariable(
"TXT_NOTGRADED",
$lng->txt(
"exc_notgraded"));
131 $this->tpl->setVariable(
"TXT_PASSED",
$lng->txt(
"exc_passed"));
132 $this->tpl->setVariable(
"TXT_FAILED",
$lng->txt(
"exc_failed"));
133 $pic = $member_status->getStatusIcon();
135 $this->tpl->setVariable(
"ALT_STATUS",
$lng->txt(
"exc_" . $status));
138 $mark = $member_status->getMark();
139 $this->tpl->setVariable(
"VAL_ONLY_MARK", $mark);
141 $this->tpl->parseCurrentBlock();
147 $this->tpl->setCurrentBlock(
"mark_input");
148 $this->tpl->setVariable(
"TXT_MARK",
$lng->txt(
"exc_mark"));
149 $this->tpl->setVariable(
151 "mark[" . $user_id .
"]" 153 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
155 $this->tpl->setVariable(
159 $this->tpl->parseCurrentBlock();
161 $this->tpl->setCurrentBlock(
"grade");
163 $this->tpl->setVariable(
"SEL_" . strtoupper($status),
' selected="selected" ');
165 case "passed": $pic =
"scorm/passed.svg";
break;
166 case "failed": $pic =
"scorm/failed.svg";
break;
167 default: $pic =
"scorm/not_attempted.svg";
break;
170 $this->tpl->setVariable(
"ALT_STATUS",
$lng->txt(
"exc_" . $status));
180 $this->tpl->parseCurrentBlock();
183 $this->tpl->setVariable(
185 $d[
"lastname"] .
", " .
$d[
"firstname"] .
" [" .
$d[
"login"] .
"]" 187 $this->tpl->setVariable(
"VAL_ID", $user_id);
190 $ilCtrl->setParameter($this->parent_obj,
"part_id", $user_id);
191 $url =
$ilCtrl->getLinkTarget($this->parent_obj,
"showParticipant");
192 $ilCtrl->setParameter($this->parent_obj,
"part_id",
"");
194 $this->tpl->setVariable(
"LINK_NAME",
$url);
197 $this->tpl->setVariable(
"ID_COMMENT", $user_id);
199 $this->tpl->setVariable(
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.
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.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
fillRow($d)
Fill table row.
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.
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.
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.