4 include_once(
"./Modules/Exercise/classes/class.ilExerciseSubmissionTableGUI.php");
29 parent::__construct($a_parent_obj, $a_parent_cmd, $a_exc, $a_item_id);
30 $this->
setFormAction($ilCtrl->getFormAction($a_parent_obj,
"saveStatusAll"));
37 $this->mode = self::MODE_BY_ASSIGNMENT;
40 $this->
setId(
"exc_mem");
42 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
45 $this->
setTitle(
$lng->txt(
"exc_assignment") .
": " . $this->ass->getTitle());
53 $tmp_data = $this->ass->getMemberListData();
56 $usr_ids = array_keys($tmp_data);
57 $filtered_usr_ids =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
58 'edit_submissions_grades',
59 'edit_submissions_grades',
60 $this->exc->getRefId(),
64 foreach ($filtered_usr_ids as $usr_id) {
65 $data[$usr_id] = $tmp_data[$usr_id];
69 $idl = $this->ass->getIndividualDeadlines();
70 $calc_deadline = $this->ass->getCalculatedDeadlines();
73 if ($this->ass->hasTeam()) {
79 foreach (
$data as $item) {
81 if ($this->filter[
"status"] &&
82 $item[
"status"] != $this->filter[
"status"]) {
86 $team_id = $team_map[$item[
"usr_id"]];
90 $team_id =
"nty" . $item[
"usr_id"];
93 if (!isset($tmp[$team_id])) {
94 $tmp[$team_id] = $item;
96 if (is_numeric($team_id)) {
97 $tmp[$team_id][
"submission_obj"] =
new ilExSubmission($this->ass, $item[
"usr_id"],
$teams[$team_id]);
104 $tmp[$team_id][
"team"][$item[
"usr_id"]] = $item[
"name"];
106 if (is_numeric($team_id)) {
107 $idl_team_id =
"t" . $team_id;
108 if (array_key_exists($idl_team_id, $idl)) {
109 $tmp[$team_id][
"idl"] = $idl[$idl_team_id];
112 if (isset($calc_deadline[
"team"][$team_id])) {
113 $tmp[$team_id][
"calc_deadline"] = $calc_deadline[
"team"][$team_id][
"calculated_deadline"];
116 if (isset($calc_deadline[
"user"][$item[
"usr_id"]])) {
117 $tmp[
"nty" . $item[
"usr_id"]][
"calc_deadline"] = $calc_deadline[
"user"][$item[
"usr_id"]][
"calculated_deadline"];
123 if ($this->filter[
"name"]) {
124 foreach ($tmp as $idx => $item) {
125 if (!stristr(implode(
"", $item[
"team"]), $this->filter[
"name"])) {
130 if ($this->filter[
"subm"]) {
131 foreach ($tmp as $idx => $item) {
132 $submission = $item[
"submission_obj"];
133 if ($this->filter[
"subm"] ==
"y" &&
134 !$submission->getLastSubmission()) {
136 } elseif ($this->filter[
"subm"] ==
"n" &&
137 $submission->getLastSubmission()) {
146 foreach (
$data as $idx => $item) {
148 if ($this->filter[
"status"] &&
149 $item[
"status"] != $this->filter[
"status"]) {
153 if ($this->filter[
"name"] &&
154 !stristr($item[
"name"], $this->filter[
"name"]) &&
155 !stristr($item[
"login"], $this->filter[
"name"])) {
163 if ($this->filter[
"subm"]) {
164 $submission =
$data[$idx][
"submission_obj"];
165 if ($this->filter[
"subm"] ==
"y" &&
166 !$submission->getLastSubmission()) {
169 } elseif ($this->filter[
"subm"] ==
"n" &&
170 $submission->getLastSubmission()) {
176 if (array_key_exists($item[
"usr_id"], $idl)) {
177 $data[$idx][
"idl"] = $idl[$item[
"usr_id"]];
180 if (isset($calc_deadline[
"user"][$item[
"usr_id"]])) {
181 $data[$idx][
"calc_deadline"] = $calc_deadline[
"user"][$item[
"usr_id"]][
"calculated_deadline"];
193 if (!$this->ass->hasTeam()) {
196 if (in_array(
"image", $selected)) {
197 $cols[
"image"] = array($this->lng->txt(
"image"));
200 $cols[
"name"] = array($this->lng->txt(
"name"),
"name");
202 if (in_array(
"login", $selected)) {
203 $cols[
"login"] = array($this->lng->txt(
"login"),
"login");
206 $cols[
"name"] = array($this->lng->txt(
"exc_team"));
216 if (!$this->ass->hasTeam()) {
217 $cols[
"image"] = array($this->lng->txt(
"image"));
218 $cols[
"name"] = array($this->lng->txt(
"name"),
"name");
219 $cols[
"login"] = array($this->lng->txt(
"login"),
"login");
221 $cols[
"name"] = array($this->lng->txt(
"exc_tbl_team"));
224 if ($this->ass->hasActiveIDl()) {
225 $cols[
"idl"] = array($this->lng->txt(
"exc_tbl_individual_deadline"),
"idl");
229 $cols[
"calc_deadline"] = array($this->lng->txt(
"exc_tbl_calculated_deadline"),
"calc_deadline");
239 $member_id = $member[
"usr_id"];
241 $ilCtrl->setParameter($this->parent_obj,
"ass_id", $this->ass->getId());
242 $ilCtrl->setParameter($this->parent_obj,
"member_id", $member_id);
245 $this->tpl->setVariable(
"NAME_ID",
"member");
246 $this->tpl->setVariable(
"VAL_ID", $member_id);
248 $this->
parseRow($member_id, $this->ass, $member);
250 $ilCtrl->setParameter($this->parent_obj,
"ass_id", $this->ass->getId());
251 $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.
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
Exercise submission table.
parseRow($a_user_id, ilExAssignment $a_ass, array $a_row)
getSelectedColumns()
Get selected columns.
__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.
Exercise submission //TODO: This class has to much static methods related to delivered "files"...
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.