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) {
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 $mem_data = $this->assignment->getMemberListData();
451 if (count($mem_data) > 0) {
453 $ilToolbar->addButton(
454 $this->
lng->txt(
"exc_multi_feedback"),
455 $this->ctrl->getLinkTarget($this,
"showMultiFeedback")
458 $ilToolbar->addSeparator();
463 $submission_repository = $this->service->repo()->submission();
465 if ($submission_repository->hasSubmissions($this->assignment->getId()) !== 0) {
466 $ass_type = $this->assignment->getType();
469 $ilToolbar->addFormButton(
$lng->
txt(
"exc_list_text_assignment"),
"listTextAssignment");
471 $ilToolbar->addFormButton(
$lng->
txt(
"download_all_returned_files"),
"downloadSubmissions");
473 $this->
ctrl->setParameter($this,
"vw", self::VIEW_ASSIGNMENT);
479 $this->assignment->getId(),
483 $exc_tab->getHTML() .
484 $this->initIndividualDeadlineModal()
487 $this->tpl->setOnScreenMessage(
'info',
$lng->
txt(
"exc_no_assignments_available"));
490 $ilCtrl->setParameter($this,
"ass_id",
"0");
495 if (count($this->selected_participants) > 0) {
507 $this->exercise->getRefId(),
508 $this->exercise->getId(),
514 if ($download_task->run()) {
515 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'exc_down_files_started_bg'),
true);
523 if ($this->assignment !==
null) {
524 $this->
ctrl->redirect($this,
"members");
526 $this->
ctrl->redirect($this,
"showParticipant");
540 $this->assignment->getId(),
543 $exc_tab->resetOffset();
544 $exc_tab->writeFilterToSession();
558 $this->assignment->getId(),
561 $exc_tab->resetOffset();
562 $exc_tab->resetFilter();
572 foreach ($this->requested_learning_comments as $k => $v) {
573 $marks_obj =
new ilLPMarks($this->exercise->getId(), (
int) $k);
574 $marks_obj->setComment($v);
575 $marks_obj->update();
577 foreach ($this->requested_marks as $k => $v) {
578 $marks_obj =
new ilLPMarks($this->exercise->getId(), (
int) $k);
579 $marks_obj->setMark($v);
580 $marks_obj->update();
582 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"exc_msg_saved_grades"),
true);
583 $ilCtrl->redirect($this,
"showGradesOverview");
593 public function listTextAssignmentObject(): void
599 $button_print = $this->ui_factory->button()->standard($this->
lng->txt(
'print'),
"#")
600 ->withOnLoadCode(
function (
$id) {
601 return "$('#$id').click(function() { window.print(); return false; });";
603 $this->
toolbar->addSeparator();
604 $this->
toolbar->addComponent($button_print);
606 $group_panels_tpl =
new ilTemplate(
"tpl.exc_group_report_panels.html",
true,
true,
"components/ILIAS/Exercise");
607 $group_panels_tpl->setVariable(
'TITLE', $this->
lng->txt(
"exc_list_text_assignment") .
": " . $this->assignment->getTitle());
614 $members = $members_filter->filterParticipantsByAccess();
616 $sm = $this->domain->submission($this->assignment->getId());
617 foreach ($sm->getSubmissionsOfOwners($members) as $sub) {
618 if (trim($sub->getText()) && $this->domain->profile()->exists($sub->getUserId())) {
621 $sub->getTimestamp(),
624 $submission_data = $this->assignment->getExerciseMemberAssignmentData($sub->getUserId(), $this->filter[
"status"] ??
"");
626 if (is_array($submission_data)) {
627 $data = array_merge($feedback_data, $submission_data);
633 if ($total_reports == 0) {
634 $mess = $this->ui_factory->messageBox()->info($this->
lng->txt(
"fiter_no_results"));
635 $report_html .= $this->ui_renderer->render($mess);
638 $group_panels_tpl->setVariable(
'CONTENT', $report_html);
639 $this->tpl->setContent($group_panels_tpl->get());
650 $subm = $this->domain->submission($this->assignment->getId());
652 $group_panels_tpl =
new ilTemplate(
"tpl.exc_group_report_panels.html",
true,
true,
"components/ILIAS/Exercise");
653 $group_panels_tpl->setVariable(
'TITLE', $this->
lng->txt(
"exc_compare_selected_submissions"));
659 foreach ($participants as $participant_id) {
660 $subs = $subm->getSubmissionsOfUser($participant_id);
663 if ($s = $subs->current()) {
664 $ts = $s->getTimestamp();
665 $text = $s->getText();
674 $submission_data = $this->assignment->getExerciseMemberAssignmentData((
int) $participant_id, $this->
filter[
"status"] ??
"");
676 if (is_array($submission_data)) {
677 $data = array_merge($feedback_data, $submission_data);
682 $group_panels_tpl->setVariable(
'CONTENT', $report_html);
683 $this->tpl->setContent($group_panels_tpl->get());
693 $this->
ctrl->setParameter($this,
"member_id", $a_data[
'uid']);
695 $this->ui_factory->button()->shy($this->lng->txt(
"grade_evaluate"),
"#")->withOnClick($modal->getShowSignal())
698 if ($this->exercise->hasTutorFeedbackMail()) {
699 $actions[] = $this->ui_factory->button()->shy(
700 $this->
lng->txt(
"exc_tbl_action_feedback_mail"),
701 $this->ctrl->getLinkTarget($this,
"redirectFeedbackMail")
704 if ($this->exercise->hasTutorFeedbackFile()) {
705 $actions[] = $this->ui_factory->button()->shy(
706 $this->
lng->txt(
"exc_tbl_action_feedback_file"),
707 $this->ctrl->getLinkTargetByClass(ilResourceCollectionGUI::class)
711 $this->
ctrl->setParameter($this,
"member_id",
"");
713 $actions_dropdown = $this->ui_factory->dropdown()->standard($actions);
714 if ($a_data[
'status'] == self::GRADE_NOT_GRADED) {
715 $str_status_key = $this->
lng->txt(
'exc_tbl_status') .
": ";
716 $str_status_value =
"-";
718 $str_status_key = $this->
lng->txt(
'exc_tbl_status_time') .
": ";
722 $str_mark_key = $this->
lng->txt(
"exc_tbl_mark") .
": ";
723 $str_mark_value =
"-";
725 if (($a_data[
'mark'] !=
"")) {
726 $str_mark_value = $a_data[
'mark'];
729 if ($a_data[
'feedback_time']) {
730 $str_evaluation_key = $this->
lng->txt(
'exc_tbl_feedback_time') .
": ";
733 $str_evaluation_key = $this->
lng->txt(
'exc_settings_feedback') .
": ";
734 $str_evaluation_value =
"-";
737 $card_content = array(
739 $str_status_key => $str_status_value,
740 $str_mark_key => $str_mark_value,
741 $str_evaluation_key => $str_evaluation_value,
742 $this->
lng->txt(
'feedback_given') .
": " => $a_data[
'fb_given'],
743 $this->lng->txt(
'feedback_received') .
": " => $a_data[
'fb_received']
745 $card_tpl =
new ilTemplate(
"tpl.exc_report_details_card.html",
true,
true,
"components/ILIAS/Exercise");
746 foreach ($card_content as $key => $value) {
747 $card_tpl->setCurrentBlock(
"assingment_card");
748 $card_tpl->setVariable(
"ROW_KEY", $key);
749 $card_tpl->setVariable(
"ROW_VALUE", $value);
750 $card_tpl->parseCurrentBlock();
753 $main_panel = $this->ui_factory->panel()->sub($a_data[
'uname'], $this->ui_factory->legacy()->content(
754 $this->gui->html()->escapeCurly($a_data[
'utext'])
756 ->withFurtherInformation($this->ui_factory->card()->standard($this->lng->txt(
'text_assignment'))->withSections(array($this->ui_factory->legacy()->content($card_tpl->get()))))->withActions($actions_dropdown);
758 $feedback_tpl =
new ilTemplate(
"tpl.exc_report_feedback.html",
true,
true,
"components/ILIAS/Exercise");
760 $filter_feedback = $this->
filter[
"feedback"] ??
"";
761 if (array_key_exists(
"peer", $a_data) && (($filter_feedback == self::FEEDBACK_FULL_SUBMISSION) || $filter_feedback ==
"")) {
762 $feedback_tpl->setCurrentBlock(
"feedback");
763 foreach ($a_data[
"peer"] as $peer_id) {
768 $peer_name = $this->
lng->txt(
"exc_deleted_user");
771 $feedback_tpl->setCurrentBlock(
"peer_feedback");
772 $feedback_tpl->setVariable(
"PEER_NAME", $peer_name);
774 $submission =
new ilExSubmission($this->assignment, $a_data[
"uid"]);
775 $values = $submission->getPeerReview()->getPeerReviewValues($peer_id, $a_data[
"uid"]);
778 foreach ($this->assignment->getPeerReviewCriteriaCatalogueItems() as $crit) {
779 $crit_id = $crit->getId()
782 $crit->setPeerReviewContext($this->assignment, $peer_id, $a_data[
"uid"]);
785 '<div class="ilBlockPropertyCaption">' . $crit->getTitle() .
'</div>' .
786 '<div style="margin:2px 0;">' . $crit->getHTML($values[$crit_id] ??
null) .
'</div>';
788 $feedback_tpl->setVariable(
"PEER_FEEDBACK", $review_html);
789 $feedback_tpl->parseCurrentBlock();
791 $feedback_tpl->parseCurrentBlock();
793 $feedback_tpl->setVariable(
"GRADE", $this->
lng->txt(
'exc_grading') .
": " . $this->lng->txt(
'exc_' . $a_data[
'status']));
794 $comment = ($a_data[
'comment'] ===
"")
796 : $a_data[
'comment'];
797 $feedback_tpl->setVariable(
"COMMENT", $this->
lng->txt(
'exc_comment') .
": <br>" .
$comment);
799 $feedback_panel = $this->ui_factory->panel()->sub(
"", $this->ui_factory->legacy()->content($feedback_tpl->get()));
801 $report = $this->ui_factory->panel()->report(
"", array($main_panel, $feedback_panel));
803 return $this->ui_renderer->render([$modal,$report]);
809 $more_id = $a_data[
'uid'];
810 $this->tpl->addJavaScript(
"assets/js/exc-text-more.js");
811 $modal_tpl =
new ilTemplate(
"tpl.exc_report_evaluation_modal.html",
true,
true,
"components/ILIAS/Exercise");
812 $modal_tpl->setVariable(
"USER_NAME", $a_data[
'uname']);
816 if ($this->exercise->hasTutorFeedbackText()) {
818 $more_button = $this->gui->ui()->factory()->button()->standard($this->
lng->txt(
"exc_show_more"),
"#");
819 $text =
"<div data-exc-show-more='$more_id'><div>";
820 $text .= $a_data[
"utext"];
821 $text .=
"</div><div>";
822 $text .= $this->gui->ui()->renderer()->render($more_button);
823 $text .=
"</div></div>";
824 $modal_tpl->setVariable(
"USER_TEXT",
$text);
827 $modal_tpl->setVariable(
"FORM", $form->getHTML());
829 $form_id =
'form_' . $form->getId();
830 $submit_btn = $this->ui_factory->button()->primary($this->
lng->txt(
"save"),
'#')
831 ->withOnLoadCode(
function (
$id) use ($form_id) {
832 return "$('#$id').click(function() { $('#$form_id').submit(); return false; });";
835 return $this->ui_factory->modal()->roundtrip(strtoupper($this->
lng->txt(
"grade_evaluate")), $this->ui_factory->legacy()->content($modal_tpl->get()))->withActionButtons([$submit_btn]);
842 $this->
ctrl->setParameterByClass(
845 $this->assignment->getId()
847 $form->setFormAction($this->
ctrl->getFormAction($this,
"saveEvaluationFromModal"));
848 $form->setId(uniqid(
'form'));
852 self::GRADE_NOT_GRADED => $this->
lng->txt(
"exc_notgraded"),
853 self::GRADE_PASSED => $this->lng->txt(
"exc_passed"),
854 self::GRADE_FAILED => $this->lng->txt(
"exc_failed")
858 $si->setValue($a_data[
'status'] ??
"");
863 $mark_input->setValue($a_data[
'mark'] ??
"");
864 $mark_input->setMaxLength(32);
865 $mark_input->setSize(4);
866 $form->addItem($mark_input);
869 $item->setValue($a_data[
'uid'] ??
"");
870 $form->addItem($item);
873 if ($this->exercise->hasTutorFeedbackText()) {
875 $ta->setInfo($this->
lng->txt(
"exc_comment_for_learner_info"));
876 $ta->setValue($a_data[
'comment'] ??
"");
890 $form = $this->getEvaluationModalForm([]);
895 if ($form->checkInput()) {
896 $comment = trim($form->getInput(
'comment'));
898 $grade = trim($form->getInput(
'grade'));
899 $mark = trim($form->getInput(
'mark'));
901 if ($this->assignment->getId() &&
$user_id > 0) {
902 $member_status = $this->assignment->getMemberStatus(
$user_id);
905 $member_status->setStatus($grade);
907 $member_status->setMark($mark);
909 $member_status->setFeedback(
true);
911 $member_status->update();
913 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_status_saved"),
true);
914 $this->
ctrl->redirect($this,
"listTextAssignment");
924 if ($this->requested_user_login ==
"") {
925 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_no_search_string'));
926 $this->membersObject();
929 $users = explode(
',', $this->requested_user_login);
932 foreach ($users as $user) {
936 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'user_not_known'));
937 $this->membersObject();
944 $this->addMembersObject($user_ids);
950 if (!count($a_user_ids)) {
951 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
953 if (!$this->exercise->members_obj->assignMembers($a_user_ids)) {
954 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"exc_members_already_assigned"),
true);
956 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_members_assigned"),
true);
959 $this->
ctrl->redirect($this,
"members");
968 $ctrl->
setParameter($this,
"ass_id", $this->requested_ass_id);
978 $ilToolbar = $this->toolbar;
979 $ilCtrl = $this->ctrl;
981 $access = $this->access;
983 $this->addSubTabs(
"participant");
984 $this->
ctrl->setParameter($this,
"ass_id",
"0");
987 $members = $this->exercise->members_obj->getMembers();
990 'edit_submissions_grades',
991 'edit_submissions_grades',
992 $this->exercise->getRefId(),
997 if (count($members) == 0) {
998 $this->tpl->setOnScreenMessage(
'info',
$lng->txt(
"exc_no_participants"));
1003 foreach ($members as $mem_id) {
1006 if (trim($name[
"login"]) !=
"") {
1007 $mems[$mem_id] = $name;
1014 if ($this->requested_part_id == 0 && $mems !== [] && key($mems) > 0) {
1015 $ilCtrl->setParameter($this,
"part_id", key($mems));
1016 $ilCtrl->redirect($this,
"showParticipant");
1019 $current_participant = $this->requested_part_id;
1022 if (count($mems) > 1) {
1024 foreach ($mems as $k => $m) {
1026 $m[
"lastname"] .
", " . $m[
"firstname"] .
" [" . $m[
"login"] .
"]";
1030 $si->setValue($current_participant);
1031 $ilToolbar->addStickyItem($si,
true);
1034 $this->
lng->txt(
"select"),
1036 )->submit()->toToolbar(
true);
1040 $this->
ctrl->setParameter($this,
"vw", self::VIEW_PARTICIPANT);
1041 $this->
ctrl->setParameter($this,
"part_id", $current_participant);
1045 if (count($ass) > 0) {
1046 $ilToolbar->addSeparator();
1047 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1048 $ilToolbar->addFormButton(
$lng->txt(
"download_all_returned_files"),
"downloadSubmissions");
1055 $current_participant,
1059 $this->initIndividualDeadlineModal());
1061 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"exc_no_assignments_available"));
1073 $this->requested_part_id,
1076 $exc_tab->resetOffset();
1077 $exc_tab->writeFilterToSession();
1079 $this->showParticipantObject();
1090 $this->requested_part_id,
1093 $exc_tab->resetOffset();
1094 $exc_tab->resetFilter();
1096 $this->showParticipantObject();
1104 $ctrl = $this->ctrl;
1105 $ctrl->
setParameter($this,
"part_id", $this->requested_part_id);
1106 $ctrl->
redirect($this,
"showParticipant");
1112 $ilToolbar = $this->toolbar;
1113 $ilCtrl = $this->ctrl;
1116 $this->addSubTabs(
"grades");
1119 $mems = $mem_obj->getMembers();
1121 $mems =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
1122 'edit_submissions_grades',
1123 'edit_submissions_grades',
1124 $this->exercise->getRefId(),
1127 if (count($mems) > 0) {
1128 $ilToolbar->addButton(
1129 $lng->txt(
"exc_export_excel"),
1130 $ilCtrl->getLinkTarget($this,
"exportExcel")
1134 $this->
ctrl->setParameter($this,
"vw", self::VIEW_GRADES);
1138 "showGradesOverview",
1150 if ($this->requested_member_id > 0) {
1151 $submission =
new ilExSubmission($this->assignment, $this->requested_member_id);
1152 $members = $submission->getUserIds();
1153 } elseif ($members = $this->getMultiActionUserIds()) {
1154 $members = array_keys($members);
1157 if ($members !== []) {
1160 $member_status = $this->assignment->getMemberStatus(
$user_id);
1161 $member_status->setFeedback(
true);
1162 $member_status->update();
1166 $logins = implode(
",", $logins);
1169 $sig = chr(13) . chr(10) . chr(13) . chr(10);
1170 $sig .= $this->
lng->txt(
'exc_mail_permanent_link');
1171 $sig .= chr(13) . chr(10) . chr(13) . chr(10);
1172 $sig .= ilLink::_getLink($this->exercise->getRefId());
1173 $sig = rawurlencode(base64_encode($sig));
1177 $this->getViewBack(),
1181 'rcp_to' => $logins,
1197 if ($this->assignment !==
null) {
1198 if (count($this->selected_participants) == 0) {
1199 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1200 $this->
ctrl->redirect($this,
"members");
1203 foreach ($this->selected_participants as
$user_id) {
1205 $tmembers = $submission->getUserIds();
1206 if (!$a_keep_teams) {
1207 foreach ($tmembers as $tuser_id) {
1208 $members[$tuser_id] = 1;
1212 $members[] = $tmembers;
1222 if (count($this->selected_ass_ids) == 0) {
1223 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1224 $this->
ctrl->redirect($this,
"showParticipant");
1227 $user_id = $this->requested_part_id;
1229 foreach ($this->selected_ass_ids as
$ass_id) {
1231 $tmembers = $submission->getUserIds();
1232 if (!$a_keep_teams) {
1233 foreach ($tmembers as $tuser_id) {
1234 $members[
$ass_id][] = $tuser_id;
1238 $members[
$ass_id][] = $tmembers;
1257 $members = $this->getMultiActionUserIds();
1259 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_sent"),
true);
1260 if ($this->assignment !==
null) {
1261 $this->exercise->sendAssignment($this->assignment, array_keys($members));
1262 $this->
ctrl->redirect($this,
"members");
1264 foreach ($members as
$ass_id => $users) {
1267 $this->
ctrl->setParameter($this,
"part_id", $this->requested_part_id);
1268 $this->
ctrl->redirect($this,
"showParticipant");
1277 $ilCtrl = $this->ctrl;
1281 $members = $this->getMultiActionUserIds();
1284 $cgui->setFormAction($ilCtrl->getFormAction($this));
1285 $cgui->setHeaderText(
$lng->txt(
"exc_msg_sure_to_deassign_participant"));
1286 $cgui->setCancel(
$lng->txt(
"cancel"),
"members");
1287 $cgui->setConfirm(
$lng->txt(
"remove"),
"deassignMembers");
1288 foreach ($members as $k => $m) {
1306 $ilCtrl = $this->ctrl;
1309 $member_ids = $this->request->getMemberIds();
1311 foreach ($member_ids as $usr_id) {
1312 $this->exercise->members_obj->deassignMember((
int) $usr_id);
1314 $this->tpl->setOnScreenMessage(
'success',
$lng->txt(
"exc_msg_participants_removed"),
true);
1315 $ilCtrl->redirect($this,
"members");
1324 $ilCtrl = $this->ctrl;
1326 $member_id = $this->requested_part_id;
1328 $marks = $this->requested_marks;
1329 $status = $this->requested_status;
1330 $notices = $this->requested_tutor_notices;
1331 foreach ($this->listed_ass_ids as
$ass_id) {
1332 if (is_array($selected_ass_ids) &&
1333 !in_array(
$ass_id, $selected_ass_ids)) {
1338 "status" => $status[
$ass_id] ??
""
1343 if (isset($notices[
$ass_id])) {
1348 $ilCtrl->setParameter($this,
"part_id", $member_id);
1349 $this->saveStatus(
$data);
1356 ?array $a_selected =
null,
1357 bool $a_redirect =
true
1359 $user_ids = $this->listed_participants;
1360 $marks = $this->requested_marks;
1361 $notices = $this->requested_tutor_notices;
1362 $status = $this->requested_status;
1363 $filtered_user_ids =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
1364 'edit_submissions_grades',
1365 'edit_submissions_grades',
1366 $this->exercise->getRefId(),
1371 foreach ($filtered_user_ids as
$user_id) {
1372 if (is_array($a_selected) &&
1373 !in_array(
$user_id, $a_selected)) {
1378 "status" => $status[
$user_id] ??
null
1388 $this->saveStatus(
$data, $a_redirect);
1397 if ($this->assignment !==
null) {
1398 $this->saveStatusAllObject($this->selected_participants);
1400 $this->saveStatusParticipantObject($this->selected_ass_ids);
1411 bool $a_redirect =
true
1413 $ilCtrl = $this->
ctrl;
1414 $saved_for = array();
1415 foreach ($a_data as
$ass_id => $users) {
1419 foreach ($users as
$user_id => $values) {
1424 foreach ($submission->getUserIds() as $sub_user_id) {
1426 $saved_for[$sub_user_id] = $uname[
"lastname"] .
", " . $uname[
"firstname"];
1428 $member_status = $ass->getMemberStatus($sub_user_id);
1431 $status = $values[
"status"];
1432 if ($status ==
"") {
1433 $status = self::GRADE_NOT_GRADED;
1435 $member_status->setStatus($status);
1436 if (array_key_exists(
"mark", $values)) {
1437 $member_status->setMark($values[
"mark"]);
1439 if (array_key_exists(
"notice", $values)) {
1440 $member_status->setNotice($values[
"notice"]);
1442 $member_status->update();
1448 if ($saved_for !== []) {
1449 $save_for_str =
"(" . implode(
" - ", $saved_for) .
")";
1453 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_status_saved") .
" " . $save_for_str,
true);
1454 $ilCtrl->redirect($this, $this->getViewBack());
1460 $this->exercise->exportGradesExcel();
1474 $ilCtrl = $this->ctrl;
1476 $members = $this->getMultiActionUserIds(
true);
1478 $new_members = array();
1480 foreach ($members as $group) {
1481 if (is_array($group)) {
1482 $new_members = array_merge($new_members, $group);
1484 $first_user = $group;
1485 $first_user = array_shift($first_user);
1491 $new_members[] = $group;
1495 if ($new_members !== []) {
1498 $first_user = array_shift($new_members);
1500 foreach ($new_members as
$user_id) {
1505 $submission =
new ilExSubmission($this->assignment, $first_user);
1506 $this->exercise->processExerciseStatus(
1508 $team->getMembers(),
1509 $submission->hasSubmitted(),
1510 $submission->validatePeerReviews()
1514 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1515 $ilCtrl->redirect($this,
"members");
1523 $ilCtrl = $this->ctrl;
1525 $members = $this->getMultiActionUserIds(
true);
1527 foreach ($members as $group) {
1529 if (is_array($group)) {
1532 $first_user = $group;
1533 $first_user = array_shift($first_user);
1540 $this->exercise->processExerciseStatus(
1548 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1549 $ilCtrl->redirect($this,
"members");
1555 $ilCtrl = $this->
ctrl;
1556 $ilTabs = $this->tabs_gui;
1560 $ilTabs->clearTargets();
1561 $ilTabs->setBackTarget(
1563 $ilCtrl->getLinkTarget($this, $this->getViewBack())
1566 if ($a_form ===
null) {
1567 $a_form = $this->initGroupForm();
1577 $form->setTitle(
$lng->txt(
"exc_adopt_group_teams") .
" - " . $this->assignment->getTitle());
1578 $form->setFormAction($this->
ctrl->getFormAction($this,
"createTeamsFromGroups"));
1580 $all_members = array();
1582 if (count($group[
"members"]) !== 0) {
1585 foreach ($group[
"members"] as
$user_id) {
1588 if (!in_array(
$user_id, $all_members)) {
1597 $grp_team->setValue($grp_value);
1600 $grp_team->setValue(
$lng->txt(
"exc_adopt_group_teams_no_members"));
1602 $form->addItem($grp_team);
1605 if ($all_members !== []) {
1606 $form->addCommandButton(
"createTeamsFromGroups",
$lng->txt(
"save"));
1608 $form->addCommandButton(
"members",
$lng->txt(
"cancel"));
1620 $req_members = $this->requested_group_members;
1622 $form = $this->initGroupForm();
1623 if ($form->checkInput()) {
1625 $all_members = $teams = array();
1627 foreach (array_keys($map) as $grp_id) {
1628 if (isset($req_members[$grp_id]) && is_array($req_members[$grp_id])) {
1629 $members = $req_members[$grp_id];
1630 $teams[] = $members;
1631 $invalid_team_members = array();
1634 if (!array_key_exists(
$user_id, $all_members)) {
1638 $invalid_team_members[] =
$user_id;
1642 if ($invalid_team_members !== []) {
1646 foreach ($invalid_team_members as
$user_id) {
1648 $grp_title = $map[$all_members[
$user_id]][
"title"];
1649 $alert[] = sprintf(
$lng->txt(
"exc_adopt_group_teams_conflict"), $user_name, $grp_title);
1651 $input = $form->getItemByPostVar(
"grpt[" . $grp_id .
"]");
1652 $input->setAlert(implode(
"<br/>", $alert));
1657 if ($teams !== []) {
1661 $sum = array(
"added" => 0,
"blocked" => 0);
1662 foreach ($teams as $members) {
1664 if (!$this->exercise->members_obj->isAssigned(
$user_id)) {
1665 $this->exercise->members_obj->assignMember(
$user_id);
1668 if (!in_array(
$user_id, $existing_users)) {
1675 $first = array_shift($members);
1687 if ($sum[
"added"] !== 0) {
1688 $mess[] = sprintf(
$lng->txt(
"exc_adopt_group_teams_added"), $sum[
"added"]);
1690 if ($sum[
"blocked"] !== 0) {
1691 $mess[] = sprintf(
$lng->txt(
"exc_adopt_group_teams_blocked"), $sum[
"blocked"]);
1693 if ($sum[
"added"] !== 0) {
1694 $this->tpl->setOnScreenMessage(
'success', implode(
" ", $mess),
true);
1696 $this->tpl->setOnScreenMessage(
'failure', implode(
" ", $mess),
true);
1699 $this->
ctrl->redirect($this,
"members");
1701 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"form_input_not_valid"));
1705 $form->setValuesByPost();
1706 $this->adoptTeamsFromGroupObject($form);
1718 $form = $this->gui->form([self::class],
"uploadMultiFeedback")
1722 $lng->txt(
"exc_multi_feedback_file"),
1723 $this->handleMultiFeedbackUploadResult(...),
1736 $feedback_zip = $this->domain->assignment()->tutorFeedbackZip();
1737 $rid = $feedback_zip->importFromUploadResult(
1739 $this->
user->getId(),
1742 return new \ILIAS\FileUpload\Handler\BasicHandlerResult(
1759 $this->addSubTabs(
"assignment");
1763 $this->
lng->txt(
"exc_download_zip_structure"),
1764 $this->ctrl->getLinkTarget($this,
"downloadMultiFeedbackZip")
1767 if ($form ===
null) {
1768 $form = $this->getMultiFeedbackForm($this->assignment->getId());
1779 $st_file = $this->domain->assignment()->tutorFeedbackZip()->getMultiFeedbackStructureFile(
1783 $this->gui->httpUtil()->deliverString(
1796 $form = $this->getMultiFeedbackForm($this->assignment->getId());
1797 if ($form->isValid()) {
1798 $this->
ctrl->redirect($this,
"showMultiFeedbackConfirmationTable");
1801 $this->showMultiFeedbackObject($form);
1811 $this->addSubTabs(
"assignment");
1822 $this->
ctrl->redirect($this,
"members");
1830 $feedback_zip = $this->domain->assignment()->tutorFeedbackZip();
1831 $feedback_zip->saveMultiFeedbackFiles(
1833 $this->assignment->getId(),
1834 $this->user->getId(),
1835 $this->requested_files
1838 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1839 $this->
ctrl->redirect($this,
"members");
1853 $modal = $this->ui_factory->modal()->roundtrip(
1854 $lng->txt(
"exc_individual_deadline"),
1855 $this->ui_factory->legacy()->content(
'<div id="ilExcIDlBody"></div>')
1857 $show = $modal->getShowSignal()->getId();
1858 $close = $modal->getCloseSignal()->getId();
1860 $ajax_url = $this->
ctrl->getLinkTarget($this,
"handleIndividualDeadlineCalls",
"",
true,
false);
1863 $tpl->
addOnLoadCode(
"il.ExcIDl.init('" . $ajax_url .
"','" . $show .
"','" . $close .
"');");
1867 return $this->ui_renderer->render($modal);
1879 foreach ($a_data as $item) {
1880 $item = explode(
"_", $item);
1884 if (!array_key_exists(
$ass_id, $ass_tmp)) {
1885 if ($this->assignment &&
1886 $ass_id == $this->assignment->getId()) {
1887 $ass_tmp[
$ass_id] = $this->assignment;
1896 return array($map, $ass_tmp);
1909 $this->
ctrl->saveParameter($this,
"part_id");
1913 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
1914 $this->
ctrl->redirect($this, $this->assignment !==
null
1916 :
"showParticipant");
1920 if ($this->requested_idl_id !=
"") {
1921 $tmp = $this->parseIndividualDeadlineData(explode(
",", $this->requested_idl_id));
1922 if (is_array($tmp)) {
1923 $form = $this->initIndividualDeadlineForm($tmp[1], $tmp[0]);
1924 echo $form->getHTML() .
1931 $post = $this->
http->request()->getParsedBody();
1932 foreach (array_keys(
$post) as
$id) {
1933 if (substr(
$id, 0, 3) ==
"dl_") {
1934 $tmp[] = substr(
$id, 3);
1937 $tmp = $this->parseIndividualDeadlineData($tmp);
1942 $form = $this->initIndividualDeadlineForm($ass_map, $users);
1944 if (
$valid = $form->checkInput()) {
1945 foreach ($users as
$ass_id => $users2) {
1952 $date_field = $form->getItemByPostVar(
"dl_" .
$ass_id .
"_" .
$user_id);
1964 $form->setValuesByPost();
1965 echo $form->getHTML() .
1971 foreach ($users as
$id => $date) {
1972 $ass->setIndividualDeadline(
$id, $date);
1973 if (is_numeric(
$id)) {
1978 $subm = $this->domain->submission($ass->getId());
1979 $subm->recalculateLateSubmissions();
1998 $form->setName(
"ilExcIDlForm");
2000 foreach ($ids as
$ass_id => $users) {
2004 $section->setTitle($ass->getTitle());
2005 $form->addItem($section);
2009 $values = $ass->getIndividualDeadlines();
2011 foreach ($users as
$id) {
2013 if (is_numeric(
$id)) {
2015 $name = $name[
"lastname"] .
", " . $name[
"firstname"];
2020 $team_id = (
int) substr(
$id, 1);
2021 if (array_key_exists($team_id, $teams)) {
2023 foreach ($teams[$team_id]->getMembers() as $member_id) {
2025 $name[] = $uname[
"lastname"] .
", " . $uname[
"firstname"];
2028 $name = implode(
"<br />", $name);
2033 $dl->setShowTime(
true);
2034 $dl->setRequired(
true);
2035 $form->addItem($dl);
2037 if (array_key_exists(
$id, $values)) {
2043 $form->addCommandButton(
"", $this->
lng->txt(
"save"));
2054 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"select_one"));
2056 if ($this->assignment !==
null) {
2057 $this->membersObject();
2059 $this->showParticipantObject();
2065 if ($this->requested_filter_status !=
"") {
2066 $this->
filter[
"status"] = $this->requested_filter_status;
2069 $this->
lng->loadLanguageModule(
"search");
2071 $this->
toolbar->setFormAction($this->
ctrl->getFormAction($this,
"listTextAssignment"));
2077 "" => $this->
lng->txt(
"search_any"),
2078 self::GRADE_NOT_GRADED => $this->lng->txt(
"exc_notgraded"),
2079 self::GRADE_PASSED => $this->lng->txt(
"exc_passed"),
2080 self::GRADE_FAILED => $this->lng->txt(
"exc_failed")
2083 $si_status->setValue($this->
filter[
"status"] ??
"");
2087 self::FEEDBACK_FULL_SUBMISSION => $this->
lng->txt(
"submissions_feedback"),
2088 self::FEEDBACK_ONLY_SUBMISSION => $this->lng->txt(
"submissions_only")
2090 $si_feedback->setOptions(
$options);
2091 $si_feedback->setValue($this->
filter[
"feedback"] ??
"");
2093 $this->
toolbar->addInputItem($si_status,
true);
2097 if ($this->assignment->getPeerReview()) {
2098 if ($this->requested_filter_feedback !=
"") {
2099 $this->
filter[
"feedback"] = $this->requested_filter_feedback;
2101 $this->
filter[
"feedback"] =
"submission_feedback";
2106 "submission_feedback" => $this->
lng->txt(
"submissions_feedback"),
2107 "submission_only" => $this->lng->txt(
"submissions_only")
2109 $si_feedback->setOptions(
$options);
2110 $si_feedback->setValue($this->
filter[
"feedback"] ??
"");
2112 $this->
toolbar->addInputItem($si_feedback,
true);
2116 $this->
lng->txt(
"filter"),
2117 "listTextAssignment"
2118 )->submit()->toToolbar();
2126 $this->openSubmissionViewObject(
true);
2136 $member_id = $this->requested_member_id;
2139 $entry = $submission->getSubmittedEntry($print_version);
2140 if (is_null($entry)) {
2141 throw new ilExerciseException(
"No submission entry for " . $this->assignment->getId() .
" / " .
2144 $rid = $entry->getRid();
2146 $last_opening = $submission->getLastOpeningHTMLView();
2147 $submission_time = $submission->getLastSubmission();
2151 $this->assignment->getExerciseId(),
2153 ) .
"/subm_" . $this->assignment->getId() .
"/" . $member_id .
"/resource.zip";
2154 $obj_id = str_replace([
".zip",
"print"],
"", $entry->getTitle());
2155 $obj_id = $this->assignment->getAssignmentType()->getExportObjIdForResourceId($obj_id);
2157 if ($print_version) {
2161 $obj_dir = $this->assignment->getAssignmentType()->getStringIdentifier() .
"_" . $obj_id;
2165 DIRECTORY_SEPARATOR .
2167 DIRECTORY_SEPARATOR .
2168 dirname($zip_internal_path) .
2171 DIRECTORY_SEPARATOR .
2173 $this->log->debug(
"index html file: " . $index_html_file);
2175 $web_filesystem =
$DIC->filesystem()->web();
2176 if ($last_opening > $submission_time && $web_filesystem->has($index_html_file)) {
2182 $file_copied = $this->domain->submission($this->ass_id)->copyRidToWebDir($rid, $zip_internal_path);
2187 $this->zip->unzipFile($file_copied);
2188 $web_filesystem->delete($zip_internal_path);
2189 $this->log->debug(
"deleting: " . $zip_internal_path);
2191 $submission_repository = $this->service->repo()->submission();
2192 $submission_repository->updateWebDirAccessTime($this->assignment->getId(), $member_id);
2197 $error_msg = $this->
lng->txt(
"exc_copy_zip_error");
2199 if ($error_msg ===
'' || $error_msg ===
'0') {
2200 $error_msg = $this->
lng->txt(
"exc_find_zip_error");
2203 $this->tpl->setOnScreenMessage(
'failure', $error_msg);
2210 string $external_file_path
2212 list($external_path, $internal_file_path) = explode(
CLIENT_ID .
"/ilExercise", $external_file_path);
2213 $internal_file_path =
"ilExercise" . $internal_file_path;
2214 return $internal_file_path;
2223 $this->tabs_gui->clearTargets();
2224 $this->tabs_gui->setBackTarget(
2225 $this->
lng->txt(
"back"),
2226 $this->ctrl->getLinkTarget($this,
"members")
2242 "utext" => $this->gui->getUIUtil()->formatTextInput(
$text)
2247 $data[
"peer"] = array();
2248 foreach ($peer_review->getPeerReviewsByPeerId(
$user_id) as $value) {
2249 $data[
"peer"][] = $value[
'giver_id'];
2253 $data[
"fb_given"] = $peer_review->countGivenFeedback(
true,
$user_id);
2261 $ass_id = $this->request->getAssId();
2262 $selected_users = $this->request->getSelectedParticipants();
2264 $graded_users = array_filter($selected_users,
function (
$user_id) {
2265 return $this->assignment->getMemberStatus(
$user_id)->getStatus() !==
"notgraded";
2268 if (count($graded_users) === 0) {
2269 $this->tpl->setOnScreenMessage(
"failure", $this->
lng->txt(
"exc_no_graded_mem_selected"),
true);
2270 $this->
ctrl->redirect($this, $this->getViewBack());
2275 $not->setAssignmentId(
$ass_id);
2276 $not->setObjId($this->exercise->getId());
2277 $not->setRefId($this->exercise->getRefId());
2278 $not->setRecipients($graded_users);
2280 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"exc_graded_mem_notified"),
true);
2281 $this->
ctrl->redirect($this, $this->getViewBack());
2286 $members = $this->getMultiActionUserIds();
2288 if ($this->assignment !==
null) {
2289 foreach (array_keys($members) as $mem) {
2291 $this->setSingleStatus($this->assignment->getId(), $mem,
"failed");
2294 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"msg_obj_modified"),
true);
2297 $this->
ctrl->redirect($this,
"members");
2302 $members = $this->getMultiActionUserIds();
2304 if ($this->assignment !==
null) {
2305 foreach (array_keys($members) as $mem) {
2307 $this->setSingleStatus($this->assignment->getId(), $mem,
"passed");
2310 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"msg_obj_modified"),
true);
2313 $this->
ctrl->redirect($this,
"members");
2320 $member_status = $ass->getMemberStatus($part_id);
2321 $member_status->setStatus($status);
2322 $member_status->update();
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
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 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, array $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'))