ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilObjCmiXapiAccess.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
16{
17 public static function _getCommands()
18 {
19 global $DIC; /* @var \ILIAS\DI\Container $DIC */
20
21 $commands = array(
22 array(
23 "permission" => "read",
24 "cmd" => "infoScreen",
25 "lang_var" => "infoScreen",
26 "default" => true
27 ),
28 array(
29 'permission' => 'write',
30 'cmd' => 'ilCmiXapiSettingsGUI::show',
32 )
33 );
34
35 return $commands;
36 }
37
38 public static function getConditionOperators()
39 {
40 return [
43 ];
44 }
45
46 public static function checkCondition($a_trigger_obj_id, $a_operator, $a_value, $a_usr_id)
47 {
48 switch ($a_operator) {
50 return ilLPStatus::_lookupStatus($a_trigger_obj_id, $a_usr_id) == ilLPStatus::LP_STATUS_FAILED_NUM;
51
53 return ilLPStatus::_hasUserCompleted($a_trigger_obj_id, $a_usr_id);
54 }
55
56 return false;
57 }
58}
An exception for terminatinating execution or to throw for unit testing.
static _lookupStatus($a_obj_id, $a_user_id, $a_create=true)
Lookup status.
static _hasUserCompleted($a_obj_id, $a_user_id)
Lookup user object completion.
const LP_STATUS_FAILED_NUM
static checkCondition($a_trigger_obj_id, $a_operator, $a_value, $a_usr_id)
check condition for a specific user and object
static _getCommands()
get commands
static getConditionOperators()
Returns an array with valid operators for the specific object type.
Class ilObjectAccess.
global $DIC
Definition: goto.php:24
Interface for condition handling.