40 $this->ctrl = $DIC->ctrl();
41 $this->lng = $DIC->language();
43 $lng = $DIC->language();
44 $request = $DIC->exercise()->internal()->request();
46 $this->exc = $request->getRequestedExercise();
50 $this->exc_id = $this->exc->getId();
52 $this->
setId(
"exc_grades_" . $this->exc_id);
54 $this->mem_obj = $a_mem_obj;
56 $mems = $this->mem_obj->getMembers();
57 $mems =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
58 'edit_submissions_grades',
59 'edit_submissions_grades',
60 $this->exc->getRefId(),
65 foreach ($mems as
$d) {
81 $this->
addColumn($this->lng->txt(
"name"),
"name");
83 foreach ($this->ass_data as $ass) {
84 $ilCtrl->setParameter($this->parent_obj,
"ass_id", $ass->getId());
85 $cnt_str =
'<a href="' .
$ilCtrl->getLinkTarget($this->parent_obj,
"members") .
'">' . $cnt .
'</a>';
86 if (!$this->random_ass_manager->isActivated() && $ass->getMandatory()) {
87 $this->
addColumn(
"<u>" . $cnt_str .
"</u>",
"",
"",
false,
"", $ass->getTitle() .
" " .
88 "(" .
$lng->txt(
"exc_mandatory") .
")");
90 $this->
addColumn($cnt_str,
"",
"",
false,
"", $ass->getTitle());
94 $ilCtrl->setParameter($this->parent_obj,
"ass_id",
"");
96 $this->
addColumn($this->lng->txt(
"exc_total_exc"),
"");
97 $this->lng->loadLanguageModule(
"trac");
98 $this->
addColumn($this->lng->txt(
"trac_comment"));
108 $this->
setRowTemplate(
"tpl.exc_grades_row.html",
"Modules/Exercise");
113 if (count($mems) > 0) {
123 if (in_array($a_f, array(
"order_val"))) {
138 $user_id =
$d[
"user_id"];
140 foreach ($this->ass_data as $ass) {
144 $this->tpl->setCurrentBlock(
"grade");
146 $this->tpl->setVariable(
"SEL_" . strtoupper($status),
' selected="selected" ');
147 $this->tpl->setVariable(
"TXT_NOTGRADED",
$lng->txt(
"exc_notgraded"));
148 $this->tpl->setVariable(
"TXT_PASSED",
$lng->txt(
"exc_passed"));
149 $this->tpl->setVariable(
"TXT_FAILED",
$lng->txt(
"exc_failed"));
150 $pic = $member_status->getStatusIcon();
152 $this->tpl->setVariable(
"ALT_STATUS",
$lng->txt(
"exc_" . $status));
155 $mark = $member_status->getMark();
156 $this->tpl->setVariable(
"VAL_ONLY_MARK", $mark);
158 $this->tpl->parseCurrentBlock();
164 $this->tpl->setCurrentBlock(
"mark_input");
165 $this->tpl->setVariable(
"TXT_MARK",
$lng->txt(
"exc_mark"));
166 $this->tpl->setVariable(
168 "mark[" . $user_id .
"]" 171 $this->tpl->setVariable(
175 $this->tpl->parseCurrentBlock();
177 $this->tpl->setCurrentBlock(
"grade");
179 $this->tpl->setVariable(
"SEL_" . strtoupper($status),
' selected="selected" ');
181 case "passed": $pic =
"scorm/passed.svg";
break;
182 case "failed": $pic =
"scorm/failed.svg";
break;
183 default: $pic =
"scorm/not_attempted.svg";
break;
186 $this->tpl->setVariable(
"ALT_STATUS",
$lng->txt(
"exc_" . $status));
196 $this->tpl->parseCurrentBlock();
199 $this->tpl->setVariable(
201 $d[
"lastname"] .
", " .
$d[
"firstname"] .
" [" .
$d[
"login"] .
"]" 203 $this->tpl->setVariable(
"VAL_ID", $user_id);
206 $ilCtrl->setParameter($this->parent_obj,
"part_id", $user_id);
207 $url =
$ilCtrl->getLinkTarget($this->parent_obj,
"showParticipant");
208 $ilCtrl->setParameter($this->parent_obj,
"part_id",
"");
210 $this->tpl->setVariable(
"LINK_NAME",
$url);
213 $this->tpl->setVariable(
"ID_COMMENT", $user_id);
215 $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.
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.
__construct($a_parent_obj, $a_parent_cmd, ilExerciseInternalService $service, $a_mem_obj)
Constructor.
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)
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
__construct(Container $dic, ilPlugin $plugin)
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.
getRandomAssignmentManager(ilObjExercise $exc, $user=null)
Get random assignment manager.
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