ILIAS  release_7 Revision v7.30-3-g800a261c036
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 (int $variant=ilLPStatusIcons::ICON_VARIANT_LONG)
 
 __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
 

Protected Member Functions

 saveProgress ()
 
- Protected Member Functions inherited from ilLearningProgressBaseGUI
 initEditUserForm ($a_user_id, $a_obj_id, $a_cancel=null)
 

Additional Inherited Members

- Static Public Member Functions inherited from ilLearningProgressBaseGUI
static _showImageByStatus (&$tpl, $a_status, $tpl_prefix="")
 we need this public in table classes More...
 
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 Attributes inherited from ilLearningProgressBaseGUI
 $anonymized
 
 $logger
 
 $tabs_gui
 

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"]
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $_GET, ILIAS\GlobalScreen\Provider\__construct(), __initDetails(), and __initUser().

+ Here is the call graph for this function:

Member Function Documentation

◆ __initDetails()

ilLPListOfProgressGUI::__initDetails (   $a_details_id)

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

240 {
241 global $DIC;
242
243 $ilObjDataCache = $DIC['ilObjDataCache'];
244
245 if (!$a_details_id) {
246 $a_details_id = $this->getRefId();
247 }
248 if ($a_details_id) {
249 $ref_ids = ilObject::_getAllReferences($a_details_id);
250
251 $this->details_id = $a_details_id;
252 $this->details_obj_id = $ilObjDataCache->lookupObjId($this->details_id);
253 $this->details_type = $ilObjDataCache->lookupType($this->details_obj_id);
254
255 include_once 'Services/Object/classes/class.ilObjectLP.php';
256 $olp = ilObjectLP::getInstance($this->details_obj_id);
257 $this->details_mode = $olp->getCurrentMode();
258 }
259 }
static getInstance($a_obj_id)
static _getAllReferences($a_id)
get all reference ids of object
global $DIC
Definition: goto.php:24

References $DIC, 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 203 of file class.ilLPListOfProgressGUI.php.

204 {
205 global $DIC;
206
207 $ilUser = $DIC['ilUser'];
208 $rbacreview = $DIC['rbacreview'];
209 $rbacsystem = $DIC['rbacsystem'];
210
211 if ($_POST['user_id']) {
212 $a_usr_id = $_POST['user_id'];
213 $this->ctrl->setParameter($this, 'user_id', $_POST['user_id']);
214 }
215
216 if ($a_usr_id) {
217 $this->tracked_user = ilObjectFactory::getInstanceByObjId($a_usr_id);
218 } else {
219 $this->tracked_user = $ilUser;
220 }
221
222 // #8762: see ilObjUserGUI->getTabs()
223 if ($this->mode == self::LP_CONTEXT_USER_FOLDER && $rbacsystem->checkAccess('read', $this->ref_id)) {
224 return true;
225 }
226
227 if ($this->mode == self::LP_CONTEXT_ORG_UNIT && ilObjOrgUnitAccess::_checkAccessToUserLearningProgress($this->ref_id, $a_usr_id)) {
228 return true;
229 }
230
231 // Check access
232 if (!$rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID)) {
233 $this->tracked_user = $ilUser;
234 }
235
236 return true;
237 }
$_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
const SYSTEM_ROLE_ID
Definition: constants.php:27
$ilUser
Definition: imgupload.php:18

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

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 175 of file class.ilLPListOfProgressGUI.php.

176 {
177 global $DIC;
178
179 $ilUser = $DIC['ilUser'];
180 $ilObjDataCache = $DIC['ilObjDataCache'];
181 $ilCtrl = $DIC['ilCtrl'];
182
183 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.lp_list_progress.html', 'Services/Tracking');
184
185 // User info
186 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
187 $info = new ilInfoScreenGUI($this);
188 $info->setFormAction($ilCtrl->getFormAction($this));
189
190 if ($this->__appendUserInfo($info, $this->tracked_user)) {
191 $this->tpl->setCurrentBlock("info_user");
192 $this->tpl->setVariable("USER_INFO", $info->getHTML());
193 $this->tpl->parseCurrentBlock();
194 }
195
196 include_once("./Services/Tracking/classes/repository_statistics/class.ilLPProgressTableGUI.php");
197 $lp_table = new ilLPProgressTableGUI($this, "", $this->tracked_user, null, false, null, false, null, null, $this->getMode());
198 $this->tpl->setVariable("LP_OBJECTS", $lp_table->getHTML());
199
200 $this->tpl->setVariable("LEGEND", $this->__getLegendHTML());
201 }
Class ilInfoScreenGUI.
TableGUI class for learning progress.
__getLegendHTML(int $variant=ilLPStatusIcons::ICON_VARIANT_LONG)

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

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

+ Here is the call graph for this function:

◆ saveProgress()

ilLPListOfProgressGUI::saveProgress ( )
protected

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

88 {
89 $info = new ilInfoScreenGUI($this);
90 $info->setContextRefId((int) $this->ref_id);
91 $info->setContextObjId((int) $this->details_obj_id);
92 $info->setContentObjType((string) $this->obj_type);
93 $info->saveProgress(false);
94 $this->ctrl->redirect($this);
95 }

◆ show()

ilLPListOfProgressGUI::show ( )

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

62 {
63 global $DIC;
64
65 $ilObjDataCache = $DIC['ilObjDataCache'];
66
67 switch ($this->getMode()) {
68 // Show only detail of current repository item if called from repository
70 $this->__initDetails($this->getRefId());
71 return $this->details();
72
75 // if called from user folder obj_id is id of current user
76 $this->__initUser($this->getUserId());
77 break;
78 }
79
80 // not called from repository
81 $this->__showProgressList();
82 }

References $DIC, __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: