ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilObjLearningSequenceLPPollingGUI Class Reference
+ Collaboration diagram for ilObjLearningSequenceLPPollingGUI:

Public Member Functions

 __construct (ilCtrl $ctrl, int $current_user_id, ilObjectDataCache $obj_data_cache, ILIAS\Refinery\Factory $refinery, ILIAS\HTTP\Wrapper\RequestWrapper $request_wrapper)
 
 executeCommand ()
 

Data Fields

const PARAM_LSO_LP_OBJID = LSUrlBuilder::PARAM_LSO_PARAMETER
 

Protected Member Functions

 getCurrentItemLearningProgress ()
 

Protected Attributes

ilCtrl $ctrl
 
int $current_user_id
 
ilObjectDataCache $obj_data_cache
 
ILIAS Refinery Factory $refinery
 
RequestWrapper $request_wrapper
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilObjLearningSequenceLPPollingGUI::__construct ( ilCtrl  $ctrl,
int  $current_user_id,
ilObjectDataCache  $obj_data_cache,
ILIAS\Refinery\Factory  $refinery,
ILIAS\HTTP\Wrapper\RequestWrapper  $request_wrapper 
)

Member Function Documentation

◆ executeCommand()

ilObjLearningSequenceLPPollingGUI::executeCommand ( )

Definition at line 47 of file class.ilObjLearningSequenceLPPollingGUI.php.

47 : void
48 {
49 $cmd = $this->ctrl->getCmd();
50 switch ($cmd) {
53 // no break
54 default:
55 throw new ilException("Command not supported: $cmd");
56 }
57 }
Base class for ILIAS Exception handling.

References LSControlBuilder\CMD_CHECK_CURRENT_ITEM_LP, ILIAS\Repository\ctrl(), and getCurrentItemLearningProgress().

+ Here is the call graph for this function:

◆ getCurrentItemLearningProgress()

ilObjLearningSequenceLPPollingGUI::getCurrentItemLearningProgress ( )
protected

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

59 : void
60 {
61 $obj_id = $this->request_wrapper->retrieve(self::PARAM_LSO_LP_OBJID, $this->refinery->kindlyTo()->int());
63 if (ilObjectLP::isSupportedObjectType($this->obj_data_cache->lookupType((int) $obj_id))) {
64 $il_lp_status = ilLPStatus::_lookupStatus($obj_id, $this->current_user_id, true);
65 }
66 print $il_lp_status;
67 exit;
68 }
const LP_STATUS_NOT_ATTEMPTED_NUM
static _lookupStatus(int $a_obj_id, int $a_user_id, bool $a_create=true)
Lookup status.
static isSupportedObjectType(string $type)
exit

References ilLPStatus\_lookupStatus(), exit, ilObjectLP\isSupportedObjectType(), ilLPStatus\LP_STATUS_NOT_ATTEMPTED_NUM, and ILIAS\Repository\refinery().

Referenced by executeCommand().

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

Field Documentation

◆ $ctrl

ilCtrl ilObjLearningSequenceLPPollingGUI::$ctrl
protected

Definition at line 27 of file class.ilObjLearningSequenceLPPollingGUI.php.

Referenced by __construct().

◆ $current_user_id

int ilObjLearningSequenceLPPollingGUI::$current_user_id
protected

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

Referenced by __construct().

◆ $obj_data_cache

ilObjectDataCache ilObjLearningSequenceLPPollingGUI::$obj_data_cache
protected

Definition at line 29 of file class.ilObjLearningSequenceLPPollingGUI.php.

Referenced by __construct().

◆ $refinery

ILIAS Refinery Factory ilObjLearningSequenceLPPollingGUI::$refinery
protected

Definition at line 30 of file class.ilObjLearningSequenceLPPollingGUI.php.

Referenced by __construct().

◆ $request_wrapper

RequestWrapper ilObjLearningSequenceLPPollingGUI::$request_wrapper
protected

Definition at line 31 of file class.ilObjLearningSequenceLPPollingGUI.php.

Referenced by __construct().

◆ PARAM_LSO_LP_OBJID

const ilObjLearningSequenceLPPollingGUI::PARAM_LSO_LP_OBJID = LSUrlBuilder::PARAM_LSO_PARAMETER

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


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