26     protected \ILIAS\Exercise\InternalDomainService 
$domain;
    27     protected \ILIAS\Exercise\Assignment\DomainService 
$ass_domain;
    38     protected array 
$cols_default = array(
"login", 
"submission", 
"idl", 
"calc_deadline");
    39     protected array 
$cols_order = array(
"image", 
"name", 
"login", 
"team_members",
    40             "sent_time", 
"submission", 
"calc_deadline", 
"idl", 
"status", 
"mark", 
"status_time",
    41             "feedback_time", 
"comment", 
"notice");
    58         $this->ui_factory = $DIC->ui()->factory();
    59         $this->ui_renderer = $DIC->ui()->renderer();
    61         $this->
ctrl = $DIC->ctrl();
    62         $this->
access = $DIC->access();
    63         $this->tpl = $DIC[
"tpl"];
    64         $this->
lng = $DIC->language();
    66         $ilCtrl = $DIC->ctrl();
    78         $this->
setRowTemplate(
"tpl.exc_members_row.html", 
"components/ILIAS/Exercise");
    81         if ($this->mode == self::MODE_BY_ASSIGNMENT) {
    93         foreach ($this->cols_order as 
$id) {
    94             if (in_array($id, $this->cols_mandatory) ||
    95                 in_array($id, $selected)) {
    96                 if (array_key_exists($id, $columns)) {
   112             $this->
addMultiCommand(
"compareTextAssignments", $this->
lng->txt(
"exc_compare_submissions"));
   118         if ($this->mode == self::MODE_BY_ASSIGNMENT &&
   119             $this->ass->hasActiveIDl() &&
   120             !$this->ass->hasReadOnlyIDl()) {
   121             $this->
addMultiCommand(
"setIndividualDeadline", $this->
lng->txt(
"exc_individual_deadline_action"));
   124         if ($this->exc->hasTutorFeedbackMail() &&
   125             $this->mode == self::MODE_BY_ASSIGNMENT) {
   126             $this->
addMultiCommand(
"redirectFeedbackMail", $this->
lng->txt(
"exc_tbl_action_feedback_mail"));
   131         if ($this->mode == self::MODE_BY_ASSIGNMENT) {
   132             $this->
addMultiCommand(
"sendGradingNotification", $this->
lng->txt(
"exc_send_grading_notification"));
   135         if ($this->mode == self::MODE_BY_ASSIGNMENT &&
   137             $this->ass->hasTeam()) {
   142         if ($this->mode == self::MODE_BY_ASSIGNMENT) {
   143             $this->
addMultiCommand(
"confirmDeassignMembers", $this->
lng->txt(
"exc_deassign_members"));
   151         $this->ass_domain = $DIC->exercise()->internal()->domain()->assignment();
   152         $this->domain = $DIC->exercise()->internal()->domain();
   157         if ($this->mode == self::MODE_BY_ASSIGNMENT) {
   159             $this->
filter[
"name"] = $item->getValue();
   162         $this->
lng->loadLanguageModule(
"search");
   164             "" => $this->
lng->txt(
"search_any"),
   165             "notgraded" => $this->
lng->txt(
"exc_notgraded"),
   166             "passed" => $this->
lng->txt(
"exc_passed"),
   167             "failed" => $this->
lng->txt(
"exc_failed")
   170         $item->setOptions($options);
   171         $this->
filter[
"status"] = $item->getValue();
   174             "" => $this->
lng->txt(
"search_any"),
   175             "y" => $this->
lng->txt(
"exc_tbl_filter_has_submission"),
   176             "n" => $this->
lng->txt(
"exc_tbl_filter_has_no_submission")
   179         $item->setOptions($options);
   180         $this->
filter[
"subm"] = $item->getValue();
   182         $item = $this->
addFilterItemByMetaType(
"flt_subm_after", self::FILTER_DATE, 
false, $this->
lng->txt(
"exc_tbl_filter_submission_after"));
   183         $this->
filter[
"subm_after"] = $item->getDate();
   185         $item = $this->
addFilterItemByMetaType(
"flt_subm_before", self::FILTER_DATE, 
false, $this->
lng->txt(
"exc_tbl_filter_submission_before"));
   186         $this->filter[
"subm_before"] = $item->getDate();
   188         if ($this->mode == self::MODE_BY_ASSIGNMENT && !$this->ass->hasTeam()) {
   196             $this->
lng->txt(
'exc_member_of_crs_grp'),
   201         $repo->getExplorerGUI()->setSelectableTypes([
"crs", 
"grp"]);
   202         $repo->getExplorerGUI()->setTypeWhiteList([
"root", 
"cat", 
"crs", 
"grp"]);
   204         $repo->readFromSession();
   205         $this->
filter[
'member_of'] = (
int) $repo->getValue();
   215     abstract protected function initMode(
int $a_item_id): void;
   217     abstract protected function parseData(): array;
   226         foreach ($this->cols_order as 
$id) {
   227             if (in_array($id, $this->cols_mandatory)) {
   231             if (array_key_exists($id, $columns)) {
   232                 $col = $columns[
$id];
   236                     "default" => in_array($id, $this->cols_default)
   247         $cols[
"submission"] = array($this->
lng->txt(
"exc_tbl_submission_date"), 
"submission");
   249         $cols[
"status"] = array($this->
lng->txt(
"exc_tbl_status"), 
"status");
   250         $cols[
"mark"] = array($this->
lng->txt(
"exc_tbl_mark"), 
"mark");
   251         $cols[
"status_time"] = array($this->
lng->txt(
"exc_tbl_status_time"), 
"status_time");
   253         $cols[
"sent_time"] = array($this->
lng->txt(
"exc_tbl_sent_time"), 
"sent_time");
   255         if ($this->exc->hasTutorFeedbackText() ||
   256             $this->exc->hasTutorFeedbackMail() ||
   257             $this->exc->hasTutorFeedbackFile()) {
   258             $cols[
"feedback_time"] = array($this->
lng->txt(
"exc_tbl_feedback_time"), 
"feedback_time");
   261         if ($this->exc->hasTutorFeedbackText()) {
   262             $cols[
"comment"] = array($this->
lng->txt(
"exc_tbl_comment"), 
"comment");
   265         $cols[
"notice"] = array($this->
lng->txt(
"exc_tbl_notice"), 
"notice");
   275     protected function parseRow(
   283         $has_no_team_yet = ($a_ass->
hasTeam() &&
   289         if ($this->mode == self::MODE_BY_ASSIGNMENT) {
   291                 $this->tpl->setVariable(
"VAL_NAME", $a_row[
"name"]);
   294                 if (!$ilAccess->checkAccessOfUser($a_user_id, 
"read", 
"", $this->exc->getRefId()) &&
   295                     is_array($info = $ilAccess->getInfo())) {
   296                     $this->tpl->setCurrentBlock(
'access_warning');
   297                     $this->tpl->setVariable(
'PARENT_ACCESS', $info[0][
"text"]);
   298                     $this->tpl->parseCurrentBlock();
   301                 asort($a_row[
"team"]);
   302                 foreach ($a_row[
"team"] as $team_member_id => $team_member_name) { 
   303                     if (count($a_row[
"team"]) > 1) {
   304                         $ilCtrl->setParameterByClass(
"ilExSubmissionTeamGUI", 
"id", $team_member_id);
   305                         $url = $ilCtrl->getLinkTargetByClass(
"ilExSubmissionTeamGUI", 
"confirmRemoveTeamMember");
   306                         $ilCtrl->setParameterByClass(
"ilExSubmissionTeamGUI", 
"id", 
"");
   308                         $this->tpl->setCurrentBlock(
"team_member_removal_bl");
   309                         $this->tpl->setVariable(
"URL_TEAM_MEMBER_REMOVAL", 
$url);
   311                         $rem_gl = $this->ui_factory->symbol()->glyph()->remove(
$url);
   312                         $this->tpl->setVariable(
   313                             "TXT_TEAM_MEMBER_REMOVAL",
   314                             $this->ui_renderer->render($rem_gl)
   317                         $this->tpl->parseCurrentBlock();
   321                     if (!$ilAccess->checkAccessOfUser($team_member_id, 
"read", 
"", $this->exc->getRefId()) &&
   322                         is_array($info = $ilAccess->getInfo())) {
   323                         $this->tpl->setCurrentBlock(
'team_access_warning');
   324                         $this->tpl->setVariable(
'TEAM_PARENT_ACCESS', $info[0][
"text"]);
   325                         $this->tpl->parseCurrentBlock();
   328                     $this->tpl->setCurrentBlock(
"team_member");
   329                     $this->tpl->setVariable(
"TXT_MEMBER_NAME", $team_member_name);
   330                     $this->tpl->parseCurrentBlock();
   333                 $this->tpl->setCurrentBlock(
"team_info");
   334                 if ($has_no_team_yet) {
   336                     $this->tpl->setVariable(
"TXT_TEAM_INFO", $this->
lng->txt(
"exc_no_team_yet"));
   338                     $this->tpl->setVariable(
"TXT_TEAM_INFO", 
"(" . $a_row[
"submission_obj"]->getTeam()->
getId() . 
")");
   342             $this->tpl->setVariable(
"VAL_NAME", $a_row[
"name"]);
   346         if (!$has_no_team_yet) {
   348             $this->tpl->setVariable(
"SEL_" . strtoupper($a_row[
"status"] ?? 
""), 
' selected="selected" ');
   349             $this->tpl->setVariable(
"TXT_NOTGRADED", $this->
lng->txt(
"exc_notgraded"));
   350             $this->tpl->setVariable(
"TXT_PASSED", $this->
lng->txt(
"exc_passed"));
   351             $this->tpl->setVariable(
"TXT_FAILED", $this->
lng->txt(
"exc_failed"));
   357             $this->tpl->setVariable(
"NO_TEAM_COLSPAN", $nt_colspan);
   363             $include_seconds = 
false;
   369                             $this->tpl->setVariable(
"VAL_IMAGE", $usr_obj->getPersonalPicturePath(
"xxsmall"));
   370                             $this->tpl->setVariable(
"TXT_IMAGE", $this->
lng->txt(
"personal_picture"));
   377                         if (count($a_row[
"team"]) === 0) {
   378                             $this->tpl->setVariable(
"VAL_TEAM_MEMBER", $this->
lng->txt(
"exc_no_team_yet"));
   380                             foreach ($a_row[
"team"] as $name) {
   381                                 $this->tpl->setCurrentBlock(
"team_member_bl");
   382                                 $this->tpl->setVariable(
"VAL_TEAM_MEMBER", $name);
   383                                 $this->tpl->parseCurrentBlock();
   387                         $this->tpl->setVariable(
"VAL_TEAM_MEMBER", 
" ");
   391                 case "calc_deadline":
   395                         if ($a_row[
"requested_idl"] ?? 
false) {
   396                             $this->tpl->setVariable(
   397                                 "VAL_" . strtoupper($col),
   398                                 $this->
lng->txt(
"exc_deadline_requested")
   401                             $this->tpl->setVariable(
   402                                 "VAL_" . strtoupper($col),
   407                         $this->tpl->setVariable(
   408                             "VAL_" . strtoupper($col),
   417                     if (!$has_no_team_yet) {
   418                         $this->tpl->setVariable(
   419                             "VAL_" . strtoupper($col),
   421                                 trim((
string) ($a_row[$col] ?? 
""))
   429                     $this->tpl->setVariable(
   430                         "VAL_" . strtoupper($col),
   437                     $comment_id = 
"excasscomm_" . $a_ass->
getId() . 
"_" . $a_user_id;
   438                     $this->tpl->setVariable(
"LCOMMENT_ID", $comment_id . 
"_snip");
   441                     $this->tpl->setVariable(
"VAL_" . strtoupper($col), (trim((
string) ($a_row[$col] ?? 
"")) !== 
"")
   442                         ? nl2br(trim((
string) $a_row[$col]))
   446                 case "feedback_time":
   450                     if ($col == 
"submission" && $a_row[
"submission_obj"]) {
   451                         $include_seconds = 
true;
   452                         $sm = $this->domain->submission($a_row[
"submission_obj"]->getAssignment()->
getId());
   453                         foreach ($sm->getSubmissionsOfUser($a_row[
"submission_obj"]->getUserId()) as $sub) {
   454                             if ($sub->getLate()) {
   455                                 $this->tpl->setVariable(
"TXT_LATE", $this->
lng->txt(
"exc_late_submission"));
   460                     $this->tpl->setVariable(
   461                         "VAL_" . strtoupper($col),
   462                         ($a_row[$col] ?? 
false)
   475                         $this->tpl->setVariable(
"VAL_" . strtoupper($col), $a_row[$col]
   476                             ? trim((
string) $a_row[$col])
   482                     $this->tpl->setVariable(
"VAL_" . strtoupper($col), $a_row[$col]
   483                         ? trim((
string) $a_row[$col])
   494         $file_info = $a_row[
"submission_obj"]->getDownloadedFilesInfoForTableGUIS();
   496         $counter = $file_info[
"files"][
"count"];
   498             if (isset($file_info[
"files"][
"download_url"])) {
   499                 $items[] = $this->ui_factory->button()->shy(
   500                     $file_info[
"files"][
"download_txt"] . 
" (" . $counter . 
")",
   501                     $file_info[
"files"][
"download_url"]
   505             if (isset($file_info[
"files"][
"download_new_url"])) {
   506                 $items[] = $this->ui_factory->button()->shy(
   507                     $file_info[
"files"][
"download_new_txt"],
   508                     $file_info[
"files"][
"download_new_url"]
   515         if ($ass_type->
supportsWebDirAccess() && $a_row[
'submission_obj']->hasSubmittedPrintVersion()) {
   518             if ($a_row[
'submission_obj']->hasSubmittedPrintVersion()) {
   524         if (!$has_no_team_yet &&
   527             (!is_null($a_row[
"calc_deadline"] ?? null) || $a_ass->
getDeadline() || $ind_deadline_mode)) {    
   532             $this->tpl->setVariable(
"VAL_IDL_ID", $a_ass->
getId() . 
"_" . $idl_id);
   534             $assignment_id = $a_ass->
getId();
   535             $items[] = $this->ui_factory->button()->shy($this->
lng->txt(
"exc_individual_deadline_action"), 
"#")
   537                     return "$('#$id').on('click', function() {il.ExcIDl.trigger('$idl_id', '$assignment_id'); return false;})";
   542         if ($this->exc->hasTutorFeedbackMail()) {
   543             $items[] = $this->ui_factory->button()->shy(
   544                 $this->
lng->txt(
"exc_tbl_action_feedback_mail"),
   545                 $ilCtrl->getLinkTarget($this->parent_obj, 
"redirectFeedbackMail")
   551             if ($this->exc->hasTutorFeedbackFile()) {
   552                 $tutor_feedback_manager = $this->ass_domain->tutorFeedbackFile($a_ass->
getId());
   553                 if ($tutor_feedback_manager->hasCollection($a_user_id)) {
   555                     $counter = $tutor_feedback_manager->count($a_user_id);
   557                         ? 
" (" . $counter . 
")"   559                     $items[] = $this->ui_factory->button()->shy(
   560                         $this->
lng->txt(
"exc_tbl_action_feedback_file") . $counter,
   561                         $ilCtrl->getLinkTargetByClass(ilResourceCollectionGUI::class, 
"")
   567             if ($this->exc->hasTutorFeedbackText()) {
   568                 $components = $this->feedback_gui->getComponents($a_ass->
getId(), $a_user_id);
   570                     if ($type === 
"modal") {
   571                         $this->comment_modals[] = $this->ui_renderer->render(
$c);
   572                     } elseif ($type === 
"button") {
   580         if (($peer_review = $a_row[
"submission_obj"]->getPeerReview()) && $a_ass->
afterDeadlineStrict()) {      
   581             $counter = $peer_review->countGivenFeedback(
true, $a_user_id);
   583                 ? 
" (" . $counter . 
")"   585             $items[] = $this->ui_factory->button()->shy(
   586                 $this->
lng->txt(
"exc_tbl_action_peer_review_given") . $counter,
   587                 $ilCtrl->getLinkTargetByClass(
"ilexpeerreviewgui", 
"showGivenPeerReview")
   590             $counter = count($peer_review->getPeerReviewsByPeerId($a_user_id, 
true));
   591             $counter = $counter !== 0
   592                 ? 
" (" . $counter . 
")"   595             $items[] = $this->ui_factory->button()->shy(
   596                 $this->
lng->txt(
"exc_tbl_action_peer_review_received") . $counter,
   597                 $ilCtrl->getLinkTargetByClass(
"ilexpeerreviewgui", 
"showReceivedPeerReview")
   602         if ($has_no_team_yet) {
   603             $items[] = $this->ui_factory->button()->shy(
   604                 $this->
lng->txt(
"exc_create_team"),
   605                 $ilCtrl->getLinkTargetByClass(
"ilExSubmissionTeamGUI", 
"createSingleMemberTeam")
   608             $items[] = $this->ui_factory->button()->shy(
   609                 $this->
lng->txt(
"exc_tbl_action_team_log"),
   610                 $ilCtrl->getLinkTargetByClass(
"ilExSubmissionTeamGUI", 
"showTeamLog")
   614         $actions = $this->ui_factory->dropdown()->standard($items);
   616         $this->tpl->setVariable(
"ACTIONS", $this->ui_renderer->render($actions));
   621         return parent::render() .
   622             implode(
"\n", $this->comment_modals);
 
ilExerciseSubmissionFeedbackGUI $feedback_gui
 
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ilObjUser $user=null,)
 
getType()
Get type this will most probably become an non public function in the future (or become obsolete) ...
 
canParticipantReceiveFeedback(int $part_id)
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
 
setResetCommand(string $a_val, string $a_caption="")
 
afterDeadlineStrict(bool $a_include_personal=true)
 
setShowTemplates(bool $a_value)
 
setFormName(string $a_name="")
 
withOnLoadCode(Closure $binder)
 
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type. 
 
const DEADLINE_ABSOLUTE_INDIVIDUAL
 
setDefaultOrderField(string $a_defaultorderfield)
 
This is how the factory for UI elements looks. 
 
__construct(object $a_parent_obj, string $a_parent_cmd, ilObjExercise $a_exc, int $a_item_id, ilExerciseSubmissionFeedbackGUI $feedback_gui)
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template. 
 
setFilterCommand(string $a_val, string $a_caption="")
 
setDefaultOrderDirection(string $a_defaultorderdirection)
 
ILIAS Exercise InternalDomainService $domain
 
static getTeamId(int $a_assignment_id, int $a_user_id, bool $a_create_on_demand=false)
 
ILIAS Exercise Assignment DomainService $ass_domain
 
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id 
 
ilExAssignmentTypes $ass_types
 
ilExAssignmentTypeInterface $ass_type
 
__construct(Container $dic, ilPlugin $plugin)
 
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
 
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
 
isForwardingToFormDispatcher()
 
addMultiCommand(string $a_cmd, string $a_text)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...