ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilLPListOfProgressGUI Class Reference
+ Inheritance diagram for ilLPListOfProgressGUI:
+ Collaboration diagram for ilLPListOfProgressGUI:

Public Member Functions

 ilLPListOfProgressGUI ($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
 ilLearningProgressBaseGUI ($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="")
 
 _getImagePathForStatus ($a_status)
 Get image path for status. More...
 
 _getStatusText ($a_status)
 Get status alt text. More...
 
__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)
 
 __readStatus ($a_obj_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 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
 

Detailed Description

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

Member Function Documentation

◆ __initDetails()

ilLPListOfProgressGUI::__initDetails (   $a_details_id)

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

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

Referenced by ilLPListOfProgressGUI(), and show().

225  {
226  global $ilObjDataCache;
227 
228  if(!$a_details_id)
229  {
230  $a_details_id = $this->getRefId();
231  }
232  if($a_details_id)
233  {
234  $ref_ids = ilObject::_getAllReferences($a_details_id);
235 
236  $this->details_id = $a_details_id;
237  $this->details_obj_id = $ilObjDataCache->lookupObjId($this->details_id);
238  $this->details_type = $ilObjDataCache->lookupType($this->details_obj_id);
239 
240  include_once 'Services/Object/classes/class.ilObjectLP.php';
241  $olp = ilObjectLP::getInstance($this->details_obj_id);
242  $this->details_mode = $olp->getCurrentMode();
243  }
244  }
static _getAllReferences($a_id)
get all reference ids of object
static getInstance($a_obj_id)
+ 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 185 of file class.ilLPListOfProgressGUI.php.

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

Referenced by ilLPListOfProgressGUI(), and show().

186  {
187  global $ilUser,$rbacreview,$rbacsystem;
188 
189  if($_POST['user_id'])
190  {
191  $a_usr_id = $_POST['user_id'];
192  $this->ctrl->setParameter($this,'user_id',$_POST['user_id']);
193  }
194 
195  if($a_usr_id)
196  {
197  $this->tracked_user = ilObjectFactory::getInstanceByObjId($a_usr_id);
198  }
199  else
200  {
201  $this->tracked_user = $ilUser;
202  }
203 
204  // #8762: see ilObjUserGUI->getTabs()
205  if($this->mode == self::LP_CONTEXT_USER_FOLDER && $rbacsystem->checkAccess('read',$this->ref_id))
206  {
207  return true;
208  }
209 
210  if($this->mode == self::LP_CONTEXT_ORG_UNIT && ilObjOrgUnitAccess::_checkAccessToUserLearningProgress($this->ref_id,$a_usr_id))
211  {
212  return true;
213  }
214 
215  // Check access
216  if(!$rbacreview->isAssigned($ilUser->getId(),SYSTEM_ROLE_ID))
217  {
218  $this->tracked_user = $ilUser;
219  }
220 
221  return true;
222  }
$_POST['username']
Definition: cron.php:12
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
global $ilUser
Definition: imgupload.php:15
static _checkAccessToUserLearningProgress($ref_id, $usr_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __showProgressList()

ilLPListOfProgressGUI::__showProgressList ( )

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

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

Referenced by show().

161  {
162  global $ilUser,$ilObjDataCache,$ilCtrl;
163 
164  $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.lp_list_progress.html','Services/Tracking');
165 
166  // User info
167  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
168  $info = new ilInfoScreenGUI($this);
169  $info->setFormAction($ilCtrl->getFormAction($this));
170 
171  if ($this->__appendUserInfo($info, $this->tracked_user))
172  {
173  $this->tpl->setCurrentBlock("info_user");
174  $this->tpl->setVariable("USER_INFO",$info->getHTML());
175  $this->tpl->parseCurrentBlock();
176  }
177 
178  include_once("./Services/Tracking/classes/repository_statistics/class.ilLPProgressTableGUI.php");
179  $lp_table = new ilLPProgressTableGUI($this, "", $this->tracked_user,null,false,null,false,null,null,$this->getMode());
180  $this->tpl->setVariable("LP_OBJECTS", $lp_table->getHTML());
181 
182  $this->tpl->setVariable("LEGEND", $this->__getLegendHTML());
183  }
Class ilInfoScreenGUI.
TableGUI class for learning progress.
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

& ilLPListOfProgressGUI::executeCommand ( )

execute command

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

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

43  {
44  global $ilUser;
45 
46  $this->ctrl->setReturn($this, "show");
47  $this->ctrl->saveParameter($this,'user_id',$this->getUserId());
48  switch($this->ctrl->getNextClass())
49  {
50  case 'illpprogresstablegui':
51  include_once './Services/Tracking/classes/repository_statistics/class.ilLPProgressTableGUI.php';
52  $table_gui = new ilLPProgressTableGUI($this, "", $this->tracked_user);
53  $this->ctrl->setReturn($this,'show');
54  $this->ctrl->forwardCommand($table_gui);
55  break;
56 
57  default:
58  $cmd = $this->__getDefaultCommand();
59  $this->$cmd();
60 
61  }
62  return true;
63  }
$cmd
Definition: sahs_server.php:35
TableGUI class for learning progress.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ ilLPListOfProgressGUI()

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

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

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

29  {
30  parent::ilLearningProgressBaseGUI($a_mode,$a_ref_id,$a_user_id);
31  $this->__initUser($a_user_id);
32 
33  // Set item id for details
34  $this->__initDetails((int) $_GET['details_id']);
35  $this->ctrl->saveParameter($this,'details_id',$_REQUEST['details_id']);
36  }
$_GET["client_id"]
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:

◆ show()

ilLPListOfProgressGUI::show ( )

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

References $_GET, $ilCtrl, ilLearningProgressBaseGUI\__appendLPDetails(), ilLearningProgressBaseGUI\__appendUserInfo(), ilLearningProgressBaseGUI\__getLegendHTML(), __initDetails(), __initUser(), ilLearningProgressBaseGUI\__showObjectDetails(), __showProgressList(), ilObject\_lookupObjectId(), ilObjectLP\getInstance(), ilLearningProgressBaseGUI\getMode(), ilLearningProgressBaseGUI\getRefId(), and ilLearningProgressBaseGUI\getUserId().

66  {
67  global $ilObjDataCache;
68 
69  switch($this->getMode())
70  {
71  // Show only detail of current repository item if called from repository
72  case self::LP_CONTEXT_REPOSITORY:
73  $this->__initDetails($this->getRefId());
74  return $this->details();
75 
76  case self::LP_CONTEXT_USER_FOLDER:
77  case self::LP_CONTEXT_ORG_UNIT:
78  // if called from user folder obj_id is id of current user
79  $this->__initUser($this->getUserId());
80  break;
81  }
82 
83  // not called from repository
84  $this->__showProgressList();
85  }
+ Here is the call graph for this function:

Field Documentation

◆ $details_id

ilLPListOfProgressGUI::$details_id = 0

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

◆ $details_mode

ilLPListOfProgressGUI::$details_mode = 0

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

◆ $details_type

ilLPListOfProgressGUI::$details_type = ''

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

◆ $tracked_user

ilLPListOfProgressGUI::$tracked_user = null

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


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