ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjLearningSequenceLPPollingGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24{
26
27 protected ilCtrl $ctrl;
28 protected int $current_user_id;
32
33 public function __construct(
37 ILIAS\Refinery\Factory $refinery,
39 ) {
40 $this->ctrl = $ctrl;
41 $this->current_user_id = $current_user_id;
42 $this->obj_data_cache = $obj_data_cache;
43 $this->refinery = $refinery;
44 $this->request_wrapper = $request_wrapper;
45 }
46
47 public function executeCommand(): 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 }
58
59 protected function getCurrentItemLearningProgress(): 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 }
69}
Builds data types.
Definition: Factory.php:36
const PARAM_LSO_PARAMETER
Class ilCtrl provides processing control methods.
Base class for ILIAS Exception handling.
const LP_STATUS_NOT_ATTEMPTED_NUM
static _lookupStatus(int $a_obj_id, int $a_user_id, bool $a_create=true)
Lookup status.
__construct(ilCtrl $ctrl, int $current_user_id, ilObjectDataCache $obj_data_cache, ILIAS\Refinery\Factory $refinery, ILIAS\HTTP\Wrapper\RequestWrapper $request_wrapper)
class ilObjectDataCache
static isSupportedObjectType(string $type)
exit
Interface RequestWrapper.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.