ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilIndividualAssessmentMembersGUI Class Reference

For the purpose of streamlining the grading and learning-process status definition outside of tests, SCORM courses e.t.c. More...

+ Collaboration diagram for ilIndividualAssessmentMembersGUI:

Public Member Functions

 __construct ($a_parent_gui, $a_ref_id)
 
 executeCommand ()
 
 addUsersFromSearch ($user_ids)
 
 addUsers (array $user_ids)
 Add users to corresponding iass-object. More...
 
 removeUser ()
 Remove users from corresponding iass-object. More...
 

Protected Member Functions

 addedUsers ()
 
 view ()
 
 removeUserConfirmation ()
 

Protected Attributes

 $ctrl
 
 $parent_gui
 
 $ref_id
 
 $tpl
 
 $lng
 

Detailed Description

For the purpose of streamlining the grading and learning-process status definition outside of tests, SCORM courses e.t.c.

the IndividualAssessment is used. It caries a LPStatus, which is set Individually.

Author
Denis Klöpfer denis.nosp@m..klo.nosp@m.epfer.nosp@m.@con.nosp@m.cepts.nosp@m.-and.nosp@m.-trai.nosp@m.ning.nosp@m..de

ilIndividualAssessmentMembersGUI: ilRepositorySearchGUI ilIndividualAssessmentMembersGUI: ilIndividualAssessmentMemberGUI

Definition at line 14 of file class.ilIndividualAssessmentMembersGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilIndividualAssessmentMembersGUI::__construct (   $a_parent_gui,
  $a_ref_id 
)

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

References $DIC.

22  {
23  global $DIC;
24  $this->ctrl = $DIC['ilCtrl'];
25  $this->parent_gui = $a_parent_gui;
26  $this->object = $a_parent_gui->object;
27  $this->ref_id = $a_ref_id;
28  $this->tpl = $DIC['tpl'];
29  $this->lng = $DIC['lng'];
30  $this->toolbar = $DIC['ilToolbar'];
31  $this->access_handler = $this->object->accessHandler();
32  }
global $DIC

Member Function Documentation

◆ addedUsers()

ilIndividualAssessmentMembersGUI::addedUsers ( )
protected

Definition at line 63 of file class.ilIndividualAssessmentMembersGUI.php.

References $_GET, ilUtil\sendFailure(), ilUtil\sendSuccess(), and view().

63  {
64  if(!$_GET['failure']) {
65  ilUtil::sendSuccess($this->lng->txt('iass_add_user_success'));
66  } else {
67  ilUtil::sendFailure($this->lng->txt('iass_add_user_failure'));
68  }
69  $this->view();
70  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ addUsers()

ilIndividualAssessmentMembersGUI::addUsers ( array  $user_ids)

Add users to corresponding iass-object.

To be used by repository search.

Parameters
int|string[]$user_ids

Definition at line 119 of file class.ilIndividualAssessmentMembersGUI.php.

References $failure, array, object, and ilIndividualAssessmentLPInterface\updateLPStatusByIds().

Referenced by addUsersFromSearch().

119  {
120 
121  if(!$this->object->accessHandler()->checkAccessToObj($this->object,'edit_members')) {
122  $a_parent_gui->handleAccessViolation();
123  }
124  $iass = $this->object;
125  $members = $iass->loadMembers();
126  $failure = null;
127  if(count($user_ids) === 0) {
128  $failure = 1;
129  }
130  foreach ($user_ids as $user_id) {
131  $user = new ilObjUser($user_id);
132  if(!$members->userAllreadyMember($user)) {
133  $members = $members->withAdditionalUser($user);
134  } else {
135  $failure = 1;
136  }
137  }
138  $members->updateStorageAndRBAC($iass->membersStorage(),$iass->accessHandler());
140  $this->ctrl->setParameter($this, 'failure', $failure);
141  $this->ctrl->redirectByClass(array(get_class($this->parent_gui),get_class($this)),'addedUsers');
142  }
$failure
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addUsersFromSearch()

ilIndividualAssessmentMembersGUI::addUsersFromSearch (   $user_ids)

Definition at line 105 of file class.ilIndividualAssessmentMembersGUI.php.

References addUsers(), array, and ilUtil\sendInfo().

105  {
106  if($user_ids && is_array($user_ids) && !empty($user_ids)) {
107  $this->addUsers($user_ids);
108  }
109 
110  ilUtil::sendInfo($this->lng->txt("search_no_selection"), true);
111  $this->ctrl->redirectByClass(array(get_class($this->parent_gui),get_class($this)),'view');
112  }
addUsers(array $user_ids)
Add users to corresponding iass-object.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ executeCommand()

ilIndividualAssessmentMembersGUI::executeCommand ( )

Definition at line 34 of file class.ilIndividualAssessmentMembersGUI.php.

References $cmd.

34  {
35  if(!$this->access_handler->checkAccessToObj($this->object,'edit_members')
36  && !$this->access_handler->checkAccessToObj($this->object,'edit_learning_progress')
37  && !$this->access_handler->checkAccessToObj($this->object,'read_learning_progress') ) {
38  $this->parent_gui->handleAccessViolation();
39  }
40  $cmd = $this->ctrl->getCmd();
41  $next_class = $this->ctrl->getNextClass();
42  switch($next_class) {
43  case "ilrepositorysearchgui":
44  require_once 'Services/Search/classes/class.ilRepositorySearchGUI.php';
45  $rep_search = new ilRepositorySearchGUI();
46  $rep_search->setCallback($this,"addUsersFromSearch");
47  $this->ctrl->forwardCommand($rep_search);
48  break;
49  case "ilindividualassessmentmembergui":
50  require_once 'Modules/IndividualAssessment/classes/class.ilIndividualAssessmentMemberGUI.php';
51  $member = new ilIndividualAssessmentMemberGUI($this, $this->parent_gui, $this->ref_id);
52  $this->ctrl->forwardCommand($member);
53  break;
54  default:
55  if(!$cmd) {
56  $cmd = 'view';
57  }
58  $this->$cmd();
59  break;
60  }
61  }
$cmd
Definition: sahs_server.php:35
For the purpose of streamlining the grading and learning-process status definition outside of tests...

◆ removeUser()

ilIndividualAssessmentMembersGUI::removeUser ( )

Remove users from corresponding iass-object.

To be used by repository search.

Parameters
int|string[]$user_ids

Definition at line 164 of file class.ilIndividualAssessmentMembersGUI.php.

References $_POST, array, object, and ilIndividualAssessmentLPInterface\updateLPStatusByIds().

164  {
165  if(!$this->object->accessHandler()->checkAccessToObj($this->object,'edit_members')) {
166  $a_parent_gui->handleAccessViolation();
167  }
168  $usr_id = $_POST['usr_id'];
169  $iass = $this->object;
170  $iass->loadMembers()
171  ->withoutPresentUser(new ilObjUser($usr_id))
172  ->updateStorageAndRBAC($iass->membersStorage(),$iass->accessHandler());
174  $this->ctrl->redirectByClass(array(get_class($this->parent_gui),get_class($this)),'view');
175  }
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
$_POST["username"]
+ Here is the call graph for this function:

◆ removeUserConfirmation()

ilIndividualAssessmentMembersGUI::removeUserConfirmation ( )
protected

Definition at line 144 of file class.ilIndividualAssessmentMembersGUI.php.

References $_GET, ilObjUser\_lookupFullname(), and object.

144  {
145  if(!$this->object->accessHandler()->checkAccessToObj($this->object,'edit_members')) {
146  $a_parent_gui->handleAccessViolation();
147  }
148  $this->parent_gui->setScreenId("iass", "members", "removeUserConfirmation");
149  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
150  $confirm = new ilConfirmationGUI();
151  $confirm->addItem('usr_id',$_GET['usr_id'], ilObjUser::_lookupFullname($_GET['usr_id']));
152  $confirm->setHeaderText($this->lng->txt('iass_remove_user_qst'));
153  $confirm->setFormAction($this->ctrl->getFormAction($this));
154  $confirm->setConfirm($this->lng->txt('remove'), 'removeUser');
155  $confirm->setCancel($this->lng->txt('cancel'), 'view');
156  $this->tpl->setContent($confirm->getHTML());
157  }
$_GET["client_id"]
static _lookupFullname($a_user_id)
Lookup Full Name.
Create new PHPExcel object
obj_idprivate
Confirmation screen class.
+ Here is the call graph for this function:

◆ view()

ilIndividualAssessmentMembersGUI::view ( )
protected

Definition at line 72 of file class.ilIndividualAssessmentMembersGUI.php.

References array, and ilRepositorySearchGUI\fillAutoCompleteToolbar().

Referenced by addedUsers().

72  {
73  if($this->access_handler->checkAccessToObj($this->object,'edit_members')) {
74  require_once './Services/Search/classes/class.ilRepositorySearchGUI.php';
75 
76  $search_params = ['crs', 'grp'];
77  $container_id = $this->object->getParentContainerIdByType($this->ref_id, $search_params);
78  if($container_id !== 0) {
80  $this,
81  $this->toolbar,
82  array(
83  'auto_complete_name' => $this->lng->txt('user'),
84  'submit_name' => $this->lng->txt('add'),
85  'add_search' => true,
86  'add_from_container' => $container_id
87  )
88  );
89  } else {
91  $this,
92  $this->toolbar,
93  array(
94  'auto_complete_name' => $this->lng->txt('user'),
95  'submit_name' => $this->lng->txt('add'),
96  'add_search' => true
97  )
98  );
99  }
100  }
101  $table = new ilIndividualAssessmentMembersTableGUI($this);
102  $this->tpl->setContent($table->getHTML());
103  }
Create styles array
The data for the language used.
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

◆ $ctrl

ilIndividualAssessmentMembersGUI::$ctrl
protected

Definition at line 16 of file class.ilIndividualAssessmentMembersGUI.php.

◆ $lng

ilIndividualAssessmentMembersGUI::$lng
protected

Definition at line 20 of file class.ilIndividualAssessmentMembersGUI.php.

◆ $parent_gui

ilIndividualAssessmentMembersGUI::$parent_gui
protected

Definition at line 17 of file class.ilIndividualAssessmentMembersGUI.php.

◆ $ref_id

ilIndividualAssessmentMembersGUI::$ref_id
protected

Definition at line 18 of file class.ilIndividualAssessmentMembersGUI.php.

◆ $tpl

ilIndividualAssessmentMembersGUI::$tpl
protected

Definition at line 19 of file class.ilIndividualAssessmentMembersGUI.php.


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