ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjCmiXapiAccess.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
31{
35 public static function _getCommands(): array
36 {
37 global $DIC; /* @var \ILIAS\DI\Container $DIC */
38
39 $commands = array(
40 array(
41 "permission" => "read",
42 "cmd" => "infoScreen",
43 "lang_var" => "infoScreen",
44 "default" => true
45 ),
46 array(
47 'permission' => 'write',
48 'cmd' => 'ilCmiXapiSettingsGUI::show',
50 )
51 );
52
53 return $commands;
54 }
55
59 public static function getConditionOperators(): array
60 {
61 return [
64 ];
65 }
66
67 public static function checkCondition(int $a_trigger_obj_id, string $a_operator, string $a_value, int $a_usr_id): bool
68 {
69 switch ($a_operator) {
71 return ilLPStatus::_lookupStatus($a_trigger_obj_id, $a_usr_id) == ilLPStatus::LP_STATUS_FAILED_NUM;
72
74 return ilLPStatus::_hasUserCompleted($a_trigger_obj_id, $a_usr_id);
75 }
76
77 return false;
78 }
79}
static _hasUserCompleted(int $a_obj_id, int $a_user_id)
Lookup user object completion.
static _lookupStatus(int $a_obj_id, int $a_user_id, bool $a_create=true)
Lookup status.
const LP_STATUS_FAILED_NUM
static checkCondition(int $a_trigger_obj_id, string $a_operator, string $a_value, int $a_usr_id)
check condition for a specific user and object
Class ilObjectAccess.
Interface for condition handling.
global $DIC
Definition: shib_login.php:26