ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilLTITool Class Reference

LTI provider for LTI launch. More...

+ Inheritance diagram for ilLTITool:
+ Collaboration diagram for ilLTITool:

Public Member Functions

 __construct (ilLTIDataConnector $dataConnector)
 ilLTITool constructor. More...
 

Protected Member Functions

 onLaunch ()
 Process a valid launch request. More...
 

Protected Attributes

ilLogger $logger = null
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilLTITool::__construct ( ilLTIDataConnector  $dataConnector)

ilLTITool constructor.

Parameters
ilLTIDataConnector$dataConnector

Definition at line 42 of file class.ilLTITool.php.

References $DIC, ilLTIDataConnector\getDataConnector(), ilLoggerFactory\getLogger(), ILIAS\Repository\logger(), and null.

43  {
44  global $DIC;
45  $this->logger = ilLoggerFactory::getLogger('ltis');
46  // $this->initialize();
47  if (empty($dataConnector)) {
48  $dataConnector = ilLTIDataConnector::getDataConnector();
49  }
50  $this->dataConnector = $dataConnector;
51  // parent::__construct($dataConnector);
52  $this->setParameterConstraint('resource_link_id', true, 50, array('basic-lti-launch-request'));
53  $this->setParameterConstraint('user_id', true, 64, array('basic-lti-launch-request'));
54  $this->setParameterConstraint('roles', true, null, array('basic-lti-launch-request'));
55  $this->setParameterConstraint('lis_person_contact_email_primary', true, 80, array('basic-lti-launch-request'));
56  }
static getLogger(string $a_component_id)
Get component logger.
static getDataConnector(mixed $db=null, string $dbTableNamePrefix='', string $type='')
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:

Member Function Documentation

◆ onLaunch()

ilLTITool::onLaunch ( )
protected

Process a valid launch request.

Definition at line 61 of file class.ilLTITool.php.

References ILIAS\Repository\logger().

61  : void
62  {
63  // save/update current user
64  if ($this->userResult instanceof User) {
65  $this->logger->debug("onLaunch - user");
66  $this->userResult->save();
67  }
68 
69  if ($this->context instanceof Context) {
70  $this->logger->debug("onLaunch - context");
71  $this->context->save();
72  }
73 
74  if ($this->resourceLink instanceof ResourceLink) {
75  $this->logger->debug("onLaunch - resource");
76  $this->resourceLink->save();
77  }
78  }
+ Here is the call graph for this function:

Field Documentation

◆ $logger

ilLogger ilLTITool::$logger = null
protected

Definition at line 36 of file class.ilLTITool.php.


The documentation for this class was generated from the following file: