4 include_once(
"./Modules/Exercise/classes/class.ilExerciseSubmissionTableGUI.php");
25 parent::__construct($a_parent_obj, $a_parent_cmd, $a_exc, $a_item_id);
26 $this->
setFormAction($ilCtrl->getFormAction($a_parent_obj,
"saveStatusAll"));
33 $this->mode = self::MODE_BY_ASSIGNMENT;
36 $this->
setId(
"exc_mem");
38 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
41 $this->
setTitle($lng->txt(
"exc_assignment").
": ".$this->ass->getTitle());
49 $data = $this->ass->getMemberListData();
51 $idl = $this->ass->getIndividualDeadlines();
54 if($this->ass->hasTeam())
61 foreach($data as $item)
64 if($this->filter[
"status"] &&
65 $item[
"status"] != $this->filter[
"status"])
70 $team_id = $team_map[$item[
"usr_id"]];
75 $team_id =
"nty".$item[
"usr_id"];
78 if(!isset($tmp[$team_id]))
80 $tmp[$team_id] = $item;
82 if(is_numeric($team_id))
84 $tmp[$team_id][
"submission_obj"] =
new ilExSubmission($this->ass, $item[
"usr_id"],
$teams[$team_id]);
93 $tmp[$team_id][
"team"][$item[
"usr_id"]] = $item[
"name"];
95 if(is_numeric($team_id))
97 $idl_team_id =
"t".$team_id;
98 if(array_key_exists($idl_team_id, $idl))
100 $tmp[$team_id][
"idl"] = $idl[$idl_team_id];
106 if($this->filter[
"name"])
108 foreach($tmp as $idx => $item)
110 if(!stristr(implode(
"", $item[
"team"]), $this->filter[
"name"]))
116 if($this->filter[
"subm"])
118 foreach($tmp as $idx => $item)
120 $submission = $item[
"submission_obj"];
121 if($this->filter[
"subm"] ==
"y" &&
122 !$submission->getLastSubmission())
126 else if($this->filter[
"subm"] ==
"n" &&
127 $submission->getLastSubmission())
141 foreach($data as $idx => $item)
144 if($this->filter[
"status"] &&
145 $item[
"status"] != $this->filter[
"status"])
150 if($this->filter[
"name"] &&
151 !stristr($item[
"name"], $this->filter[
"name"]) &&
152 !stristr($item[
"login"], $this->filter[
"name"]))
158 $data[$idx][
"submission_obj"] =
new ilExSubmission($this->ass, $item[
"usr_id"]);
161 if($this->filter[
"subm"])
163 $submission = $data[$idx][
"submission_obj"];
164 if($this->filter[
"subm"] ==
"y" &&
165 !$submission->getLastSubmission())
170 else if($this->filter[
"subm"] ==
"n" &&
171 $submission->getLastSubmission())
178 if(array_key_exists($item[
"usr_id"], $idl))
180 $data[$idx][
"idl"] = $idl[$item[
"usr_id"]];
192 if(!$this->ass->hasTeam())
196 if(in_array(
"image", $selected))
198 $cols[
"image"] =
array($this->lng->txt(
"image"));
201 $cols[
"name"] =
array($this->lng->txt(
"name"),
"name");
203 if(in_array(
"login", $selected))
205 $cols[
"login"] =
array($this->lng->txt(
"login"),
"login");
210 $cols[
"name"] =
array($this->lng->txt(
"exc_team"));
220 if(!$this->ass->hasTeam())
222 $cols[
"image"] =
array($this->lng->txt(
"image"));
223 $cols[
"name"] =
array($this->lng->txt(
"name"),
"name");
224 $cols[
"login"] =
array($this->lng->txt(
"login"),
"login");
228 $cols[
"name"] =
array($this->lng->txt(
"exc_tbl_team"));
231 if($this->ass->hasActiveIDl())
233 $cols[
"idl"] =
array($this->lng->txt(
"exc_tbl_individual_deadline"),
"idl");
243 $member_id = $member[
"usr_id"];
245 $ilCtrl->setParameter($this->parent_obj,
"ass_id", $this->ass->getId());
246 $ilCtrl->setParameter($this->parent_obj,
"member_id", $member_id);
249 $this->tpl->setVariable(
"NAME_ID",
"member");
250 $this->tpl->setVariable(
"VAL_ID", $member_id);
252 $this->
parseRow($member_id, $this->ass, $member);
254 $ilCtrl->setParameter($this->parent_obj,
"ass_id", $this->ass->getId());
255 $ilCtrl->setParameter($this->parent_obj,
"member_id",
"");
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static getAssignmentTeamMap($a_ass_id)
Get team structure for assignment.
static getInstancesFromMap($a_assignment_id)
Exercise assignment team.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Exercise submission table.
parseRow($a_user_id, ilExAssignment $a_ass, array $a_row)
getSelectedColumns()
Get selected columns.
Create styles array
The data for the language used.
__construct($a_parent_obj, $a_parent_cmd, ilObjExercise $a_exc, $a_item_id)
Constructor.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.