54     protected \ILIAS\Exercise\InternalDomainService 
$domain;
    55     protected \ILIAS\Exercise\Notification\NotificationManager 
$notification;
    58     protected \ILIAS\HTTP\Services 
$http;
   107         $this->gui = $gui = $service->
gui();
   108         $this->domain = $domain = $service->
domain();
   110         $this->
user = $domain->user();
   111         $this->log = $domain->logger()->exc();
   112         $this->
access = $domain->access();
   113         $this->
lng = $domain->lng();
   115         $this->
toolbar = $gui->toolbar();
   116         $this->ui_factory = $gui->ui()->factory();
   117         $this->ui_renderer = $gui->ui()->renderer();
   118         $this->
ctrl = $gui->ctrl();
   119         $this->tabs_gui = $gui->tabs();
   120         $this->tpl = $gui->ui()->mainTemplate();
   121         $this->
http = $gui->http();
   123         $this->task_factory = $domain->backgroundTasks()->taskFactory();
   124         $this->request = $gui->
request();
   128         if ($a_ass !== null) {
   129             $this->assignment = $a_ass;
   130             $this->ass_id = $this->assignment->getId();
   132         $this->requested_member_id = $request->
getMemberId();
   134         $this->requested_ass_id = $request->
getAssId();
   135         $this->requested_idl_id = $request->
getIdlId();
   136         $this->done = $request->
getDone();
   138         $this->requested_comment = $request->
getComment();
   144         $this->requested_marks = $request->
getMarks();
   145         $this->requested_status = $request->
getStatus();
   148         $this->requested_files = $request->
getFiles();
   154         $this->
ctrl->saveParameter($this, array(
"vw", 
"member_id"));
   155         if ($this->ass_id > 0) {
   156             $this->tutor_feedback_file = $domain->assignment()->tutorFeedbackFile($this->ass_id);
   158         $this->zip = $domain->resources()->zip();
   159         $this->
ctrl->saveParameter($this, array(
"part_id"));
   172         $class = $ilCtrl->getNextClass($this);
   177             case strtolower(ilResourceCollectionGUI::class):
   178                 $ilTabs->clearTargets();
   179                 $ilTabs->setBackTarget(
   181                     $ilCtrl->getLinkTarget($this, $this->
getViewBack())
   183                 $this->domain->assignment()->tutorFeedbackFile($this->ass_id)->addObserver();
   184                 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"exc_fb_tutor_info"));
   185                 $gui = $this->gui->
assignment()->getTutorFeedbackFileResourceCollectionGUI(
   186                     $this->exercise->getRefId(),
   187                     $this->assignment->getId(),
   190                 $this->
ctrl->forwardCommand($gui);
   194             case "ilfilesystemgui":
   195                 $ilTabs->clearTargets();
   196                 $ilTabs->setBackTarget(
   198                     $ilCtrl->getLinkTarget($this, $this->
getViewBack())
   201                 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"exc_fb_tutor_info"));
   206                 $submission = 
new ilExSubmission($this->assignment, $this->requested_member_id);
   207                 $feedback_id = $submission->getFeedbackId();
   208                 $noti_rec_ids = $submission->getUserIds();
   211                 foreach ($noti_rec_ids as $rec_id) {
   214                 $fs_title = implode(
" / ", $fs_title);
   216                 $fs_gui = 
new ilFileSystemGUI($fstorage->getFeedbackPath($feedback_id));
   217                 $fs_gui->
setTableId(
"excfbfil" . $this->assignment->getId() . 
"_" . $feedback_id);
   218                 $fs_gui->setAllowDirectories(
false);
   219                 $fs_gui->setTitle($lng->
txt(
"exc_fb_files") . 
" - " .
   220                     $this->assignment->getTitle() . 
" - " .
   222                 $pcommand = $fs_gui->getLastPerformedCommand();
   223                 if (is_array($pcommand) && ($pcommand[
"cmd"] ?? 
"") == 
"create_file") {
   224                     foreach ($noti_rec_ids as $user_id) {
   225                         $member_status = $this->assignment->getMemberStatus($user_id);
   226                         $member_status->setFeedback(
true);
   227                         $member_status->update();
   231                         $this->assignment->getId(),
   233                         $pcommand[
"name"] ?? 
""   236                 $this->
ctrl->forwardCommand($fs_gui);
   239             case 'ilrepositorysearchgui':
   241                 $ref_id = $this->exercise->getRefId();
   242                 $rep_search->addUserAccessFilterCallable(
function ($a_user_ids) use (
$ref_id) {
   243                     return $GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
   244                         'edit_submissions_grades',
   245                         'edit_submissions_grades',
   250                 $rep_search->setTitle($this->
lng->txt(
"exc_add_participant"));
   251                 $rep_search->setCallback($this, 
'addMembersObject');
   255                 $this->
ctrl->setReturn($this, 
'members');
   257                 $this->
ctrl->forwardCommand($rep_search);
   260             case strtolower(ilRepoStandardUploadHandlerGUI::class):
   262                 $gui = $form->getRepoStandardUploadHandlerGUI(
"mfzip");
   263                 $this->
ctrl->forwardCommand($gui);
   266             case "ilexsubmissionteamgui":
   268                 $ilCtrl->forwardCommand($gui);
   271             case "ilexsubmissionfilegui":
   273                 $ilCtrl->forwardCommand($gui);
   276             case "ilexsubmissiontextgui":
   277                 $ilCtrl->saveParameter($this, array(
"part_id"));
   279                 $ilCtrl->forwardCommand($gui);
   282             case "ilexpeerreviewgui":
   284                 $ilCtrl->forwardCommand($gui);
   287             case "ilparticipantsperassignmenttablegui":
   292                     $this->assignment->getId()
   294                 $this->
ctrl->forwardCommand($table);
   298                 $cmd = $ilCtrl->getCmd();
   300                     case 'downloadSubmissions':
   301                         $cmd = $ilCtrl->getCmd(
"downloadSubmissions");
   304                         $cmd = $ilCtrl->getCmd(
"listPublicSubmissions");
   307                 $this->{$cmd . 
"Object"}();
   314         switch ($this->request->getBackView()) {
   315             case self::VIEW_PARTICIPANT:
   316                 $back_cmd = 
"showParticipant";
   319             case self::VIEW_GRADES:
   320                 $back_cmd = 
"showGradesOverview";
   325                 $back_cmd = 
"members";
   334         $this->
ctrl->setReturn($this, $back_cmd);
   336         $this->tabs_gui->clearTargets();
   337         $this->tabs_gui->setBackTarget(
   338             $this->
lng->txt(
"back"),
   339             $this->
ctrl->getLinkTarget($this, $back_cmd)
   342         return new ilExSubmission($this->assignment, $this->requested_member_id, null, 
true);
   351         $ass_id = $this->assignment !== null ? $this->assignment->getId() : 0;
   354         $ilCtrl->setParameter($this, 
"vw", 
"");
   355         $ilCtrl->setParameter($this, 
"member_id", 
"");
   356         $ilCtrl->setParameter($this, 
"ass_id", 
"");
   357         $ilCtrl->setParameter($this, 
"part_id", 
"");
   361             $lng->
txt(
"exc_assignment_view"),
   362             $ilCtrl->getLinkTarget($this, 
"members")
   366             $lng->
txt(
"exc_participant_view"),
   367             $ilCtrl->getLinkTarget($this, 
"showParticipant")
   371             $lng->
txt(
"exc_grades_overview"),
   372             $ilCtrl->getLinkTarget($this, 
"showGradesOverview")
   374         $ilTabs->activateSubTab($a_activate);
   376         $ilCtrl->setParameter($this, 
"ass_id", $ass_id);
   377         $ilCtrl->setParameter($this, 
"part_id", $part_id);
   388         $ilCtrl->
setParameterByClass(
"ilExSubmissionFileGUI", 
"member_id", $this->requested_member_id);
   389         $url = $ilCtrl->getLinkTargetByClass(array(
"ilExerciseHandlerGUI", 
"ilObjExerciseGUI", 
"ilExerciseManagementGUI", 
"ilExSubmissionFileGUI"), 
"downloadNewReturned");
   390         $js_url = $ilCtrl->getLinkTargetByClass(array(
"ilExerciseHandlerGUI", 
"ilObjExerciseGUI", 
"ilExerciseManagementGUI", 
"ilExSubmissionFileGUI"), 
"downloadNewReturned", 
"", 
"", 
false);
   391         $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>");
   407         $this->gui->permanentLink()->setGradesPermanentLink();
   412         if ($this->assignment === null && count($ass) > 0) {
   413             $this->assignment = current($ass);
   417         if (count($ass) > 1) {
   419             foreach ($ass as 
$a) {
   420                 $options[$a->getId()] = $a->getTitle();
   424             $si->setValue($this->assignment->getId());
   425             $ilToolbar->addStickyItem($si, 
true);
   427                 $this->
lng->txt(
"select"),
   429             )->submit()->toToolbar(
true);
   431             $ilToolbar->addSeparator();
   434         elseif ($this->assignment) {
   435             $ilCtrl->setParameter($this, 
"ass_id", $this->assignment->getId());
   441         $has_rbac_access = 
$GLOBALS[
'DIC']->access()->checkAccess(
   442             'edit_submissions_grades',
   444             $this->exercise->getRefId()
   446         if ($has_rbac_access) {
   451                     'auto_complete_name' => $lng->
txt(
'user'),
   452                     'submit_name' => $lng->
txt(
'add'),
   453                     'add_search' => 
true,
   454                     'add_from_container' => $this->exercise->getRefId()
   461             if ($has_rbac_access) {
   462                 $ilToolbar->addSeparator();
   466             $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
   468             $ilCtrl->setParameter($this, 
"ass_id", $this->assignment->getId());
   472                     $ilToolbar->addButton(
   473                         $this->
lng->txt(
"exc_adopt_group_teams"),
   474                         $this->
ctrl->getLinkTarget($this, 
"adoptTeamsFromGroup")
   477                     $ilToolbar->addSeparator();
   479             } elseif ($this->exercise->hasTutorFeedbackFile()) {
   480                 if (!$this->assignment->getAssignmentType()->usesTeams()) {
   482                     $ilToolbar->addButton(
   483                         $this->
lng->txt(
"exc_multi_feedback"),
   484                         $this->
ctrl->getLinkTarget($this, 
"showMultiFeedback")
   487                     $ilToolbar->addSeparator();
   491             $submission_repository = $this->service->repo()->submission();
   493             if ($submission_repository->hasSubmissions($this->assignment->getId()) !== 0) {
   494                 $ass_type = $this->assignment->getType();
   497                     $ilToolbar->addFormButton($lng->
txt(
"exc_list_text_assignment"), 
"listTextAssignment");
   499                 $ilToolbar->addFormButton($lng->
txt(
"download_all_returned_files"), 
"downloadSubmissions");
   501             $this->
ctrl->setParameter($this, 
"vw", self::VIEW_ASSIGNMENT);
   505                 $exc_tab->getHTML() .
   509             $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"exc_no_assignments_available"));
   512         $ilCtrl->setParameter($this, 
"ass_id", 
"");
   517         if (count($this->selected_participants) > 0) {
   529             $this->exercise->getRefId(),
   530             $this->exercise->getId(),
   536         if ($download_task->run()) {
   537             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'exc_down_files_started_bg'), 
true);
   545         if ($this->assignment !== null) {
   546             $this->
ctrl->redirect($this, 
"members");
   548             $this->
ctrl->redirect($this, 
"showParticipant");
   560         $exc_tab->writeFilterToSession();
   572         $exc_tab->resetFilter();
   582         foreach ($this->requested_learning_comments as $k => $v) {
   583             $marks_obj = 
new ilLPMarks($this->exercise->getId(), (
int) $k);
   584             $marks_obj->setComment($v);
   585             $marks_obj->update();
   587         foreach ($this->requested_marks as $k => $v) {
   588             $marks_obj = 
new ilLPMarks($this->exercise->getId(), (
int) $k);
   589             $marks_obj->setMark($v);
   590             $marks_obj->update();
   592         $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"exc_msg_saved_grades"), 
true);
   593         $ilCtrl->redirect($this, 
"showGradesOverview");
   603     public function listTextAssignmentObject(): 
void   609         $button_print = $this->ui_factory->button()->standard($this->
lng->txt(
'print'), 
"#")
   611                 return "$('#$id').click(function() { window.print(); return false; });";
   613         $this->
toolbar->addSeparator();
   614         $this->
toolbar->addComponent($button_print);
   616         $group_panels_tpl = 
new ilTemplate(
"tpl.exc_group_report_panels.html", 
true, 
true, 
"Modules/Exercise");
   617         $group_panels_tpl->setVariable(
'TITLE', $this->
lng->txt(
"exc_list_text_assignment") . 
": " . $this->assignment->getTitle());
   629                 $submission_data = $this->assignment->getExerciseMemberAssignmentData((
int) $file[
"user_id"], $this->
filter[
"status"] ?? 
"");
   631                 if (is_array($submission_data)) {
   632                     $data = array_merge($feedback_data, $submission_data);
   638         if ($total_reports == 0) {
   639             $mess = $this->ui_factory->messageBox()->info($this->
lng->txt(
"fiter_no_results"));
   640             $report_html .= $this->ui_renderer->render($mess);
   643         $group_panels_tpl->setVariable(
'CONTENT', $report_html);
   644         $this->tpl->setContent($group_panels_tpl->get());
   656         $group_panels_tpl = 
new ilTemplate(
"tpl.exc_group_report_panels.html", 
true, 
true, 
"Modules/Exercise");
   657         $group_panels_tpl->setVariable(
'TITLE', $this->
lng->txt(
"exc_compare_selected_submissions"));
   664         foreach ($participants as $participant_id) {
   665             $submission = 
new ilExSubmission($this->assignment, $participant_id);
   668             $files = $submission->getFiles();
   669             $file = reset($files);
   673                     "user_id" => $participant_id,
   681             $submission_data = $this->assignment->getExerciseMemberAssignmentData((
int) $file[
"user_id"], $this->
filter[
"status"] ?? 
"");
   683             if (is_array($submission_data)) {
   684                 $data = array_merge($feedback_data, $submission_data);
   690         $group_panels_tpl->setVariable(
'CONTENT', $report_html);
   691         $this->tpl->setContent($group_panels_tpl->get());
   701         $this->
ctrl->setParameter($this, 
"member_id", $a_data[
'uid']);
   703             $this->ui_factory->button()->shy($this->
lng->txt(
"grade_evaluate"), 
"#")->withOnClick($modal->getShowSignal())
   706         if ($this->exercise->hasTutorFeedbackMail()) {
   707             $actions[] = $this->ui_factory->button()->shy(
   708                 $this->
lng->txt(
"exc_tbl_action_feedback_mail"),
   709                 $this->
ctrl->getLinkTarget($this, 
"redirectFeedbackMail")
   712         if ($this->exercise->hasTutorFeedbackFile()) {
   713             $actions[] = $this->ui_factory->button()->shy(
   714                 $this->
lng->txt(
"exc_tbl_action_feedback_file"),
   715                 $this->
ctrl->getLinkTargetByClass(
"ilFileSystemGUI", 
"listFiles")
   719         $this->
ctrl->setParameter($this, 
"member_id", 
"");
   721         $actions_dropdown = $this->ui_factory->dropdown()->standard($actions);
   722         if ($a_data[
'status'] == self::GRADE_NOT_GRADED) {
   723             $str_status_key = $this->
lng->txt(
'exc_tbl_status') . 
": ";
   724             $str_status_value = 
"-";
   726             $str_status_key = $this->
lng->txt(
'exc_tbl_status_time') . 
": ";
   730         $str_mark_key = $this->
lng->txt(
"exc_tbl_mark") . 
": ";
   731         $str_mark_value = 
"-";
   733         if (($a_data[
'mark'] != 
"")) {
   734             $str_mark_value = $a_data[
'mark'];
   737         if ($a_data[
'feedback_time']) {
   738             $str_evaluation_key = $this->
lng->txt(
'exc_tbl_feedback_time') . 
": ";
   741             $str_evaluation_key = $this->
lng->txt(
'exc_settings_feedback') . 
": ";
   742             $str_evaluation_value = 
"-";
   745         $card_content = array(
   747             $str_status_key => $str_status_value,
   748             $str_mark_key => $str_mark_value,
   749             $str_evaluation_key => $str_evaluation_value,
   750             $this->
lng->txt(
'feedback_given') . 
": " => $a_data[
'fb_given'],
   751             $this->
lng->txt(
'feedback_received') . 
": " => $a_data[
'fb_received']
   753         $card_tpl = 
new ilTemplate(
"tpl.exc_report_details_card.html", 
true, 
true, 
"Modules/Exercise");
   754         foreach ($card_content as 
$key => $value) {
   755             $card_tpl->setCurrentBlock(
"assingment_card");
   756             $card_tpl->setVariable(
"ROW_KEY", 
$key);
   757             $card_tpl->setVariable(
"ROW_VALUE", $value);
   758             $card_tpl->parseCurrentBlock();
   761         $main_panel = $this->ui_factory->panel()->sub($a_data[
'uname'], $this->ui_factory->legacy($a_data[
'utext']))
   762             ->withFurtherInformation($this->ui_factory->card()->standard($this->
lng->txt(
'text_assignment'))->withSections(array($this->ui_factory->legacy($card_tpl->get()))))->withActions($actions_dropdown);
   764         $feedback_tpl = 
new ilTemplate(
"tpl.exc_report_feedback.html", 
true, 
true, 
"Modules/Exercise");
   766         $filter_feedback = $this->
filter[
"feedback"] ?? 
"";
   767         if (array_key_exists(
"peer", $a_data) && (($filter_feedback == self::FEEDBACK_FULL_SUBMISSION) || $filter_feedback == 
"")) {
   768             $feedback_tpl->setCurrentBlock(
"feedback");
   769             foreach ($a_data[
"peer"] as $peer_id) {
   774                     $peer_name = $this->
lng->txt(
"exc_deleted_user");
   777                 $feedback_tpl->setCurrentBlock(
"peer_feedback");
   778                 $feedback_tpl->setVariable(
"PEER_NAME", $peer_name);
   780                 $submission = 
new ilExSubmission($this->assignment, $a_data[
"uid"]);
   781                 $values = $submission->getPeerReview()->getPeerReviewValues($peer_id, $a_data[
"uid"]);
   784                 foreach ($this->assignment->getPeerReviewCriteriaCatalogueItems() as $crit) {
   785                     $crit_id = $crit->getId()
   788                     $crit->setPeerReviewContext($this->assignment, $peer_id, $a_data[
"uid"]);
   791                         '<div class="ilBlockPropertyCaption">' . $crit->getTitle() . 
'</div>' .
   792                         '<div style="margin:2px 0;">' . $crit->getHTML($values[$crit_id] ?? null) . 
'</div>';
   794                 $feedback_tpl->setVariable(
"PEER_FEEDBACK", $review_html);
   795                 $feedback_tpl->parseCurrentBlock();
   797             $feedback_tpl->parseCurrentBlock();
   799         $feedback_tpl->setVariable(
"GRADE", $this->
lng->txt(
'exc_grading') . 
": " . $this->
lng->txt(
'exc_' . $a_data[
'status']));
   800         $comment = ($a_data[
'comment'] === 
"")
   802             : $a_data[
'comment'];
   803         $feedback_tpl->setVariable(
"COMMENT", $this->
lng->txt(
'exc_comment') . 
": <br>" . 
$comment);
   805         $feedback_panel = $this->ui_factory->panel()->sub(
"", $this->ui_factory->legacy($feedback_tpl->get()));
   807         $report = $this->ui_factory->panel()->report(
"", array($main_panel, $feedback_panel));
   809         return $this->ui_renderer->render([$modal,$report]);
   815         $modal_tpl = 
new ilTemplate(
"tpl.exc_report_evaluation_modal.html", 
true, 
true, 
"Modules/Exercise");
   816         $modal_tpl->setVariable(
"USER_NAME", $a_data[
'uname']);
   820         if ($this->exercise->hasTutorFeedbackText()) {
   823             $u_text = strip_tags($a_data[
"utext"]); 
   826             if (strlen($u_text) > $max_chars) {
   827                 $text = 
"<input type='checkbox' class='read-more-state' id='post-1' />";
   828                 $text .= 
"<div class='read-more-wrap'>";
   829                 $text .= mb_substr($u_text, 0, $max_chars);
   830                 $text .= 
"<span class='read-more-target'>";
   831                 $text .= mb_substr($u_text, $max_chars);
   832                 $text .= 
"</span></div>";
   833                 $text .= 
"<label for='post-1' class='read-more-trigger'></label>";
   835             $modal_tpl->setVariable(
"USER_TEXT", $text);
   838         $modal_tpl->setVariable(
"FORM", $form->getHTML());
   840         $form_id = 
'form_' . $form->getId();
   841         $submit_btn = $this->ui_factory->button()->primary($this->
lng->txt(
"save"), 
'#')
   843                 return "$('#$id').click(function() { $('#$form_id').submit(); return false; });";
   846         return  $this->ui_factory->modal()->roundtrip(strtoupper($this->
lng->txt(
"grade_evaluate")), $this->ui_factory->legacy($modal_tpl->get()))->withActionButtons([$submit_btn]);
   853         $form->setFormAction($this->
ctrl->getFormAction($this, 
"saveEvaluationFromModal"));
   854         $form->setId(uniqid(
'form'));
   858             self::GRADE_NOT_GRADED => $this->
lng->txt(
"exc_notgraded"),
   859             self::GRADE_PASSED => $this->
lng->txt(
"exc_passed"),
   860             self::GRADE_FAILED => $this->
lng->txt(
"exc_failed")
   864         $si->setValue($a_data[
'status'] ?? 
"");
   869         $mark_input->setValue($a_data[
'mark'] ?? 
"");
   870         $mark_input->setMaxLength(32);
   871         $mark_input->setSize(4);
   872         $form->addItem($mark_input);
   875         $item->setValue($a_data[
'uid'] ?? 
"");
   876         $form->addItem($item);
   879         if ($this->exercise->hasTutorFeedbackText()) {
   881             $ta->
setInfo($this->
lng->txt(
"exc_comment_for_learner_info"));
   882             $ta->setValue($a_data[
'comment'] ?? 
"");
   901         if ($form->checkInput()) {
   902             $comment = trim($form->getInput(
'comment'));
   903             $user_id = (
int) $form->getInput(
'mem_id');
   904             $grade = trim($form->getInput(
'grade'));
   905             $mark = trim($form->getInput(
'mark'));
   908         if ($this->assignment->getId() && $user_id > 0) {
   909             $member_status = $this->assignment->getMemberStatus($user_id);
   912                 $member_status->setStatus($grade);
   914             $member_status->setMark($mark);
   916                 $member_status->setFeedback(
true);
   918             $member_status->update();
   920         $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_status_saved"), 
true);
   921         $this->
ctrl->redirect($this, 
"listTextAssignment");
   931         if ($this->requested_user_login == 
"") {
   932             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_no_search_string'));
   936         $users = explode(
',', $this->requested_user_login);
   939         foreach ($users as $user) {
   943                 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'user_not_known'));
   948             $user_ids[] = $user_id;
   957         if (!count($a_user_ids)) {
   958             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"), 
true);
   960             if (!$this->exercise->members_obj->assignMembers($a_user_ids)) {
   961                 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"exc_members_already_assigned"), 
true);
   963                 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_members_assigned"), 
true);
   966         $this->
ctrl->redirect($this, 
"members");
   975         $ctrl->
setParameter($this, 
"ass_id", $this->requested_ass_id);
   991         $this->
ctrl->setParameter($this, 
"ass_id", 
"");
   994         $members = $this->exercise->members_obj->getMembers();
   997             'edit_submissions_grades',
   998             'edit_submissions_grades',
   999             $this->exercise->getRefId(),
  1004         if (count($members) == 0) {
  1005             $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"exc_no_participants"));
  1010         foreach ($members as $mem_id) {
  1013                 if (trim($name[
"login"]) != 
"") {               
  1014                     $mems[$mem_id] = $name;
  1021         if ($this->requested_part_id == 0 && $mems !== [] && key($mems) > 0) {
  1022             $ilCtrl->setParameter($this, 
"part_id", key($mems));
  1023             $ilCtrl->redirect($this, 
"showParticipant");
  1029         if (count($mems) > 1) {
  1031             foreach ($mems as $k => $m) {
  1033                     $m[
"lastname"] . 
", " . $m[
"firstname"] . 
" [" . $m[
"login"] . 
"]";
  1037             $si->setValue($current_participant);
  1038             $ilToolbar->addStickyItem($si, 
true);
  1041                 $this->
lng->txt(
"select"),
  1043             )->submit()->toToolbar(
true);
  1047             $this->
ctrl->setParameter($this, 
"vw", self::VIEW_PARTICIPANT);
  1048             $this->
ctrl->setParameter($this, 
"part_id", $current_participant);
  1050             $ilToolbar->addSeparator();
  1051             $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
  1052             $ilToolbar->addFormButton($lng->
txt(
"download_all_returned_files"), 
"downloadSubmissions");
  1058                 $current_participant
  1063             $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"exc_no_assignments_available"));
  1072         $exc_tab->resetOffset();
  1073         $exc_tab->writeFilterToSession();
  1083         $exc_tab->resetOffset();
  1084         $exc_tab->resetFilter();
  1095         $ctrl->
setParameter($this, 
"part_id", $this->requested_part_id);
  1096         $ctrl->
redirect($this, 
"showParticipant");
  1109         $mems = $mem_obj->getMembers();
  1111         $mems = 
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
  1112             'edit_submissions_grades',
  1113             'edit_submissions_grades',
  1114             $this->exercise->getRefId(),
  1117         if (count($mems) > 0) {
  1118             $ilToolbar->addButton(
  1119                 $lng->
txt(
"exc_export_excel"),
  1120                 $ilCtrl->getLinkTarget($this, 
"exportExcel")
  1124         $this->
ctrl->setParameter($this, 
"vw", self::VIEW_GRADES);
  1128             "showGradesOverview",
  1140         if ($this->requested_member_id > 0) {
  1141             $submission = 
new ilExSubmission($this->assignment, $this->requested_member_id);
  1142             $members = $submission->getUserIds();
  1144             $members = array_keys($members);
  1147         if ($members !== []) {
  1149             foreach ($members as $user_id) {
  1150                 $member_status = $this->assignment->getMemberStatus($user_id);
  1151                 $member_status->setFeedback(
true);
  1152                 $member_status->update();
  1156             $logins = implode(
",", $logins);
  1159             $sig = chr(13) . chr(10) . chr(13) . chr(10);
  1160             $sig .= $this->
lng->txt(
'exc_mail_permanent_link');
  1161             $sig .= chr(13) . chr(10) . chr(13) . chr(10);
  1162             $sig .= ilLink::_getLink($this->exercise->getRefId());
  1163             $sig = rawurlencode(base64_encode($sig));
  1171                     'rcp_to' => $logins,
  1185     public function downloadAllObject(): 
void  1189         foreach ($this->exercise->members_obj->getMembers() as $member_id) {
  1191             $submission->updateTutorDownloadTime();
  1197                 foreach ($submission->getFiles() as $file) {
  1198                     if ($this->assignment->getAssignmentType()->isSubmissionAssignedToTeam()) {
  1199                         $storage_id = $file[
"team_id"];
  1201                         $storage_id = $file[
"user_id"];
  1204                     $members[$storage_id][
"files"][$file[
"returned_id"]] = $file;
  1206                 if ($this->assignment->getAssignmentType()->isSubmissionAssignedToTeam()) {
  1207                     $name = 
"Team " . $submission->getTeam()->getId();
  1211                     $name = $tmp_obj->getFirstname() . 
" " . $tmp_obj->getLastname();
  1213                 if ($storage_id > 0) {
  1214                     $members[$storage_id][
"name"] = $name;
  1230         if ($this->assignment !== null) {
  1231             if (count($this->selected_participants) == 0) {
  1232                 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"), 
true);
  1233                 $this->
ctrl->redirect($this, 
"members");
  1236             foreach ($this->selected_participants as $user_id) {
  1238                 $tmembers = $submission->getUserIds();
  1239                 if (!$a_keep_teams) {
  1240                     foreach ($tmembers as $tuser_id) {
  1241                         $members[$tuser_id] = 1;
  1245                         $members[] = $tmembers;
  1248                         $members[] = $user_id;
  1255             if (count($this->selected_ass_ids) == 0) {
  1256                 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"), 
true);
  1257                 $this->
ctrl->redirect($this, 
"showParticipant");
  1262             foreach ($this->selected_ass_ids as $ass_id) {
  1264                 $tmembers = $submission->getUserIds();
  1265                 if (!$a_keep_teams) {
  1266                     foreach ($tmembers as $tuser_id) {
  1267                         $members[
$ass_id][] = $tuser_id;
  1271                         $members[
$ass_id][] = $tmembers;
  1274                         $members[
$ass_id][] = $user_id;
  1292         $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_sent"), 
true);
  1293         if ($this->assignment !== null) {
  1294             $this->exercise->sendAssignment($this->assignment, array_keys($members));
  1295             $this->
ctrl->redirect($this, 
"members");
  1297             foreach ($members as $ass_id => $users) {
  1298                 $this->exercise->sendAssignment(
new ilExAssignment($ass_id), $users);
  1300             $this->
ctrl->setParameter($this, 
"part_id", $this->requested_part_id); 
  1301             $this->
ctrl->redirect($this, 
"showParticipant");
  1317         $cgui->setFormAction($ilCtrl->getFormAction($this));
  1318         $cgui->setHeaderText($lng->
txt(
"exc_msg_sure_to_deassign_participant"));
  1319         $cgui->setCancel($lng->
txt(
"cancel"), 
"members");
  1320         $cgui->setConfirm($lng->
txt(
"remove"), 
"deassignMembers");
  1321         foreach ($members as $k => $m) {
  1342         $member_ids = $this->request->getMemberIds();
  1344         foreach ($member_ids as $usr_id) {
  1345             $this->exercise->members_obj->deassignMember((
int) $usr_id);
  1348         $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"exc_msg_participants_removed"), 
true);
  1349         $ilCtrl->redirect($this, 
"members");
  1354         $storage = 
new ilFSWebStorageExercise($this->exercise->getId(), 
$this->ass_id);
  1355         $storage->deleteUserSubmissionDirectory($user_id);
  1371         foreach ($this->listed_ass_ids as $ass_id) {
  1372             if (is_array($selected_ass_ids) &&
  1373                 !in_array($ass_id, $selected_ass_ids)) {
  1378                 "status" => $status[$ass_id]
  1380             if (isset($marks[$ass_id])) {
  1383             if (isset($notices[$ass_id])) {
  1388         $ilCtrl->setParameter($this, 
"part_id", $member_id); 
  1396         array $a_selected = null,
  1397         bool $a_redirect = 
true  1403         $filtered_user_ids = 
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
  1404             'edit_submissions_grades',
  1405             'edit_submissions_grades',
  1406             $this->exercise->getRefId(),
  1411         foreach ($filtered_user_ids as $user_id) {
  1412             if (is_array($a_selected) &&
  1413                 !in_array($user_id, $a_selected)) {
  1417             $data[-1][$user_id] = array(
  1418                 "status" => $status[$user_id] ?? null
  1421             if (isset($marks[$user_id])) {
  1422                 $data[-1][$user_id][
"mark"] = $marks[$user_id];
  1424             if (isset($notices[$user_id])) {
  1425                 $data[-1][$user_id][
"notice"] = $notices[$user_id];
  1438         if ($this->assignment !== null) {
  1452         bool $a_redirect = 
true  1455         $saved_for = array();
  1456         foreach ($a_data as $ass_id => $users) {
  1457             $ass = ($ass_id < 0)
  1460             foreach ($users as $user_id => $values) {
  1465                 foreach ($submission->getUserIds() as $sub_user_id) {
  1467                     $saved_for[$sub_user_id] = $uname[
"lastname"] . 
", " . $uname[
"firstname"];
  1469                     $member_status = $ass->getMemberStatus($sub_user_id);
  1472                     $status = $values[
"status"];
  1473                     if ($status == 
"") {
  1474                         $status = self::GRADE_NOT_GRADED;
  1476                     $member_status->setStatus($status);
  1477                     if (array_key_exists(
"mark", $values)) {
  1478                         $member_status->setMark($values[
"mark"]);
  1480                     if (array_key_exists(
"notice", $values)) {
  1481                         $member_status->setNotice($values[
"notice"]);
  1483                     $member_status->update();
  1489         if ($saved_for !== []) {
  1490             $save_for_str = 
"(" . implode(
" - ", $saved_for) . 
")";
  1494             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"exc_status_saved") . 
" " . $save_for_str, 
true);
  1504         $res = array(
"result" => 
false);
  1506         if ($this->
ctrl->isAsynch()) {
  1509             $comment = trim($this->requested_comment);
  1511             if ($ass_id && $user_id) {
  1513                 $user_ids = $submission->getUserIds();
  1516                 $all_members = $all_members->getMembers();
  1518                 $reci_ids = array();
  1519                 foreach ($user_ids as $user_id) {
  1520                     if (in_array($user_id, $all_members)) {
  1521                         $member_status = $this->assignment->getMemberStatus($user_id);
  1523                         $member_status->setFeedback(
true);
  1524                         $member_status->update();
  1527                             $reci_ids[] = $user_id;
  1532                 if ($reci_ids !== []) {
  1542                 $res = array(
"result" => 
true, 
"snippet" => nl2br(
$comment));
  1546         echo(json_encode(
$res));
  1552         $this->exercise->exportGradesExcel();
  1570         $new_members = array();
  1572         foreach ($members as $group) {
  1573             if (is_array($group)) {
  1574                 $new_members = array_merge($new_members, $group);
  1576                 $first_user = $group;
  1577                 $first_user = array_shift($first_user);
  1579                 foreach ($group as $user_id) {
  1580                     $team->removeTeamMember($user_id);
  1583                 $new_members[] = $group;
  1587         if ($new_members !== []) {
  1590             $first_user = array_shift($new_members);
  1592             foreach ($new_members as $user_id) {
  1593                 $team->addTeamMember($user_id);
  1597             $submission = 
new ilExSubmission($this->assignment, $first_user);
  1598             $this->exercise->processExerciseStatus(
  1600                 $team->getMembers(),
  1601                 $submission->hasSubmitted(),
  1602                 $submission->validatePeerReviews()
  1606         $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"), 
true);
  1607         $ilCtrl->redirect($this, 
"members");
  1619         foreach ($members as $group) {
  1621             if (is_array($group)) {
  1624                 $first_user = $group;
  1625                 $first_user = array_shift($first_user);
  1627                 foreach ($group as $user_id) {
  1628                     $team->removeTeamMember($user_id);
  1632                 $this->exercise->processExerciseStatus(
  1640         $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"), 
true);
  1641         $ilCtrl->redirect($this, 
"members");
  1652         $ilTabs->clearTargets();
  1653         $ilTabs->setBackTarget(
  1655             $ilCtrl->getLinkTarget($this, $this->
getViewBack())
  1658         if ($a_form === null) {
  1669         $form->setTitle($lng->
txt(
"exc_adopt_group_teams") . 
" - " . $this->assignment->getTitle());
  1670         $form->setFormAction($this->
ctrl->getFormAction($this, 
"createTeamsFromGroups"));
  1672         $all_members = array();
  1674             if (count($group[
"members"]) !== 0) {
  1676                 $grp_value = $options = array();
  1677                 foreach ($group[
"members"] as $user_id) {
  1679                     $options[$user_id] = $user_name;
  1680                     if (!in_array($user_id, $all_members)) {
  1681                         $grp_value[] = $user_id;
  1682                         $all_members[] = $user_id;
  1686                 foreach ($options as $user_id => $user_name) {
  1689                 $grp_team->setValue($grp_value);
  1692                 $grp_team->setValue($lng->
txt(
"exc_adopt_group_teams_no_members"));
  1694             $form->addItem($grp_team);
  1697         if ($all_members !== []) {
  1698             $form->addCommandButton(
"createTeamsFromGroups", $lng->
txt(
"save"));
  1700         $form->addCommandButton(
"members", $lng->
txt(
"cancel"));
  1715         if ($form->checkInput()) {
  1717             $all_members = $teams = array();
  1719             foreach (array_keys($map) as $grp_id) {
  1720                 if (isset($req_members[$grp_id]) && is_array($req_members[$grp_id])) {
  1721                     $members = $req_members[$grp_id];
  1722                     $teams[] = $members;
  1723                     $invalid_team_members = array();
  1725                     foreach ($members as $user_id) {
  1726                         if (!array_key_exists($user_id, $all_members)) {
  1727                             $all_members[$user_id] = $grp_id;
  1730                             $invalid_team_members[] = $user_id;
  1734                     if ($invalid_team_members !== []) {
  1738                         foreach ($invalid_team_members as $user_id) {
  1740                             $grp_title = $map[$all_members[$user_id]][
"title"];
  1741                             $alert[] = sprintf($lng->
txt(
"exc_adopt_group_teams_conflict"), $user_name, $grp_title);
  1743                         $input = $form->getItemByPostVar(
"grpt[" . $grp_id . 
"]");
  1744                         $input->setAlert(implode(
"<br/>", $alert));
  1749                 if ($teams !== []) {
  1753                     $sum = array(
"added" => 0, 
"blocked" => 0);
  1754                     foreach ($teams as $members) {
  1755                         foreach ($members as $user_id) {
  1756                             if (!$this->exercise->members_obj->isAssigned($user_id)) {
  1757                                 $this->exercise->members_obj->assignMember($user_id);
  1760                             if (!in_array($user_id, $existing_users)) {
  1767                         $first = array_shift($members);
  1773                         foreach ($members as $user_id) {
  1774                             $team->addTeamMember($user_id);
  1779                     if ($sum[
"added"] !== 0) {
  1780                         $mess[] = sprintf($lng->
txt(
"exc_adopt_group_teams_added"), $sum[
"added"]);
  1782                     if ($sum[
"blocked"] !== 0) {
  1783                         $mess[] = sprintf($lng->
txt(
"exc_adopt_group_teams_blocked"), $sum[
"blocked"]);
  1785                     if ($sum[
"added"] !== 0) {
  1786                         $this->tpl->setOnScreenMessage(
'success', implode(
" ", $mess), 
true);
  1788                         $this->tpl->setOnScreenMessage(
'failure', implode(
" ", $mess), 
true);
  1791                 $this->
ctrl->redirect($this, 
"members");
  1793                 $this->tpl->setOnScreenMessage(
'failure', $lng->
txt(
"form_input_not_valid"));
  1797         $form->setValuesByPost();
  1810         $form = $this->gui->form([self::class], 
"uploadMultiFeedback")
  1814                 $lng->
txt(
"exc_multi_feedback_file"),
  1828         $feedback_zip = $this->domain->assignment()->tutorFeedbackZip();
  1829         $rid = $feedback_zip->importFromUploadResult(
  1831             $this->
user->getId(),
  1834         return new \ILIAS\FileUpload\Handler\BasicHandlerResult(
  1855             $this->
lng->txt(
"exc_download_zip_structure"),
  1856             $this->
ctrl->getLinkTarget($this, 
"downloadMultiFeedbackZip")
  1859         if ($form === null) {
  1871         $st_file = $this->domain->assignment()->tutorFeedbackZip()->getMultiFeedbackStructureFile(
  1875         $this->gui->httpUtil()->deliverString(
  1889         if ($form->isValid()) {
  1890             $this->
ctrl->redirect($this, 
"showMultiFeedbackConfirmationTable");
  1914         $this->
ctrl->redirect($this, 
"members");
  1922         $feedback_zip = $this->domain->assignment()->tutorFeedbackZip();
  1923         $feedback_zip->saveMultiFeedbackFiles(
  1925             $this->assignment->getId(),
  1926             $this->
user->getId(),
  1930         $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"), 
true);
  1931         $this->
ctrl->redirect($this, 
"members");
  1946         $modal->setHeading($lng->
txt(
"exc_individual_deadline"));
  1947         $modal->setId(
"ilExcIDl");
  1948         $modal->setBody(
'<div id="ilExcIDlBody"></div>');
  1949         $modal = $modal->getHTML();
  1951         $ajax_url = $this->
ctrl->getLinkTarget($this, 
"handleIndividualDeadlineCalls", 
"", 
true, 
false);
  1953         $tpl->
addJavaScript(
"./Modules/Exercise/js/ilExcIDl.js", 
true, 3);
  1954         $tpl->
addOnLoadCode(
'il.ExcIDl.init("' . $ajax_url . 
'");');
  1970             foreach ($a_data as $item) {
  1971                 $item = explode(
"_", $item);
  1973                 $user_id = $item[1];
  1975                 if (!array_key_exists($ass_id, $ass_tmp)) {
  1976                     if ($this->assignment &&
  1977                         $ass_id == $this->assignment->getId()) {
  1987             return array($map, $ass_tmp);
  2000         $this->
ctrl->saveParameter($this, 
"part_id");
  2004             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"), 
true);
  2005             $this->
ctrl->redirect($this, $this->assignment !== null
  2007                 : 
"showParticipant");
  2011         if ($this->requested_idl_id != 
"") {
  2013             if (is_array($tmp)) {
  2015                 echo $form->getHTML() .
  2022             $post = $this->
http->request()->getParsedBody();
  2023             foreach (array_keys(
$post) as 
$id) {
  2024                 if (substr($id, 0, 3) == 
"dl_") {
  2025                     $tmp[] = substr($id, 3);
  2035             if (
$valid = $form->checkInput()) {
  2036                 foreach ($users as $ass_id => $users2) {
  2042                     foreach ($users2 as $user_id) {
  2043                         $date_field = $form->getItemByPostVar(
"dl_" . $ass_id . 
"_" . $user_id);
  2055                 $form->setValuesByPost();
  2056                 echo $form->getHTML() .
  2059                 foreach (
$res as $ass_id => $users) {
  2062                     foreach ($users as $id => $date) {
  2063                         $ass->setIndividualDeadline($id, $date);
  2064                         if (is_numeric($id)) {
  2065                             $this->
notification->sendDeadlineSetNotification($ass_id, $id);
  2069                     $ass->recalculateLateSubmissions();
  2087         $form->setFormAction($this->
ctrl->getFormAction($this));
  2088         $form->setName(
"ilExcIDlForm");
  2090         foreach ($ids as $ass_id => $users) {
  2094             $section->setTitle($ass->getTitle());
  2095             $form->addItem($section);
  2099             $values = $ass->getIndividualDeadlines();
  2101             foreach ($users as 
$id) {
  2103                 if (is_numeric($id)) {
  2105                     $name = $name[
"lastname"] . 
", " . $name[
"firstname"];
  2110                     $team_id = (
int) substr($id, 1);
  2111                     if (array_key_exists($team_id, $teams)) {
  2113                         foreach ($teams[$team_id]->getMembers() as $member_id) {
  2115                             $name[] = $uname[
"lastname"] . 
", " . $uname[
"firstname"];
  2118                         $name = implode(
"<br />", $name);
  2123                 $dl->setShowTime(
true);
  2124                 $dl->setRequired(
true);
  2125                 $form->addItem($dl);
  2127                 if (array_key_exists($id, $values)) {
  2133         $form->addCommandButton(
"", $this->
lng->txt(
"save"));
  2144         $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"select_one"));
  2146         if ($this->assignment !== null) {
  2155         if ($this->requested_filter_status != 
"") {
  2159         $this->
lng->loadLanguageModule(
"search");
  2161         $this->
toolbar->setFormAction($this->
ctrl->getFormAction($this, 
"listTextAssignment"));
  2167             "" => $this->
lng->txt(
"search_any"),
  2168             self::GRADE_NOT_GRADED => $this->
lng->txt(
"exc_notgraded"),
  2169             self::GRADE_PASSED => $this->
lng->txt(
"exc_passed"),
  2170             self::GRADE_FAILED => $this->
lng->txt(
"exc_failed")
  2173         $si_status->setValue($this->
filter[
"status"] ?? 
"");
  2177             self::FEEDBACK_FULL_SUBMISSION => $this->
lng->txt(
"submissions_feedback"),
  2178             self::FEEDBACK_ONLY_SUBMISSION => $this->
lng->txt(
"submissions_only")
  2181         $si_feedback->setValue($this->
filter[
"feedback"] ?? 
"");
  2183         $this->
toolbar->addInputItem($si_status, 
true);
  2187         if ($this->assignment->getPeerReview()) {
  2188             if ($this->requested_filter_feedback != 
"") {
  2191                 $this->
filter[
"feedback"] = 
"submission_feedback";
  2196                 "submission_feedback" => $this->
lng->txt(
"submissions_feedback"),
  2197                 "submission_only" => $this->
lng->txt(
"submissions_only")
  2200             $si_feedback->setValue($this->
filter[
"feedback"] ?? 
"");
  2202             $this->
toolbar->addInputItem($si_feedback, 
true);
  2206             $this->
lng->txt(
"filter"),
  2207             "listTextAssignment"  2208         )->submit()->toToolbar();
  2230         $last_opening = $submission->getLastOpeningHTMLView();
  2231         $submission_time = $submission->getLastSubmission();
  2235         $this->log->debug(
"zip original full path: " . $zip_original_full_path);
  2239         $this->log->debug(
"zip internal path: " . $zip_internal_path);
  2241         $arr = explode(
"_", basename($zip_original_full_path));
  2242         $obj_date = $arr[0];
  2243         $obj_id = (
int) ($arr[1] ?? 0);
  2244         if ($obj_id === 0) {
  2246                 $submission->getSubmittedPrintFile() . 
".");
  2249         $obj_id = $this->assignment->getAssignmentType()->getExportObjIdForResourceId($obj_id);
  2250         if ($print_version) {
  2254         $obj_dir = $this->assignment->getAssignmentType()->getStringIdentifier() . 
"_" . $obj_id;
  2257             DIRECTORY_SEPARATOR .
  2259             DIRECTORY_SEPARATOR .
  2260             dirname($zip_internal_path) .
  2261             DIRECTORY_SEPARATOR .
  2263             DIRECTORY_SEPARATOR .
  2265         $this->log->debug(
"index html file: " . $index_html_file);
  2267         $web_filesystem = $DIC->filesystem()->web();
  2268         if ($last_opening > $submission_time && $web_filesystem->has($index_html_file)) {
  2273         if ($zip_original_full_path) {
  2275             $this->log->debug(
"file copied: " . $file_copied);
  2278                 $this->zip->unzipFile($file_copied);
  2279                 $web_filesystem->delete($zip_internal_path);
  2280                 $this->log->debug(
"deleting: " . $zip_internal_path);
  2282                 $submission_repository = $this->service->repo()->submission();
  2283                 $submission_repository->updateWebDirAccessTime($this->assignment->getId(), $member_id);
  2288             $error_msg = $this->
lng->txt(
"exc_copy_zip_error");
  2291         if ($error_msg === 
'' || $error_msg === 
'0') {
  2292             $error_msg = $this->
lng->txt(
"exc_find_zip_error");
  2295         $this->tpl->setOnScreenMessage(
'failure', $error_msg);
  2305         bool $print_versions = 
false  2307         $submitted = $submission->
getFiles(
  2313         if ($submitted !== []) {
  2314             $submitted = array_pop($submitted);
  2316             return $submitted[
'filename'];
  2327         string $internal_file_path
  2331         $web_filesystem = $DIC->filesystem()->web();
  2332         $data_filesystem = $DIC->filesystem()->storage();
  2334         $internal_dirs = dirname($internal_file_path);
  2335         $zip_file = basename($internal_file_path);
  2337         if ($data_filesystem->has($internal_file_path)) {
  2338             $this->log->debug(
"internal file path: " . $internal_file_path);
  2339             if ($web_filesystem->hasDir($internal_dirs)) {
  2340                 $web_filesystem->deleteDir($internal_dirs);
  2342             $web_filesystem->createDir($internal_dirs);
  2344             if ($web_filesystem->has($internal_file_path)) {
  2345                 $web_filesystem->delete($internal_file_path);
  2347             if (!$web_filesystem->has($internal_file_path)) {
  2348                 $this->log->debug(
"writing: " . $internal_file_path);
  2349                 $stream = $data_filesystem->readStream($internal_file_path);
  2350                 $web_filesystem->writeStream($internal_file_path, $stream);
  2352                 return ILIAS_ABSOLUTE_PATH .
  2353                     DIRECTORY_SEPARATOR .
  2355                     DIRECTORY_SEPARATOR .
  2357                     DIRECTORY_SEPARATOR .
  2359                     DIRECTORY_SEPARATOR .
  2371         string $external_file_path
  2373         list($external_path, $internal_file_path) = explode(
CLIENT_ID . 
"/ilExercise", $external_file_path);
  2374         $internal_file_path = 
"ilExercise" . $internal_file_path;
  2375         return $internal_file_path;
  2384         $this->tabs_gui->clearTargets();
  2385         $this->tabs_gui->setBackTarget(
  2386             $this->
lng->txt(
"back"),
  2387             $this->
ctrl->getLinkTarget($this, 
"members")
  2394         $user = 
new ilObjUser($a_data[
"user_id"]);
  2398             "uid" => $a_data[
"user_id"],
  2400             "udate" => $a_data[
"ts"],
  2406         $data[
"peer"] = array();
  2407         foreach ($peer_review->getPeerReviewsByPeerId($a_data[
'user_id']) as $value) {
  2408             $data[
"peer"][] = $value[
'giver_id'];
  2412         $data[
"fb_given"] = $peer_review->countGivenFeedback(
true, $a_data[
"user_id"]);
  2420         $ass_id = $this->request->getAssId();
  2421         $selected_users = $this->request->getSelectedParticipants();
  2423         $graded_users = array_filter($selected_users, 
function ($user_id) {
  2424             return $this->assignment->getMemberStatus($user_id)->getStatus() !== 
"notgraded";
  2427         if (count($graded_users) === 0) {
  2428             $this->tpl->setOnScreenMessage(
"failure", $this->
lng->txt(
"exc_no_graded_mem_selected"), 
true);
  2434         $not->setAssignmentId($ass_id);
  2435         $not->setObjId($this->exercise->getId());
  2436         $not->setRefId($this->exercise->getRefId());
  2437         $not->setRecipients($graded_users);
  2439         $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"exc_graded_mem_notified"), 
true);
  2447         if ($this->assignment !== null) {
  2448             foreach (array_keys($members) as $mem) {
  2453                 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"msg_obj_modified"), 
true);
  2456         $this->
ctrl->redirect($this, 
"members");
  2463         if ($this->assignment !== null) {
  2464             foreach (array_keys($members) as $mem) {
  2469                 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"msg_obj_modified"), 
true);
  2472         $this->
ctrl->redirect($this, 
"members");
  2479         $member_status = $ass->getMemberStatus($part_id);
  2480         $member_status->setStatus($status);
  2481         $member_status->update();
 array $listed_participants
 
static _replaceMediaObjectImageSrc(string $a_text, int $a_direction=0, string $nic='')
Replaces image source from mob image urls with the mob id or replaces mob id with the correct image s...
 
addMembersObject($a_user_ids=array())
 
An entity that renders components to a string output. 
 
showMultiFeedbackObject(FormAdapterGUI $form=null)
 
__construct(InternalService $service, ilExAssignment $a_ass=null)
Constructor. 
 
Exercise UI frontend presentation service class. 
 
getFiles(array $a_file_ids=null, bool $a_only_valid=false, string $a_min_timestamp=null, bool $print_versions=false)
Get submission items (not only files) 
 
showParticipantObject()
Show Participant. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
ilGlobalTemplateInterface $tpl
 
showGradesOverviewObject()
 
string $requested_user_login
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static downloadAllAssignmentFiles(ilExAssignment $a_ass, array $members, string $to_path)
Download all submitted files of an assignment (all user) 
 
handleMultiFeedbackUploadResult(FileUpload $upload, UploadResult $result)
 
TutorFeedbackFileManager $tutor_feedback_file
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
static initDateTimePicker()
 
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
 
getEvaluationModal(array $a_data)
 
createTeamsFromGroupsObject()
 
static _before(ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets. 
 
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
ILIAS Exercise Notification NotificationManager $notification
 
Class ChatMainBarProvider . 
 
ilExAssignment $assignment
 
getTutorNotices()
key might be ass_ids or user_ids! 
 
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
 
copyFileToWebDir(string $internal_file_path)
Generate the directories and copy the file if necessary. 
 
parseIndividualDeadlineData(array $a_data)
 
static lookupTitle(int $a_id)
 
getStatus()
key might be ass_ids or user_ids! 
 
getEvaluationModalForm(array $a_data)
 
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
 
getMarks()
key might be ass_ids or user_ids! 
 
static _lookupName(int $a_user_id)
lookup user name 
 
Exercise internal service. 
 
getWebFilePathFromExternalFilePath(string $external_file_path)
Get the object specific file path from an external full file path. 
 
array $requested_tutor_notices
 
static _lookupId($a_user_str)
 
setParameterByClass(string $a_class, string $a_parameter, $a_value)
 
request(?array $query_params=null, ?array $post_data=null)
Get request wrapper. 
 
static getInstanceByUserId(int $a_assignment_id, int $a_user_id, bool $a_create_on_demand=false)
 
addUserFromAutoCompleteObject()
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
setSingleStatus($ass_id, $part_id, $status)
 
filterParticipantsByAccess()
Filter manageable members by position or rbac access. 
 
addSubTabs(string $a_activate)
 
static getAssignmentParticipants(int $a_exercise_id, int $a_ass_id)
 
withOnLoadCode(Closure $binder)
 
static getAdoptableGroups(int $a_exc_ref_id)
 
getSubmissionZipFilePath(ilExSubmission $submission, bool $print_versions=false)
Returns the ZIP file path from outside web directory. 
 
showParticipantResetObject()
 
selectParticipantObject()
 
saveStatusAllObject(array $a_selected=null, bool $a_redirect=true)
 
saveStatusParticipantObject(array $selected_ass_ids=null)
Save assignment status (participant view) 
 
getMultiFeedbackForm(int $a_ass_id)
 
resetOffset(bool $a_in_determination=false)
 
sendGradingNotificationObject()
 
string $requested_comment
 
redirectFeedbackMailObject()
 
filterUserIdsByRbacOrPositionOfCurrentUser(string $rbac_perm, string $pos_perm, int $ref_id, array $user_ids)
 
compareTextAssignmentsObject()
TODO -> Deal with the redirection after update the grade via action button. 
 
handleIndividualDeadlineCallsObject()
 
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data 
 
array $requested_learning_comments
 
static http()
Fetches the global http state from ILIAS. 
 
getReportPanel(array $a_data)
 
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is: 
 
setContent(string $a_html)
Sets content for standard template. 
 
static signFolderOfStartFile(string $start_file_path)
 
Download submissions and feedback for exercises. 
 
TaskFactory $task_factory
 
downloadSubmissionsObject(?array $selected_participants=null)
 
string $requested_filter_feedback
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
uploadMultiFeedbackObject()
Upload multi feedback file. 
 
downloadMultiFeedbackZipObject()
Download multi-feedback structrue file. 
 
removeUserSubmissionFilesFromWebDir(int $user_id)
 
Class BasicHandlerResult. 
 
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...
 
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. 
 
array $requested_group_members
 
showParticipantApplyObject()
 
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code. 
 
static getAssignmentFilesByUsers(int $a_exc_id, int $a_ass_id, array $a_users)
 
static getAssignmentTeamMap(int $a_ass_id)
 
static redirect(string $a_script)
 
ilExerciseManagementGUI: ilFileSystemGUI, ilRepositorySearchGUI  ilExerciseManagementGUI: ilExSubmiss...
 
static getInstancesByExercise(int $a_exc_id)
 
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id 
 
confirmDeassignMembersObject()
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
cancelMultiFeedbackObject()
Cancel Multi Feedback. 
 
collectFeedbackDataFromPeer(array $a_data)
 
create()
Create directory. 
 
openSubmissionViewObject(bool $print_version=false)
Open HTML view for portfolio submissions. 
 
membersObject()
All participants and submission of one assignment. 
 
array $selected_participants
 
initIndividualDeadlineModal()
 
saveEvaluationFromModalObject()
 
saveCommentForLearnersObject()
 
This class represents a text area property in a property form. 
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
ILIAS HTTP Services $http
 
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples 
 
adoptTeamsFromGroupObject(ilPropertyFormGUI $a_form=null)
 
const FEEDBACK_ONLY_SUBMISSION
 
showMultiFeedbackConfirmationTableObject()
Show multi feedback confirmation table. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
getOnLoadCodeForAsynch()
Get js onload code for ajax calls. 
 
saveMultiFeedbackObject()
Save multi feedback. 
 
File System Explorer GUI class. 
 
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
 
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
 
static getGroupMembersMap(int $a_exc_ref_id)
 
static _lookupType(int $id, bool $reference=false)
 
Exercise gui request wrapper. 
 
saveStatusSelectedObject()
 
Exercise participant table. 
 
getMultiActionUserIds(bool $a_keep_teams=false)
 
ILIAS Exercise InternalDomainService $domain
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
getSelectedParticipants()
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
initIndividualDeadlineForm(array $a_ass_map, array $ids)
 
saveStatus(array $a_data, bool $a_redirect=true)
 
const FEEDBACK_FULL_SUBMISSION
 
string $requested_filter_status
 
openSubmissionPrintViewObject()
Open HTML view for portfolio submissions. 
 
static getInstancesFromMap(int $a_assignment_id)
 
setIndividualDeadlineObject()
 
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
 
setTableId(string $a_val)
 
static _lookupLogin(int $a_user_id)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...