ILIAS  release_8 Revision v8.24
class.ilObjCmiXapiAccess.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
31{
35 public static function _getCommands(): array
36 {
37 return [
38 [
39 "permission" => "read",
40 "cmd" => "launch",
41 "lang_var" => "show",
42 "default" => true
43 ],
44 [
45 'permission' => 'write',
46 'cmd' => 'ilCmiXapiSettingsGUI::show',
48 ]
49 ];
50 }
51
55 public static function getConditionOperators(): array
56 {
57 return [
60 ];
61 }
62
63 public static function checkCondition(int $a_trigger_obj_id, string $a_operator, string $a_value, int $a_usr_id): bool
64 {
65 switch ($a_operator) {
67 return ilLPStatus::_lookupStatus($a_trigger_obj_id, $a_usr_id) == ilLPStatus::LP_STATUS_FAILED_NUM;
68
70 return ilLPStatus::_hasUserCompleted($a_trigger_obj_id, $a_usr_id);
71 }
72
73 return false;
74 }
75}
return true
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
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface for condition handling.