ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilExSubmissionTeamGUI Class Reference

Submission team. More...

+ Collaboration diagram for ilExSubmissionTeamGUI:

Public Member Functions

 __construct (ilObjExercise $a_exercise, ilExSubmission $a_submission)
 
 executeCommand ()
 
 returnToParentObject ()
 
 submissionScreenTeamObject ()
 Displays a form which allows members to manage team uploads. More...
 
 addTeamMemberActionObject ($a_user_ids=array())
 
 confirmDeleteTeamObject ()
 
 confirmRemoveTeamMemberObject ($a_full_delete=false)
 
 removeTeamMemberObject ($a_full_delete=false)
 
 submissionScreenTeamLogObject ()
 
 createSingleMemberTeamObject ()
 
 showTeamLogObject ()
 
 createTeamObject ()
 
 createAdoptedTeamObject ()
 
 addUserFromAutoCompleteObject ()
 Add user as member. More...
 

Static Public Member Functions

static getOverviewContent (ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
 
static handleTabs ()
 

Protected Member Functions

 canEditTeam ()
 

Protected Attributes

 $ctrl
 
 $tabs_gui
 
 $lng
 
 $tpl
 
 $toolbar
 
 $user
 
 $exercise
 
 $assignment
 
 $submission
 
 $team
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilExSubmissionTeamGUI::__construct ( ilObjExercise  $a_exercise,
ilExSubmission  $a_submission 
)

Definition at line 49 of file class.ilExSubmissionTeamGUI.php.

References $DIC, $ilCtrl, $lng, $tpl, ilExSubmission\getAssignment(), and user().

50  {
51  global $DIC;
52 
53  $this->toolbar = $DIC->toolbar();
54  $this->user = $DIC->user();
55  $ilCtrl = $DIC->ctrl();
56  $ilTabs = $DIC->tabs();
57  $lng = $DIC->language();
58  $tpl = $DIC["tpl"];
59 
60  $this->exercise = $a_exercise;
61  $this->submission = $a_submission;
62  $this->assignment = $a_submission->getAssignment();
63 
64  // :TODO:
65  $this->ctrl = $ilCtrl;
66  $this->tabs_gui = $ilTabs;
67  $this->lng = $lng;
68  $this->tpl = $tpl;
69  }
user()
Definition: user.php:4
global $ilCtrl
Definition: ilias.php:18
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ addTeamMemberActionObject()

ilExSubmissionTeamGUI::addTeamMemberActionObject (   $a_user_ids = array())

Definition at line 253 of file class.ilExSubmissionTeamGUI.php.

References canEditTeam(), and ilUtil\sendFailure().

Referenced by addUserFromAutoCompleteObject().

254  {
255  if (!$this->canEditTeam()) {
256  $this->ctrl->redirect("submissionScreenTeam");
257  }
258 
259  if (!count($a_user_ids)) {
260  ilUtil::sendFailure($this->lng->txt("no_checkbox"));
261  return false;
262  }
263 
264  $new_users = [];
265 
266  foreach ($a_user_ids as $user_id) {
267  if ($this->team->addTeamMember($user_id, $this->exercise->getRefId())) {
268  $new_users[] = $user_id;
269 
270  // #14277
271  if (!$this->exercise->members_obj->isAssigned($user_id)) {
272  $this->exercise->members_obj->assignMember($user_id);
273  }
274  } else {
275  // #11959
276  ilUtil::sendFailure($this->lng->txt("exc_members_already_assigned_team"), true);
277  }
278  }
279 
280  if (sizeof($new_users)) {
281  // re-evaluate complete team, as new member could have already submitted
282  $this->exercise->processExerciseStatus(
283  $this->assignment,
284  $this->team->getMembers(),
285  $this->submission->hasSubmitted(),
286  $this->submission->validatePeerReviews()
287  );
288  // :TODO: notification?
289  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
290  }
291 
292  $this->ctrl->redirect($this, "submissionScreenTeam");
293  }
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addUserFromAutoCompleteObject()

ilExSubmissionTeamGUI::addUserFromAutoCompleteObject ( )

Add user as member.

Definition at line 545 of file class.ilExSubmissionTeamGUI.php.

References $_POST, $user, ilObjUser\_lookupId(), addTeamMemberActionObject(), ilUtil\sendFailure(), and submissionScreenTeamObject().

546  {
547  if (!strlen(trim($_POST['user_login']))) {
548  ilUtil::sendFailure($this->lng->txt('msg_no_search_string'));
550  return false;
551  }
552 
553  $users = explode(',', $_POST['user_login']);
554 
555  $user_ids = array();
556  foreach ($users as $user) {
557  $user_id = ilObjUser::_lookupId($user);
558 
559  if (!$user_id) {
560  ilUtil::sendFailure($this->lng->txt('user_not_known'));
561  return $this->submissionScreenTeamObject();
562  }
563 
564  $user_ids[] = $user_id;
565  }
566 
567  return $this->addTeamMemberActionObject($user_ids);
568  }
static _lookupId($a_user_str)
Lookup id by login.
submissionScreenTeamObject()
Displays a form which allows members to manage team uploads.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
addTeamMemberActionObject($a_user_ids=array())
$_POST["username"]
+ Here is the call graph for this function:

◆ canEditTeam()

ilExSubmissionTeamGUI::canEditTeam ( )
protected

Definition at line 203 of file class.ilExSubmissionTeamGUI.php.

Referenced by addTeamMemberActionObject(), confirmRemoveTeamMemberObject(), removeTeamMemberObject(), and submissionScreenTeamObject().

204  {
205  return (($this->submission->canSubmit() &&
206  !$this->submission->getAssignment()->getTeamTutor()) ||
207  $this->submission->isTutor());
208  }
+ Here is the caller graph for this function:

◆ confirmDeleteTeamObject()

ilExSubmissionTeamGUI::confirmDeleteTeamObject ( )

Definition at line 295 of file class.ilExSubmissionTeamGUI.php.

References confirmRemoveTeamMemberObject().

296  {
297  $this->confirmRemoveTeamMemberObject(true);
298  }
confirmRemoveTeamMemberObject($a_full_delete=false)
+ Here is the call graph for this function:

◆ confirmRemoveTeamMemberObject()

ilExSubmissionTeamGUI::confirmRemoveTeamMemberObject (   $a_full_delete = false)

Definition at line 300 of file class.ilExSubmissionTeamGUI.php.

References $_GET, $_POST, $ilUser, $tpl, $user, canEditTeam(), ilUserUtil\getNamePresentation(), removeTeamMemberObject(), returnToParentObject(), and ilUtil\sendFailure().

Referenced by confirmDeleteTeamObject().

301  {
303  $tpl = $this->tpl;
304 
305  if (!$this->submission->isTutor()) {
306  $ids = [];
307  if ((bool) $a_full_delete) {
308  $ids = $this->team->getMembers();
309  } elseif (isset($_POST["id"]) && is_array($_POST["id"])) {
310  $ids = $_POST["id"];
311  }
312  $ids = array_filter(array_map('intval', $ids));
313 
314  if (0 === count($ids) && !$this->canEditTeam()) {
315  ilUtil::sendFailure($this->lng->txt("select_one"), true);
316  $this->ctrl->redirect($this, "submissionScreenTeam");
317  }
318  } else {
319  $ids = array_filter(array_map('intval', array($_GET["id"])));
320  if (0 === count($ids)) {
321  $this->returnToParentObject();
322  }
323  }
324 
325  $members = $this->team->getMembers();
326  if (sizeof($members) <= sizeof($ids)) {
327  if (sizeof($members) == 1 && $members[0] == $ilUser->getId()) {
328  // direct team deletion - no confirmation
329  return $this->removeTeamMemberObject($a_full_delete);
330  } else {
331  ilUtil::sendFailure($this->lng->txt("exc_team_at_least_one"), true);
332  $this->ctrl->redirect($this, "submissionScreenTeam");
333  }
334  }
335 
336  $cgui = new ilConfirmationGUI();
337  $cgui->setFormAction($this->ctrl->getFormAction($this));
338  $cgui->setHeaderText($this->lng->txt("exc_team_member_remove_sure"));
339  $cgui->setConfirm($this->lng->txt("remove"), "removeTeamMember");
340  $cgui->setCancel($this->lng->txt("cancel"), $this->submission->isTutor()
341  ? "returnToParent"
342  : "submissionScreenTeam");
343 
344  $files = $this->submission->getFiles();
345 
346  foreach ($ids as $id) {
347  $details = array();
348  foreach ($files as $file) {
349  if ($file["owner_id"] == $id) {
350  $details[] = $file["filetitle"];
351  }
352  }
353  $uname = ilUserUtil::getNamePresentation($id);
354  if (sizeof($details)) {
355  $uname .= ": " . implode(", ", $details);
356  }
357  $cgui->addItem("id[]", $id, $uname);
358  }
359 
360  $tpl->setContent($cgui->getHTML());
361  }
$_GET["client_id"]
$ilUser
Definition: imgupload.php:18
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
removeTeamMemberObject($a_full_delete=false)
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createAdoptedTeamObject()

ilExSubmissionTeamGUI::createAdoptedTeamObject ( )

Definition at line 521 of file class.ilExSubmissionTeamGUI.php.

References $_POST, $ctrl, $ilCtrl, $ilUser, $lng, $user, ilExAssignmentTeam\adoptTeams(), and ilExAssignmentTeam\getTeamId().

522  {
525  $lng = $this->lng;
526 
527  if ($this->submission->canSubmit()) {
528  $src_ass_id = (int) $_POST["ass_adpt"];
529  if ($src_ass_id > 0) {
530  ilExAssignmentTeam::adoptTeams($src_ass_id, $this->assignment->getId(), $ilUser->getId(), $this->exercise->getRefId());
531  } else {
532  ilExAssignmentTeam::getTeamId($this->assignment->getId(), $ilUser->getId(), true);
533  }
534 
535  ilUtil::sendSuccess($lng->txt("settings_saved"), true);
536  }
537 
538  $ilCtrl->redirect($this, "returnToParent");
539  }
static getTeamId($a_assignment_id, $a_user_id, $a_create_on_demand=false)
Get team id for member id.
static adoptTeams($a_source_ass_id, $a_target_ass_id, $a_user_id=null, $a_exc_ref_id=null)
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
$_POST["username"]
+ Here is the call graph for this function:

◆ createSingleMemberTeamObject()

ilExSubmissionTeamGUI::createSingleMemberTeamObject ( )

Definition at line 439 of file class.ilExSubmissionTeamGUI.php.

References ilExAssignmentTeam\getTeamId(), and returnToParentObject().

440  {
442  $this->assignment->getId(),
443  $this->submission->getUserId(),
444  true
445  );
446  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
447  $this->returnToParentObject();
448  }
static getTeamId($a_assignment_id, $a_user_id, $a_create_on_demand=false)
Get team id for member id.
+ Here is the call graph for this function:

◆ createTeamObject()

ilExSubmissionTeamGUI::createTeamObject ( )

Definition at line 456 of file class.ilExSubmissionTeamGUI.php.

References $ctrl, $ilCtrl, $ilUser, $lng, $tpl, $user, ilExAssignmentTeam\getAdoptableTeamAssignments(), ilExAssignmentTeam\getAssignmentTeamMap(), ilUserUtil\getNamePresentation(), ilExAssignmentTeam\getTeamId(), and ilRadioGroupInputGUI\setValue().

457  {
460  $lng = $this->lng;
461  $tpl = $this->tpl;
462 
463  if ($this->submission->canSubmit()) {
464  $options = ilExAssignmentTeam::getAdoptableTeamAssignments($this->assignment->getExerciseId(), $this->assignment->getId(), $ilUser->getId());
465  if (sizeof($options)) {
466  $form = new ilPropertyFormGUI();
467  $form->setTitle($lng->txt("exc_team_assignment_adopt_user"));
468  $form->setFormAction($ilCtrl->getFormAction($this, "createAdoptedTeam"));
469 
470  $teams = new ilRadioGroupInputGUI($lng->txt("exc_assignment"), "ass_adpt");
471  $teams->setValue(-1);
472 
473  $teams->addOption(new ilRadioOption($lng->txt("exc_team_assignment_adopt_none_user"), -1));
474 
475  $current_map = ilExAssignmentTeam::getAssignmentTeamMap($this->assignment->getId());
476 
477  foreach ($options as $id => $item) {
478  $members = array();
479  $free = false;
480  foreach ($item["user_team"] as $user_id) {
481  $members[$user_id] = ilUserUtil::getNamePresentation($user_id);
482 
483  if (array_key_exists($user_id, $current_map)) {
484  $members[$user_id] .= " (" . $lng->txt("exc_team_assignment_adopt_already_assigned") . ")";
485  } else {
486  $free = true;
487  }
488  }
489  asort($members);
490  $members = implode("<br />", $members);
491  $option = new ilRadioOption($item["title"], $id);
492  $option->setInfo($members);
493  if (!$free) {
494  $option->setDisabled(true);
495  }
496  $teams->addOption($option);
497  }
498 
499  $form->addItem($teams);
500 
501  $form->addCommandButton("createAdoptedTeam", $lng->txt("save"));
502  $form->addCommandButton("returnToParent", $lng->txt("cancel"));
503 
504  $tpl->setContent($form->getHTML());
505  return;
506  }
507 
508  ilExAssignmentTeam::getTeamId($this->assignment->getId(), $ilUser->getId(), true);
509 
510  // #18046
511  if (!$this->exercise->members_obj->isAssigned($ilUser->getId())) {
512  $this->exercise->members_obj->assignMember($ilUser->getId());
513  }
514 
515  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
516  }
517 
518  $ilCtrl->redirect($this, "returnToParent");
519  }
This class represents an option in a radio group.
This class represents a property form user interface.
static getAssignmentTeamMap($a_ass_id)
Get team structure for assignment.
static getTeamId($a_assignment_id, $a_user_id, $a_create_on_demand=false)
Get team id for member id.
global $ilCtrl
Definition: ilias.php:18
static getAdoptableTeamAssignments($a_exercise_id, $a_exclude_ass_id=null, $a_user_id=null)
This class represents a property in a property form.
$ilUser
Definition: imgupload.php:18
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
+ Here is the call graph for this function:

◆ executeCommand()

ilExSubmissionTeamGUI::executeCommand ( )

Definition at line 71 of file class.ilExSubmissionTeamGUI.php.

References $ctrl, $ilCtrl, and ilUserAutoComplete\PRIVACY_MODE_RESPECT_USER_SETTING.

72  {
74 
75  $class = $ilCtrl->getNextClass($this);
76  $cmd = $ilCtrl->getCmd("submissionScreenTeam");
77 
78  if (!$this->assignment->hasTeam() ||
79  !$this->submission->canView()) {
80  return;
81  }
82  $this->team = $this->submission->getTeam();
83 
84  if (!$this->submission->isTutor()) {
85  self::handleTabs();
86  $this->tabs_gui->activateTab("team");
87  }
88 
89  switch ($class) {
90  case 'ilrepositorysearchgui':
91  $this->ctrl->setReturn($this, 'submissionScreenTeam');
92  $rep_search = new ilRepositorySearchGUI();
93  if (!$this->submission->isTutor()) {
94  $rep_search->setPrivacyMode(ilUserAutoComplete::PRIVACY_MODE_RESPECT_USER_SETTING);
95  }
96  $rep_search->setTitle($this->lng->txt("exc_team_member_add"));
97  $rep_search->setCallback($this, 'addTeamMemberActionObject');
98  $this->ctrl->forwardCommand($rep_search);
99  break;
100 
101  default:
102  $this->{$cmd . "Object"}();
103  break;
104  }
105  }
global $ilCtrl
Definition: ilias.php:18

◆ getOverviewContent()

static ilExSubmissionTeamGUI::getOverviewContent ( ilInfoScreenGUI  $a_info,
ilExSubmission  $a_submission 
)
static

Definition at line 107 of file class.ilExSubmissionTeamGUI.php.

References $DIC, $ilCtrl, $lng, $team, ilInfoScreenGUI\addProperty(), ilExSubmission\getAssignment(), ilLinkButton\getInstance(), ilExcAssMemberState\getInstanceByIds(), ilExSubmission\getLastSubmission(), ilUserUtil\getNamePresentation(), ilExSubmission\getTeam(), ilExSubmission\getUserId(), and ilExSubmission\hasSubmitted().

Referenced by ilExSubmissionGUI\getOverviewContent().

108  {
109  global $DIC;
110 
111  $lng = $DIC->language();
112  $ilCtrl = $DIC->ctrl();
113 
114  if (!$a_submission->getAssignment()->hasTeam()) {
115  return;
116  }
117 
118  $state = ilExcAssMemberState::getInstanceByIds($a_submission->getAssignment()->getId(), $a_submission->getUserId());
119 
120  $team_members = $a_submission->getTeam()->getMembers();
121  if (sizeof($team_members)) { // we have a team
122  $team = array();
123  foreach ($team_members as $member_id) {
124  //$team[] = ilObjUser::_lookupFullname($member_id);
125  $team[] = ilUserUtil::getNamePresentation($member_id, false, false, "", false);
126  }
127  $team = implode("; ", $team);
128 
129  if (!$a_submission->getAssignment()->getTeamTutor()) {
130  #23685
131  // any team member upload?
132  if (!$a_submission->getLastSubmission()) {
133  $button = ilLinkButton::getInstance();
134  $button->setCaption("exc_delete_team");
135  $button->setUrl($ilCtrl->getLinkTargetByClass(array("ilExSubmissionGUI", "ilExSubmissionTeamGUI"), "confirmDeleteTeam"));
136  $team .= " " . $button->render();
137  }
138  $button = ilLinkButton::getInstance();
139  $button->setCaption("exc_manage_team");
140  $button->setUrl($ilCtrl->getLinkTargetByClass(array("ilExSubmissionGUI", "ilExSubmissionTeamGUI"), "submissionScreenTeam"));
141  } else {
142  $button = ilLinkButton::getInstance();
143  $button->setCaption("exc_team_log");
144  $button->setUrl($ilCtrl->getLinkTargetByClass(array("ilExSubmissionGUI", "ilExSubmissionTeamGUI"), "submissionScreenTeamLog"));
145  }
146  $team .= "<br><br>" . $button->render();
147 
148  $a_info->addProperty($lng->txt("exc_team_members"), $team);
149  } else {
150  //if($a_submission->getAssignment()->beforeDeadline()) // this was "for all users"
151  if (!$state->hasSubmissionEnded()) { // this is for current user/team -> no team creation, if no submission possible
152  if (!$a_submission->hasSubmitted()) {
153  $team_info = $lng->txt("exc_no_team_yet_notice");
154  } else {
155  $team_info = '<span class="warning">' . $lng->txt("exc_no_team_yet_notice") . '</span>';
156  }
157 
158  if (!$a_submission->getAssignment()->getTeamTutor()) {
159  $button = ilLinkButton::getInstance();
160  $button->setPrimary(true);
161  $button->setCaption("exc_create_team"); // team creation
162  $button->setUrl($ilCtrl->getLinkTargetByClass(array("ilExSubmissionGUI", "ilExSubmissionTeamGUI"), "createTeam"));
163  $team_info .= " " . $button->render();
164 
165  $team_info .= '<div class="ilFormInfo">' . $lng->txt("exc_no_team_yet_info") . '</div>';
166  } else {
167  $team_info .= '<div class="ilFormInfo">' . $lng->txt("exc_no_team_yet_info_tutor") . '</div>';
168  }
169  } else {
170  $team_info = '<span class="warning">' . $lng->txt("exc_create_team_times_up_warning") . '</span>';
171  }
172 
173  $a_info->addProperty($lng->txt("exc_team_members"), $team_info);
174  }
175  }
static getInstanceByIds($a_ass_id, $a_user_id=0)
Get instance by IDs (recommended for consumer code)
global $ilCtrl
Definition: ilias.php:18
getLastSubmission()
TODO -> get rid of getTableUserWhere and move to repository class Get the date of the last submission...
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
addProperty($a_name, $a_value, $a_link="")
add a property to current section
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleTabs()

static ilExSubmissionTeamGUI::handleTabs ( )
static

Definition at line 182 of file class.ilExSubmissionTeamGUI.php.

References $DIC, $ilCtrl, and $lng.

Referenced by ilExSubmissionBaseGUI\handleTabs().

183  {
184  global $DIC;
185 
186  $ilTabs = $DIC->tabs();
187  $ilCtrl = $DIC->ctrl();
188  $lng = $DIC->language();
189 
190  $ilTabs->addTab(
191  "team",
192  $lng->txt("exc_team"),
193  $ilCtrl->getLinkTargetByClass("ilExSubmissionTeamGUI", "submissionScreenTeam")
194  );
195 
196  $ilTabs->addTab(
197  "log",
198  $lng->txt("exc_team_log"),
199  $ilCtrl->getLinkTargetByClass("ilExSubmissionTeamGUI", "submissionScreenTeamLog")
200  );
201  }
global $ilCtrl
Definition: ilias.php:18
$DIC
Definition: xapitoken.php:46
+ Here is the caller graph for this function:

◆ removeTeamMemberObject()

ilExSubmissionTeamGUI::removeTeamMemberObject (   $a_full_delete = false)

Definition at line 363 of file class.ilExSubmissionTeamGUI.php.

References $_POST, $ilUser, $user, canEditTeam(), and ilUtil\sendFailure().

Referenced by confirmRemoveTeamMemberObject().

364  {
366 
367  $cancel_cmd = $this->submission->isTutor()
368  ? "returnToParent"
369  : "submissionScreenTeam";
370 
371  $ids = [];
372  if ((bool) $a_full_delete) {
373  $ids = $this->team->getMembers();
374  } elseif (isset($_POST["id"]) && is_array($_POST["id"])) {
375  $ids = $_POST["id"];
376  }
377  $ids = array_filter(array_map('intval', $ids));
378 
379  if (0 === count($ids) && !$this->canEditTeam()) {
380  ilUtil::sendFailure($this->lng->txt("select_one"), true);
381  $this->ctrl->redirect($this, $cancel_cmd);
382  }
383 
384  $team_deleted = (bool) $a_full_delete;
385  if (!$team_deleted) {
386  $members = $this->team->getMembers();
387  if (sizeof($members) <= sizeof($ids)) {
388  if (sizeof($members) == 1 && $members[0] == $ilUser->getId()) {
389  $team_deleted = true;
390  } else {
391  ilUtil::sendFailure($this->lng->txt("exc_team_at_least_one"), true);
392  $this->ctrl->redirect($this, $cancel_cmd);
393  }
394  }
395  }
396 
397  foreach ($ids as $user_id) {
398  $this->team->removeTeamMember($user_id, $this->exercise->getRefId());
399  }
400 
401  // reset ex team members, as any submission is not valid without team
402  $this->exercise->processExerciseStatus(
403  $this->assignment,
404  $ids,
405  false
406  );
407 
408  if (!$team_deleted) {
409  // re-evaluate complete team, as removed member might have had submitted
410  $this->exercise->processExerciseStatus(
411  $this->assignment,
412  $this->team->getMembers(),
413  $this->submission->hasSubmitted(),
414  $this->submission->validatePeerReviews()
415  );
416  }
417 
418  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
419  if (!$team_deleted) {
420  $this->ctrl->redirect($this, $cancel_cmd);
421  } else {
422  $this->ctrl->redirect($this, "returnToParent");
423  }
424  }
$ilUser
Definition: imgupload.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ returnToParentObject()

ilExSubmissionTeamGUI::returnToParentObject ( )

Definition at line 177 of file class.ilExSubmissionTeamGUI.php.

Referenced by confirmRemoveTeamMemberObject(), and createSingleMemberTeamObject().

178  {
179  $this->ctrl->returnToParent($this);
180  }
+ Here is the caller graph for this function:

◆ showTeamLogObject()

ilExSubmissionTeamGUI::showTeamLogObject ( )

Definition at line 450 of file class.ilExSubmissionTeamGUI.php.

451  {
452  $tbl = new ilExAssignmentTeamLogTableGUI($this, "showTeamLog", $this->team);
453  $this->tpl->setContent($tbl->getHTML());
454  }

◆ submissionScreenTeamLogObject()

ilExSubmissionTeamGUI::submissionScreenTeamLogObject ( )

Definition at line 426 of file class.ilExSubmissionTeamGUI.php.

427  {
428  $this->tabs_gui->activateTab("log");
429 
431  $this,
432  "submissionScreenTeamLog",
433  $this->team
434  );
435 
436  $this->tpl->setContent($tbl->getHTML());
437  }

◆ submissionScreenTeamObject()

ilExSubmissionTeamGUI::submissionScreenTeamObject ( )

Displays a form which allows members to manage team uploads.

public

Definition at line 215 of file class.ilExSubmissionTeamGUI.php.

References $team, $toolbar, canEditTeam(), ilRepositorySearchGUI\fillAutoCompleteToolbar(), ilExAssignmentTeamTableGUI\MODE_EDIT, and ilUtil\sendInfo().

Referenced by addUserFromAutoCompleteObject().

216  {
217  $ilToolbar = $this->toolbar;
218 
219  // #13414
220  $read_only = !$this->canEditTeam();
221 
222  if ($this->submission->getAssignment()->afterDeadlineStrict(false)) {
223  ilUtil::sendInfo($this->lng->txt("exercise_time_over"));
224  } elseif (!$read_only) {
225  $add_search = $this->submission->isTutor();
226  // add member
228  $this,
229  $ilToolbar,
230  array(
231  'auto_complete_name' => $this->lng->txt('user'),
232  'submit_name' => $this->lng->txt('add'),
233  'add_search' => $add_search,
234  'add_from_container' => $this->exercise->getRefId()
235  )
236  );
237  } elseif ($this->submission->getAssignment()->getTeamTutor()) {
238  ilUtil::sendInfo($this->lng->txt("exc_no_team_yet_info_tutor"));
239  }
240 
241  $tbl = new ilExAssignmentTeamTableGUI(
242  $this,
243  "submissionScreenTeam",
245  $this->exercise->getRefId(),
246  $this->team,
247  $read_only
248  );
249 
250  $this->tpl->setContent($tbl->getHTML());
251  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
List all team members of an assignment.
static fillAutoCompleteToolbar($parent_object, ilToolbarGUI $toolbar=null, $a_options=array(), $a_sticky=false)
fill toolbar with
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $assignment

ilExSubmissionTeamGUI::$assignment
protected

Definition at line 45 of file class.ilExSubmissionTeamGUI.php.

◆ $ctrl

ilExSubmissionTeamGUI::$ctrl
protected

◆ $exercise

ilExSubmissionTeamGUI::$exercise
protected

Definition at line 44 of file class.ilExSubmissionTeamGUI.php.

◆ $lng

ilExSubmissionTeamGUI::$lng
protected

◆ $submission

ilExSubmissionTeamGUI::$submission
protected

Definition at line 46 of file class.ilExSubmissionTeamGUI.php.

◆ $tabs_gui

ilExSubmissionTeamGUI::$tabs_gui
protected

Definition at line 22 of file class.ilExSubmissionTeamGUI.php.

◆ $team

ilExSubmissionTeamGUI::$team
protected

◆ $toolbar

ilExSubmissionTeamGUI::$toolbar
protected

Definition at line 37 of file class.ilExSubmissionTeamGUI.php.

Referenced by submissionScreenTeamObject().

◆ $tpl

ilExSubmissionTeamGUI::$tpl
protected

◆ $user


The documentation for this class was generated from the following file: