49 protected \ILIAS\Exercise\InternalGUIService
$gui;
50 protected \ILIAS\HTTP\Services
$http;
102 $this->ui_factory = $DIC->ui()->factory();
103 $this->ui_renderer = $DIC->ui()->renderer();
104 $this->
user = $DIC->user();
105 $this->
toolbar = $DIC->toolbar();
107 $this->
access = $DIC->access();
109 $this->
ctrl = $DIC->ctrl();
110 $this->tabs_gui = $DIC->tabs();
111 $this->
lng = $DIC->language();
112 $this->tpl = $DIC[
"tpl"];
114 $this->task_factory = $DIC->backgroundTasks()->taskFactory();
116 $this->request = $DIC->exercise()->internal()->gui()->request();
122 if ($a_ass !== null) {
123 $this->assignment = $a_ass;
124 $this->ass_id = $this->assignment->getId();
126 $this->requested_member_id = $request->
getMemberId();
128 $this->requested_ass_id = $request->
getAssId();
129 $this->requested_idl_id = $request->
getIdlId();
130 $this->done = $request->
getDone();
132 $this->requested_comment = $request->
getComment();
138 $this->requested_marks = $request->
getMarks();
139 $this->requested_status = $request->
getStatus();
142 $this->requested_files = $request->
getFiles();
146 $this->
ctrl->saveParameter($this, array(
"vw",
"member_id"));
147 $this->
http = $DIC->http();
148 $this->
ctrl->saveParameter($this, array(
"part_id"));
149 $this->gui = $DIC->exercise()->internal()->gui();
150 $this->html_util = $this->gui->html();
163 $class = $ilCtrl->getNextClass($this);
167 case "ilfilesystemgui":
169 $ilTabs->setBackTarget(
171 $ilCtrl->getLinkTarget($this, $this->
getViewBack())
174 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"exc_fb_tutor_info"));
179 $submission =
new ilExSubmission($this->assignment, $this->requested_member_id);
180 $feedback_id = $submission->getFeedbackId();
181 $noti_rec_ids = $submission->getUserIds();
184 foreach ($noti_rec_ids as $rec_id) {
187 $fs_title = implode(
" / ", $fs_title);
189 $fs_gui =
new ilFileSystemGUI($fstorage->getFeedbackPath($feedback_id));
190 $fs_gui->
setTableId(
"excfbfil" . $this->assignment->getId() .
"_" . $feedback_id);
191 $fs_gui->setAllowDirectories(
false);
192 $fs_gui->setTitle($lng->
txt(
"exc_fb_files") .
" - " .
193 $this->assignment->getTitle() .
" - " .
195 $pcommand = $fs_gui->getLastPerformedCommand();
196 if (is_array($pcommand) && ($pcommand[
"cmd"] ??
"") ==
"create_file") {
197 foreach ($noti_rec_ids as $user_id) {
198 $member_status = $this->assignment->getMemberStatus($user_id);
199 $member_status->setFeedback(
true);
200 $member_status->update();
203 $this->exercise->sendFeedbackFileNotification(
204 $pcommand[
"name"] ??
"",
206 $this->assignment->getId()
209 $this->
ctrl->forwardCommand($fs_gui);
212 case 'ilrepositorysearchgui':
214 $ref_id = $this->exercise->getRefId();
215 $rep_search->addUserAccessFilterCallable(
function ($a_user_ids) use (
$ref_id) {
216 return $GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
217 'edit_submissions_grades',
218 'edit_submissions_grades',
223 $rep_search->setTitle($this->
lng->txt(
"exc_add_participant"));
224 $rep_search->setCallback($this,
'addMembersObject');
228 $this->
ctrl->setReturn($this,
'members');
230 $this->
ctrl->forwardCommand($rep_search);
233 case "ilexsubmissionteamgui":
235 $ilCtrl->forwardCommand($gui);
238 case "ilexsubmissionfilegui":
240 $ilCtrl->forwardCommand($gui);
243 case "ilexsubmissiontextgui":
244 $ilCtrl->saveParameter($this, array(
"part_id"));
246 $ilCtrl->forwardCommand($gui);
249 case "ilexpeerreviewgui":
251 $ilCtrl->forwardCommand($gui);
255 $cmd = $ilCtrl->getCmd();
257 case 'downloadSubmissions':
258 $cmd = $ilCtrl->getCmd(
"downloadSubmissions");
261 $cmd = $ilCtrl->getCmd(
"listPublicSubmissions");
264 $this->{$cmd .
"Object"}();
271 switch ($this->request->getBackView()) {
272 case self::VIEW_PARTICIPANT:
273 $back_cmd =
"showParticipant";
276 case self::VIEW_GRADES:
277 $back_cmd =
"showGradesOverview";
282 $back_cmd =
"members";
291 $this->
ctrl->setReturn($this, $back_cmd);
293 $this->tabs_gui->clearTargets();
294 $this->tabs_gui->setBackTarget(
295 $this->
lng->txt(
"back"),
296 $this->
ctrl->getLinkTarget($this, $back_cmd)
299 return new ilExSubmission($this->assignment, $this->requested_member_id, null,
true);
308 $ass_id = $this->assignment !== null ? $this->assignment->getId() : 0;
311 $ilCtrl->setParameter($this,
"vw",
"");
312 $ilCtrl->setParameter($this,
"member_id",
"");
313 $ilCtrl->setParameter($this,
"ass_id",
"");
314 $ilCtrl->setParameter($this,
"part_id",
"");
318 $lng->
txt(
"exc_assignment_view"),
319 $ilCtrl->getLinkTarget($this,
"members")
323 $lng->
txt(
"exc_participant_view"),
324 $ilCtrl->getLinkTarget($this,
"showParticipant")
328 $lng->
txt(
"exc_grades_overview"),
329 $ilCtrl->getLinkTarget($this,
"showGradesOverview")
331 $ilTabs->activateSubTab($a_activate);
333 $ilCtrl->setParameter($this,
"ass_id", $ass_id);
334 $ilCtrl->setParameter($this,
"part_id", $part_id);
345 $ilCtrl->
setParameterByClass(
"ilExSubmissionFileGUI",
"member_id", $this->requested_member_id);
346 $url = $ilCtrl->getLinkTargetByClass(array(
"ilExerciseHandlerGUI",
"ilObjExerciseGUI",
"ilExerciseManagementGUI",
"ilExSubmissionFileGUI"),
"downloadNewReturned");
347 $js_url = $ilCtrl->getLinkTargetByClass(array(
"ilExerciseHandlerGUI",
"ilObjExerciseGUI",
"ilExerciseManagementGUI",
"ilExSubmissionFileGUI"),
"downloadNewReturned",
"",
"",
false);
348 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"exc_wait_for_files") .
"<a href='$url'> " . $lng->
txt(
'exc_download_files') .
"</a><script>window.location.href ='" . $js_url .
"';</script>");
368 if ($this->assignment === null && count($ass) > 0) {
369 $this->assignment = current($ass);
373 if (count($ass) > 1) {
375 foreach ($ass as
$a) {
376 $options[$a->getId()] = $a->getTitle();
379 $si->setOptions($options);
380 $si->setValue($this->assignment->getId());
381 $ilToolbar->addStickyItem($si,
true);
383 $button->setCaption(
"select");
384 $button->setCommand(
"selectAssignment");
385 $ilToolbar->addStickyItem($button);
387 $ilToolbar->addSeparator();
390 elseif ($this->assignment) {
391 $ilCtrl->setParameter($this,
"ass_id", $this->assignment->getId());
397 $has_rbac_access =
$GLOBALS[
'DIC']->access()->checkAccess(
398 'edit_submissions_grades',
400 $this->exercise->getRefId()
402 if ($has_rbac_access) {
407 'auto_complete_name' => $lng->
txt(
'user'),
408 'submit_name' => $lng->
txt(
'add'),
409 'add_search' =>
true,
410 'add_from_container' => $this->exercise->getRefId()
417 if ($has_rbac_access) {
418 $ilToolbar->addSeparator();
422 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
424 $ilCtrl->setParameter($this,
"ass_id", $this->assignment->getId());
428 $ilToolbar->addButton(
429 $this->
lng->txt(
"exc_adopt_group_teams"),
430 $this->
ctrl->getLinkTarget($this,
"adoptTeamsFromGroup")
433 $ilToolbar->addSeparator();
435 } elseif ($this->exercise->hasTutorFeedbackFile()) {
436 if (!$this->assignment->getAssignmentType()->usesTeams()) {
438 $ilToolbar->addButton(
439 $this->
lng->txt(
"exc_multi_feedback"),
440 $this->
ctrl->getLinkTarget($this,
"showMultiFeedback")
443 $ilToolbar->addSeparator();
447 $submission_repository = $this->service->repo()->submission();
449 if ($submission_repository->hasSubmissions($this->assignment->getId()) !== 0) {
450 $ass_type = $this->assignment->getType();
453 $ilToolbar->addFormButton($lng->
txt(
"exc_list_text_assignment"),
"listTextAssignment");
455 $ilToolbar->addFormButton($lng->
txt(
"download_all_returned_files"),
"downloadSubmissions");
457 $this->
ctrl->setParameter($this,
"vw", self::VIEW_ASSIGNMENT);
461 $exc_tab->getHTML() .
465 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"exc_no_assignments_available"));
468 $ilCtrl->setParameter($this,
"ass_id",
"");
477 $this->exercise->getRefId(),
478 $this->exercise->getId(),
483 if ($download_task->run()) {
484 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'exc_down_files_started_bg'),
true);
487 if ($this->assignment !== null) {
488 $this->
ctrl->redirect($this,
"members");
490 $this->
ctrl->redirect($this,
"showParticipant");
502 $exc_tab->writeFilterToSession();
514 $exc_tab->resetFilter();
524 foreach ($this->requested_learning_comments as $k => $v) {
525 $marks_obj =
new ilLPMarks($this->exercise->getId(), (
int) $k);
526 $marks_obj->setComment($this->html_util->strip($v));
527 $marks_obj->update();
529 foreach ($this->requested_marks as $k => $v) {
530 $marks_obj =
new ilLPMarks($this->exercise->getId(), (
int) $k);
531 $marks_obj->setMark($this->html_util->strip($v));
532 $marks_obj->update();
534 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"exc_msg_saved_grades"),
true);
535 $ilCtrl->redirect($this,
"showGradesOverview");
545 public function listTextAssignmentObject():
void 551 $button_print = $this->ui_factory->button()->standard($this->
lng->txt(
'print'),
"#")
553 return "$('#$id').click(function() { window.print(); return false; });";
555 $this->
toolbar->addSeparator();
556 $this->
toolbar->addComponent($button_print);
558 $group_panels_tpl =
new ilTemplate(
"tpl.exc_group_report_panels.html",
true,
true,
"Modules/Exercise");
559 $group_panels_tpl->setVariable(
'TITLE', $this->
lng->txt(
"exc_list_text_assignment") .
": " . $this->assignment->getTitle());
571 $submission_data = $this->assignment->getExerciseMemberAssignmentData((
int) $file[
"user_id"], $this->
filter[
"status"] ??
"");
573 if (is_array($submission_data)) {
574 $data = array_merge($feedback_data, $submission_data);
580 if ($total_reports == 0) {
581 $mess = $this->ui_factory->messageBox()->info($this->
lng->txt(
"fiter_no_results"));
582 $report_html .= $this->ui_renderer->render($mess);
585 $group_panels_tpl->setVariable(
'CONTENT', $report_html);
586 $this->tpl->setContent($group_panels_tpl->get());
598 $group_panels_tpl =
new ilTemplate(
"tpl.exc_group_report_panels.html",
true,
true,
"Modules/Exercise");
599 $group_panels_tpl->setVariable(
'TITLE', $this->
lng->txt(
"exc_compare_selected_submissions"));
606 foreach ($participants as $participant_id) {
607 $submission =
new ilExSubmission($this->assignment, $participant_id);
610 $files = $submission->getFiles();
611 $file = reset($files);
615 "user_id" => $participant_id,
623 $submission_data = $this->assignment->getExerciseMemberAssignmentData((
int) $file[
"user_id"], $this->
filter[
"status"] ??
"");
625 if (is_array($submission_data)) {
626 $data = array_merge($feedback_data, $submission_data);
632 $group_panels_tpl->setVariable(
'CONTENT', $report_html);
633 $this->tpl->setContent($group_panels_tpl->get());
643 $this->
ctrl->setParameter($this,
"member_id", $a_data[
'uid']);
645 $this->ui_factory->button()->shy($this->
lng->txt(
"grade_evaluate"),
"#")->withOnClick($modal->getShowSignal())
648 if ($this->exercise->hasTutorFeedbackMail()) {
649 $actions[] = $this->ui_factory->button()->shy(
650 $this->
lng->txt(
"exc_tbl_action_feedback_mail"),
651 $this->
ctrl->getLinkTarget($this,
"redirectFeedbackMail")
654 if ($this->exercise->hasTutorFeedbackFile()) {
655 $actions[] = $this->ui_factory->button()->shy(
656 $this->
lng->txt(
"exc_tbl_action_feedback_file"),
657 $this->
ctrl->getLinkTargetByClass(
"ilFileSystemGUI",
"listFiles")
661 $this->
ctrl->setParameter($this,
"member_id",
"");
663 $actions_dropdown = $this->ui_factory->dropdown()->standard($actions);
664 if ($a_data[
'status'] == self::GRADE_NOT_GRADED) {
665 $str_status_key = $this->
lng->txt(
'exc_tbl_status');
666 $str_status_value = $this->
lng->txt(
'not_yet');
668 $str_status_key = $this->
lng->txt(
'exc_tbl_status_time');
672 $str_mark_key = $this->
lng->txt(
"exc_tbl_mark");
673 $str_mark_value = $this->
lng->txt(
'not_yet');
675 if (($a_data[
'mark'] !=
"")) {
676 $str_mark_value = $a_data[
'mark'];
679 if ($a_data[
'feedback_time']) {
680 $str_evaluation_key = $this->
lng->txt(
'exc_tbl_feedback_time');
683 $str_evaluation_key = $this->
lng->txt(
'exc_settings_feedback');
684 $str_evaluation_value = $this->
lng->txt(
'not_yet');
687 $card_content = array(
689 $str_status_key => $str_status_value,
690 $str_mark_key => $str_mark_value,
691 $str_evaluation_key => $str_evaluation_value,
692 $this->
lng->txt(
'feedback_given') => $a_data[
'fb_given'],
693 $this->
lng->txt(
'feedback_received') => $a_data[
'fb_received']
695 $card_tpl =
new ilTemplate(
"tpl.exc_report_details_card.html",
true,
true,
"Modules/Exercise");
696 foreach ($card_content as
$key => $value) {
697 $card_tpl->setCurrentBlock(
"assingment_card");
698 $card_tpl->setVariable(
"ROW_KEY",
$key);
699 $card_tpl->setVariable(
"ROW_VALUE", $value);
700 $card_tpl->parseCurrentBlock();
703 $main_panel = $this->ui_factory->panel()->sub($a_data[
'uname'], $this->ui_factory->legacy($a_data[
'utext']))
704 ->withFurtherInformation($this->ui_factory->card()->standard($this->
lng->txt(
'text_assignment'))->withSections(array($this->ui_factory->legacy($card_tpl->get()))))->withActions($actions_dropdown);
706 $feedback_tpl =
new ilTemplate(
"tpl.exc_report_feedback.html",
true,
true,
"Modules/Exercise");
708 $filter_feedback = $this->
filter[
"feedback"] ??
"";
709 if (array_key_exists(
"peer", $a_data) && (($filter_feedback == self::FEEDBACK_FULL_SUBMISSION) || $filter_feedback ==
"")) {
710 $feedback_tpl->setCurrentBlock(
"feedback");
711 foreach ($a_data[
"peer"] as $peer_id) {
716 $peer_name = $this->
lng->txt(
"exc_deleted_user");
719 $feedback_tpl->setCurrentBlock(
"peer_feedback");
720 $feedback_tpl->setVariable(
"PEER_NAME", $peer_name);
722 $submission =
new ilExSubmission($this->assignment, $a_data[
"uid"]);
723 $values = $submission->getPeerReview()->getPeerReviewValues($peer_id, $a_data[
"uid"]);
726 foreach ($this->assignment->getPeerReviewCriteriaCatalogueItems() as $crit) {
727 $crit_id = $crit->getId()
730 $crit->setPeerReviewContext($this->assignment, $peer_id, $a_data[
"uid"]);
733 '<div class="ilBlockPropertyCaption">' . $crit->getTitle() .
'</div>' .
734 '<div style="margin:2px 0;">' . $crit->getHTML($values[$crit_id] ?? null) .
'</div>';
736 $feedback_tpl->setVariable(
"PEER_FEEDBACK", $review_html);
737 $feedback_tpl->parseCurrentBlock();
739 $feedback_tpl->parseCurrentBlock();
741 $feedback_tpl->setVariable(
"GRADE", $this->
lng->txt(
'grade') .
": " . $this->
lng->txt(
'exc_' . $a_data[
'status']));
742 $feedback_tpl->setVariable(
"COMMENT", $this->
lng->txt(
'exc_comment') .
"<br>" . $a_data[
'comment']);
744 $feedback_panel = $this->ui_factory->panel()->sub(
"", $this->ui_factory->legacy($feedback_tpl->get()));
746 $report = $this->ui_factory->panel()->report(
"", array($main_panel, $feedback_panel));
748 return $this->ui_renderer->render([$modal,$report]);
754 $modal_tpl =
new ilTemplate(
"tpl.exc_report_evaluation_modal.html",
true,
true,
"Modules/Exercise");
755 $modal_tpl->setVariable(
"USER_NAME", $a_data[
'uname']);
759 if ($this->exercise->hasTutorFeedbackText()) {
762 $u_text = strip_tags($a_data[
"utext"]);
765 if (strlen($u_text) > $max_chars) {
766 $text =
"<input type='checkbox' class='read-more-state' id='post-1' />";
767 $text .=
"<div class='read-more-wrap'>";
768 $text .= mb_substr($u_text, 0, $max_chars);
769 $text .=
"<span class='read-more-target'>";
770 $text .= mb_substr($u_text, $max_chars);
771 $text .=
"</span></div>";
772 $text .=
"<label for='post-1' class='read-more-trigger'></label>";
774 $modal_tpl->setVariable(
"USER_TEXT", $text);
777 $modal_tpl->setVariable(
"FORM", $form->getHTML());
779 $form_id =
'form_' . $form->getId();
780 $submit_btn = $this->ui_factory->button()->primary($this->
lng->txt(
"save"),
'#')
782 return "$('#$id').click(function() { $('#$form_id').submit(); return false; });";
785 return $this->ui_factory->modal()->roundtrip(strtoupper($this->
lng->txt(
"grade_evaluate")), $this->ui_factory->legacy($modal_tpl->get()))->withActionButtons([$submit_btn]);
792 $form->setFormAction($this->
ctrl->getFormAction($this,
"saveEvaluationFromModal"));
793 $form->setId(uniqid(
'form'));
797 self::GRADE_NOT_GRADED => $this->
lng->txt(
"exc_notgraded"),
798 self::GRADE_PASSED => $this->
lng->txt(
"exc_passed"),
799 self::GRADE_FAILED => $this->
lng->txt(
"exc_failed")
802 $si->setOptions($options);
803 $si->setValue($a_data[
'status'] ??
"");
808 $mark_input->setValue($a_data[
'mark'] ??
"");
809 $mark_input->setMaxLength(32);
810 $mark_input->setSize(4);
811 $form->addItem($mark_input);
814 $item->setValue($a_data[
'uid'] ??
"");
815 $form->addItem($item);
818 if ($this->exercise->hasTutorFeedbackText()) {
820 $ta->
setInfo($this->
lng->txt(
"exc_comment_for_learner_info"));
821 $ta->setValue($a_data[
'comment'] ??
"");
840 if ($form->checkInput()) {
841 $comment = trim($form->getInput(
'comment'));
842 $user_id = (
int) $form->getInput(
'mem_id');
843 $grade = trim($form->getInput(
'grade'));
844 $mark = trim($form->getInput(
'mark'));
847 if ($this->assignment->getId() && $user_id > 0) {
848 $member_status = $this->assignment->getMemberStatus($user_id);
851 $member_status->setStatus($grade);
853 $member_status->setMark($mark);
855 $member_status->setFeedback(
true);
857 $member_status->update();
859 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_status_saved"),
true);
860 $this->
ctrl->redirect($this,
"listTextAssignment");
870 if ($this->requested_user_login ==
"") {
871 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_no_search_string'));
875 $users = explode(
',', $this->requested_user_login);
878 foreach ($users as $user) {
882 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'user_not_known'));
887 $user_ids[] = $user_id;
896 if (!count($a_user_ids)) {
897 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
899 if (!$this->exercise->members_obj->assignMembers($a_user_ids)) {
900 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"exc_members_already_assigned"),
true);
902 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_members_assigned"),
true);
905 $this->
ctrl->redirect($this,
"members");
914 $ctrl->
setParameter($this,
"ass_id", $this->requested_ass_id);
930 $this->
ctrl->setParameter($this,
"ass_id",
"");
933 $members = $this->exercise->members_obj->getMembers();
936 'edit_submissions_grades',
937 'edit_submissions_grades',
938 $this->exercise->getRefId(),
943 if (count($members) == 0) {
944 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"exc_no_participants"));
949 foreach ($members as $mem_id) {
952 if (trim(
$name[
"login"]) !=
"") {
953 $mems[$mem_id] =
$name;
960 if ($this->requested_part_id == 0 && $mems !== [] && key($mems) > 0) {
961 $ilCtrl->setParameter($this,
"part_id", key($mems));
962 $ilCtrl->redirect($this,
"showParticipant");
968 if (count($mems) > 1) {
970 foreach ($mems as $k => $m) {
972 $m[
"lastname"] .
", " . $m[
"firstname"] .
" [" . $m[
"login"] .
"]";
975 $si->setOptions($options);
976 $si->setValue($current_participant);
977 $ilToolbar->addStickyItem($si,
true);
979 $button->setCaption(
"select");
980 $button->setCommand(
"selectParticipant");
981 $ilToolbar->addStickyItem($button);
985 $this->
ctrl->setParameter($this,
"vw", self::VIEW_PARTICIPANT);
986 $this->
ctrl->setParameter($this,
"part_id", $current_participant);
988 $ilToolbar->addSeparator();
989 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
990 $ilToolbar->addFormButton($lng->
txt(
"download_all_returned_files"),
"downloadSubmissions");
1001 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"exc_no_assignments_available"));
1010 $exc_tab->resetOffset();
1011 $exc_tab->writeFilterToSession();
1021 $exc_tab->resetOffset();
1022 $exc_tab->resetFilter();
1033 $ctrl->
setParameter($this,
"part_id", $this->requested_part_id);
1034 $ctrl->
redirect($this,
"showParticipant");
1047 $mems = $mem_obj->getMembers();
1049 $mems =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
1050 'edit_submissions_grades',
1051 'edit_submissions_grades',
1052 $this->exercise->getRefId(),
1055 if (count($mems) > 0) {
1056 $ilToolbar->addButton(
1057 $lng->
txt(
"exc_export_excel"),
1058 $ilCtrl->getLinkTarget($this,
"exportExcel")
1062 $this->
ctrl->setParameter($this,
"vw", self::VIEW_GRADES);
1066 "showGradesOverview",
1078 if ($this->requested_member_id > 0) {
1079 $submission =
new ilExSubmission($this->assignment, $this->requested_member_id);
1080 $members = $submission->getUserIds();
1082 $members = array_keys($members);
1085 if ($members !== []) {
1087 foreach ($members as $user_id) {
1088 $member_status = $this->assignment->getMemberStatus($user_id);
1089 $member_status->setFeedback(
true);
1090 $member_status->update();
1094 $logins = implode(
",", $logins);
1097 $sig = chr(13) . chr(10) . chr(13) . chr(10);
1098 $sig .= $this->
lng->txt(
'exc_mail_permanent_link');
1099 $sig .= chr(13) . chr(10) . chr(13) . chr(10);
1101 $sig = rawurlencode(base64_encode($sig));
1109 'rcp_to' => $logins,
1123 public function downloadAllObject():
void 1127 foreach ($this->exercise->members_obj->getMembers() as $member_id) {
1129 $submission->updateTutorDownloadTime();
1135 foreach ($submission->getFiles() as $file) {
1136 if ($this->assignment->getAssignmentType()->isSubmissionAssignedToTeam()) {
1137 $storage_id = $file[
"team_id"];
1139 $storage_id = $file[
"user_id"];
1142 $members[$storage_id][
"files"][$file[
"returned_id"]] = $file;
1144 if ($this->assignment->getAssignmentType()->isSubmissionAssignedToTeam()) {
1145 $name =
"Team " . $submission->getTeam()->getId();
1149 $name = $tmp_obj->getFirstname() .
" " . $tmp_obj->getLastname();
1151 if ($storage_id > 0) {
1152 $members[$storage_id][
"name"] =
$name;
1168 if ($this->assignment !== null) {
1169 if (count($this->selected_participants) == 0) {
1170 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1171 $this->
ctrl->redirect($this,
"members");
1174 foreach ($this->selected_participants as $user_id) {
1176 $tmembers = $submission->getUserIds();
1177 if (!$a_keep_teams) {
1178 foreach ($tmembers as $tuser_id) {
1179 $members[$tuser_id] = 1;
1183 $members[] = $tmembers;
1186 $members[] = $user_id;
1193 if (count($this->selected_ass_ids) == 0) {
1194 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1195 $this->
ctrl->redirect($this,
"showParticipant");
1200 foreach ($this->selected_ass_ids as $ass_id) {
1202 $tmembers = $submission->getUserIds();
1203 if (!$a_keep_teams) {
1204 foreach ($tmembers as $tuser_id) {
1205 $members[
$ass_id][] = $tuser_id;
1209 $members[
$ass_id][] = $tmembers;
1212 $members[
$ass_id][] = $user_id;
1230 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_sent"),
true);
1231 if ($this->assignment !== null) {
1232 $this->exercise->sendAssignment($this->assignment, array_keys($members));
1233 $this->
ctrl->redirect($this,
"members");
1235 foreach ($members as $ass_id => $users) {
1236 $this->exercise->sendAssignment(
new ilExAssignment($ass_id), $users);
1238 $this->
ctrl->setParameter($this,
"part_id", $this->requested_part_id);
1239 $this->
ctrl->redirect($this,
"showParticipant");
1255 $cgui->setFormAction($ilCtrl->getFormAction($this));
1256 $cgui->setHeaderText($lng->
txt(
"exc_msg_sure_to_deassign_participant"));
1257 $cgui->setCancel($lng->
txt(
"cancel"),
"members");
1258 $cgui->setConfirm($lng->
txt(
"remove"),
"deassignMembers");
1259 foreach ($members as $k => $m) {
1280 $member_ids = $this->request->getMemberIds();
1282 foreach ($member_ids as $usr_id) {
1283 $this->exercise->members_obj->deassignMember((
int) $usr_id);
1286 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"exc_msg_participants_removed"),
true);
1287 $ilCtrl->redirect($this,
"members");
1309 foreach ($this->listed_ass_ids as $ass_id) {
1310 if (is_array($selected_ass_ids) &&
1311 !in_array($ass_id, $selected_ass_ids)) {
1316 "status" => $status[$ass_id]
1318 if (isset($marks[$ass_id])) {
1321 if (isset($notices[$ass_id])) {
1326 $ilCtrl->setParameter($this,
"part_id", $member_id);
1334 array $a_selected = null,
1335 bool $a_redirect =
true 1341 $filtered_user_ids =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
1342 'edit_submissions_grades',
1343 'edit_submissions_grades',
1344 $this->exercise->getRefId(),
1349 foreach ($filtered_user_ids as $user_id) {
1350 if (is_array($a_selected) &&
1351 !in_array($user_id, $a_selected)) {
1355 $data[-1][$user_id] = array(
1356 "status" => $status[$user_id] ?? null
1359 if (isset($marks[$user_id])) {
1360 $data[-1][$user_id][
"mark"] = $marks[$user_id];
1362 if (isset($notices[$user_id])) {
1363 $data[-1][$user_id][
"notice"] = $notices[$user_id];
1376 if ($this->assignment !== null) {
1390 bool $a_redirect =
true 1394 $saved_for = array();
1395 foreach ($a_data as $ass_id => $users) {
1396 $ass = ($ass_id < 0)
1399 foreach ($users as $user_id => $values) {
1402 foreach ($submission->getUserIds() as $sub_user_id) {
1404 $saved_for[$sub_user_id] = $uname[
"lastname"] .
", " . $uname[
"firstname"];
1406 $member_status = $ass->getMemberStatus($sub_user_id);
1409 $status = $values[
"status"];
1410 if ($status ==
"") {
1411 $status = self::GRADE_NOT_GRADED;
1413 $member_status->setStatus($status);
1414 if (array_key_exists(
"mark", $values)) {
1415 $member_status->setMark($values[
"mark"]);
1417 if (array_key_exists(
"notice", $values)) {
1418 $member_status->setNotice($values[
"notice"]);
1420 $member_status->update();
1426 if ($saved_for !== []) {
1427 $save_for_str =
"(" . implode(
" - ", $saved_for) .
")";
1431 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_status_saved") .
" " . $save_for_str,
true);
1441 $res = array(
"result" =>
false);
1443 if ($this->
ctrl->isAsynch()) {
1446 $comment = trim($this->requested_comment);
1448 if ($ass_id && $user_id) {
1450 $user_ids = $submission->getUserIds();
1453 $all_members = $all_members->getMembers();
1455 $reci_ids = array();
1456 foreach ($user_ids as $user_id) {
1457 if (in_array($user_id, $all_members)) {
1458 $member_status = $this->assignment->getMemberStatus($user_id);
1460 $member_status->setFeedback(
true);
1461 $member_status->update();
1464 $reci_ids[] = $user_id;
1469 if ($reci_ids !== []) {
1471 $this->exercise->sendFeedbackFileNotification(
1479 $res = array(
"result" =>
true,
"snippet" => nl2br(
$comment));
1483 echo(json_encode(
$res));
1489 $this->exercise->exportGradesExcel();
1507 $new_members = array();
1509 foreach ($members as $group) {
1510 if (is_array($group)) {
1511 $new_members = array_merge($new_members, $group);
1513 $first_user = $group;
1514 $first_user = array_shift($first_user);
1516 foreach ($group as $user_id) {
1517 $team->removeTeamMember($user_id);
1520 $new_members[] = $group;
1524 if ($new_members !== []) {
1527 $first_user = array_shift($new_members);
1529 foreach ($new_members as $user_id) {
1530 $team->addTeamMember($user_id);
1534 $submission =
new ilExSubmission($this->assignment, $first_user);
1535 $this->exercise->processExerciseStatus(
1537 $team->getMembers(),
1538 $submission->hasSubmitted(),
1539 $submission->validatePeerReviews()
1543 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1544 $ilCtrl->redirect($this,
"members");
1556 foreach ($members as $group) {
1558 if (is_array($group)) {
1561 $first_user = $group;
1562 $first_user = array_shift($first_user);
1564 foreach ($group as $user_id) {
1565 $team->removeTeamMember($user_id);
1569 $this->exercise->processExerciseStatus(
1577 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1578 $ilCtrl->redirect($this,
"members");
1589 $ilTabs->clearTargets();
1590 $ilTabs->setBackTarget(
1592 $ilCtrl->getLinkTarget($this, $this->
getViewBack())
1595 if ($a_form === null) {
1606 $form->setTitle($lng->
txt(
"exc_adopt_group_teams") .
" - " . $this->assignment->getTitle());
1607 $form->setFormAction($this->
ctrl->getFormAction($this,
"createTeamsFromGroups"));
1609 $all_members = array();
1611 if (count($group[
"members"]) !== 0) {
1613 $grp_value = $options = array();
1614 foreach ($group[
"members"] as $user_id) {
1616 $options[$user_id] = $user_name;
1617 if (!in_array($user_id, $all_members)) {
1618 $grp_value[] = $user_id;
1619 $all_members[] = $user_id;
1623 foreach ($options as $user_id => $user_name) {
1626 $grp_team->setValue($grp_value);
1629 $grp_team->setValue($lng->
txt(
"exc_adopt_group_teams_no_members"));
1631 $form->addItem($grp_team);
1634 if ($all_members !== []) {
1635 $form->addCommandButton(
"createTeamsFromGroups", $lng->
txt(
"save"));
1637 $form->addCommandButton(
"members", $lng->
txt(
"cancel"));
1652 if ($form->checkInput()) {
1654 $all_members = $teams = array();
1656 foreach (array_keys($map) as $grp_id) {
1657 if (isset($req_members[$grp_id]) && is_array($req_members[$grp_id])) {
1658 $members = $req_members[$grp_id];
1659 $teams[] = $members;
1660 $invalid_team_members = array();
1662 foreach ($members as $user_id) {
1663 if (!array_key_exists($user_id, $all_members)) {
1664 $all_members[$user_id] = $grp_id;
1667 $invalid_team_members[] = $user_id;
1671 if ($invalid_team_members !== []) {
1675 foreach ($invalid_team_members as $user_id) {
1677 $grp_title = $map[$all_members[$user_id]][
"title"];
1678 $alert[] = sprintf($lng->
txt(
"exc_adopt_group_teams_conflict"), $user_name, $grp_title);
1680 $input = $form->getItemByPostVar(
"grpt[" . $grp_id .
"]");
1681 $input->setAlert(implode(
"<br/>", $alert));
1686 if ($teams !== []) {
1690 $sum = array(
"added" => 0,
"blocked" => 0);
1691 foreach ($teams as $members) {
1692 foreach ($members as $user_id) {
1693 if (!$this->exercise->members_obj->isAssigned($user_id)) {
1694 $this->exercise->members_obj->assignMember($user_id);
1697 if (!in_array($user_id, $existing_users)) {
1704 $first = array_shift($members);
1710 foreach ($members as $user_id) {
1711 $team->addTeamMember($user_id);
1716 if ($sum[
"added"] !== 0) {
1717 $mess[] = sprintf($lng->
txt(
"exc_adopt_group_teams_added"), $sum[
"added"]);
1719 if ($sum[
"blocked"] !== 0) {
1720 $mess[] = sprintf($lng->
txt(
"exc_adopt_group_teams_blocked"), $sum[
"blocked"]);
1722 if ($sum[
"added"] !== 0) {
1723 $this->tpl->setOnScreenMessage(
'success', implode(
" ", $mess),
true);
1725 $this->tpl->setOnScreenMessage(
'failure', implode(
" ", $mess),
true);
1728 $this->
ctrl->redirect($this,
"members");
1730 $this->tpl->setOnScreenMessage(
'failure', $lng->
txt(
"form_input_not_valid"));
1734 $form->setValuesByPost();
1748 $form->addCommandButton(
"uploadMultiFeedback", $lng->
txt(
"upload"));
1749 $form->addCommandButton(
"members", $lng->
txt(
"cancel"));
1754 $fi->setRequired(
true);
1755 $form->addItem($fi);
1758 $form->setFormAction($this->
ctrl->getFormAction($this,
"uploadMultiFeedback"));
1780 $button->setCaption(
"exc_download_zip_structure");
1781 $button->setUrl($this->
ctrl->getLinkTarget($this,
"downloadMultiFeedbackZip"));
1782 $button->setOmitPreventDoubleSubmission(
true);
1783 $ilToolbar->addButtonInstance($button);
1785 if ($a_form === null) {
1797 $this->assignment->sendMultiFeedbackStructureFile($this->exercise);
1807 if ($form->checkInput()) {
1810 $this->
ctrl->redirect($this,
"showMultiFeedbackConfirmationTable");
1812 $this->tpl->setOnScreenMessage(
'failure', $e->getMessage(),
true);
1813 $this->
ctrl->redirect($this,
"showMultiFeedback");
1817 $form->setValuesByPost();
1839 $this->assignment->clearMultiFeedbackDirectory();
1840 $this->
ctrl->redirect($this,
"members");
1848 $this->assignment->saveMultiFeedbackFiles($this->requested_files, $this->exercise);
1850 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1851 $this->
ctrl->redirect($this,
"members");
1866 $modal->setHeading($lng->
txt(
"exc_individual_deadline"));
1867 $modal->setId(
"ilExcIDl");
1868 $modal->setBody(
'<div id="ilExcIDlBody"></div>');
1869 $modal = $modal->getHTML();
1871 $ajax_url = $this->
ctrl->getLinkTarget($this,
"handleIndividualDeadlineCalls",
"",
true,
false);
1873 $tpl->
addJavaScript(
"./Modules/Exercise/js/ilExcIDl.js",
true, 3);
1874 $tpl->
addOnLoadCode(
'il.ExcIDl.init("' . $ajax_url .
'");');
1890 foreach ($a_data as $item) {
1891 $item = explode(
"_", $item);
1893 $user_id = $item[1];
1895 if (!array_key_exists($ass_id, $ass_tmp)) {
1896 if ($this->assignment &&
1897 $ass_id == $this->assignment->getId()) {
1907 return array($map, $ass_tmp);
1920 $this->
ctrl->saveParameter($this,
"part_id");
1924 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
1925 $this->
ctrl->redirect($this, $this->assignment !== null
1927 :
"showParticipant");
1931 if ($this->requested_idl_id !=
"") {
1933 if (is_array($tmp)) {
1935 echo $form->getHTML() .
1942 $post = $this->
http->request()->getParsedBody();
1943 foreach (array_keys(
$post) as
$id) {
1944 if (substr($id, 0, 3) ==
"dl_") {
1945 $tmp[] = substr($id, 3);
1955 if (
$valid = $form->checkInput()) {
1956 foreach ($users as $ass_id => $users2) {
1962 foreach ($users2 as $user_id) {
1963 $date_field = $form->getItemByPostVar(
"dl_" . $ass_id .
"_" . $user_id);
1975 $form->setValuesByPost();
1976 echo $form->getHTML() .
1979 foreach (
$res as $ass_id => $users) {
1982 foreach ($users as $id => $date) {
1983 $ass->setIndividualDeadline($id, $date);
1986 $ass->recalculateLateSubmissions();
2004 $form->setFormAction($this->
ctrl->getFormAction($this));
2005 $form->setName(
"ilExcIDlForm");
2007 foreach ($ids as $ass_id => $users) {
2011 $section->setTitle($ass->getTitle());
2012 $form->addItem($section);
2016 $values = $ass->getIndividualDeadlines();
2018 foreach ($users as
$id) {
2020 if (is_numeric($id)) {
2027 $team_id = (
int) substr($id, 1);
2028 if (array_key_exists($team_id, $teams)) {
2030 foreach ($teams[$team_id]->getMembers() as $member_id) {
2032 $name[] = $uname[
"lastname"] .
", " . $uname[
"firstname"];
2040 $dl->setShowTime(
true);
2041 $dl->setRequired(
true);
2042 $form->addItem($dl);
2044 if (array_key_exists($id, $values)) {
2050 $form->addCommandButton(
"", $this->
lng->txt(
"save"));
2061 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"select_one"));
2063 if ($this->assignment !== null) {
2072 if ($this->requested_filter_status !=
"") {
2076 $this->
lng->loadLanguageModule(
"search");
2078 $this->
toolbar->setFormAction($this->
ctrl->getFormAction($this,
"listTextAssignment"));
2084 "" => $this->
lng->txt(
"search_any"),
2085 self::GRADE_NOT_GRADED => $this->
lng->txt(
"exc_notgraded"),
2086 self::GRADE_PASSED => $this->
lng->txt(
"exc_passed"),
2087 self::GRADE_FAILED => $this->
lng->txt(
"exc_failed")
2089 $si_status->setOptions($options);
2090 $si_status->setValue($this->
filter[
"status"] ??
"");
2094 self::FEEDBACK_FULL_SUBMISSION => $this->
lng->txt(
"submissions_feedback"),
2095 self::FEEDBACK_ONLY_SUBMISSION => $this->
lng->txt(
"submissions_only")
2098 $si_feedback->setValue($this->
filter[
"feedback"] ??
"");
2100 $this->
toolbar->addInputItem($si_status,
true);
2104 if ($this->assignment->getPeerReview()) {
2105 if ($this->requested_filter_feedback !=
"") {
2108 $this->
filter[
"feedback"] =
"submission_feedback";
2113 "submission_feedback" => $this->
lng->txt(
"submissions_feedback"),
2114 "submission_only" => $this->
lng->txt(
"submissions_only")
2117 $si_feedback->setValue($this->
filter[
"feedback"] ??
"");
2119 $this->
toolbar->addInputItem($si_feedback,
true);
2124 $submit->setCaption(
"filter");
2125 $submit->setCommand(
"listTextAssignment");
2126 $this->
toolbar->addButtonInstance($submit);
2148 $last_opening = $submission->getLastOpeningHTMLView();
2149 $submission_time = $submission->getLastSubmission();
2153 $this->log->debug(
"zip original full path: " . $zip_original_full_path);
2157 $this->log->debug(
"zip internal path: " . $zip_internal_path);
2159 $arr = explode(
"_", basename($zip_original_full_path));
2160 $obj_date = $arr[0];
2161 $obj_id = (
int) ($arr[1] ?? 0);
2162 if ($obj_id === 0) {
2164 $submission->getSubmittedPrintFile() .
".");
2167 $obj_id = $this->assignment->getAssignmentType()->getExportObjIdForResourceId($obj_id);
2168 if ($print_version) {
2172 $obj_dir = $this->assignment->getAssignmentType()->getStringIdentifier() .
"_" . $obj_id;
2175 DIRECTORY_SEPARATOR .
2177 DIRECTORY_SEPARATOR .
2178 dirname($zip_internal_path) .
2179 DIRECTORY_SEPARATOR .
2181 DIRECTORY_SEPARATOR .
2183 $this->log->debug(
"index html file: " . $index_html_file);
2187 $web_filesystem = $DIC->filesystem()->web();
2188 if ($last_opening > $submission_time && $web_filesystem->has($index_html_file)) {
2192 if ($zip_original_full_path) {
2194 $this->log->debug(
"file copied: " . $file_copied);
2197 $web_filesystem->delete($zip_internal_path);
2198 $this->log->debug(
"deleting: " . $zip_internal_path);
2200 $submission_repository = $this->service->repo()->submission();
2201 $submission_repository->updateWebDirAccessTime($this->assignment->getId(), $member_id);
2206 $error_msg = $this->
lng->txt(
"exc_copy_zip_error");
2209 if ($error_msg ===
'' || $error_msg ===
'0') {
2210 $error_msg = $this->
lng->txt(
"exc_find_zip_error");
2213 $this->tpl->setOnScreenMessage(
'failure', $error_msg);
2223 bool $print_versions =
false 2225 $submitted = $submission->
getFiles(
2231 if ($submitted !== []) {
2232 $submitted = array_pop($submitted);
2234 return $submitted[
'filename'];
2245 string $internal_file_path
2249 $web_filesystem = $DIC->filesystem()->web();
2250 $data_filesystem = $DIC->filesystem()->storage();
2252 $internal_dirs = dirname($internal_file_path);
2253 $zip_file = basename($internal_file_path);
2255 if ($data_filesystem->has($internal_file_path)) {
2256 $this->log->debug(
"internal file path: " . $internal_file_path);
2257 if ($web_filesystem->hasDir($internal_dirs)) {
2258 $web_filesystem->deleteDir($internal_dirs);
2260 $web_filesystem->createDir($internal_dirs);
2262 if ($web_filesystem->has($internal_file_path)) {
2263 $web_filesystem->delete($internal_file_path);
2265 if (!$web_filesystem->has($internal_file_path)) {
2266 $this->log->debug(
"writing: " . $internal_file_path);
2267 $stream = $data_filesystem->readStream($internal_file_path);
2268 $web_filesystem->writeStream($internal_file_path, $stream);
2270 return ILIAS_ABSOLUTE_PATH .
2271 DIRECTORY_SEPARATOR .
2273 DIRECTORY_SEPARATOR .
2275 DIRECTORY_SEPARATOR .
2277 DIRECTORY_SEPARATOR .
2289 string $external_file_path
2291 list($external_path, $internal_file_path) = explode(
CLIENT_ID .
"/ilExercise", $external_file_path);
2292 $internal_file_path =
"ilExercise" . $internal_file_path;
2293 return $internal_file_path;
2302 $this->tabs_gui->clearTargets();
2303 $this->tabs_gui->setBackTarget(
2304 $this->
lng->txt(
"back"),
2305 $this->
ctrl->getLinkTarget($this,
"members")
2312 $user =
new ilObjUser($a_data[
"user_id"]);
2316 "uid" => $a_data[
"user_id"],
2318 "udate" => $a_data[
"ts"],
2324 $data[
"peer"] = array();
2325 foreach ($peer_review->getPeerReviewsByPeerId($a_data[
'user_id']) as $value) {
2326 $data[
"peer"][] = $value[
'giver_id'];
2330 $data[
"fb_given"] = $peer_review->countGivenFeedback(
true, $a_data[
"user_id"]);
array $listed_participants
static _replaceMediaObjectImageSrc(string $a_text, int $a_direction=0, string $nic='')
Replaces image source from mob image urls with the mob id or replaces mob id with the correct image s...
addMembersObject($a_user_ids=array())
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.
An entity that renders components to a string output.
getFiles(array $a_file_ids=null, bool $a_only_valid=false, string $a_min_timestamp=null, bool $print_versions=false)
Get submission items (not only files)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
showParticipantObject()
Show Participant.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
showGradesOverviewObject()
string $requested_user_login
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getLogger(string $a_component_id)
Get component logger.
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link="", bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static downloadAllAssignmentFiles(ilExAssignment $a_ass, array $members, string $to_path)
Download all submitted files of an assignment (all user)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static initDateTimePicker()
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
getEvaluationModal(array $a_data)
createTeamsFromGroupsObject()
static _before(ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilExAssignment $assignment
getTutorNotices()
key might be ass_ids or user_ids!
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
copyFileToWebDir(string $internal_file_path)
Generate the directories and copy the file if necessary.
parseIndividualDeadlineData(array $a_data)
static lookupTitle(int $a_id)
getStatus()
key might be ass_ids or user_ids!
getEvaluationModalForm(array $a_data)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
getMarks()
key might be ass_ids or user_ids!
static _lookupName(int $a_user_id)
lookup user name
Exercise internal service.
getWebFilePathFromExternalFilePath(string $external_file_path)
Get the object specific file path from an external full file path.
array $requested_tutor_notices
static _lookupId($a_user_str)
setParameterByClass(string $a_class, string $a_parameter, $a_value)
static getInstanceByUserId(int $a_assignment_id, int $a_user_id, bool $a_create_on_demand=false)
downloadSubmissionsObject()
showMultiFeedbackObject(ilPropertyFormGUI $a_form=null)
Show multi-feedback screen.
initMultiFeedbackForm(int $a_ass_id)
addUserFromAutoCompleteObject()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
deleteUserSubmissionDirectory(int $user_id)
filterParticipantsByAccess()
Filter manageable members by position or rbac access.
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
addSubTabs(string $a_activate)
static getAssignmentParticipants(int $a_exercise_id, int $a_ass_id)
ILIAS Exercise InternalGUIService $gui
static unzip(string $path_to_zip_file, bool $overwrite_existing=false, bool $unpack_flat=false)
withOnLoadCode(Closure $binder)
static getAdoptableGroups(int $a_exc_ref_id)
getSubmissionZipFilePath(ilExSubmission $submission, bool $print_versions=false)
Returns the ZIP file path from outside web directory.
showParticipantResetObject()
selectParticipantObject()
saveStatusAllObject(array $a_selected=null, bool $a_redirect=true)
saveStatusParticipantObject(array $selected_ass_ids=null)
Save assignment status (participant view)
resetOffset(bool $a_in_determination=false)
string $requested_comment
redirectFeedbackMailObject()
filterUserIdsByRbacOrPositionOfCurrentUser(string $rbac_perm, string $pos_perm, int $ref_id, array $user_ids)
compareTextAssignmentsObject()
TODO -> Deal with the redirection after update the grade via action button.
handleIndividualDeadlineCallsObject()
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
array $requested_learning_comments
static http()
Fetches the global http state from ILIAS.
getReportPanel(array $a_data)
ilGlobalPageTemplate $tpl
static signFolderOfStartFile(string $start_file_path)
Download submissions and feedback for exercises.
TaskFactory $task_factory
string $requested_filter_feedback
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
uploadMultiFeedbackObject()
Upload multi feedback file.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
downloadMultiFeedbackZipObject()
Download multi-feedback structrue file.
removeUserSubmissionFilesFromWebDir(int $user_id)
ILIAS Repository HTML HTMLUtil $html_util
static fillAutoCompleteToolbar(object $parent_object, ilToolbarGUI $toolbar=null, array $a_options=[], bool $a_sticky=false)
array( auto_complete_name = $lng->txt('user'), auto_complete_size = 15, user_type = array(ilCoursePar...
clearTargets()
clear all targets
static _getLink(?int $a_ref_id, string $a_type='', array $a_params=array(), string $append="")
array $requested_group_members
showParticipantApplyObject()
static getAssignmentFilesByUsers(int $a_exc_id, int $a_ass_id, array $a_users)
static getAssignmentTeamMap(int $a_ass_id)
static redirect(string $a_script)
getOnLoadCodeForAsynch()
Get js onload code for ajax calls.
Class ilExerciseManagementGUI.
static getInstancesByExercise(int $a_exc_id)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
confirmDeassignMembersObject()
setOnScreenMessage(string $a_type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
cancelMultiFeedbackObject()
Cancel Multi Feedback.
collectFeedbackDataFromPeer(array $a_data)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
create()
Create directory.
openSubmissionViewObject(bool $print_version=false)
Open HTML view for portfolio submissions.
membersObject()
All participants and submission of one assignment.
array $selected_participants
initIndividualDeadlineModal()
saveEvaluationFromModalObject()
__construct(Container $dic, ilPlugin $plugin)
saveCommentForLearnersObject()
This class represents a text area property in a property form.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
ILIAS HTTP Services $http
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
adoptTeamsFromGroupObject(ilPropertyFormGUI $a_form=null)
const FEEDBACK_ONLY_SUBMISSION
showMultiFeedbackConfirmationTableObject()
Show multi feedback confirmation table.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
saveMultiFeedbackObject()
Save multi feedback.
File System Explorer GUI class.
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
static getGroupMembersMap(int $a_exc_ref_id)
static _lookupType(int $id, bool $reference=false)
Exercise gui request wrapper.
saveStatusSelectedObject()
Exercise participant table.
getMultiActionUserIds(bool $a_keep_teams=false)
static stripSlashesArray(array $a_arr, bool $a_strip_html=true, string $a_allow="")
getSelectedParticipants()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initIndividualDeadlineForm(array $a_ass_map, array $ids)
saveStatus(array $a_data, bool $a_redirect=true)
setContent(string $a_html)
Sets content for standard template.
const FEEDBACK_FULL_SUBMISSION
string $requested_filter_status
openSubmissionPrintViewObject()
Open HTML view for portfolio submissions.
static getInstancesFromMap(int $a_assignment_id)
setIndividualDeadlineObject()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
setTableId(string $a_val)
static _lookupLogin(int $a_user_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...