4 include_once
"Modules/Exercise/classes/class.ilExSubmission.php";
5 include_once
"Modules/Exercise/classes/class.ilExSubmissionBaseGUI.php";
62 $this->toolbar = $DIC->toolbar();
64 $ilTabs = $DIC->tabs();
65 $lng = $DIC->language();
68 $this->exercise = $a_exercise;
69 $this->assignment = $a_ass;
75 $this->tabs_gui = $ilTabs;
86 $class =
$ilCtrl->getNextClass($this);
87 $cmd =
$ilCtrl->getCmd(
"listPublicSubmissions");
90 case "ilfilesystemgui":
91 $ilTabs->clearTargets();
92 $ilTabs->setBackTarget(
99 include_once(
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
104 $feedback_id = $submission->getFeedbackId();
105 $noti_rec_ids = $submission->getUserIds();
107 include_once(
"./Services/User/classes/class.ilUserUtil.php");
109 foreach ($noti_rec_ids as $rec_id) {
112 $fs_title = implode(
" / ", $fs_title);
114 include_once(
"./Services/FileSystem/classes/class.ilFileSystemGUI.php");
115 $fs_gui =
new ilFileSystemGUI($fstorage->getFeedbackPath($feedback_id));
116 $fs_gui->
setTableId(
"excfbfil" . $this->assignment->getId() .
"_" . $feedback_id);
117 $fs_gui->setAllowDirectories(
false);
118 $fs_gui->setTitle(
$lng->txt(
"exc_fb_files") .
" - " .
119 $this->assignment->getTitle() .
" - " .
121 $pcommand = $fs_gui->getLastPerformedCommand();
122 if (is_array($pcommand) && $pcommand[
"cmd"] ==
"create_file") {
123 foreach ($noti_rec_ids as $user_id) {
124 $member_status = $this->assignment->getMemberStatus($user_id);
125 $member_status->setFeedback(
true);
126 $member_status->update();
129 $this->exercise->sendFeedbackFileNotification(
132 $this->assignment->getId()
135 $this->ctrl->forwardCommand($fs_gui);
138 case 'ilrepositorysearchgui':
139 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
141 $ref_id = $this->exercise->getRefId();
142 $rep_search->addUserAccessFilterCallable(
function ($a_user_ids) use ($ref_id) {
143 return $GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
144 'edit_submissions_grades',
145 'edit_submissions_grades',
150 $rep_search->setTitle($this->lng->txt(
"exc_add_participant"));
151 $rep_search->setCallback($this,
'addMembersObject');
155 $this->ctrl->setReturn($this,
'members');
157 $this->ctrl->forwardCommand($rep_search);
160 case "ilexsubmissionteamgui":
161 include_once
"Modules/Exercise/classes/class.ilExSubmissionTeamGUI.php";
166 case "ilexsubmissionfilegui":
167 include_once
"Modules/Exercise/classes/class.ilExSubmissionFileGUI.php";
172 case "ilexsubmissiontextgui":
174 include_once
"Modules/Exercise/classes/class.ilExSubmissionTextGUI.php";
179 case "ilexpeerreviewgui":
180 include_once
"Modules/Exercise/classes/class.ilExPeerReviewGUI.php";
186 $this->{$cmd .
"Object"}();
193 switch ($_REQUEST[
"vw"]) {
194 case self::VIEW_PARTICIPANT:
195 $back_cmd =
"showParticipant";
198 case self::VIEW_GRADES:
199 $back_cmd =
"showGradesOverview";
204 $back_cmd =
"members";
213 $this->ctrl->setReturn($this, $back_cmd);
215 $this->tabs_gui->clearTargets();
216 $this->tabs_gui->setBackTarget(
217 $this->lng->txt(
"back"),
218 $this->ctrl->getLinkTarget($this, $back_cmd)
221 include_once
"Modules/Exercise/classes/class.ilExSubmission.php";
222 return new ilExSubmission($this->assignment, $_REQUEST[
"member_id"], null,
true);
236 $ass_id =
$_GET[
"ass_id"];
237 $part_id =
$_GET[
"part_id"];
239 $ilCtrl->setParameter($this,
"vw",
"");
240 $ilCtrl->setParameter($this,
"member_id",
"");
241 $ilCtrl->setParameter($this,
"ass_id",
"");
242 $ilCtrl->setParameter($this,
"part_id",
"");
246 $lng->txt(
"exc_assignment_view"),
247 $ilCtrl->getLinkTarget($this,
"members")
251 $lng->txt(
"exc_participant_view"),
252 $ilCtrl->getLinkTarget($this,
"showParticipant")
256 $lng->txt(
"exc_grades_overview"),
257 $ilCtrl->getLinkTarget($this,
"showGradesOverview")
259 $ilTabs->activateSubTab($a_activate);
261 $ilCtrl->setParameter($this,
"ass_id", $ass_id);
262 $ilCtrl->setParameter($this,
"part_id", $part_id);
270 $ilCtrl->setParameterByClass(
"ilExSubmissionFileGUI",
"member_id", (
int)
$_GET[
"member_id"]);
271 $url =
$ilCtrl->getLinkTargetByClass(
array(
"ilRepositoryGUI",
"ilExerciseHandlerGUI",
"ilObjExerciseGUI",
"ilExerciseManagementGUI",
"ilExSubmissionFileGUI"),
"downloadNewReturned");
272 $js_url =
$ilCtrl->getLinkTargetByClass(
array(
"ilRepositoryGUI",
"ilExerciseHandlerGUI",
"ilObjExerciseGUI",
"ilExerciseManagementGUI",
"ilExSubmissionFileGUI"),
"downloadNewReturned",
"",
"",
false);
273 ilUtil::sendInfo(
$lng->txt(
"exc_wait_for_files") .
"<a href='$url'> " .
$lng->txt(
'exc_download_files') .
"</a><script>window.location.href ='" . $js_url .
"';</script>");
287 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
292 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
295 if (!$this->assignment) {
296 $this->assignment = current($ass);
300 if (count($ass) > 1) {
302 foreach ($ass as $a) {
303 $options[$a->getId()] = $a->getTitle();
305 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
308 $si->setValue($this->assignment->getId());
309 $ilToolbar->addStickyItem(
$si);
311 include_once(
"./Services/UIComponent/Button/classes/class.ilSubmitButton.php");
313 $button->setCaption(
"exc_select_ass");
314 $button->setCommand(
"selectAssignment");
315 $ilToolbar->addStickyItem($button);
317 $ilToolbar->addSeparator();
320 elseif ($this->assignment) {
321 $ilCtrl->setParameter($this,
"ass_id", $this->assignment->getId());
327 $has_rbac_access =
$GLOBALS[
'DIC']->access()->checkAccess(
328 'edit_submissions_grades',
330 $this->exercise->getRefId()
332 if ($has_rbac_access) {
333 include_once
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
338 'auto_complete_name' =>
$lng->txt(
'user'),
339 'submit_name' =>
$lng->txt(
'add'),
340 'add_search' =>
true,
341 'add_from_container' => $this->exercise->getRefId()
347 if (count($ass) > 0) {
348 if ($has_rbac_access) {
349 $ilToolbar->addSeparator();
353 $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
355 $ilCtrl->setParameter($this,
"ass_id", $this->assignment->getId());
358 include_once(
"./Modules/Exercise/classes/class.ilExAssignmentTeam.php");
360 $ilToolbar->addButton(
361 $this->lng->txt(
"exc_adopt_group_teams"),
362 $this->ctrl->getLinkTarget($this,
"adoptTeamsFromGroup")
365 $ilToolbar->addSeparator();
367 } elseif ($this->exercise->hasTutorFeedbackFile()) {
369 $ilToolbar->addButton(
370 $this->lng->txt(
"exc_multi_feedback"),
371 $this->ctrl->getLinkTarget($this,
"showMultiFeedback")
374 $ilToolbar->addSeparator();
379 $ilToolbar->addFormButton(
$lng->txt(
"exc_list_text_assignment"),
"listTextAssignment");
381 $ilToolbar->addFormButton(
$lng->txt(
"download_all_returned_files"),
"downloadAll");
384 $this->ctrl->setParameter($this,
"vw", self::VIEW_ASSIGNMENT);
386 include_once(
"./Modules/Exercise/classes/class.ilExerciseMemberTableGUI.php");
389 $exc_tab->getHTML() .
396 $ilCtrl->setParameter($this,
"ass_id",
"");
404 include_once(
"./Modules/Exercise/classes/class.ilExerciseMemberTableGUI.php");
407 $exc_tab->writeFilterToSession();
414 include_once(
"./Modules/Exercise/classes/class.ilExerciseMemberTableGUI.php");
417 $exc_tab->resetFilter();
430 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
432 if (is_array(
$_POST[
"lcomment"])) {
433 foreach (
$_POST[
"lcomment"] as $k => $v) {
434 $marks_obj =
new ilLPMarks($this->exercise->getId(), (int) $k);
437 $marks_obj->update();
441 $ilCtrl->redirect($this,
"showGradesOverview");
460 $ilCtrl->redirect($this,
"members");
463 $ilTabs->clearTargets();
464 $ilTabs->setBackTarget(
466 $ilCtrl->getLinkTarget($this,
"members")
469 if ($a_show_peer_review) {
470 $cmd =
"listTextAssignmentWithPeerReview";
472 $cmd =
"listTextAssignment";
474 include_once
"Modules/Exercise/classes/class.ilExAssignmentListTextTableGUI.php";
485 if (!strlen(trim(
$_POST[
'user_login']))) {
493 foreach (
$users as $user) {
501 $user_ids[] = $user_id;
516 if (!count($a_user_ids)) {
521 if (!$this->exercise->members_obj->assignMembers($a_user_ids)) {
544 $this->ctrl->redirect($this,
"members");
569 $this->ctrl->setParameter($this,
"ass_id",
"");
572 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
574 $members = $this->exercise->members_obj->getMembers();
576 $members =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
577 'edit_submissions_grades',
578 'edit_submissions_grades',
579 $this->exercise->getRefId(),
584 if (count($members) == 0) {
590 foreach ($members as $mem_id) {
592 include_once(
"./Services/User/classes/class.ilObjUser.php");
594 if (trim(
$name[
"login"]) !=
"") {
595 $mems[$mem_id] =
$name;
602 if (
$_GET[
"part_id"] ==
"" && count($mems) > 0) {
603 $_GET[
"part_id"] = key($mems);
606 $current_participant =
$_GET[
"part_id"];
609 if (count($mems) > 1) {
611 foreach ($mems as $k =>
$m) {
613 $m[
"lastname"] .
", " .
$m[
"firstname"] .
" [" .
$m[
"login"] .
"]";
615 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
618 $si->setValue($current_participant);
619 $ilToolbar->addStickyItem(
$si);
621 include_once(
"./Services/UIComponent/Button/classes/class.ilSubmitButton.php");
623 $button->setCaption(
"exc_select_part");
624 $button->setCommand(
"selectParticipant");
625 $ilToolbar->addStickyItem($button);
627 $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
630 if (count($mems) > 0) {
631 $this->ctrl->setParameter($this,
"vw", self::VIEW_PARTICIPANT);
632 $this->ctrl->setParameter($this,
"part_id", $current_participant);
634 include_once(
"./Modules/Exercise/classes/class.ilExParticipantTableGUI.php");
641 $tpl->setContent($part_tab->getHTML() .
650 include_once(
"./Modules/Exercise/classes/class.ilExParticipantTableGUI.php");
652 $exc_tab->resetOffset();
653 $exc_tab->writeFilterToSession();
660 include_once(
"./Modules/Exercise/classes/class.ilExParticipantTableGUI.php");
662 $exc_tab->resetOffset();
663 $exc_tab->resetFilter();
689 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
691 $mems = $mem_obj->getMembers();
693 $mems =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
694 'edit_submissions_grades',
695 'edit_submissions_grades',
696 $this->exercise->getRefId(),
699 if (count($mems) > 0) {
700 $ilToolbar->addButton(
701 $lng->txt(
"exc_export_excel"),
702 $ilCtrl->getLinkTarget($this,
"exportExcel")
706 $this->ctrl->setParameter($this,
"vw", self::VIEW_GRADES);
708 include_once(
"./Modules/Exercise/classes/class.ilExGradesTableGUI.php");
711 "showGradesOverview",
715 $tpl->setContent($grades_tab->getHTML());
725 if (
$_GET[
"member_id"] !=
"") {
727 $members = $submission->getUserIds();
729 $members = array_keys($members);
734 foreach ($members as $user_id) {
735 $member_status = $this->assignment->getMemberStatus($user_id);
736 $member_status->setFeedback(
true);
737 $member_status->update();
741 $logins = implode($logins,
",");
744 $sig = chr(13) . chr(10) . chr(13) . chr(10);
745 $sig .= $this->lng->txt(
'exc_mail_permanent_link');
746 $sig .= chr(13) . chr(10) . chr(13) . chr(10);
747 include_once
'./Services/Link/classes/class.ilLink.php';
749 $sig = rawurlencode(base64_encode($sig));
751 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
772 foreach ($this->exercise->members_obj->getMembers() as $member_id) {
774 $submission->updateTutorDownloadTime();
779 foreach ($submission->getFiles() as
$file) {
784 $members[$member_id][
"name"] = $tmp_obj->getFirstname() .
" " . $tmp_obj->getLastname();
795 if ($this->assignment) {
798 $this->ctrl->redirect($this,
"members");
801 foreach (array_keys(
$_POST[
"member"]) as $user_id) {
803 $tmembers = $submission->getUserIds();
804 if (!(
bool) $a_keep_teams) {
805 foreach ($tmembers as $tuser_id) {
806 $members[$tuser_id] = 1;
810 $members[] = $tmembers;
813 $members[] = $user_id;
822 $this->ctrl->redirect($this,
"showParticipant");
825 $user_id =
$_GET[
"part_id"];
827 include_once
"Modules/Exercise/classes/class.ilExAssignment.php";
828 foreach (array_keys(
$_POST[
"ass"]) as $ass_id) {
830 $tmembers = $submission->getUserIds();
831 if (!(
bool) $a_keep_teams) {
832 foreach ($tmembers as $tuser_id) {
833 $members[$ass_id][] = $tuser_id;
837 $members[$ass_id][] = $tmembers;
840 $members[$ass_id][] = $user_id;
857 if ($this->assignment) {
858 $this->exercise->sendAssignment($this->assignment, array_keys($members));
859 $this->ctrl->redirect($this,
"members");
861 foreach ($members as $ass_id =>
$users) {
864 $this->ctrl->setParameter($this,
"part_id",
$_GET[
"part_id"]);
865 $this->ctrl->redirect($this,
"showParticipant");
880 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
882 $cgui->setFormAction(
$ilCtrl->getFormAction($this));
883 $cgui->setHeaderText(
$lng->txt(
"exc_msg_sure_to_deassign_participant"));
884 $cgui->setCancel(
$lng->txt(
"cancel"),
"members");
885 $cgui->setConfirm(
$lng->txt(
"remove"),
"deassignMembers");
887 include_once(
"./Services/User/classes/class.ilUserUtil.php");
888 foreach ($members as $k =>
$m) {
896 $tpl->setContent($cgui->getHTML());
909 foreach (array_keys($members) as $usr_id) {
910 $this->exercise->members_obj->deassignMember((
int) $usr_id);
913 $ilCtrl->redirect($this,
"members");
918 if (!isset(
$_POST[
'comments_value'])) {
922 $this->exercise->members_obj->setNoticeForMember(
937 $member_id = (int)
$_GET[
"part_id"];
939 foreach (array_keys(
$_POST[
"id"]) as $ass_id) {
940 if (is_array($a_selected) &&
941 !in_array($ass_id, $a_selected)) {
949 if (array_key_exists(
"mark",
$_POST)) {
952 if (array_key_exists(
"notice",
$_POST)) {
957 $ilCtrl->setParameter($this,
"part_id", $member_id);
965 $filtered_user_ids =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
966 'edit_submissions_grades',
967 'edit_submissions_grades',
968 $this->exercise->getRefId(),
973 foreach ($filtered_user_ids as $user_id) {
974 if (is_array($a_selected) &&
975 !in_array($user_id, $a_selected)) {
983 if (array_key_exists(
"mark",
$_POST)) {
986 if (array_key_exists(
"notice",
$_POST)) {
997 if ($this->assignment) {
1011 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
1013 $saved_for =
array();
1014 foreach ($a_data as $ass_id =>
$users) {
1015 $ass = ($ass_id < 0)
1018 foreach (
$users as $user_id => $values) {
1021 foreach ($submission->getUserIds() as $sub_user_id) {
1023 $saved_for[$sub_user_id] = $uname[
"lastname"] .
", " . $uname[
"firstname"];
1025 $member_status = $ass->getMemberStatus($sub_user_id);
1028 $status = $values[
"status"];
1029 if ($status ==
"") {
1030 $status =
"notgraded";
1032 $member_status->setStatus($status);
1033 if (array_key_exists(
"mark", $values)) {
1034 $member_status->setMark($values[
"mark"]);
1036 if (array_key_exists(
"notice", $values)) {
1037 $member_status->setNotice($values[
"notice"]);
1039 $member_status->update();
1044 if (count($saved_for) > 0) {
1045 $save_for_str =
"(" . implode($saved_for,
" - ") .
")";
1061 if ($this->ctrl->isAsynch()) {
1062 $ass_id = (int)
$_POST[
"ass_id"];
1063 $user_id = (int)
$_POST[
"mem_id"];
1066 if ($ass_id && $user_id) {
1068 $user_ids = $submission->getUserIds();
1071 $all_members = $all_members->getMembers();
1073 $reci_ids =
array();
1074 foreach ($user_ids as $user_id) {
1075 if (in_array($user_id, $all_members)) {
1076 $member_status = $this->assignment->getMemberStatus($user_id);
1078 $member_status->setFeedback(
true);
1079 $member_status->update();
1082 $reci_ids[] = $user_id;
1087 if (
sizeof($reci_ids)) {
1089 $this->exercise->sendFeedbackFileNotification(
1101 echo(json_encode(
$res));
1110 $this->exercise->exportGradesExcel();
1125 $new_members =
array();
1127 include_once
"Modules/Exercise/classes/class.ilExAssignmentTeam.php";
1128 foreach ($members as $group) {
1129 if (is_array($group)) {
1130 $new_members = array_merge($new_members, $group);
1132 $first_user = $group;
1133 $first_user = array_shift($first_user);
1135 foreach ($group as $user_id) {
1136 $team->removeTeamMember($user_id);
1139 $new_members[] = $group;
1143 if (
sizeof($new_members)) {
1146 $first_user = array_shift($new_members);
1148 if (
sizeof($new_members)) {
1149 foreach ($new_members as $user_id) {
1150 $team->addTeamMember($user_id);
1155 $submission =
new ilExSubmission($this->assignment, $first_user);
1156 $this->exercise->processExerciseStatus(
1158 $team->getMembers(),
1159 $submission->hasSubmitted(),
1160 $submission->validatePeerReviews()
1165 $ilCtrl->redirect($this,
"members");
1174 include_once
"Modules/Exercise/classes/class.ilExAssignmentTeam.php";
1175 foreach ($members as $group) {
1177 if (is_array($group)) {
1180 $first_user = $group;
1181 $first_user = array_shift($first_user);
1183 foreach ($group as $user_id) {
1184 $team->removeTeamMember($user_id);
1188 $this->exercise->processExerciseStatus(
1197 $ilCtrl->redirect($this,
"members");
1207 $ilTabs->clearTargets();
1208 $ilTabs->setBackTarget(
1216 $tpl->setContent($a_form->getHTML());
1223 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1225 $form->setTitle(
$lng->txt(
"exc_adopt_group_teams") .
" - " . $this->assignment->getTitle());
1226 $form->setFormAction($this->ctrl->getFormAction($this,
"createTeamsFromGroups"));
1228 include_once
"Modules/Exercise/classes/class.ilExAssignmentTeam.php";
1229 include_once
"Services/User/classes/class.ilUserUtil.php";
1230 $all_members =
array();
1232 if (
sizeof($group[
"members"])) {
1235 foreach ($group[
"members"] as $user_id) {
1238 if (!in_array($user_id, $all_members)) {
1239 $grp_value[] = $user_id;
1240 $all_members[] = $user_id;
1244 foreach (
$options as $user_id => $user_name) {
1247 $grp_team->setValue($grp_value);
1248 $form->addItem($grp_team);
1251 $grp_team->setValue(
$lng->txt(
"exc_adopt_group_teams_no_members"));
1252 $form->addItem($grp_team);
1256 if (
sizeof($all_members)) {
1257 $form->addCommandButton(
"createTeamsFromGroups",
$lng->txt(
"save"));
1259 $form->addCommandButton(
"members",
$lng->txt(
"cancel"));
1269 if (
$form->checkInput()) {
1270 include_once
"Services/User/classes/class.ilUserUtil.php";
1272 $all_members = $teams =
array();
1274 foreach (array_keys($map) as $grp_id) {
1275 $postvar =
"grpt_" . $grp_id;
1276 $members =
$_POST[$postvar];
1277 if (is_array($members)) {
1278 $teams[] = $members;
1279 $invalid_team_members =
array();
1281 foreach ($members as $user_id) {
1282 if (!array_key_exists($user_id, $all_members)) {
1283 $all_members[$user_id] = $grp_id;
1286 $invalid_team_members[] = $user_id;
1290 if (
sizeof($invalid_team_members)) {
1294 foreach ($invalid_team_members as $user_id) {
1296 $grp_title = $map[$all_members[$user_id]][
"title"];
1297 $alert[] = sprintf(
$lng->txt(
"exc_adopt_group_teams_conflict"), $user_name, $grp_title);
1299 $input =
$form->getItemByPostVar($postvar);
1300 $input->setAlert(implode(
"<br/>", $alert));
1305 if (
sizeof($teams)) {
1309 $sum =
array(
"added"=>0,
"blocked"=>0);
1310 foreach ($teams as $members) {
1311 foreach ($members as $user_id) {
1312 if (!$this->exercise->members_obj->isAssigned($user_id)) {
1313 $this->exercise->members_obj->assignMember($user_id);
1316 if (!in_array($user_id, $existing_users)) {
1323 $first = array_shift($members);
1329 if (
sizeof($members)) {
1330 foreach ($members as $user_id) {
1331 $team->addTeamMember($user_id);
1337 if ($sum[
"added"]) {
1338 $mess[] = sprintf(
$lng->txt(
"exc_adopt_group_teams_added"), $sum[
"added"]);
1340 if ($sum[
"blocked"]) {
1341 $mess[] = sprintf(
$lng->txt(
"exc_adopt_group_teams_blocked"), $sum[
"blocked"]);
1343 if ($sum[
"added"]) {
1349 $this->ctrl->redirect($this,
"members");
1355 $form->setValuesByPost();
1368 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1370 $form->addCommandButton(
"uploadMultiFeedback",
$lng->txt(
"upload"));
1371 $form->addCommandButton(
"members",
$lng->txt(
"cancel"));
1376 $fi->setRequired(
true);
1377 $form->addItem($fi);
1380 $form->setFormAction($this->ctrl->getFormAction($this,
"uploadMultiFeedback"));
1402 include_once(
"./Services/UIComponent/Button/classes/class.ilLinkButton.php");
1404 $button->setCaption(
"exc_download_zip_structure");
1405 $button->setUrl($this->ctrl->getLinkTarget($this,
"downloadMultiFeedbackZip"));
1406 $button->setOmitPreventDoubleSubmission(
true);
1407 $ilToolbar->addButtonInstance($button);
1413 $tpl->setContent($a_form->getHTML());
1421 $this->assignment->sendMultiFeedbackStructureFile($this->exercise);
1431 if (
$form->checkInput()) {
1434 $this->ctrl->redirect($this,
"showMultiFeedbackConfirmationTable");
1437 $this->ctrl->redirect($this,
"showMultiFeedback");
1441 $form->setValuesByPost();
1457 include_once(
"./Modules/Exercise/classes/class.ilFeedbackConfirmationTable2GUI.php");
1467 $this->assignment->clearMultiFeedbackDirectory();
1468 $this->ctrl->redirect($this,
"members");
1476 $this->assignment->saveMultiFeedbackFiles(
$_POST[
"file"], $this->exercise);
1479 $this->ctrl->redirect($this,
"members");
1493 include_once
"./Services/UIComponent/Modal/classes/class.ilModalGUI.php";
1495 $modal->setHeading(
$lng->txt(
"exc_individual_deadline"));
1496 $modal->setId(
"ilExcIDl");
1497 $modal->setBody(
'<div id="ilExcIDlBody"></div>');
1498 $modal = $modal->getHTML();
1500 $ajax_url = $this->ctrl->getLinkTarget($this,
"handleIndividualDeadlineCalls",
"",
true,
false);
1502 $tpl->addJavaScript(
"./Modules/Exercise/js/ilExcIDl.js",
true, 3);
1503 $tpl->addOnloadCode(
'il.ExcIDl.init("' . $ajax_url .
'");');
1505 include_once
"Services/Calendar/classes/class.ilCalendarUtil.php";
1516 foreach ($a_data as $item) {
1517 $item = explode(
"_", $item);
1519 $user_id = $item[1];
1521 if (!array_key_exists($ass_id, $ass_tmp)) {
1522 if ($this->assignment &&
1523 $ass_id == $this->assignment->getId()) {
1530 $map[$ass_id][] = $user_id;
1533 return array($map, $ass_tmp);
1541 $this->ctrl->saveParameter($this,
"part_id");
1544 if ((
bool)
$_GET[
"dn"]) {
1546 $this->ctrl->redirect($this, $this->assignment
1548 :
"showParticipant");
1551 include_once
"Modules/Exercise/classes/class.ilExAssignment.php";
1554 if ($_GET[
"idlid"]) {
1556 if (is_array($tmp)) {
1558 echo
$form->getHTML() .
1559 $tpl->getOnLoadCodeForAsynch();
1566 if (substr($id, 0, 3) ==
"dl_") {
1567 $tmp[] = substr($id, 3);
1579 $ass = $ass_map[$ass_id];
1584 foreach (
$users as $user_id) {
1585 $date_field =
$form->getItemByPostVar(
"dl_" . $ass_id .
"_" . $user_id);
1590 $res[$ass_id][$user_id] = $date_field->getDate();
1597 $form->setValuesByPost();
1598 echo
$form->getHTML() .
1599 $tpl->getOnLoadCodeForAsynch();
1602 $ass = $ass_map[$ass_id];
1604 foreach (
$users as $id => $date) {
1605 $ass->setIndividualDeadline($id, $date);
1608 $ass->recalculateLateSubmissions();
1620 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
1622 $form->setFormAction($this->ctrl->getFormAction($this));
1623 $form->setName(
"ilExcIDlForm");
1625 include_once
"Services/User/classes/class.ilUserUtil.php";
1626 foreach ($ids as $ass_id =>
$users) {
1627 $ass = $a_ass_map[$ass_id];
1630 $section->setTitle($ass->getTitle());
1633 include_once(
"./Modules/Exercise/classes/class.ilExAssignmentTeam.php");
1636 $values = $ass->getIndividualDeadlines();
1640 if (is_numeric($id)) {
1647 $team_id = (int) substr($id, 1);
1648 if (array_key_exists($team_id, $teams)) {
1650 foreach ($teams[$team_id]->getMembers() as $member_id) {
1652 $name[] = $uname[
"lastname"] .
", " . $uname[
"firstname"];
1660 $dl->setShowTime(
true);
1661 $dl->setRequired(
true);
1662 $form->addItem($dl);
1664 if (array_key_exists($id, $values)) {
1670 $form->addCommandButton(
"", $this->lng->txt(
"save"));
1680 if ($this->assignment) {
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
initMultiFeedbackForm($a_ass_id)
addMembersObject($a_user_ids=array())
Add new partipant.
static _lookupLogin($a_user_id)
lookup login
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
static _lookupName($a_user_id)
lookup user name
showParticipantObject()
Show Participant.
deassignMembersObject()
Deassign members from exercise.
showGradesOverviewObject()
Show grades overview.
static getAssignmentDataOfExercise($a_exc_id)
Get assignments data of an exercise in an array.
This class represents an option in a checkbox group.
exportExcelObject()
Export as excel.
static getAdoptableGroups($a_exc_ref_id)
static getGroupMembersMap($a_exc_ref_id)
static initDateTimePicker()
createTeamsFromGroupsObject()
static getAssignmentTeamMap($a_ass_id)
Get team structure for assignment.
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data
static getInstancesFromMap($a_assignment_id)
saveStatusParticipantObject(array $a_selected=null)
Save assignment status (participant view)
getMultiActionUserIds($a_keep_teams=false)
static _before(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
parseIndividualDeadlineData(array $a_data)
Exercise participant table.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
saveStatusAllObject(array $a_selected=null, $a_redirect=true)
resetOffset($a_in_determination=false)
Reset offset.
if(!array_key_exists('StateId', $_REQUEST)) $id
static _lookupId($a_user_str)
Lookup id by login.
showMultiFeedbackObject(ilPropertyFormGUI $a_form=null)
Show multi-feedback screen.
addUserFromAutoCompleteObject()
Add user as member.
static downloadAllAssignmentFiles(ilExAssignment $a_ass, array $members)
Download all submitted files of an assignment (all user)
static hasAnySubmissions($a_ass_id)
showParticipantResetObject()
selectParticipantObject()
Select participant.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
setTableId($a_val)
Set table id.
__construct(ilObjExercise $a_exercise, ilExAssignment $a_ass=null)
Constructor.
redirectFeedbackMailObject()
set feedback status for member and redirect to mail screen
handleIndividualDeadlineCallsObject()
saveStatus(array $a_data, $a_redirect=true)
Save status of selecte members.
addSubTabs($a_activate)
adds tabs to tab gui object
foreach($_POST as $key=> $value) $res
if(isset($_POST['submit'])) $form
static getInstanceByUserId($a_assignment_id, $a_user_id, $a_create_on_demand=false)
uploadMultiFeedbackObject()
Upload multi feedback file.
static getInstancesByExercise($a_exc_id)
downloadMultiFeedbackZipObject()
Download multi-feedback structrue file.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
selectAssignmentObject()
Select assignment.
showParticipantApplyObject()
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
saveGradesObject()
Save grades.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
listTextAssignmentObject($a_show_peer_review=false)
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
Class ilExerciseManagementGUI.
confirmDeassignMembersObject()
Confirm deassigning members.
static getInstance()
Get instance.
cancelMultiFeedbackObject()
Cancel Multi Feedback.
sendMembersObject()
Send assignment per mail to participants.
This class represents a non editable value in a property form.
create()
Create directory.
membersObject()
All participants and submission of one assignment.
initIndividualDeadlineModal()
saveCommentForLearnersObject()
Save comment for learner (asynch)
adoptTeamsFromGroupObject(ilPropertyFormGUI $a_form=null)
showMultiFeedbackConfirmationTableObject()
Show multi feedback confirmation table.
listTextAssignmentWithPeerReviewObject()
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
static fillAutoCompleteToolbar($parent_object, ilToolbarGUI $toolbar=null, $a_options=array(), $a_sticky=false)
fill toolbar with
saveMultiFeedbackObject()
Save multi feedback.
File System Explorer GUI class.
static redirect($a_script)
saveStatusSelectedObject()
Exercise participant table.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
Object-based submissions (ends up as static file)
initIndividualDeadlineForm(array $a_ass_map, array $ids)
static lookupTitle($a_id)
Lookup title.
downloadAllObject()
Download all submitted files (of all members).
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
setIndividualDeadlineObject()
Confirmation screen class.
Exercise exceptions class.