55 protected \ILIAS\Exercise\InternalDomainService
$domain;
56 protected \ILIAS\Exercise\Notification\NotificationManager
$notification;
59 protected \ILIAS\HTTP\Services
$http;
114 $this->
user = $domain->user();
115 $this->log =
$domain->logger()->exc();
116 $this->
access = $domain->access();
117 $this->
lng = $domain->lng();
119 $this->
toolbar = $gui->toolbar();
120 $this->ui_factory =
$gui->ui()->factory();
121 $this->ui_renderer =
$gui->ui()->renderer();
122 $this->
ctrl = $gui->ctrl();
123 $this->tabs_gui =
$gui->tabs();
124 $this->tpl =
$gui->ui()->mainTemplate();
125 $this->
http = $gui->http();
127 $this->task_factory =
$domain->backgroundTasks()->taskFactory();
132 if ($a_ass !==
null) {
133 $this->assignment = $a_ass;
134 $this->ass_id = $this->assignment->getId();
158 $this->feedback_gui =
$DIC->exercise()->internal()->gui()->getSubmissionFeedbackGUI(
163 $this->
ctrl->saveParameter($this, array(
"vw",
"member_id"));
164 if ($this->ass_id > 0) {
165 $this->tutor_feedback_file =
$domain->assignment()->tutorFeedbackFile($this->ass_id);
167 $this->zip =
$domain->resources()->zip();
168 $this->
ctrl->saveParameter($this, array(
"part_id"));
181 $class = $ilCtrl->getNextClass($this);
186 case strtolower(ilResourceCollectionGUI::class):
187 $ilTabs->clearTargets();
188 $ilTabs->setBackTarget(
190 $ilCtrl->getLinkTarget($this, $this->getViewBack())
192 $this->domain->assignment()->tutorFeedbackFile($this->ass_id)->addObserver();
193 $this->tpl->setOnScreenMessage(
'info',
$lng->
txt(
"exc_fb_tutor_info"));
194 $gui = $this->gui->
assignment()->getTutorFeedbackFileResourceCollectionGUI(
195 $this->exercise->getRefId(),
196 $this->assignment->getId(),
197 $this->requested_member_id
199 $this->
ctrl->forwardCommand($gui);
202 case 'ilrepositorysearchgui':
204 $ref_id = $this->exercise->getRefId();
205 $rep_search->addUserAccessFilterCallable(
function ($a_user_ids) use (
$ref_id) {
206 return $GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
207 'edit_submissions_grades',
208 'edit_submissions_grades',
213 $rep_search->setTitle($this->
lng->txt(
"exc_add_participant"));
214 $rep_search->setCallback($this,
'addMembersObject');
218 $this->
ctrl->setReturn($this,
'members');
220 $this->
ctrl->forwardCommand($rep_search);
223 case strtolower(ilRepoStandardUploadHandlerGUI::class):
225 $gui = $form->getRepoStandardUploadHandlerGUI(
"mfzip");
226 $this->
ctrl->forwardCommand($gui);
229 case "ilexsubmissionteamgui":
231 $ilCtrl->forwardCommand(
$gui);
234 case "ilexsubmissionfilegui":
236 $ilCtrl->forwardCommand(
$gui);
239 case "ilexsubmissiontextgui":
240 $ilCtrl->saveParameter($this, array(
"part_id"));
242 $ilCtrl->forwardCommand(
$gui);
245 case "ilexpeerreviewgui":
247 $ilCtrl->forwardCommand(
$gui);
250 case "ilparticipantsperassignmenttablegui":
255 $this->assignment->getId(),
258 $this->
ctrl->forwardCommand($table);
261 case "ilexercisesubmissionfeedbackgui":
262 $this->
ctrl->forwardCommand($this->feedback_gui);
266 $cmd = $ilCtrl->getCmd();
268 case 'downloadSubmissions':
269 $cmd = $ilCtrl->getCmd(
"downloadSubmissions");
272 $cmd = $ilCtrl->getCmd(
"listPublicSubmissions");
275 $this->{$cmd .
"Object"}();
282 switch ($this->request->getBackView()) {
284 $back_cmd =
"showParticipant";
288 $back_cmd =
"showGradesOverview";
293 $back_cmd =
"members";
302 $this->
ctrl->setReturn($this, $back_cmd);
304 $this->tabs_gui->clearTargets();
305 $this->tabs_gui->setBackTarget(
306 $this->
lng->txt(
"back"),
307 $this->ctrl->getLinkTarget($this, $back_cmd)
310 return new ilExSubmission($this->assignment, $this->requested_member_id,
null,
true);
319 $ass_id = $this->assignment !==
null ? $this->assignment->getId() : 0;
322 $ilCtrl->setParameter($this,
"vw",
"");
323 $ilCtrl->setParameter($this,
"member_id",
"0");
324 $ilCtrl->setParameter($this,
"ass_id",
"0");
325 $ilCtrl->setParameter($this,
"part_id",
"0");
329 $lng->
txt(
"exc_assignment_view"),
330 $ilCtrl->getLinkTarget($this,
"members")
334 $lng->
txt(
"exc_participant_view"),
335 $ilCtrl->getLinkTarget($this,
"showParticipant")
339 $lng->
txt(
"exc_grades_overview"),
340 $ilCtrl->getLinkTarget($this,
"showGradesOverview")
342 $ilTabs->activateSubTab($a_activate);
344 $ilCtrl->setParameter($this,
"ass_id",
$ass_id);
345 $ilCtrl->setParameter($this,
"part_id", $part_id);
356 $ilCtrl->
setParameterByClass(
"ilExSubmissionFileGUI",
"member_id", $this->requested_member_id);
357 $url = $ilCtrl->getLinkTargetByClass(array(
"ilExerciseHandlerGUI",
"ilObjExerciseGUI",
"ilExerciseManagementGUI",
"ilExSubmissionFileGUI"),
"downloadNewReturned");
358 $js_url = $ilCtrl->getLinkTargetByClass(array(
"ilExerciseHandlerGUI",
"ilObjExerciseGUI",
"ilExerciseManagementGUI",
"ilExSubmissionFileGUI"),
"downloadNewReturned",
"",
"",
false);
359 $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>");
375 $this->gui->permanentLink()->setGradesPermanentLink();
380 if ($this->assignment ===
null && count($ass) > 0) {
381 $this->assignment = current($ass);
385 if (count($ass) > 1) {
387 foreach ($ass as
$a) {
388 $options[
$a->getId()] =
$a->getTitle();
391 $si->setOptions($options);
392 $si->setValue($this->assignment->getId());
393 $ilToolbar->addStickyItem($si,
true);
395 $this->
lng->txt(
"select"),
397 )->submit()->toToolbar(
true);
399 $ilToolbar->addSeparator();
402 elseif ($this->assignment) {
403 $ilCtrl->setParameter($this,
"ass_id", $this->assignment->getId());
409 $has_rbac_access =
$GLOBALS[
'DIC']->access()->checkAccess(
410 'edit_submissions_grades',
412 $this->exercise->getRefId()
414 if ($has_rbac_access) {
419 'auto_complete_name' =>
$lng->
txt(
'user'),
420 'submit_name' =>
$lng->
txt(
'add'),
421 'add_search' =>
true,
422 'add_from_container' => $this->exercise->getRefId()
429 if ($has_rbac_access) {
430 $ilToolbar->addSeparator();
434 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
436 $ilCtrl->setParameter($this,
"ass_id", $this->assignment->getId());
440 $ilToolbar->addButton(
441 $this->
lng->txt(
"exc_adopt_group_teams"),
442 $this->ctrl->getLinkTarget($this,
"adoptTeamsFromGroup")
445 $ilToolbar->addSeparator();
447 } elseif ($this->exercise->hasTutorFeedbackFile()) {
448 if (!$this->assignment->getAssignmentType()->usesTeams()) {
450 $ilToolbar->addButton(
451 $this->
lng->txt(
"exc_multi_feedback"),
452 $this->ctrl->getLinkTarget($this,
"showMultiFeedback")
455 $ilToolbar->addSeparator();
459 $submission_repository = $this->service->repo()->submission();
461 if ($submission_repository->hasSubmissions($this->assignment->getId()) !== 0) {
462 $ass_type = $this->assignment->getType();
465 $ilToolbar->addFormButton(
$lng->
txt(
"exc_list_text_assignment"),
"listTextAssignment");
467 $ilToolbar->addFormButton(
$lng->
txt(
"download_all_returned_files"),
"downloadSubmissions");
469 $this->
ctrl->setParameter($this,
"vw", self::VIEW_ASSIGNMENT);
475 $this->assignment->getId(),
479 $exc_tab->getHTML() .
480 $this->initIndividualDeadlineModal()
483 $this->tpl->setOnScreenMessage(
'info',
$lng->
txt(
"exc_no_assignments_available"));
486 $ilCtrl->setParameter($this,
"ass_id",
"0");
491 if (count($this->selected_participants) > 0) {
503 $this->exercise->getRefId(),
504 $this->exercise->getId(),
510 if ($download_task->run()) {
511 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'exc_down_files_started_bg'),
true);
519 if ($this->assignment !==
null) {
520 $this->
ctrl->redirect($this,
"members");
522 $this->
ctrl->redirect($this,
"showParticipant");
536 $this->assignment->getId(),
539 $exc_tab->resetOffset();
540 $exc_tab->writeFilterToSession();
554 $this->assignment->getId(),
557 $exc_tab->resetOffset();
558 $exc_tab->resetFilter();
568 foreach ($this->requested_learning_comments as $k => $v) {
569 $marks_obj =
new ilLPMarks($this->exercise->getId(), (
int) $k);
570 $marks_obj->setComment($v);
571 $marks_obj->update();
573 foreach ($this->requested_marks as $k => $v) {
574 $marks_obj =
new ilLPMarks($this->exercise->getId(), (
int) $k);
575 $marks_obj->setMark($v);
576 $marks_obj->update();
578 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"exc_msg_saved_grades"),
true);
579 $ilCtrl->redirect($this,
"showGradesOverview");
589 public function listTextAssignmentObject(): void
595 $button_print = $this->ui_factory->button()->standard($this->
lng->txt(
'print'),
"#")
596 ->withOnLoadCode(
function (
$id) {
597 return "$('#$id').click(function() { window.print(); return false; });";
599 $this->
toolbar->addSeparator();
600 $this->
toolbar->addComponent($button_print);
602 $group_panels_tpl =
new ilTemplate(
"tpl.exc_group_report_panels.html",
true,
true,
"components/ILIAS/Exercise");
603 $group_panels_tpl->setVariable(
'TITLE', $this->
lng->txt(
"exc_list_text_assignment") .
": " . $this->assignment->getTitle());
610 $members = $members_filter->filterParticipantsByAccess();
612 $sm = $this->domain->submission($this->assignment->getId());
613 foreach ($sm->getSubmissionsOfOwners($members) as $sub) {
614 if (trim($sub->getText()) && $this->domain->profile()->exists($sub->getUserId())) {
617 $sub->getTimestamp(),
620 $submission_data = $this->assignment->getExerciseMemberAssignmentData($sub->getUserId(), $this->filter[
"status"] ??
"");
622 if (is_array($submission_data)) {
623 $data = array_merge($feedback_data, $submission_data);
629 if ($total_reports == 0) {
630 $mess = $this->ui_factory->messageBox()->info($this->
lng->txt(
"fiter_no_results"));
631 $report_html .= $this->ui_renderer->render($mess);
634 $group_panels_tpl->setVariable(
'CONTENT', $report_html);
635 $this->tpl->setContent($group_panels_tpl->get());
646 $subm = $this->domain->submission($this->assignment->getId());
648 $group_panels_tpl =
new ilTemplate(
"tpl.exc_group_report_panels.html",
true,
true,
"components/ILIAS/Exercise");
649 $group_panels_tpl->setVariable(
'TITLE', $this->
lng->txt(
"exc_compare_selected_submissions"));
655 foreach ($participants as $participant_id) {
656 $subs = $subm->getSubmissionsOfUser($participant_id);
659 if ($s = $subs->current()) {
660 $ts = $s->getTimestamp();
661 $text = $s->getText();
670 $submission_data = $this->assignment->getExerciseMemberAssignmentData((
int) $participant_id, $this->
filter[
"status"] ??
"");
672 if (is_array($submission_data)) {
673 $data = array_merge($feedback_data, $submission_data);
678 $group_panels_tpl->setVariable(
'CONTENT', $report_html);
679 $this->tpl->setContent($group_panels_tpl->get());
689 $this->
ctrl->setParameter($this,
"member_id", $a_data[
'uid']);
691 $this->ui_factory->button()->shy($this->lng->txt(
"grade_evaluate"),
"#")->withOnClick($modal->getShowSignal())
694 if ($this->exercise->hasTutorFeedbackMail()) {
695 $actions[] = $this->ui_factory->button()->shy(
696 $this->
lng->txt(
"exc_tbl_action_feedback_mail"),
697 $this->ctrl->getLinkTarget($this,
"redirectFeedbackMail")
700 if ($this->exercise->hasTutorFeedbackFile()) {
701 $actions[] = $this->ui_factory->button()->shy(
702 $this->
lng->txt(
"exc_tbl_action_feedback_file"),
703 $this->ctrl->getLinkTargetByClass(ilResourceCollectionGUI::class)
707 $this->
ctrl->setParameter($this,
"member_id",
"");
709 $actions_dropdown = $this->ui_factory->dropdown()->standard($actions);
710 if ($a_data[
'status'] == self::GRADE_NOT_GRADED) {
711 $str_status_key = $this->
lng->txt(
'exc_tbl_status') .
": ";
712 $str_status_value =
"-";
714 $str_status_key = $this->
lng->txt(
'exc_tbl_status_time') .
": ";
718 $str_mark_key = $this->
lng->txt(
"exc_tbl_mark") .
": ";
719 $str_mark_value =
"-";
721 if (($a_data[
'mark'] !=
"")) {
722 $str_mark_value = $a_data[
'mark'];
725 if ($a_data[
'feedback_time']) {
726 $str_evaluation_key = $this->
lng->txt(
'exc_tbl_feedback_time') .
": ";
729 $str_evaluation_key = $this->
lng->txt(
'exc_settings_feedback') .
": ";
730 $str_evaluation_value =
"-";
733 $card_content = array(
735 $str_status_key => $str_status_value,
736 $str_mark_key => $str_mark_value,
737 $str_evaluation_key => $str_evaluation_value,
738 $this->
lng->txt(
'feedback_given') .
": " => $a_data[
'fb_given'],
739 $this->lng->txt(
'feedback_received') .
": " => $a_data[
'fb_received']
741 $card_tpl =
new ilTemplate(
"tpl.exc_report_details_card.html",
true,
true,
"components/ILIAS/Exercise");
742 foreach ($card_content as $key => $value) {
743 $card_tpl->setCurrentBlock(
"assingment_card");
744 $card_tpl->setVariable(
"ROW_KEY", $key);
745 $card_tpl->setVariable(
"ROW_VALUE", $value);
746 $card_tpl->parseCurrentBlock();
749 $main_panel = $this->ui_factory->panel()->sub($a_data[
'uname'], $this->ui_factory->legacy()->content(
750 $this->gui->html()->escapeCurly($a_data[
'utext'])
752 ->withFurtherInformation($this->ui_factory->card()->standard($this->lng->txt(
'text_assignment'))->withSections(array($this->ui_factory->legacy()->content($card_tpl->get()))))->withActions($actions_dropdown);
754 $feedback_tpl =
new ilTemplate(
"tpl.exc_report_feedback.html",
true,
true,
"components/ILIAS/Exercise");
756 $filter_feedback = $this->
filter[
"feedback"] ??
"";
757 if (array_key_exists(
"peer", $a_data) && (($filter_feedback == self::FEEDBACK_FULL_SUBMISSION) || $filter_feedback ==
"")) {
758 $feedback_tpl->setCurrentBlock(
"feedback");
759 foreach ($a_data[
"peer"] as $peer_id) {
764 $peer_name = $this->
lng->txt(
"exc_deleted_user");
767 $feedback_tpl->setCurrentBlock(
"peer_feedback");
768 $feedback_tpl->setVariable(
"PEER_NAME", $peer_name);
770 $submission =
new ilExSubmission($this->assignment, $a_data[
"uid"]);
771 $values = $submission->getPeerReview()->getPeerReviewValues($peer_id, $a_data[
"uid"]);
774 foreach ($this->assignment->getPeerReviewCriteriaCatalogueItems() as $crit) {
775 $crit_id = $crit->getId()
778 $crit->setPeerReviewContext($this->assignment, $peer_id, $a_data[
"uid"]);
781 '<div class="ilBlockPropertyCaption">' . $crit->getTitle() .
'</div>' .
782 '<div style="margin:2px 0;">' . $crit->getHTML($values[$crit_id] ??
null) .
'</div>';
784 $feedback_tpl->setVariable(
"PEER_FEEDBACK", $review_html);
785 $feedback_tpl->parseCurrentBlock();
787 $feedback_tpl->parseCurrentBlock();
789 $feedback_tpl->setVariable(
"GRADE", $this->
lng->txt(
'exc_grading') .
": " . $this->lng->txt(
'exc_' . $a_data[
'status']));
790 $comment = ($a_data[
'comment'] ===
"")
792 : $a_data[
'comment'];
793 $feedback_tpl->setVariable(
"COMMENT", $this->
lng->txt(
'exc_comment') .
": <br>" .
$comment);
795 $feedback_panel = $this->ui_factory->panel()->sub(
"", $this->ui_factory->legacy()->content($feedback_tpl->get()));
797 $report = $this->ui_factory->panel()->report(
"", array($main_panel, $feedback_panel));
799 return $this->ui_renderer->render([$modal,$report]);
805 $modal_tpl = new
ilTemplate(
"tpl.exc_report_evaluation_modal.html",
true,
true,
"components/ILIAS/Exercise");
806 $modal_tpl->
setVariable(
"USER_NAME", $a_data[
'uname']);
810 if ($this->exercise->hasTutorFeedbackText()) {
813 $u_text = strip_tags($a_data[
"utext"]);
816 if (strlen($u_text) > $max_chars) {
817 $text =
"<input type='checkbox' class='read-more-state' id='post-1' />";
818 $text .=
"<div class='read-more-wrap'>";
819 $text .= mb_substr($u_text, 0, $max_chars);
820 $text .=
"<span class='read-more-target'>";
821 $text .= mb_substr($u_text, $max_chars);
822 $text .=
"</span></div>";
823 $text .=
"<label for='post-1' class='read-more-trigger'></label>";
825 $modal_tpl->setVariable(
"USER_TEXT", $text);
828 $modal_tpl->setVariable(
"FORM", $form->getHTML());
830 $form_id =
'form_' . $form->getId();
831 $submit_btn = $this->ui_factory->button()->primary($this->
lng->txt(
"save"),
'#')
832 ->withOnLoadCode(
function (
$id) use ($form_id) {
833 return "$('#$id').click(function() { $('#$form_id').submit(); return false; });";
836 return $this->ui_factory->modal()->roundtrip(strtoupper($this->
lng->txt(
"grade_evaluate")), $this->ui_factory->legacy()->content($modal_tpl->get()))->withActionButtons([$submit_btn]);
843 $form->
setFormAction($this->
ctrl->getFormAction($this,
"saveEvaluationFromModal"));
844 $form->setId(uniqid(
'form'));
848 self::GRADE_NOT_GRADED => $this->
lng->txt(
"exc_notgraded"),
849 self::GRADE_PASSED => $this->lng->txt(
"exc_passed"),
850 self::GRADE_FAILED => $this->lng->txt(
"exc_failed")
853 $si->setOptions($options);
854 $si->setValue($a_data[
'status'] ??
"");
859 $mark_input->setValue($a_data[
'mark'] ??
"");
860 $mark_input->setMaxLength(32);
861 $mark_input->setSize(4);
862 $form->addItem($mark_input);
865 $item->setValue($a_data[
'uid'] ??
"");
866 $form->addItem($item);
869 if ($this->exercise->hasTutorFeedbackText()) {
871 $ta->setInfo($this->
lng->txt(
"exc_comment_for_learner_info"));
872 $ta->setValue($a_data[
'comment'] ??
"");
886 $form = $this->getEvaluationModalForm([]);
891 if ($form->checkInput()) {
892 $comment = trim($form->getInput(
'comment'));
894 $grade = trim($form->getInput(
'grade'));
895 $mark = trim($form->getInput(
'mark'));
898 if ($this->assignment->getId() &&
$user_id > 0) {
899 $member_status = $this->assignment->getMemberStatus(
$user_id);
902 $member_status->setStatus($grade);
904 $member_status->setMark($mark);
906 $member_status->setFeedback(
true);
908 $member_status->update();
910 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_status_saved"),
true);
911 $this->
ctrl->redirect($this,
"listTextAssignment");
921 if ($this->requested_user_login ==
"") {
922 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_no_search_string'));
923 $this->membersObject();
926 $users = explode(
',', $this->requested_user_login);
929 foreach ($users as $user) {
933 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'user_not_known'));
934 $this->membersObject();
941 $this->addMembersObject($user_ids);
947 if (!count($a_user_ids)) {
948 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
950 if (!$this->exercise->members_obj->assignMembers($a_user_ids)) {
951 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"exc_members_already_assigned"),
true);
953 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_members_assigned"),
true);
956 $this->
ctrl->redirect($this,
"members");
965 $ctrl->
setParameter($this,
"ass_id", $this->requested_ass_id);
975 $ilToolbar = $this->toolbar;
976 $ilCtrl = $this->ctrl;
978 $access = $this->access;
980 $this->addSubTabs(
"participant");
981 $this->
ctrl->setParameter($this,
"ass_id",
"0");
984 $members = $this->exercise->members_obj->getMembers();
987 'edit_submissions_grades',
988 'edit_submissions_grades',
989 $this->exercise->getRefId(),
994 if (count($members) == 0) {
995 $this->tpl->setOnScreenMessage(
'info',
$lng->txt(
"exc_no_participants"));
1000 foreach ($members as $mem_id) {
1003 if (trim($name[
"login"]) !=
"") {
1004 $mems[$mem_id] = $name;
1011 if ($this->requested_part_id == 0 && $mems !== [] && key($mems) > 0) {
1012 $ilCtrl->setParameter($this,
"part_id", key($mems));
1013 $ilCtrl->redirect($this,
"showParticipant");
1016 $current_participant = $this->requested_part_id;
1019 if (count($mems) > 1) {
1021 foreach ($mems as $k => $m) {
1023 $m[
"lastname"] .
", " . $m[
"firstname"] .
" [" . $m[
"login"] .
"]";
1026 $si->setOptions($options);
1027 $si->setValue($current_participant);
1028 $ilToolbar->addStickyItem($si,
true);
1031 $this->
lng->txt(
"select"),
1033 )->submit()->toToolbar(
true);
1037 $this->
ctrl->setParameter($this,
"vw", self::VIEW_PARTICIPANT);
1038 $this->
ctrl->setParameter($this,
"part_id", $current_participant);
1040 $ilToolbar->addSeparator();
1041 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1042 $ilToolbar->addFormButton(
$lng->txt(
"download_all_returned_files"),
"downloadSubmissions");
1048 $current_participant,
1052 $this->initIndividualDeadlineModal());
1054 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"exc_no_assignments_available"));
1066 $this->requested_part_id,
1069 $exc_tab->resetOffset();
1070 $exc_tab->writeFilterToSession();
1072 $this->showParticipantObject();
1083 $this->requested_part_id,
1086 $exc_tab->resetOffset();
1087 $exc_tab->resetFilter();
1089 $this->showParticipantObject();
1097 $ctrl = $this->ctrl;
1098 $ctrl->
setParameter($this,
"part_id", $this->requested_part_id);
1099 $ctrl->
redirect($this,
"showParticipant");
1105 $ilToolbar = $this->toolbar;
1106 $ilCtrl = $this->ctrl;
1109 $this->addSubTabs(
"grades");
1112 $mems = $mem_obj->getMembers();
1114 $mems =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
1115 'edit_submissions_grades',
1116 'edit_submissions_grades',
1117 $this->exercise->getRefId(),
1120 if (count($mems) > 0) {
1121 $ilToolbar->addButton(
1122 $lng->txt(
"exc_export_excel"),
1123 $ilCtrl->getLinkTarget($this,
"exportExcel")
1127 $this->
ctrl->setParameter($this,
"vw", self::VIEW_GRADES);
1131 "showGradesOverview",
1143 if ($this->requested_member_id > 0) {
1144 $submission =
new ilExSubmission($this->assignment, $this->requested_member_id);
1145 $members = $submission->getUserIds();
1146 } elseif ($members = $this->getMultiActionUserIds()) {
1147 $members = array_keys($members);
1150 if ($members !== []) {
1153 $member_status = $this->assignment->getMemberStatus(
$user_id);
1154 $member_status->setFeedback(
true);
1155 $member_status->update();
1159 $logins = implode(
",", $logins);
1162 $sig = chr(13) . chr(10) . chr(13) . chr(10);
1163 $sig .= $this->
lng->txt(
'exc_mail_permanent_link');
1164 $sig .= chr(13) . chr(10) . chr(13) . chr(10);
1165 $sig .= ilLink::_getLink($this->exercise->getRefId());
1166 $sig = rawurlencode(base64_encode($sig));
1170 $this->getViewBack(),
1174 'rcp_to' => $logins,
1190 if ($this->assignment !==
null) {
1191 if (count($this->selected_participants) == 0) {
1192 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1193 $this->
ctrl->redirect($this,
"members");
1196 foreach ($this->selected_participants as
$user_id) {
1198 $tmembers = $submission->getUserIds();
1199 if (!$a_keep_teams) {
1200 foreach ($tmembers as $tuser_id) {
1201 $members[$tuser_id] = 1;
1205 $members[] = $tmembers;
1215 if (count($this->selected_ass_ids) == 0) {
1216 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1217 $this->
ctrl->redirect($this,
"showParticipant");
1220 $user_id = $this->requested_part_id;
1222 foreach ($this->selected_ass_ids as
$ass_id) {
1224 $tmembers = $submission->getUserIds();
1225 if (!$a_keep_teams) {
1226 foreach ($tmembers as $tuser_id) {
1227 $members[
$ass_id][] = $tuser_id;
1231 $members[
$ass_id][] = $tmembers;
1250 $members = $this->getMultiActionUserIds();
1252 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_sent"),
true);
1253 if ($this->assignment !==
null) {
1254 $this->exercise->sendAssignment($this->assignment, array_keys($members));
1255 $this->
ctrl->redirect($this,
"members");
1257 foreach ($members as
$ass_id => $users) {
1260 $this->
ctrl->setParameter($this,
"part_id", $this->requested_part_id);
1261 $this->
ctrl->redirect($this,
"showParticipant");
1270 $ilCtrl = $this->ctrl;
1274 $members = $this->getMultiActionUserIds();
1277 $cgui->setFormAction($ilCtrl->getFormAction($this));
1278 $cgui->setHeaderText(
$lng->txt(
"exc_msg_sure_to_deassign_participant"));
1279 $cgui->setCancel(
$lng->txt(
"cancel"),
"members");
1280 $cgui->setConfirm(
$lng->txt(
"remove"),
"deassignMembers");
1281 foreach ($members as $k => $m) {
1299 $ilCtrl = $this->ctrl;
1302 $member_ids = $this->request->getMemberIds();
1304 foreach ($member_ids as $usr_id) {
1305 $this->exercise->members_obj->deassignMember((
int) $usr_id);
1307 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"exc_msg_participants_removed"),
true);
1308 $ilCtrl->redirect($this,
"members");
1317 $ilCtrl = $this->ctrl;
1319 $member_id = $this->requested_part_id;
1321 $marks = $this->requested_marks;
1322 $status = $this->requested_status;
1323 $notices = $this->requested_tutor_notices;
1324 foreach ($this->listed_ass_ids as
$ass_id) {
1325 if (is_array($selected_ass_ids) &&
1326 !in_array(
$ass_id, $selected_ass_ids)) {
1331 "status" => $status[
$ass_id] ??
""
1336 if (isset($notices[
$ass_id])) {
1341 $ilCtrl->setParameter($this,
"part_id", $member_id);
1342 $this->saveStatus(
$data);
1349 ?array $a_selected =
null,
1350 bool $a_redirect =
true
1352 $user_ids = $this->listed_participants;
1353 $marks = $this->requested_marks;
1354 $notices = $this->requested_tutor_notices;
1355 $status = $this->requested_status;
1356 $filtered_user_ids =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
1357 'edit_submissions_grades',
1358 'edit_submissions_grades',
1359 $this->exercise->getRefId(),
1364 foreach ($filtered_user_ids as
$user_id) {
1365 if (is_array($a_selected) &&
1366 !in_array(
$user_id, $a_selected)) {
1371 "status" => $status[
$user_id] ??
null
1381 $this->saveStatus(
$data, $a_redirect);
1390 if ($this->assignment !==
null) {
1391 $this->saveStatusAllObject($this->selected_participants);
1393 $this->saveStatusParticipantObject($this->selected_ass_ids);
1404 bool $a_redirect =
true
1406 $ilCtrl = $this->
ctrl;
1407 $saved_for = array();
1408 foreach ($a_data as
$ass_id => $users) {
1412 foreach ($users as
$user_id => $values) {
1417 foreach ($submission->getUserIds() as $sub_user_id) {
1419 $saved_for[$sub_user_id] = $uname[
"lastname"] .
", " . $uname[
"firstname"];
1421 $member_status = $ass->getMemberStatus($sub_user_id);
1424 $status = $values[
"status"];
1425 if ($status ==
"") {
1426 $status = self::GRADE_NOT_GRADED;
1428 $member_status->setStatus($status);
1429 if (array_key_exists(
"mark", $values)) {
1430 $member_status->setMark($values[
"mark"]);
1432 if (array_key_exists(
"notice", $values)) {
1433 $member_status->setNotice($values[
"notice"]);
1435 $member_status->update();
1441 if ($saved_for !== []) {
1442 $save_for_str =
"(" . implode(
" - ", $saved_for) .
")";
1446 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_status_saved") .
" " . $save_for_str,
true);
1447 $ilCtrl->redirect($this, $this->getViewBack());
1453 $this->exercise->exportGradesExcel();
1467 $ilCtrl = $this->ctrl;
1469 $members = $this->getMultiActionUserIds(
true);
1471 $new_members = array();
1473 foreach ($members as $group) {
1474 if (is_array($group)) {
1475 $new_members = array_merge($new_members, $group);
1477 $first_user = $group;
1478 $first_user = array_shift($first_user);
1484 $new_members[] = $group;
1488 if ($new_members !== []) {
1491 $first_user = array_shift($new_members);
1493 foreach ($new_members as
$user_id) {
1498 $submission =
new ilExSubmission($this->assignment, $first_user);
1499 $this->exercise->processExerciseStatus(
1501 $team->getMembers(),
1502 $submission->hasSubmitted(),
1503 $submission->validatePeerReviews()
1507 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1508 $ilCtrl->redirect($this,
"members");
1516 $ilCtrl = $this->ctrl;
1518 $members = $this->getMultiActionUserIds(
true);
1520 foreach ($members as $group) {
1522 if (is_array($group)) {
1525 $first_user = $group;
1526 $first_user = array_shift($first_user);
1533 $this->exercise->processExerciseStatus(
1541 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1542 $ilCtrl->redirect($this,
"members");
1548 $ilCtrl = $this->
ctrl;
1549 $ilTabs = $this->tabs_gui;
1553 $ilTabs->clearTargets();
1554 $ilTabs->setBackTarget(
1556 $ilCtrl->getLinkTarget($this, $this->getViewBack())
1559 if ($a_form ===
null) {
1560 $a_form = $this->initGroupForm();
1570 $form->setTitle(
$lng->txt(
"exc_adopt_group_teams") .
" - " . $this->assignment->getTitle());
1571 $form->setFormAction($this->
ctrl->getFormAction($this,
"createTeamsFromGroups"));
1573 $all_members = array();
1575 if (count($group[
"members"]) !== 0) {
1577 $grp_value = $options = array();
1578 foreach ($group[
"members"] as
$user_id) {
1581 if (!in_array(
$user_id, $all_members)) {
1587 foreach ($options as
$user_id => $user_name) {
1590 $grp_team->setValue($grp_value);
1593 $grp_team->setValue(
$lng->txt(
"exc_adopt_group_teams_no_members"));
1595 $form->addItem($grp_team);
1598 if ($all_members !== []) {
1599 $form->addCommandButton(
"createTeamsFromGroups",
$lng->txt(
"save"));
1601 $form->addCommandButton(
"members",
$lng->txt(
"cancel"));
1613 $req_members = $this->requested_group_members;
1615 $form = $this->initGroupForm();
1616 if ($form->checkInput()) {
1618 $all_members = $teams = array();
1620 foreach (array_keys($map) as $grp_id) {
1621 if (isset($req_members[$grp_id]) && is_array($req_members[$grp_id])) {
1622 $members = $req_members[$grp_id];
1623 $teams[] = $members;
1624 $invalid_team_members = array();
1627 if (!array_key_exists(
$user_id, $all_members)) {
1631 $invalid_team_members[] =
$user_id;
1635 if ($invalid_team_members !== []) {
1639 foreach ($invalid_team_members as
$user_id) {
1641 $grp_title = $map[$all_members[
$user_id]][
"title"];
1642 $alert[] = sprintf(
$lng->txt(
"exc_adopt_group_teams_conflict"), $user_name, $grp_title);
1644 $input = $form->getItemByPostVar(
"grpt[" . $grp_id .
"]");
1645 $input->setAlert(implode(
"<br/>", $alert));
1650 if ($teams !== []) {
1654 $sum = array(
"added" => 0,
"blocked" => 0);
1655 foreach ($teams as $members) {
1657 if (!$this->exercise->members_obj->isAssigned(
$user_id)) {
1658 $this->exercise->members_obj->assignMember(
$user_id);
1661 if (!in_array(
$user_id, $existing_users)) {
1668 $first = array_shift($members);
1680 if ($sum[
"added"] !== 0) {
1681 $mess[] = sprintf(
$lng->txt(
"exc_adopt_group_teams_added"), $sum[
"added"]);
1683 if ($sum[
"blocked"] !== 0) {
1684 $mess[] = sprintf(
$lng->txt(
"exc_adopt_group_teams_blocked"), $sum[
"blocked"]);
1686 if ($sum[
"added"] !== 0) {
1687 $this->tpl->setOnScreenMessage(
'success', implode(
" ", $mess),
true);
1689 $this->tpl->setOnScreenMessage(
'failure', implode(
" ", $mess),
true);
1692 $this->
ctrl->redirect($this,
"members");
1694 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"form_input_not_valid"));
1698 $form->setValuesByPost();
1699 $this->adoptTeamsFromGroupObject($form);
1711 $form = $this->gui->form([self::class],
"uploadMultiFeedback")
1715 $lng->txt(
"exc_multi_feedback_file"),
1716 $this->handleMultiFeedbackUploadResult(...),
1729 $feedback_zip = $this->domain->assignment()->tutorFeedbackZip();
1730 $rid = $feedback_zip->importFromUploadResult(
1732 $this->
user->getId(),
1735 return new \ILIAS\FileUpload\Handler\BasicHandlerResult(
1752 $this->addSubTabs(
"assignment");
1756 $this->
lng->txt(
"exc_download_zip_structure"),
1757 $this->ctrl->getLinkTarget($this,
"downloadMultiFeedbackZip")
1760 if ($form ===
null) {
1761 $form = $this->getMultiFeedbackForm($this->assignment->getId());
1772 $st_file = $this->domain->assignment()->tutorFeedbackZip()->getMultiFeedbackStructureFile(
1776 $this->gui->httpUtil()->deliverString(
1789 $form = $this->getMultiFeedbackForm($this->assignment->getId());
1790 if ($form->isValid()) {
1791 $this->
ctrl->redirect($this,
"showMultiFeedbackConfirmationTable");
1794 $this->showMultiFeedbackObject($form);
1804 $this->addSubTabs(
"assignment");
1815 $this->
ctrl->redirect($this,
"members");
1823 $feedback_zip = $this->domain->assignment()->tutorFeedbackZip();
1824 $feedback_zip->saveMultiFeedbackFiles(
1826 $this->assignment->getId(),
1827 $this->user->getId(),
1828 $this->requested_files
1831 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1832 $this->
ctrl->redirect($this,
"members");
1846 $modal = $this->ui_factory->modal()->roundtrip(
1847 $lng->txt(
"exc_individual_deadline"),
1848 $this->ui_factory->legacy()->content(
'<div id="ilExcIDlBody"></div>')
1850 $show = $modal->getShowSignal()->getId();
1851 $close = $modal->getCloseSignal()->getId();
1853 $ajax_url = $this->
ctrl->getLinkTarget($this,
"handleIndividualDeadlineCalls",
"",
true,
false);
1856 $tpl->
addOnLoadCode(
"il.ExcIDl.init('" . $ajax_url .
"','" . $show .
"','" . $close .
"');");
1860 return $this->ui_renderer->render($modal);
1872 foreach ($a_data as $item) {
1873 $item = explode(
"_", $item);
1877 if (!array_key_exists(
$ass_id, $ass_tmp)) {
1878 if ($this->assignment &&
1879 $ass_id == $this->assignment->getId()) {
1880 $ass_tmp[
$ass_id] = $this->assignment;
1889 return array($map, $ass_tmp);
1902 $this->
ctrl->saveParameter($this,
"part_id");
1906 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
1907 $this->
ctrl->redirect($this, $this->assignment !==
null
1909 :
"showParticipant");
1913 if ($this->requested_idl_id !=
"") {
1914 $tmp = $this->parseIndividualDeadlineData(explode(
",", $this->requested_idl_id));
1915 if (is_array($tmp)) {
1916 $form = $this->initIndividualDeadlineForm($tmp[1], $tmp[0]);
1917 echo $form->getHTML() .
1924 $post = $this->
http->request()->getParsedBody();
1925 foreach (array_keys(
$post) as
$id) {
1926 if (substr(
$id, 0, 3) ==
"dl_") {
1927 $tmp[] = substr(
$id, 3);
1930 $tmp = $this->parseIndividualDeadlineData($tmp);
1935 $form = $this->initIndividualDeadlineForm($ass_map, $users);
1937 if (
$valid = $form->checkInput()) {
1938 foreach ($users as
$ass_id => $users2) {
1945 $date_field = $form->getItemByPostVar(
"dl_" .
$ass_id .
"_" .
$user_id);
1957 $form->setValuesByPost();
1958 echo $form->getHTML() .
1964 foreach ($users as
$id => $date) {
1965 $ass->setIndividualDeadline(
$id, $date);
1966 if (is_numeric(
$id)) {
1971 $subm = $this->domain->submission($ass->getId());
1972 $subm->recalculateLateSubmissions();
1991 $form->setName(
"ilExcIDlForm");
1993 foreach ($ids as
$ass_id => $users) {
1997 $section->setTitle($ass->getTitle());
1998 $form->addItem($section);
2002 $values = $ass->getIndividualDeadlines();
2004 foreach ($users as
$id) {
2006 if (is_numeric(
$id)) {
2008 $name = $name[
"lastname"] .
", " . $name[
"firstname"];
2013 $team_id = (
int) substr(
$id, 1);
2014 if (array_key_exists($team_id, $teams)) {
2016 foreach ($teams[$team_id]->getMembers() as $member_id) {
2018 $name[] = $uname[
"lastname"] .
", " . $uname[
"firstname"];
2021 $name = implode(
"<br />", $name);
2026 $dl->setShowTime(
true);
2027 $dl->setRequired(
true);
2028 $form->addItem($dl);
2030 if (array_key_exists(
$id, $values)) {
2036 $form->addCommandButton(
"", $this->
lng->txt(
"save"));
2047 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"select_one"));
2049 if ($this->assignment !==
null) {
2050 $this->membersObject();
2052 $this->showParticipantObject();
2058 if ($this->requested_filter_status !=
"") {
2059 $this->
filter[
"status"] = $this->requested_filter_status;
2062 $this->
lng->loadLanguageModule(
"search");
2064 $this->
toolbar->setFormAction($this->
ctrl->getFormAction($this,
"listTextAssignment"));
2070 "" => $this->
lng->txt(
"search_any"),
2071 self::GRADE_NOT_GRADED => $this->lng->txt(
"exc_notgraded"),
2072 self::GRADE_PASSED => $this->lng->txt(
"exc_passed"),
2073 self::GRADE_FAILED => $this->lng->txt(
"exc_failed")
2075 $si_status->setOptions($options);
2076 $si_status->setValue($this->
filter[
"status"] ??
"");
2080 self::FEEDBACK_FULL_SUBMISSION => $this->
lng->txt(
"submissions_feedback"),
2081 self::FEEDBACK_ONLY_SUBMISSION => $this->lng->txt(
"submissions_only")
2083 $si_feedback->setOptions($options);
2084 $si_feedback->setValue($this->
filter[
"feedback"] ??
"");
2086 $this->
toolbar->addInputItem($si_status,
true);
2090 if ($this->assignment->getPeerReview()) {
2091 if ($this->requested_filter_feedback !=
"") {
2092 $this->
filter[
"feedback"] = $this->requested_filter_feedback;
2094 $this->
filter[
"feedback"] =
"submission_feedback";
2099 "submission_feedback" => $this->
lng->txt(
"submissions_feedback"),
2100 "submission_only" => $this->lng->txt(
"submissions_only")
2102 $si_feedback->setOptions($options);
2103 $si_feedback->setValue($this->
filter[
"feedback"] ??
"");
2105 $this->
toolbar->addInputItem($si_feedback,
true);
2109 $this->
lng->txt(
"filter"),
2110 "listTextAssignment"
2111 )->submit()->toToolbar();
2119 $this->openSubmissionViewObject(
true);
2129 $member_id = $this->requested_member_id;
2132 $entry = $submission->getSubmittedEntry($print_version);
2133 if (is_null($entry)) {
2134 throw new ilExerciseException(
"No submission entry for " . $this->assignment->getId() .
" / " .
2137 $rid = $entry->getRid();
2139 $last_opening = $submission->getLastOpeningHTMLView();
2140 $submission_time = $submission->getLastSubmission();
2144 $this->assignment->getExerciseId(),
2146 ) .
"/subm_" . $this->assignment->getId() .
"/" . $member_id .
"/resource.zip";
2147 $obj_id = str_replace([
".zip",
"print"],
"", $entry->getTitle());
2148 $obj_id = $this->assignment->getAssignmentType()->getExportObjIdForResourceId($obj_id);
2150 if ($print_version) {
2154 $obj_dir = $this->assignment->getAssignmentType()->getStringIdentifier() .
"_" . $obj_id;
2158 DIRECTORY_SEPARATOR .
2160 DIRECTORY_SEPARATOR .
2161 dirname($zip_internal_path) .
2164 DIRECTORY_SEPARATOR .
2166 $this->log->debug(
"index html file: " . $index_html_file);
2168 $web_filesystem =
$DIC->filesystem()->web();
2169 if ($last_opening > $submission_time && $web_filesystem->has($index_html_file)) {
2175 $file_copied = $this->domain->submission($this->ass_id)->copyRidToWebDir($rid, $zip_internal_path);
2180 $this->zip->unzipFile($file_copied);
2181 $web_filesystem->delete($zip_internal_path);
2182 $this->log->debug(
"deleting: " . $zip_internal_path);
2184 $submission_repository = $this->service->repo()->submission();
2185 $submission_repository->updateWebDirAccessTime($this->assignment->getId(), $member_id);
2190 $error_msg = $this->
lng->txt(
"exc_copy_zip_error");
2192 if ($error_msg ===
'' || $error_msg ===
'0') {
2193 $error_msg = $this->
lng->txt(
"exc_find_zip_error");
2196 $this->tpl->setOnScreenMessage(
'failure', $error_msg);
2203 string $external_file_path
2205 list($external_path, $internal_file_path) = explode(
CLIENT_ID .
"/ilExercise", $external_file_path);
2206 $internal_file_path =
"ilExercise" . $internal_file_path;
2207 return $internal_file_path;
2216 $this->tabs_gui->clearTargets();
2217 $this->tabs_gui->setBackTarget(
2218 $this->
lng->txt(
"back"),
2219 $this->ctrl->getLinkTarget($this,
"members")
2240 $data[
"peer"] = array();
2241 foreach ($peer_review->getPeerReviewsByPeerId(
$user_id) as $value) {
2242 $data[
"peer"][] = $value[
'giver_id'];
2246 $data[
"fb_given"] = $peer_review->countGivenFeedback(
true,
$user_id);
2254 $ass_id = $this->request->getAssId();
2255 $selected_users = $this->request->getSelectedParticipants();
2257 $graded_users = array_filter($selected_users,
function (
$user_id) {
2258 return $this->assignment->getMemberStatus(
$user_id)->getStatus() !==
"notgraded";
2261 if (count($graded_users) === 0) {
2262 $this->tpl->setOnScreenMessage(
"failure", $this->
lng->txt(
"exc_no_graded_mem_selected"),
true);
2263 $this->
ctrl->redirect($this, $this->getViewBack());
2268 $not->setAssignmentId(
$ass_id);
2269 $not->setObjId($this->exercise->getId());
2270 $not->setRefId($this->exercise->getRefId());
2271 $not->setRecipients($graded_users);
2273 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"exc_graded_mem_notified"),
true);
2274 $this->
ctrl->redirect($this, $this->getViewBack());
2279 $members = $this->getMultiActionUserIds();
2281 if ($this->assignment !==
null) {
2282 foreach (array_keys($members) as $mem) {
2284 $this->setSingleStatus($this->assignment->getId(), $mem,
"failed");
2287 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"msg_obj_modified"),
true);
2290 $this->
ctrl->redirect($this,
"members");
2295 $members = $this->getMultiActionUserIds();
2297 if ($this->assignment !==
null) {
2298 foreach (array_keys($members) as $mem) {
2300 $this->setSingleStatus($this->assignment->getId(), $mem,
"passed");
2303 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"msg_obj_modified"),
true);
2306 $this->
ctrl->redirect($this,
"members");
2313 $member_status = $ass->getMemberStatus($part_id);
2314 $member_status->setStatus($status);
2315 $member_status->update();
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
setVariable($variable, $value='')
Sets a variable value.
Builds a Color from either hex- or rgb values.
Exercise gui request wrapper.
getSelectedParticipants()
getTutorNotices()
key might be ass_ids or user_ids!
getMarks()
key might be ass_ids or user_ids!
getStatus()
key might be ass_ids or user_ids!
Exercise UI frontend presentation service class.
request(?array $query_params=null, ?array $post_data=null)
Get request wrapper.
Exercise internal service.
Class BasicHandlerResult.
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static initDateTimePicker()
This class represents an option in a checkbox group.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilCtrl provides processing control methods.
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
@classDescription Date and time handling
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.
Download submissions and feedback for exercises.
static getAssignmentTeamMap(int $a_ass_id)
static getAdoptableGroups(int $a_exc_ref_id)
static getInstanceByUserId(int $a_assignment_id, int $a_user_id, bool $a_create_on_demand=false)
static getInstancesFromMap(int $a_assignment_id)
static getGroupMembersMap(int $a_exc_ref_id)
static getInstancesByExercise(int $a_exc_id)
static lookupTitle(int $a_id)
Exercise participant 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...
Exercise submission //TODO: This class has many static methods related to delivered "files".
static getAssignmentParticipants(int $a_exercise_id, int $a_ass_id)
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...
@ilCtrl_Calls ilExerciseManagementGUI: ilRepositorySearchGUI @ilCtrl_Calls ilExerciseManagementGUI: i...
ILIAS Exercise Notification NotificationManager $notification
initIndividualDeadlineModal()
initIndividualDeadlineForm(array $a_ass_map, array $ids)
ilExAssignment $assignment
redirectFeedbackMailObject()
showParticipantResetObject()
handleMultiFeedbackUploadResult(FileUpload $upload, UploadResult $result)
confirmDeassignMembersObject()
uploadMultiFeedbackObject()
Upload multi feedback file.
array $requested_learning_comments
array $listed_participants
collectFeedbackDataFromPeer(int $user_id, string $ts, string $text)
TutorFeedbackFileManager $tutor_feedback_file
addSubTabs(string $a_activate)
saveStatus(array $a_data, bool $a_redirect=true)
getMultiActionUserIds(bool $a_keep_teams=false)
string $requested_comment
saveEvaluationFromModalObject()
array $selected_participants
getMultiFeedbackForm(int $a_ass_id)
TaskFactory $task_factory
__construct(InternalService $service, ?ilExAssignment $a_ass=null)
Constructor.
saveStatusSelectedObject()
ILIAS HTTP Services $http
adoptTeamsFromGroupObject(?ilPropertyFormGUI $a_form=null)
string $requested_filter_feedback
openSubmissionViewObject(bool $print_version=false)
Open HTML view for portfolio submissions.
showMultiFeedbackConfirmationTableObject()
Show multi feedback confirmation table.
saveMultiFeedbackObject()
Save multi feedback.
setIndividualDeadlineObject()
getEvaluationModalForm(array $a_data)
ilExerciseSubmissionFeedbackGUI $feedback_gui
showMultiFeedbackObject(?FormAdapterGUI $form=null)
string $requested_filter_status
getWebFilePathFromExternalFilePath(string $external_file_path)
Get the object specific file path from an external full file path.
openSubmissionPrintViewObject()
Open HTML view for portfolio submissions.
cancelMultiFeedbackObject()
Cancel Multi Feedback.
sendGradingNotificationObject()
array $requested_group_members
membersObject()
All participants and submission of one assignment.
parseIndividualDeadlineData(array $a_data)
saveStatusParticipantObject(?array $selected_ass_ids=null)
Save assignment status (participant view)
showGradesOverviewObject()
array $requested_tutor_notices
addUserFromAutoCompleteObject()
compareTextAssignmentsObject()
TODO -> Deal with the redirection after update the grade via action button.
selectParticipantObject()
getReportPanel(array $a_data)
string $requested_user_login
setSingleStatus($ass_id, $part_id, $status)
showParticipantObject()
Show Participant.
getEvaluationModal(array $a_data)
const FEEDBACK_ONLY_SUBMISSION
downloadMultiFeedbackZipObject()
Download multi-feedback structrue file.
ILIAS Exercise InternalDomainService $domain
handleIndividualDeadlineCallsObject()
addMembersObject($a_user_ids=array())
showParticipantApplyObject()
const FEEDBACK_FULL_SUBMISSION
ilGlobalTemplateInterface $tpl
downloadSubmissionsObject(?array $selected_participants=null)
createTeamsFromGroupsObject()
saveStatusAllObject(?array $a_selected=null, bool $a_redirect=true)
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...
static createPathFromId(int $a_container_id, string $a_name)
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...
Component logger with individual log levels by component id.
This class represents a non editable value in a property form.
static _lookupName(int $a_user_id)
static _lookupId(string|array $a_user_str)
static _lookupLogin(int $a_user_id)
static _lookupType(int $id, bool $reference=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
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=null)
Default behaviour is:
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static redirect(string $a_script)
static signFolderOfStartFile(string $start_file_path)
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.
getOnLoadCodeForAsynch()
Get js onload code for ajax calls.
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
setContent(string $a_html)
Sets content for standard template.
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.
This is how the factory for UI elements looks.
An entity that renders components to a string output.
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
filterUserIdsByRbacOrPositionOfCurrentUser(string $rbac_perm, string $pos_perm, int $ref_id, array $user_ids)
static http()
Fetches the global http state from ILIAS.
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
if(!file_exists('../ilias.ini.php'))