4require_once 
'./Services/Object/classes/class.ilObject.php';
 
   14    public function __construct($a_id = 0, $a_call_by_reference = 
true)
 
   17        parent::__construct($a_id, $a_call_by_reference);
 
   26        return $obj_def->getLTIProviderTypes();
 
   36        require_once(
"Services/AccessControl/classes/class.ilObjRole.php");
 
   40        $filtered_roles = array_diff($global_roles, array(SYSTEM_ROLE_ID, ANONYMOUS_ROLE_ID));
 
   43        foreach ($filtered_roles as $role) {
 
   45            $roles[$role] = $obj_role->getTitle();
 
   59        $ilDB->manipulate(
"DELETE FROM lti_ext_consumer_otype WHERE consumer_id = " . 
$ilDB->quote($a_consumer_id, 
"integer"));
 
   62            $query = 
"INSERT INTO lti_ext_consumer_otype (consumer_id, object_type) VALUES (%s, %s)";
 
   63            $types = array(
"integer", 
"text");
 
   64            foreach ($a_obj_types as $ot) {
 
   65                $values = array($a_consumer_id, $ot);
 
   80        $result = 
$ilDB->query(
"SELECT object_type FROM lti_ext_consumer_otype WHERE consumer_id = " . 
$ilDB->quote($a_consumer_id, 
"integer"));
 
   84            array_push($obj_ids, $record[
'object_type']);
 
   92    public static function isEnabledForType(
$a_type)
 
   99        $query = 
'select id from lti_ext_consumer join lti_ext_consumer_otype on id = consumer_id ' .
 
  100            'WHERE active = ' . 
$db->quote(1, 
'integer') . 
' ' .
 
  101            'AND object_type = ' . 
$db->quote(
$a_type, 
'text');
 
  103        while (
$row = 
$res->fetchObject()) {
 
  114    public static function getEnabledConsumersForType(
$a_type)
 
  121        $query = 
'select distinct(id) id from lti_ext_consumer join lti_ext_consumer_otype on id = consumer_id ' .
 
  122            'WHERE active = ' . 
$db->quote(1, 
'integer') . 
' ' .
 
  123            'AND object_type = ' . 
$db->quote(
$a_type, 
'text');
 
  127        $consumers = array();
 
  128        while (
$row = 
$res->fetchObject()) {
 
  141                        SELECT object_reference.ref_id FROM object_reference, tree, object_data 
  142                        WHERE tree.parent = %s 
  143                        AND object_data.type = %s 
  144                        AND object_reference.ref_id = tree.child 
  145                        AND object_reference.obj_id = object_data.obj_id',
 
  146            array(
'integer', 
'text'),
 
  147            array(SYSTEM_FOLDER_ID, 
'ltis')
 
  150            $lti_ref_id = 
$row[
'ref_id'];
 
  162        $query = 
'select ref_id, title from lti2_consumer join lti_ext_consumer ' .
 
  163            'on id = ext_consumer_id where enabled = ' . 
$db->quote(1, 
'integer');
 
  169        while (
$row =  
$res->fetchRow(DB_FETCHMODE_OBJECT)) {
 
  170            $item[
'ref_id'] = 
$row->ref_id;
 
  171            $item[
'title'] = 
$row->title;
 
An exception for terminatinating execution or to throw for unit testing.
Class to represent an LTI Data Connector for ILIAS.
static getLogger($a_component_id)
Get component logger.
static lookupLTISettingsRefId()
Lookup ref_id.
__construct($a_id=0, $a_call_by_reference=true)
Constructor @access public.
saveConsumerObjectTypes($a_consumer_id, $a_obj_types)
static readReleaseObjects()
Read released objects.
getActiveObjectTypes($a_consumer_id)
parses the objects.xml it handles the xml-description of all ilias objects
Class ilObject Basic functions for all objects.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
foreach($_POST as $key=> $value) $res