ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilLPListOfProgressGUI Class Reference
+ Inheritance diagram for ilLPListOfProgressGUI:
+ Collaboration diagram for ilLPListOfProgressGUI:

Public Member Functions

 __construct ($a_mode, $a_ref_id, $a_user_id=0)
 
 executeCommand ()
 execute command More...
 
 show ()
 
 __showProgressList ()
 
 __initUser ($a_usr_id=0)
 
 __initDetails ($a_details_id)
 
- Public Member Functions inherited from ilLearningProgressBaseGUI
 __construct ($a_mode, $a_ref_id=0, $a_usr_id=0)
 
 isAnonymized ()
 
 getMode ()
 
 getRefId ()
 
 getObjId ()
 
 getUserId ()
 
 __getDefaultCommand ()
 
 __setSubTabs ($a_active)
 
 __buildFooter ()
 
 __buildHeader ()
 
 __insertPath (&$a_tpl, $a_ref_id)
 insert path More...
 
 __showImageByStatus (&$tpl, $a_status, $tpl_prefix="")
 
__initTableGUI ()
 
 __showObjectDetails (&$info, $item_id=0, $add_section=true)
 show details about current object. More...
 
 __appendUserInfo (&$info, $a_user)
 
 __appendLPDetails (&$info, $item_id, $user_id)
 
 __sort ($a_ids, $a_table, $a_field, $a_id_name)
 Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,7),'usr_data','lastname','usr_id') => sorts by lastname. More...
 
 __getPercent ($max, $reached)
 
 __readItemStatusInfo ($a_items)
 
 __getLegendHTML ()
 
 __showEditUser ($a_user_id, $a_ref_id, $a_cancel, $a_sub_id=false)
 
 __updateUser ($user_id, $obj_id)
 

Data Fields

 $tracked_user = null
 
 $details_id = 0
 
 $details_type = ''
 
 $details_mode = 0
 
- Data Fields inherited from ilLearningProgressBaseGUI
 $tpl = null
 
 $ctrl = null
 
 $lng = null
 
 $ref_id = 0
 
 $mode = 0
 
const LP_CONTEXT_PERSONAL_DESKTOP = 1
 
const LP_CONTEXT_ADMINISTRATION = 2
 
const LP_CONTEXT_REPOSITORY = 3
 
const LP_CONTEXT_USER_FOLDER = 4
 
const LP_CONTEXT_ORG_UNIT = 5
 
const LP_ACTIVE_SETTINGS = 1
 
const LP_ACTIVE_OBJECTS = 2
 
const LP_ACTIVE_PROGRESS = 3
 
const LP_ACTIVE_USERS = 5
 
const LP_ACTIVE_SUMMARY = 6
 
const LP_ACTIVE_OBJSTATACCESS = 7
 
const LP_ACTIVE_OBJSTATTYPES = 8
 
const LP_ACTIVE_OBJSTATDAILY = 9
 
const LP_ACTIVE_OBJSTATADMIN = 10
 
const LP_ACTIVE_MATRIX = 11
 

Additional Inherited Members

- Static Public Member Functions inherited from ilLearningProgressBaseGUI
static _showImageByStatus (&$tpl, $a_status, $tpl_prefix="")
 
static _getImagePathForStatus ($a_status)
 Get image path for status. More...
 
static _getStatusText ($a_status, $a_lng=null)
 Get status alt text. More...
 
static __readStatus ($a_obj_id, $user_id)
 
static isObjectOffline ($a_obj_id, $a_type=null)
 
- Protected Member Functions inherited from ilLearningProgressBaseGUI
 initEditUserForm ($a_user_id, $a_obj_id, $a_cancel=null)
 
- Protected Attributes inherited from ilLearningProgressBaseGUI
 $anonymized
 
 $logger
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilLPListOfProgressGUI::__construct (   $a_mode,
  $a_ref_id,
  $a_user_id = 0 
)

Reimplemented from ilLearningProgressBaseGUI.

Definition at line 23 of file class.ilLPListOfProgressGUI.php.

24 {
25 parent::__construct($a_mode, $a_ref_id, $a_user_id);
26 $this->__initUser($a_user_id);
27
28 // Set item id for details
29 $this->__initDetails((int) $_GET['details_id']);
30 $this->ctrl->saveParameter($this, 'details_id', $_REQUEST['details_id']);
31 }
$_GET["client_id"]

References $_GET, __initDetails(), and __initUser().

+ Here is the call graph for this function:

Member Function Documentation

◆ __initDetails()

ilLPListOfProgressGUI::__initDetails (   $a_details_id)

Definition at line 205 of file class.ilLPListOfProgressGUI.php.

206 {
207 global $ilObjDataCache;
208
209 if (!$a_details_id) {
210 $a_details_id = $this->getRefId();
211 }
212 if ($a_details_id) {
213 $ref_ids = ilObject::_getAllReferences($a_details_id);
214
215 $this->details_id = $a_details_id;
216 $this->details_obj_id = $ilObjDataCache->lookupObjId($this->details_id);
217 $this->details_type = $ilObjDataCache->lookupType($this->details_obj_id);
218
219 include_once 'Services/Object/classes/class.ilObjectLP.php';
220 $olp = ilObjectLP::getInstance($this->details_obj_id);
221 $this->details_mode = $olp->getCurrentMode();
222 }
223 }
static getInstance($a_obj_id)
static _getAllReferences($a_id)
get all reference ids of object

References ilObject\_getAllReferences(), ilObjectLP\getInstance(), and ilLearningProgressBaseGUI\getRefId().

Referenced by __construct(), and show().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __initUser()

ilLPListOfProgressGUI::__initUser (   $a_usr_id = 0)

Definition at line 173 of file class.ilLPListOfProgressGUI.php.

174 {
175 global $ilUser,$rbacreview,$rbacsystem;
176
177 if ($_POST['user_id']) {
178 $a_usr_id = $_POST['user_id'];
179 $this->ctrl->setParameter($this, 'user_id', $_POST['user_id']);
180 }
181
182 if ($a_usr_id) {
183 $this->tracked_user = ilObjectFactory::getInstanceByObjId($a_usr_id);
184 } else {
185 $this->tracked_user = $ilUser;
186 }
187
188 // #8762: see ilObjUserGUI->getTabs()
189 if ($this->mode == self::LP_CONTEXT_USER_FOLDER && $rbacsystem->checkAccess('read', $this->ref_id)) {
190 return true;
191 }
192
193 if ($this->mode == self::LP_CONTEXT_ORG_UNIT && ilObjOrgUnitAccess::_checkAccessToUserLearningProgress($this->ref_id, $a_usr_id)) {
194 return true;
195 }
196
197 // Check access
198 if (!$rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID)) {
199 $this->tracked_user = $ilUser;
200 }
201
202 return true;
203 }
$_POST["username"]
static _checkAccessToUserLearningProgress($ref_id, $usr_id)
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
$ilUser
Definition: imgupload.php:18

References $_POST, $ilUser, ilObjOrgUnitAccess\_checkAccessToUserLearningProgress(), and ilObjectFactory\getInstanceByObjId().

Referenced by __construct(), and show().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __showProgressList()

ilLPListOfProgressGUI::__showProgressList ( )

Definition at line 149 of file class.ilLPListOfProgressGUI.php.

150 {
151 global $ilUser,$ilObjDataCache,$ilCtrl;
152
153 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.lp_list_progress.html', 'Services/Tracking');
154
155 // User info
156 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
157 $info = new ilInfoScreenGUI($this);
158 $info->setFormAction($ilCtrl->getFormAction($this));
159
160 if ($this->__appendUserInfo($info, $this->tracked_user)) {
161 $this->tpl->setCurrentBlock("info_user");
162 $this->tpl->setVariable("USER_INFO", $info->getHTML());
163 $this->tpl->parseCurrentBlock();
164 }
165
166 include_once("./Services/Tracking/classes/repository_statistics/class.ilLPProgressTableGUI.php");
167 $lp_table = new ilLPProgressTableGUI($this, "", $this->tracked_user, null, false, null, false, null, null, $this->getMode());
168 $this->tpl->setVariable("LP_OBJECTS", $lp_table->getHTML());
169
170 $this->tpl->setVariable("LEGEND", $this->__getLegendHTML());
171 }
Class ilInfoScreenGUI.
TableGUI class for learning progress.
global $ilCtrl
Definition: ilias.php:18
$info
Definition: index.php:5

References $ilCtrl, $ilUser, $info, ilLearningProgressBaseGUI\__appendUserInfo(), ilLearningProgressBaseGUI\__getLegendHTML(), and ilLearningProgressBaseGUI\getMode().

Referenced by show().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilLPListOfProgressGUI::executeCommand ( )

execute command

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

38 {
39 global $ilUser;
40
41 $this->ctrl->setReturn($this, "show");
42 $this->ctrl->saveParameter($this, 'user_id', $this->getUserId());
43 switch ($this->ctrl->getNextClass()) {
44 case 'illpprogresstablegui':
45 include_once './Services/Tracking/classes/repository_statistics/class.ilLPProgressTableGUI.php';
46 $table_gui = new ilLPProgressTableGUI($this, "", $this->tracked_user);
47 $this->ctrl->setReturn($this, 'show');
48 $this->ctrl->forwardCommand($table_gui);
49 break;
50
51 default:
52 $cmd = $this->__getDefaultCommand();
53 $this->$cmd();
54
55 }
56 return true;
57 }

References $ilUser, ilLearningProgressBaseGUI\__getDefaultCommand(), and ilLearningProgressBaseGUI\getUserId().

+ Here is the call graph for this function:

◆ show()

ilLPListOfProgressGUI::show ( )

Definition at line 59 of file class.ilLPListOfProgressGUI.php.

60 {
61 global $ilObjDataCache;
62
63 switch ($this->getMode()) {
64 // Show only detail of current repository item if called from repository
66 $this->__initDetails($this->getRefId());
67 return $this->details();
68
71 // if called from user folder obj_id is id of current user
72 $this->__initUser($this->getUserId());
73 break;
74 }
75
76 // not called from repository
77 $this->__showProgressList();
78 }

References __initDetails(), __initUser(), __showProgressList(), ilLearningProgressBaseGUI\getMode(), ilLearningProgressBaseGUI\getRefId(), ilLearningProgressBaseGUI\getUserId(), ilLearningProgressBaseGUI\LP_CONTEXT_ORG_UNIT, ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, and ilLearningProgressBaseGUI\LP_CONTEXT_USER_FOLDER.

+ Here is the call graph for this function:

Field Documentation

◆ $details_id

ilLPListOfProgressGUI::$details_id = 0

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

◆ $details_mode

ilLPListOfProgressGUI::$details_mode = 0

Definition at line 21 of file class.ilLPListOfProgressGUI.php.

◆ $details_type

ilLPListOfProgressGUI::$details_type = ''

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

◆ $tracked_user

ilLPListOfProgressGUI::$tracked_user = null

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


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