31     protected \ILIAS\Exercise\InternalGUIService 
$gui;
    32     protected \ILIAS\Exercise\InternalDomainService 
$domain;
    56         $this->
toolbar = $DIC->toolbar();
    57         $this->
user = $DIC->user();
    58         $ilCtrl = $DIC->ctrl();
    59         $ilTabs = $DIC->tabs();
    60         $lng = $DIC->language();
    63         $this->exercise = $a_exercise;
    64         $this->submission = $a_submission;
    68         $this->
ctrl = $ilCtrl;
    69         $this->tabs_gui = $ilTabs;
    73         $this->request = $DIC->exercise()->internal()->gui()->request();
    74         $this->requested_team_ids = $this->request->getTeamIds();
    75         $this->domain = $DIC->exercise()->internal()->domain();
    76         $this->gui = $DIC->exercise()->internal()->gui();
    87         $cmd = $ilCtrl->getCmd(
"submissionScreenTeam");
    89         if (!$this->assignment->hasTeam() ||
    90             !$this->submission->canView()) {
    93         $this->team = $this->submission->getTeam();
    95         if (!$this->submission->isTutor()) {
    97             $this->tabs_gui->activateTab(
"team");
   101             case 'ilrepositorysearchgui':
   102                 $this->
ctrl->setReturn($this, 
'submissionScreenTeam');
   104                 if (!$this->submission->isTutor()) {
   107                 $rep_search->setTitle($this->
lng->txt(
"exc_team_member_add"));
   108                 $rep_search->setCallback($this, 
'addTeamMemberActionObject');
   109                 $this->
ctrl->forwardCommand($rep_search);
   113                 $this->{$cmd . 
"Object"}();
   124         $lng = $DIC->language();
   125         $ilCtrl = $DIC->ctrl();
   126         $gui = $DIC->exercise()->internal()->gui();
   134         $team_members = $a_submission->
getTeam()->getMembers();
   135         if ($team_members !== []) {                                                                     
   137             foreach ($team_members as $member_id) {
   141             $team = implode(
"; ", $team);
   148                         $lng->
txt(
"exc_delete_team"),
   149                         $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, 
"ilExSubmissionGUI", 
"ilExSubmissionTeamGUI"), 
"confirmDeleteTeam")
   151                     $team .= 
" " . $link->render();
   154                     $lng->
txt(
"exc_manage_team"),
   155                     $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, 
"ilExSubmissionGUI", 
"ilExSubmissionTeamGUI"), 
"submissionScreenTeam")
   159                     $lng->
txt(
"exc_team_log"),
   160                     $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, 
"ilExSubmissionGUI", 
"ilExSubmissionTeamGUI"), 
"submissionScreenTeamLog")
   163             $team .= 
"<br><br>" . $link->render();
   168             if (!$state->hasSubmissionEnded()) {                                                        
   170                     $team_info = $lng->
txt(
"exc_no_team_yet_notice");
   172                     $team_info = 
'<span class="warning">' . $lng->
txt(
"exc_no_team_yet_notice") . 
'</span>';
   176                     $button = $gui->button(
   177                         $lng->
txt(
"exc_create_team"),
   178                         $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, 
"ilExSubmissionGUI", 
"ilExSubmissionTeamGUI"), 
"createTeam")
   181                     $team_info .= 
" " . $button->render();
   183                     $team_info .= 
'<div class="ilFormInfo">' . $lng->
txt(
"exc_no_team_yet_info") . 
'</div>';
   185                     $team_info .= 
'<div class="ilFormInfo">' . $lng->
txt(
"exc_no_team_yet_info_tutor") . 
'</div>';
   188                 $team_info = 
'<span class="warning">' . $lng->
txt(
"exc_create_team_times_up_warning") . 
'</span>';
   198         $f = $this->gui->ui()->factory();
   206         $state = $this->domain->assignment()->state($submission->
getAssignment()->getId(), $submission->
getUserId());
   208         $team_members = $submission->
getTeam()->getMembers();
   209         if ($team_members !== []) {                                                                     
   211             foreach ($team_members as $member_id) {
   215             $team = implode(
"; ", $team);
   221                     $button = 
$f->button()->standard(
   222                         $this->
lng->txt(
"exc_delete_team"),
   223                         $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, 
"ilExSubmissionGUI", 
"ilExSubmissionTeamGUI"), 
"confirmDeleteTeam")
   230                 $button = 
$f->button()->standard(
   231                     $this->
lng->txt(
"exc_manage_team"),
   232                     $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, 
"ilExSubmissionGUI", 
"ilExSubmissionTeamGUI"), 
"submissionScreenTeam")
   239                 $button = 
$f->button()->standard(
   240                     $this->
lng->txt(
"exc_team_log"),
   241                     $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, 
"ilExSubmissionGUI", 
"ilExSubmissionTeamGUI"), 
"submissionScreenTeamLog")
   248             $builder->addProperty(
   250                 $lng->
txt(
"exc_team_members"),
   255             if (!$state->hasSubmissionEnded()) {                                                        
   257                     $team_info = $this->
lng->txt(
"exc_no_team_yet_notice");
   259                     $team_info = 
'<span class="warning">' . $this->
lng->txt(
"exc_no_team_yet_notice") . 
'</span>';
   263                     $button = 
$f->button()->primary(
   264                         $this->
lng->txt(
"exc_create_team"),
   265                         $ilCtrl->getLinkTargetByClass(array(ilAssignmentPresentationGUI::class, 
"ilExSubmissionGUI", 
"ilExSubmissionTeamGUI"), 
"createTeam")
   267                     $builder->setMainAction(
   271                     $team_info .= 
'<div class="ilFormInfo">' . $lng->
txt(
"exc_no_team_yet_info") . 
'</div>';
   273                     $team_info .= 
'<div class="ilFormInfo">' . $lng->
txt(
"exc_no_team_yet_info_tutor") . 
'</div>';
   276                 $team_info = $lng->
txt(
"exc_create_team_times_up_warning");
   279             $builder->addProperty(
   281                 $lng->
txt(
"exc_team_members"),
   289         $this->
ctrl->returnToParent($this);
   296         $ilTabs = $DIC->tabs();
   297         $ilCtrl = $DIC->ctrl();
   298         $lng = $DIC->language();
   302             $lng->
txt(
"exc_team"),
   303             $ilCtrl->getLinkTargetByClass(
"ilExSubmissionTeamGUI", 
"submissionScreenTeam")
   308             $lng->
txt(
"exc_team_log"),
   309             $ilCtrl->getLinkTargetByClass(
"ilExSubmissionTeamGUI", 
"submissionScreenTeamLog")
   315         return (($this->submission->canSubmit() &&
   316             !$this->submission->getAssignment()->getTeamTutor()) ||
   317             $this->submission->isTutor());
   330         if ($this->submission->getAssignment()->afterDeadlineStrict(
false)) {
   331             $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"exercise_time_over"));
   332         } elseif (!$read_only) {
   333             $add_search = $this->submission->isTutor();
   339                     'auto_complete_name' => $this->
lng->txt(
'user'),
   340                     'submit_name' => $this->
lng->txt(
'add'),
   341                     'add_search' => $add_search,
   342                     'add_from_container' => $this->exercise->getRefId()
   345         } elseif ($this->submission->getAssignment()->getTeamTutor()) {
   346             $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"exc_no_team_yet_info_tutor"));
   351             "submissionScreenTeam",
   353             $this->exercise->getRefId(),
   358         $this->tpl->setContent($tbl->getHTML());
   365         array $a_user_ids = array()
   368             $this->
ctrl->redirect($this, 
"submissionScreenTeam");
   371         if ($a_user_ids === []) {
   372             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"));
   379             if ($this->team->addTeamMember($user_id, $this->exercise->getRefId())) {
   383                 if (!$this->exercise->members_obj->isAssigned($user_id)) {
   384                     $this->exercise->members_obj->assignMember($user_id);
   388                 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"exc_members_already_assigned_team"), 
true);
   392         if ($new_users !== []) {
   394             $this->exercise->processExerciseStatus(
   396                 $this->team->getMembers(),
   397                 $this->submission->hasSubmitted(),
   398                 $this->submission->validatePeerReviews()
   401             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"), 
true);
   404         $this->
ctrl->redirect($this, 
"submissionScreenTeam");
   419         bool $a_full_delete = 
false   424         if (!$this->submission->isTutor()) {
   428                 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"select_one"), 
true);
   429                 $this->
ctrl->redirect($this, 
"submissionScreenTeam");
   438         $members = $this->team->getMembers();
   439         if (count($members) <= count($ids)) {
   440             if (count($members) == 1 && $members[0] == $ilUser->getId()) {
   445                 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"exc_team_at_least_one"), 
true);
   446                 $this->
ctrl->redirect($this, 
"submissionScreenTeam");
   451         $cgui->setFormAction($this->
ctrl->getFormAction($this));
   452         $cgui->setHeaderText($this->
lng->txt(
"exc_team_member_remove_sure"));
   453         $cgui->setConfirm($this->
lng->txt(
"remove"), 
"removeTeamMember");
   454         $cgui->setCancel($this->
lng->txt(
"cancel"), $this->submission->isTutor()
   456             : 
"submissionScreenTeam");
   458         $subs = $this->domain->submission($this->assignment->getId())
   459                              ->getSubmissionsOfUser($this->submission->getUserId());
   461         foreach ($ids as 
$id) {
   463             foreach ($subs as $sub) {
   464                 if ($sub->getUserId() === 
$id) {
   465                     $details[] = $sub->getTitle();
   469             if ($details !== []) {
   470                 $uname .= 
": " . implode(
", ", $details);
   472             $cgui->addItem(
"id[]", $id, $uname);
   482         bool $a_full_delete = 
false   486         $cancel_cmd = $this->submission->isTutor()
   488             : 
"submissionScreenTeam";
   491         if ($a_full_delete) {
   492             $ids = $this->team->getMembers();
   496         $ids = array_filter(
array_map(
'intval', $ids));
   499             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"select_one"), 
true);
   500             $this->
ctrl->redirect($this, $cancel_cmd);
   503         $team_deleted = $a_full_delete;
   504         if (!$team_deleted) {
   505             $members = $this->team->getMembers();
   506             if (count($members) <= count($ids)) {
   507                 if (count($members) == 1 && $members[0] == $ilUser->getId()) {
   508                     $team_deleted = 
true;
   510                     $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"exc_team_at_least_one"), 
true);
   511                     $this->
ctrl->redirect($this, $cancel_cmd);
   517             $this->team->removeTeamMember($user_id, $this->exercise->getRefId());
   521         $this->exercise->processExerciseStatus(
   527         if (!$team_deleted) {
   529             $this->exercise->processExerciseStatus(
   531                 $this->team->getMembers(),
   532                 $this->submission->hasSubmitted(),
   533                 $this->submission->validatePeerReviews()
   537         $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"), 
true);
   538         if (!$team_deleted) {
   539             $this->
ctrl->redirect($this, $cancel_cmd);
   541             $this->
ctrl->redirect($this, 
"returnToParent");
   547         $this->tabs_gui->activateTab(
"log");
   551             "submissionScreenTeamLog",
   555         $this->tpl->setContent($tbl->getHTML());
   561             $this->assignment->getId(),
   562             $this->submission->getUserId(),
   565         $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"), 
true);
   572         $this->tpl->setContent($tbl->getHTML());
   585         $form->setTitle($lng->
txt(
"exc_team_assignment_adopt_user"));
   586         $form->setFormAction($ctrl->
getFormAction($this, 
"createAdoptedTeam"));
   591         $teams->addOption(
new ilRadioOption($lng->
txt(
"exc_team_assignment_adopt_none_user"), -1));
   596         foreach ($options as 
$id => $item) {
   599             foreach ($item[
"user_team"] as 
$user_id) {
   602                 if (array_key_exists($user_id, $current_map)) {
   603                     $members[
$user_id] .= 
" (" . $lng->
txt(
"exc_team_assignment_adopt_already_assigned") . 
")";
   609             $members = implode(
"<br />", $members);
   611             $option->setInfo($members);
   613                 $option->setDisabled(
true);
   615             $teams->addOption($option);
   618         $form->addItem($teams);
   620         $form->addCommandButton(
"createAdoptedTeam", $lng->
txt(
"save"));
   621         $form->addCommandButton(
"returnToParent", $lng->
txt(
"cancel"));
   632         if ($this->submission->canSubmit()) {
   634             if ($options !== []) {
   643             if (!$this->exercise->members_obj->isAssigned($ilUser->getId())) {
   644                 $this->exercise->members_obj->assignMember($ilUser->getId());
   647             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"), 
true);
   650         $ilCtrl->redirect($this, 
"returnToParent");
   664         if ($this->submission->canSubmit()) {
   665             $src_ass_id = $form->getInput(
"ass_adpt");
   666             if ($src_ass_id > 0) {
   672             $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"settings_saved"), 
true);
   675         $ilCtrl->redirect($this, 
"returnToParent");
   684         $user_login = $this->request->getUserLogin();
   685         if ($user_login == 
"") {
   686             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_no_search_string'));
   691         $users = explode(
',', $user_login);
   694         foreach ($users as $user) {
   698                 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'user_not_known'));
 ILIAS Exercise InternalGUIService $gui
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
array $requested_team_ids
 
buildSubmissionPropertiesAndActions(\ILIAS\Exercise\Assignment\PropertyAndActionBuilderUI $builder)
 
createSingleMemberTeamObject()
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
getAdoptForm()
Get Adopt form. 
 
ILIAS Exercise InternalDomainService $domain
 
Interface Observer  Contains several chained tasks and infos about them. 
 
const PRIVACY_MODE_RESPECT_USER_SETTING
 
addProperty(string $a_name, string $a_value, string $a_link="")
add a property to current section 
 
removeTeamMemberObject(bool $a_full_delete=false)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static getAdoptableTeamAssignments(int $a_exercise_id, int $a_exclude_ass_id=null, int $a_user_id=null)
 
static _lookupId($a_user_str)
 
addTeamMemberActionObject(array $a_user_ids=array())
 
ilExSubmission $submission
 
submissionScreenTeamLogObject()
 
getNextClass($a_gui_class=null)
 
ilExAssignment $assignment
 
submissionScreenTeamObject()
Displays a form which allows members to manage team uploads. 
 
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. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static getInstanceByIds(int $a_ass_id, int $a_user_id=0)
 
getLastSubmission()
TODO -> get rid of getTableUserWhere and move to repository class Get the date of the last submission...
 
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...
 
static getTeamId(int $a_assignment_id, int $a_user_id, bool $a_create_on_demand=false)
 
addUserFromAutoCompleteObject()
Add user as member. 
 
static getAssignmentTeamMap(int $a_ass_id)
 
ilGlobalTemplateInterface $tpl
 
confirmRemoveTeamMemberObject(bool $a_full_delete=false)
 
confirmDeleteTeamObject()
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
__construct(Container $dic, ilPlugin $plugin)
 
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
 
static adoptTeams(int $a_source_ass_id, int $a_target_ass_id, int $a_user_id=null, int $a_exc_ref_id=null)
 
Exercise submission //TODO: This class has many static methods related to delivered "files"...
 
getFormAction(object $a_gui_obj, string $a_fallback_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
 
Exercise gui request wrapper. 
 
createAdoptedTeamObject()