ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilObjLTIConsumer Class Reference
+ Inheritance diagram for ilObjLTIConsumer:
+ Collaboration diagram for ilObjLTIConsumer:

Public Member Functions

 __construct (int $a_id=0, bool $a_reference=true)
 ilObjLTIConsumer constructor. More...
 
 isActivationLimited ()
 
 setActivationLimited ($activationLimited)
 
 getActivationStartingTime ()
 
 setActivationStartingTime ($activationStartingTime)
 
 getActivationEndingTime ()
 
 setActivationEndingTime ($activationEndingTime)
 
 getActivationVisibility ()
 
 setActivationVisibility ($activationVisibility)
 
 getMasteryScore ()
 
 setMasteryScore (float $mastery_score)
 
 getMasteryScorePercent ()
 
 setMasteryScorePercent (float $mastery_score_percent)
 
 getProviderId ()
 
 setProviderId (int $providerId)
 
 initProvider ()
 
 getProvider ()
 
 setProvider (ilLTIConsumeProvider $provider)
 
 isLaunchMethodOwnWin ()
 
 isLaunchMethodEmbedded ()
 
 getLaunchMethod ()
 
 setLaunchMethod (string $launchMethod)
 
 getCustomLaunchKey ()
 
 setCustomLaunchKey (string $customLaunchKey)
 
 getCustomLaunchSecret ()
 
 setCustomLaunchSecret (string $customLaunchSecret)
 
 getLaunchKey ()
 
 getLaunchSecret ()
 
 getUseXapi ()
 
 setUseXapi (bool $use_xapi)
 
 getCustomActivityId ()
 
 setCustomActivityId (string $custom_activity_id)
 
 getActivityId ()
 
 isStatementsReportEnabled ()
 
 setStatementsReportEnabled ($statementsReportEnabled)
 
 doRead ()
 
 load ()
 
 doUpdate ()
 
 save ()
 
 setHighscoreEnabled ($a_enabled)
 Sets if the highscore feature should be enabled. More...
 
 getHighscoreEnabled ()
 Gets the setting which determines if the highscore feature is enabled. More...
 
 setHighscoreAchievedTS ($a_achieved_ts)
 Sets if the date and time of the scores achievement should be displayed. More...
 
 getHighscoreAchievedTS ()
 Returns if date and time of the scores achievement should be displayed. More...
 
 setHighscorePercentage ($a_percentage)
 Sets if the percentages of the scores pass should be shown. More...
 
 getHighscorePercentage ()
 Gets if the percentage column should be shown. More...
 
 setHighscoreWTime ($a_wtime)
 Sets if the workingtime of the scores should be shown. More...
 
 getHighscoreWTime ()
 Gets if the column with the workingtime should be shown. More...
 
 setHighscoreOwnTable ($a_own_table)
 Sets if the table with the own ranking should be shown. More...
 
 getHighscoreOwnTable ()
 Gets if the own rankings table should be shown. More...
 
 setHighscoreTopTable ($a_top_table)
 Sets if the top-rankings table should be shown. More...
 
 getHighscoreTopTable ()
 Gets, if the top-rankings table should be shown. More...
 
 setHighscoreTopNum ($a_top_num)
 Sets the number of entries which are to be shown in the top-rankings table. More...
 
 getHighscoreTopNum ($a_retval=10)
 Gets the number of entries which are to be shown in the top-rankings table. More...
 
 getHighscoreMode ()
 
 setHighscoreMode ($mode)
 
 buildLaunchParameters (ilCmiXapiUser $cmixUser, $token, $contextType, $contextId, $contextTitle, $returnUrl='')
 
- Public Member Functions inherited from ilObject2
 __construct ($a_id=0, $a_reference=true)
 Constructor public. More...
 
 withReferences ()
 
 read ()
 Read data from db. More...
 
 setRefId ($a_id)
 
 getRefId ()
 
 getType ()
 
 setType ($a_type)
 
 getPresentationTitle ()
 
 getTitle ()
 
 getUntranslatedTitle ()
 
 setTitle ($a_title)
 
 getDescription ()
 
 setDescription ($a_desc)
 
 getLongDescription ()
 
 getImportId ()
 
 setImportId ($a_import_id)
 
 getOwner ()
 
 getOwnerName ()
 
 setOwner ($a_owner)
 
 getCreateDate ()
 
 getLastUpdateDate ()
 
 create ($a_clone_mode=false)
 
 update ()
 
 MDUpdateListener ($a_element)
 
 createMetaData ()
 
 updateMetaData ()
 
 deleteMetaData ()
 
 updateOwner ()
 
 putInTree ($a_parent_ref)
 
 setPermissions ($a_parent_ref)
 
 createReference ()
 
 countReferences ()
 
 delete ()
 
 initDefaultRoles ()
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 
 cloneMetaData ($target_obj)
 
 cloneObject ($a_target_id, $a_copy_id=null, $a_omit_tree=false)
 
 cloneDependencies ($a_target_id, $a_copy_id)
 
- Public Member Functions inherited from ilObject
 __construct ($a_id=0, $a_reference=true)
 Constructor public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 read object data from db into object More...
 
 getId ()
 get object id public More...
 
 setId ($a_id)
 set object id public More...
 
 setRefId ($a_id)
 set reference id public More...
 
 getRefId ()
 get reference id public More...
 
 getType ()
 get object type public More...
 
 setType ($a_type)
 set object type public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title public More...
 
 getUntranslatedTitle ()
 get untranslated object title public More...
 
 setTitle ($a_title)
 set object title More...
 
 getDescription ()
 get object description More...
 
 setDescription ($a_desc)
 set object description More...
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 get import id More...
 
 setImportId ($a_import_id)
 set import id More...
 
 setOfflineStatus ($a_status)
 Set offline status. More...
 
 getOfflineStatus ()
 Get offline status. More...
 
 supportsOfflineHandling ()
 Check whether object supports offline handling. More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date public More...
 
 getLastUpdateDate ()
 get last update date public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 getPossibleSubObjects ($a_filter=true)
 get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Data Fields

const DB_TABLE_NAME = 'lti_consumer_settings'
 
const LAUNCH_METHOD_OWN_WIN = 'ownWin'
 
const LAUNCH_METHOD_NEW_WIN = 'newWin'
 
const LAUNCH_METHOD_EMBEDDED = 'embedded'
 
const HIGHSCORE_SHOW_ALL_TABLES = 1
 
const HIGHSCORE_SHOW_TOP_TABLE = 2
 
const HIGHSCORE_SHOW_OWN_TABLE = 3
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 max length of object title More...
 
const DESC_LENGTH = 128
 
 $lng
 
 $id
 
 $ref_id
 
 $type
 
 $title
 
 $untranslatedTitle
 
 $desc
 
 $long_desc
 
 $owner
 
 $create_date
 
 $last_update
 
 $import_id
 
 $register = false
 
 $referenced
 
 $objectList
 
 $max_title
 
 $max_desc
 
 $add_dots
 

Protected Member Functions

 initType ()
 
 loadRepositoryActivationSettings ()
 
 saveRepositoryActivationSettings ()
 
 dbTableName ()
 
- Protected Member Functions inherited from ilObject2
 initType ()
 
 doRead ()
 
 doCreate ()
 
 beforeCreate ()
 
 doUpdate ()
 
 beforeUpdate ()
 
 doMDUpdateListener ($a_element)
 
 beforeMDUpdateListener ($a_element)
 
 doCreateMetaData ()
 
 beforeCreateMetaData ()
 
 doUpdateMetaData ()
 
 beforeUpdateMetaData ()
 
 doDelete ()
 
 beforeDelete ()
 
 doCloneObject ($new_obj, $a_target_id, $a_copy_id=null)
 
 beforeCloneObject ()
 

Protected Attributes

 $activationLimited
 repository object activation settings (handled by ilObject) More...
 
 $activationStartingTime
 
 $activationEndingTime
 
 $activationVisibility
 
 $providerId = 0
 
 $provider = null
 
 $use_xapi = false
 
 $custom_activity_id = ''
 
 $statementsReportEnabled = false
 
 $mastery_score = 0.5
 
 $launchMethod = self::LAUNCH_METHOD_NEW_WIN
 
 $customLaunchKey = ''
 
 $customLaunchSecret = ''
 
 $_highscore_enabled = 0
 
 $anonymity = 0
 
 $_highscore_achieved_ts = 1
 
 $_highscore_percentage = 1
 
 $_highscore_wtime = 1
 
 $_highscore_own_table = 1
 
 $_highscore_top_table = 1
 
 $_highscore_top_num = 10
 
- Protected Attributes inherited from ilObject
 $objDefinition
 
 $db
 
 $log
 
 $error
 
 $tree
 
 $app_event_handler
 
 $rbacadmin
 
 $rbacreview
 

Private Member Functions

 getCustomParams ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObject2
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupOwnerName ($a_owner_id)
 
static _getIdForImportId ($a_import_id)
 
static _getAllReferences ($a_id)
 
static _lookupTitle ($a_id)
 
static _lookupOwner ($a_id)
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 
static _lookupLastUpdate ($a_id, $a_as_string=false)
 
static _getLastUpdateOfObjects ($a_objs)
 
static _lookupObjId ($a_id)
 
static _setDeletedDate ($a_ref_id, $a_deleted_by)
 
static _resetDeletedDate ($a_ref_id)
 
static _lookupDeletedDate ($a_ref_id)
 
static _writeTitle ($a_obj_id, $a_title)
 
static _writeDescription ($a_obj_id, $a_desc)
 
static _writeImportId ($a_obj_id, $a_import_id)
 
static _lookupType ($a_id, $a_reference=false)
 
static _isInTrash ($a_ref_id)
 
static _hasUntrashedReference ($a_obj_id)
 
static _lookupObjectId ($a_ref_id)
 
static _getObjectsDataForType ($a_type, $a_omit_trash=false)
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $a_show_path=true)
 
static _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupImportId ($a_obj_id)
 
static _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
static _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static lookupOfflineStatus ($a_obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner ($a_id)
 lookup object owner More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
static _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
static _lookupObjId ($a_id)
 
static _setDeletedDate ($a_ref_id, $a_deleted_by)
 
static setDeletedDates ($a_ref_ids, $a_user_id)
 Set deleted date. More...
 
static _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
static _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
static _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
static _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id More...
 
static _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type More...
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static fixMissingTitles ($a_type, array &$a_obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate ($a_id)
 Lookup creation date. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 

Detailed Description

Definition at line 14 of file class.ilObjLTIConsumer.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjLTIConsumer::__construct ( int  $a_id = 0,
bool  $a_reference = true 
)

ilObjLTIConsumer constructor.

Parameters
int$a_id
bool$a_reference

Definition at line 65 of file class.ilObjLTIConsumer.php.

References ILIAS\GlobalScreen\Provider\__construct().

66  {
67  parent::__construct($a_id, $a_reference);
68  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ buildLaunchParameters()

ilObjLTIConsumer::buildLaunchParameters ( ilCmiXapiUser  $cmixUser,
  $token,
  $contextType,
  $contextId,
  $contextTitle,
  $returnUrl = '' 
)

Definition at line 742 of file class.ilObjLTIConsumer.php.

References $DIC, $token, ilLink\_getLink(), ilLTIConsumerResult\getByKeys(), getCustomParams(), ilObject2\getDescription(), ilObject\getId(), ilCmiXapiUser\getIdentAsId(), getLaunchKey(), getLaunchMethod(), getLaunchSecret(), getProvider(), ilObject2\getRefId(), ilObject2\getTitle(), ilCmiXapiUser\getUsrIdent(), ILIAS_HTTP_PATH, ilLTIConsumeProvider\PRIVACY_NAME_FIRSTNAME, ilLTIConsumeProvider\PRIVACY_NAME_FULLNAME, ilLTIConsumeProvider\PRIVACY_NAME_LASTNAME, and ilLTIConsumerLaunch\signOAuth().

743  {
744  global $DIC; /* @var \ILIAS\DI\Container $DIC */
745 
746  $roles = $DIC->access()->checkAccess('write', '', $this->getRefId()) ? "Instructor" : "Learner";
747  if ($this->getProvider()->getAlwaysLearner() == true) {
748  $roles = "Learner";
749  }
750 
751  $resource_link_id = $this->getRefId();
752  if ($this->getProvider()->getUseProviderId() == true) {
753  $resource_link_id = 'p' . $this->getProvider()->getId();
754  }
755 
756  $usrImage = '';
757  if ($this->getProvider()->getIncludeUserPicture()) {
758  $usrImage = ILIAS_HTTP_PATH . "/" . $DIC->user()->getPersonalPicturePath("small");
759  }
760 
761  $documentTarget = "window";
762  if ($this->getLaunchMethod() == self::LAUNCH_METHOD_EMBEDDED) {
763  $documentTarget = "iframe";
764  }
765 
766  $nameGiven = '-';
767  $nameFamily = '-';
768  $nameFull = '-';
769  switch ($this->getProvider()->getPrivacyName()) {
771  $nameGiven = $DIC->user()->getFirstname();
772  $nameFull = $DIC->user()->getFirstname();
773  break;
775  $usrName = $DIC->user()->getUTitle() ? $DIC->user()->getUTitle() . ' ' : '';
776  $usrName .= $DIC->user()->getLastname();
777  $nameFamily = $usrName;
778  $nameFull = $usrName;
779  break;
781  $nameGiven = $DIC->user()->getFirstname();
782  $nameFamily = $DIC->user()->getLastname();
783  $nameFull = $DIC->user()->getFullname();
784  break;
785  }
786 
787  $userIdLTI = ilCmiXapiUser::getIdentAsId($this->getProvider()->getPrivacyIdent(), $DIC->user());
788 
789  $emailPrimary = $cmixUser->getUsrIdent();
790 
791  ilLTIConsumerResult::getByKeys($this->getId(), $DIC->user()->getId(), true);
792 
793  $custom_params = $this->getCustomParams();
794 
795  $launch_vars = [
796  "lti_message_type" => "basic-lti-launch-request",
797  "lti_version" => "LTI-1p0",
798  "resource_link_id" => $resource_link_id,
799  "resource_link_title" => $this->getTitle(),
800  "resource_link_description" => $this->getDescription(),
801  "user_id" => $userIdLTI,
802  "user_image" => $usrImage,
803  "roles" => $roles,
804  "lis_person_name_given" => $nameGiven,
805  "lis_person_name_family" => $nameFamily,
806  "lis_person_name_full" => $nameFull,
807  "lis_person_contact_email_primary" => $emailPrimary,
808  "context_id" => $contextId,
809  "context_type" => $contextType,
810  "context_title" => $contextTitle,
811  "context_label" => $contextType . " " . $contextId,
812  "launch_presentation_locale" => $this->lng->getLangKey(),
813  "launch_presentation_document_target" => $documentTarget,
814  "launch_presentation_width" => "",//recommended
815  "launch_presentation_height" => "",//recommended
816  "launch_presentation_return_url" => $returnUrl,
817  "tool_consumer_instance_guid" => $value = CLIENT_ID . "." . implode(".", array_reverse(explode("/", parse_url(ILIAS_HTTP_PATH)["path"]))) . parse_url(ILIAS_HTTP_PATH)["host"],
818  "tool_consumer_instance_name" => $DIC->settings()->get("short_inst_name") ? $DIC->settings()->get("short_inst_name") : CLIENT_ID,
819  "tool_consumer_instance_description" => ilObjSystemFolder::_getHeaderTitle(),
820  "tool_consumer_instance_url" => ilLink::_getLink(ROOT_FOLDER_ID, "root"),//ToDo? "https://vb52p70.example.com/release_5-3/goto.php?target=root_1&client_id=inno",
821  "tool_consumer_instance_contact_email" => $DIC->settings()->get("admin_email"),
822  "launch_presentation_css_url" => "",
823  "tool_consumer_info_product_family_code" => "ilias",
824  "tool_consumer_info_version" => $DIC->settings()->get("ilias_version"),
825  "lis_result_sourcedid" => $token,
826  "lis_outcome_service_url" => ILIAS_HTTP_PATH . "/Modules/LTIConsumer/result.php?client_id=" . CLIENT_ID,
827  "role_scope_mentor" => ""
828  ];
829 
830  $OAuthParams = [
831  "url" => $this->getProvider()->getProviderUrl(),
832  "key" => $this->getLaunchKey(),
833  "secret" => $this->getLaunchSecret(),
834  "callback" => "about:blank",
835  "http_method" => "POST",
836  "sign_method" => "HMAC_SHA1",
837  "token" => "",
838  "data" => ($launch_vars + $custom_params)
839  ];
840 
841  $launchParameters = ilLTIConsumerLaunch::signOAuth($OAuthParams);
842 
843  return $launchParameters;
844  }
static getByKeys($a_obj_id, $a_usr_id, $a_create=false)
Get a result by object and user key.
static signOAuth($a_params)
sign request data with OAuth
getId()
get object id public
$token
Definition: xapitoken.php:57
static getIdentAsId($userIdentMode, ilObjUser $user)
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ dbTableName()

ilObjLTIConsumer::dbTableName ( )
protected

Definition at line 492 of file class.ilObjLTIConsumer.php.

Referenced by save().

493  {
494  return self::DB_TABLE_NAME;
495  }
+ Here is the caller graph for this function:

◆ doRead()

ilObjLTIConsumer::doRead ( )

Definition at line 380 of file class.ilObjLTIConsumer.php.

References load().

381  {
382  $this->load();
383  }
+ Here is the call graph for this function:

◆ doUpdate()

ilObjLTIConsumer::doUpdate ( )

Definition at line 420 of file class.ilObjLTIConsumer.php.

References save().

421  {
422  $this->save();
423  }
+ Here is the call graph for this function:

◆ getActivationEndingTime()

ilObjLTIConsumer::getActivationEndingTime ( )
Returns
int

Definition at line 110 of file class.ilObjLTIConsumer.php.

References $activationEndingTime.

Referenced by saveRepositoryActivationSettings().

111  {
113  }
+ Here is the caller graph for this function:

◆ getActivationStartingTime()

ilObjLTIConsumer::getActivationStartingTime ( )
Returns
int

Definition at line 94 of file class.ilObjLTIConsumer.php.

References $activationStartingTime.

Referenced by saveRepositoryActivationSettings().

+ Here is the caller graph for this function:

◆ getActivationVisibility()

ilObjLTIConsumer::getActivationVisibility ( )
Returns
bool

Definition at line 126 of file class.ilObjLTIConsumer.php.

References $activationVisibility.

Referenced by saveRepositoryActivationSettings().

127  {
129  }
+ Here is the caller graph for this function:

◆ getActivityId()

ilObjLTIConsumer::getActivityId ( )
Returns
string

Definition at line 331 of file class.ilObjLTIConsumer.php.

References $custom_activity_id, and getProvider().

331  : string
332  {
333  if (strlen($this->getProvider()->getXapiActivityId())) {
334  return $this->getProvider()->getXapiActivityId();
335  }
336 
338  }
+ Here is the call graph for this function:

◆ getCustomActivityId()

ilObjLTIConsumer::getCustomActivityId ( )
Returns
string

Definition at line 315 of file class.ilObjLTIConsumer.php.

References $custom_activity_id.

Referenced by save().

315  : string
316  {
318  }
+ Here is the caller graph for this function:

◆ getCustomLaunchKey()

ilObjLTIConsumer::getCustomLaunchKey ( )
Returns
string

Definition at line 243 of file class.ilObjLTIConsumer.php.

References $customLaunchKey.

Referenced by getLaunchKey(), and save().

243  : string
244  {
245  return $this->customLaunchKey;
246  }
+ Here is the caller graph for this function:

◆ getCustomLaunchSecret()

ilObjLTIConsumer::getCustomLaunchSecret ( )
Returns
string

Definition at line 259 of file class.ilObjLTIConsumer.php.

References $customLaunchSecret.

Referenced by getLaunchSecret(), and save().

259  : string
260  {
262  }
+ Here is the caller graph for this function:

◆ getCustomParams()

ilObjLTIConsumer::getCustomParams ( )
private
Returns
string[]

Definition at line 359 of file class.ilObjLTIConsumer.php.

References $param, and getProvider().

Referenced by buildLaunchParameters().

359  : array
360  {
361  $paramsAsArray = [];
362 
363  $params = $this->getProvider()->getCustomParams();
364  // allows foo=bar;foo2=baz2; foo3=baz3
365  $params = preg_split('/; ?/', $params);
366 
367  foreach ($params as $param) {
368  $param = explode('=', $param);
369  // empty field, duplicate/leading/trailing semicolon?
370  if ($param[0] != '') {
371  $value = isset($param[1]) ? $param[1] : '';
372  $paramsAsArray[$param[0]] = $value;
373  }
374  }
375 
376  return $paramsAsArray;
377  }
$param
Definition: xapitoken.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHighscoreAchievedTS()

ilObjLTIConsumer::getHighscoreAchievedTS ( )

Returns if date and time of the scores achievement should be displayed.

Returns
bool True, if column should be shown.

Definition at line 582 of file class.ilObjLTIConsumer.php.

References $_highscore_achieved_ts.

Referenced by save().

583  {
584  return (bool) $this->_highscore_achieved_ts;
585  }
+ Here is the caller graph for this function:

◆ getHighscoreEnabled()

ilObjLTIConsumer::getHighscoreEnabled ( )

Gets the setting which determines if the highscore feature is enabled.

Returns
bool True, if highscore is enabled.

Definition at line 561 of file class.ilObjLTIConsumer.php.

References $_highscore_enabled.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and save().

562  {
563  return (bool) $this->_highscore_enabled;
564  }
+ Here is the caller graph for this function:

◆ getHighscoreMode()

ilObjLTIConsumer::getHighscoreMode ( )
Returns
int

Definition at line 699 of file class.ilObjLTIConsumer.php.

References getHighscoreOwnTable(), and getHighscoreTopTable().

700  {
701  switch (true) {
702  case $this->getHighscoreOwnTable() && $this->getHighscoreTopTable():
703  return self::HIGHSCORE_SHOW_ALL_TABLES;
704  break;
705 
706  case $this->getHighscoreTopTable():
707  return self::HIGHSCORE_SHOW_TOP_TABLE;
708  break;
709 
710  case $this->getHighscoreOwnTable():
711  default:
712  return self::HIGHSCORE_SHOW_OWN_TABLE;
713  break;
714  }
715  }
getHighscoreTopTable()
Gets, if the top-rankings table should be shown.
getHighscoreOwnTable()
Gets if the own rankings table should be shown.
+ Here is the call graph for this function:

◆ getHighscoreOwnTable()

ilObjLTIConsumer::getHighscoreOwnTable ( )

Gets if the own rankings table should be shown.

Returns
bool True, if the own rankings table should be shown.

Definition at line 642 of file class.ilObjLTIConsumer.php.

References $_highscore_own_table.

Referenced by getHighscoreMode(), and save().

643  {
644  return (bool) $this->_highscore_own_table;
645  }
+ Here is the caller graph for this function:

◆ getHighscorePercentage()

ilObjLTIConsumer::getHighscorePercentage ( )

Gets if the percentage column should be shown.

Returns
bool True, if percentage column should be shown.

Definition at line 602 of file class.ilObjLTIConsumer.php.

References $_highscore_percentage.

Referenced by save().

603  {
604  return (bool) $this->_highscore_percentage;
605  }
+ Here is the caller graph for this function:

◆ getHighscoreTopNum()

ilObjLTIConsumer::getHighscoreTopNum (   $a_retval = 10)

Gets the number of entries which are to be shown in the top-rankings table.

Default: 10 entries

Parameters
integer$a_retvalOptional return value if nothing is set, defaults to 10.
Returns
integer Number of entries to be shown in the top-rankings table.

Definition at line 686 of file class.ilObjLTIConsumer.php.

References $_highscore_top_num.

Referenced by save().

687  {
688  $retval = $a_retval;
689  if ((int) $this->_highscore_top_num != 0) {
690  $retval = $this->_highscore_top_num;
691  }
692 
693  return $retval;
694  }
+ Here is the caller graph for this function:

◆ getHighscoreTopTable()

ilObjLTIConsumer::getHighscoreTopTable ( )

Gets, if the top-rankings table should be shown.

Returns
bool True, if top-rankings table should be shown.

Definition at line 662 of file class.ilObjLTIConsumer.php.

References $_highscore_top_table.

Referenced by getHighscoreMode(), and save().

663  {
664  return (bool) $this->_highscore_top_table;
665  }
+ Here is the caller graph for this function:

◆ getHighscoreWTime()

ilObjLTIConsumer::getHighscoreWTime ( )

Gets if the column with the workingtime should be shown.

Returns
bool True, if the workingtime column should be shown.

Definition at line 622 of file class.ilObjLTIConsumer.php.

References $_highscore_wtime.

Referenced by save().

623  {
624  return (bool) $this->_highscore_wtime;
625  }
+ Here is the caller graph for this function:

◆ getLaunchKey()

ilObjLTIConsumer::getLaunchKey ( )
Returns
string

Definition at line 275 of file class.ilObjLTIConsumer.php.

References getCustomLaunchKey(), and getProvider().

Referenced by buildLaunchParameters().

276  {
277  if ($this->getProvider()->isProviderKeyCustomizable()) {
278  return $this->getCustomLaunchKey();
279  }
280 
281  return $this->getProvider()->getProviderKey();
282  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLaunchMethod()

ilObjLTIConsumer::getLaunchMethod ( )
Returns
string

Definition at line 227 of file class.ilObjLTIConsumer.php.

References $launchMethod.

Referenced by buildLaunchParameters(), and save().

227  : string
228  {
229  return $this->launchMethod;
230  }
+ Here is the caller graph for this function:

◆ getLaunchSecret()

ilObjLTIConsumer::getLaunchSecret ( )
Returns
string

Definition at line 287 of file class.ilObjLTIConsumer.php.

References getCustomLaunchSecret(), and getProvider().

Referenced by buildLaunchParameters().

288  {
289  if ($this->getProvider()->isProviderKeyCustomizable()) {
290  return $this->getCustomLaunchSecret();
291  }
292 
293  return $this->getProvider()->getProviderSecret();
294  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMasteryScore()

ilObjLTIConsumer::getMasteryScore ( )
Returns
float

Definition at line 142 of file class.ilObjLTIConsumer.php.

References $mastery_score.

Referenced by save().

142  : float
143  {
144  return $this->mastery_score;
145  }
+ Here is the caller graph for this function:

◆ getMasteryScorePercent()

ilObjLTIConsumer::getMasteryScorePercent ( )
Returns
float

Definition at line 158 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerPlaceholderValues\getMasteryScore().

158  : float
159  {
160  return $this->mastery_score * 100;
161  }
+ Here is the caller graph for this function:

◆ getProvider()

◆ getProviderId()

ilObjLTIConsumer::getProviderId ( )
Returns
int

Definition at line 174 of file class.ilObjLTIConsumer.php.

References $providerId.

Referenced by initProvider(), and save().

174  : int
175  {
176  return $this->providerId;
177  }
+ Here is the caller graph for this function:

◆ getUseXapi()

ilObjLTIConsumer::getUseXapi ( )
Returns
bool

Definition at line 299 of file class.ilObjLTIConsumer.php.

References $use_xapi.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and save().

299  : bool
300  {
301  return $this->use_xapi;
302  }
+ Here is the caller graph for this function:

◆ initProvider()

ilObjLTIConsumer::initProvider ( )

Definition at line 187 of file class.ilObjLTIConsumer.php.

References getProviderId().

188  {
189  $this->provider = new ilLTIConsumeProvider($this->getProviderId());
190  }
+ Here is the call graph for this function:

◆ initType()

ilObjLTIConsumer::initType ( )
protected

Definition at line 70 of file class.ilObjLTIConsumer.php.

71  {
72  $this->type = "lti";
73  }

◆ isActivationLimited()

ilObjLTIConsumer::isActivationLimited ( )
Returns
bool

Definition at line 78 of file class.ilObjLTIConsumer.php.

References $activationLimited.

Referenced by saveRepositoryActivationSettings().

79  {
81  }
$activationLimited
repository object activation settings (handled by ilObject)
+ Here is the caller graph for this function:

◆ isLaunchMethodEmbedded()

ilObjLTIConsumer::isLaunchMethodEmbedded ( )
Returns
bool

Definition at line 219 of file class.ilObjLTIConsumer.php.

219  : bool
220  {
221  return $this->launchMethod == self::LAUNCH_METHOD_EMBEDDED;
222  }

◆ isLaunchMethodOwnWin()

ilObjLTIConsumer::isLaunchMethodOwnWin ( )
Returns
bool

Definition at line 211 of file class.ilObjLTIConsumer.php.

211  : bool
212  {
213  return $this->launchMethod == self::LAUNCH_METHOD_OWN_WIN;
214  }

◆ isStatementsReportEnabled()

ilObjLTIConsumer::isStatementsReportEnabled ( )
Returns
bool

Definition at line 343 of file class.ilObjLTIConsumer.php.

References $statementsReportEnabled.

Referenced by save().

344  {
346  }
+ Here is the caller graph for this function:

◆ load()

ilObjLTIConsumer::load ( )

Definition at line 385 of file class.ilObjLTIConsumer.php.

References $DIC, $query, $res, ilObject\getId(), loadRepositoryActivationSettings(), setCustomActivityId(), setCustomLaunchKey(), setCustomLaunchSecret(), setHighscoreAchievedTS(), setHighscoreEnabled(), setHighscoreOwnTable(), setHighscorePercentage(), setHighscoreTopNum(), setHighscoreTopTable(), setHighscoreWTime(), setLaunchMethod(), setMasteryScore(), setProvider(), setProviderId(), setStatementsReportEnabled(), and setUseXapi().

Referenced by doRead().

386  {
387  global $DIC; /* @var \ILIAS\DI\Container $DIC */
388 
389  $query = "SELECT * FROM {$this->dbTableName()} WHERE obj_id = %s";
390  $res = $DIC->database()->queryF($query, ['integer'], [$this->getId()]);
391 
392  while ($row = $DIC->database()->fetchAssoc($res)) {
393  // if ($row['provider_id']) { //always set
394  $this->setProviderId((int) $row['provider_id']);
395  $this->setProvider(new ilLTIConsumeProvider((int) $row['provider_id']));
396  // }
397 
398  $this->setLaunchMethod($row['launch_method']);
399 
400  $this->setCustomLaunchKey((string) $row['launch_key']);
401  $this->setCustomLaunchSecret((string) $row['launch_secret']);
402 
403  $this->setUseXapi((bool) $row['use_xapi']);
404  $this->setCustomActivityId((string) $row['activity_id']);
405  $this->setStatementsReportEnabled((bool) $row['show_statements']);
406  $this->setHighscoreEnabled((bool) $row['highscore_enabled']);
407  $this->setHighscoreAchievedTS((bool) $row['highscore_achieved_ts']);
408  $this->setHighscorePercentage((bool) $row['highscore_percentage']);
409  $this->setHighscoreWTime((bool) $row['highscore_wtime']);
410  $this->setHighscoreOwnTable((bool) $row['highscore_own_table']);
411  $this->setHighscoreTopTable((bool) $row['highscore_top_table']);
412  $this->setHighscoreTopNum((int) $row['highscore_top_num']);
413 
414  $this->setMasteryScore((float) $row['mastery_score']);
415  }
416 
418  }
setUseXapi(bool $use_xapi)
setHighscoreTopTable($a_top_table)
Sets if the top-rankings table should be shown.
setHighscoreEnabled($a_enabled)
Sets if the highscore feature should be enabled.
setCustomActivityId(string $custom_activity_id)
setStatementsReportEnabled($statementsReportEnabled)
setHighscorePercentage($a_percentage)
Sets if the percentages of the scores pass should be shown.
setCustomLaunchSecret(string $customLaunchSecret)
setHighscoreAchievedTS($a_achieved_ts)
Sets if the date and time of the scores achievement should be displayed.
foreach($_POST as $key=> $value) $res
setLaunchMethod(string $launchMethod)
getId()
get object id public
$query
setHighscoreWTime($a_wtime)
Sets if the workingtime of the scores should be shown.
setHighscoreOwnTable($a_own_table)
Sets if the table with the own ranking should be shown.
setHighscoreTopNum($a_top_num)
Sets the number of entries which are to be shown in the top-rankings table.
setCustomLaunchKey(string $customLaunchKey)
$DIC
Definition: xapitoken.php:46
setMasteryScore(float $mastery_score)
setProviderId(int $providerId)
setProvider(ilLTIConsumeProvider $provider)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadRepositoryActivationSettings()

ilObjLTIConsumer::loadRepositoryActivationSettings ( )
protected

Definition at line 452 of file class.ilObjLTIConsumer.php.

References ilObjectActivation\getItem(), setActivationEndingTime(), setActivationLimited(), setActivationStartingTime(), setActivationVisibility(), and ilObjectActivation\TIMINGS_ACTIVATION.

Referenced by load().

453  {
454  if ($this->ref_id) {
455  include_once "./Services/Object/classes/class.ilObjectActivation.php";
456  $activation = ilObjectActivation::getItem($this->ref_id);
457  switch ($activation["timing_type"]) {
459  $this->setActivationLimited(true);
460  $this->setActivationStartingTime($activation["timing_start"]);
461  $this->setActivationEndingTime($activation["timing_end"]);
462  $this->setActivationVisibility($activation["visible"]);
463  break;
464 
465  default:
466  $this->setActivationLimited(false);
467  break;
468  }
469  }
470  }
setActivationEndingTime($activationEndingTime)
static getItem($a_ref_id)
Get item data.
setActivationVisibility($activationVisibility)
setActivationStartingTime($activationStartingTime)
setActivationLimited($activationLimited)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilObjLTIConsumer::save ( )

Definition at line 425 of file class.ilObjLTIConsumer.php.

References $DIC, dbTableName(), getCustomActivityId(), getCustomLaunchKey(), getCustomLaunchSecret(), getHighscoreAchievedTS(), getHighscoreEnabled(), getHighscoreOwnTable(), getHighscorePercentage(), getHighscoreTopNum(), getHighscoreTopTable(), getHighscoreWTime(), ilObject\getId(), getLaunchMethod(), getMasteryScore(), getProviderId(), getUseXapi(), isStatementsReportEnabled(), and saveRepositoryActivationSettings().

Referenced by doUpdate().

426  {
427  global $DIC; /* @var \ILIAS\DI\Container $DIC */
428 
429  $DIC->database()->replace($this->dbTableName(), [
430  'obj_id' => ['integer', $this->getId()]
431  ], [
432  'provider_id' => ['integer', $this->getProviderId()],
433  'launch_method' => ['text', $this->getLaunchMethod()],
434  'launch_key' => ['text', $this->getCustomLaunchKey()],
435  'launch_secret' => ['text', $this->getCustomLaunchSecret()],
436  'use_xapi' => ['integer',$this->getUseXapi()],
437  'activity_id' => ['text',$this->getCustomActivityId()],
438  'show_statements' => ['integer',$this->isStatementsReportEnabled()],
439  'highscore_enabled' => ['integer', (int) $this->getHighscoreEnabled()],
440  'highscore_achieved_ts' => ['integer', (int) $this->getHighscoreAchievedTS()],
441  'highscore_percentage' => ['integer', (int) $this->getHighscorePercentage()],
442  'highscore_wtime' => ['integer', (int) $this->getHighscoreWTime()],
443  'highscore_own_table' => ['integer', (int) $this->getHighscoreOwnTable()],
444  'highscore_top_table' => ['integer', (int) $this->getHighscoreTopTable()],
445  'highscore_top_num' => ['integer', (int) $this->getHighscoreTopNum()],
446  'mastery_score' => ['float', (float) $this->getMasteryScore()]
447  ]);
448 
450  }
getHighscoreWTime()
Gets if the column with the workingtime should be shown.
getHighscoreTopNum($a_retval=10)
Gets the number of entries which are to be shown in the top-rankings table.
getHighscorePercentage()
Gets if the percentage column should be shown.
getHighscoreEnabled()
Gets the setting which determines if the highscore feature is enabled.
getId()
get object id public
getHighscoreTopTable()
Gets, if the top-rankings table should be shown.
$DIC
Definition: xapitoken.php:46
getHighscoreAchievedTS()
Returns if date and time of the scores achievement should be displayed.
getHighscoreOwnTable()
Gets if the own rankings table should be shown.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveRepositoryActivationSettings()

ilObjLTIConsumer::saveRepositoryActivationSettings ( )
protected

Definition at line 472 of file class.ilObjLTIConsumer.php.

References getActivationEndingTime(), getActivationStartingTime(), getActivationVisibility(), ilObjectActivation\getItem(), isActivationLimited(), ilObjectActivation\setTimingType(), ilObjectActivation\TIMINGS_ACTIVATION, and ilObjectActivation\TIMINGS_DEACTIVATED.

Referenced by save().

473  {
474  if ($this->ref_id) {
475  include_once "./Services/Object/classes/class.ilObjectActivation.php";
476  ilObjectActivation::getItem($this->ref_id);
477 
478  $item = new ilObjectActivation;
479  if (!$this->isActivationLimited()) {
481  } else {
482  $item->setTimingType(ilObjectActivation::TIMINGS_ACTIVATION);
483  $item->setTimingStart($this->getActivationStartingTime());
484  $item->setTimingEnd($this->getActivationEndingTime());
485  $item->toggleVisible($this->getActivationVisibility());
486  }
487 
488  $item->update($this->ref_id);
489  }
490  }
static getItem($a_ref_id)
Get item data.
setTimingType($a_type)
Set timing type.
Class ilObjectActivation.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setActivationEndingTime()

ilObjLTIConsumer::setActivationEndingTime (   $activationEndingTime)
Parameters
int$activationEndingTime

Definition at line 118 of file class.ilObjLTIConsumer.php.

References $activationEndingTime.

Referenced by loadRepositoryActivationSettings().

119  {
120  $this->activationEndingTime = $activationEndingTime;
121  }
+ Here is the caller graph for this function:

◆ setActivationLimited()

ilObjLTIConsumer::setActivationLimited (   $activationLimited)
Parameters
bool$activationLimited

Definition at line 86 of file class.ilObjLTIConsumer.php.

References $activationLimited.

Referenced by loadRepositoryActivationSettings().

87  {
88  $this->activationLimited = $activationLimited;
89  }
$activationLimited
repository object activation settings (handled by ilObject)
+ Here is the caller graph for this function:

◆ setActivationStartingTime()

ilObjLTIConsumer::setActivationStartingTime (   $activationStartingTime)
Parameters
int$activationStartingTime

Definition at line 102 of file class.ilObjLTIConsumer.php.

References $activationStartingTime.

Referenced by loadRepositoryActivationSettings().

103  {
104  $this->activationStartingTime = $activationStartingTime;
105  }
+ Here is the caller graph for this function:

◆ setActivationVisibility()

ilObjLTIConsumer::setActivationVisibility (   $activationVisibility)
Parameters
bool$activationVisibility

Definition at line 134 of file class.ilObjLTIConsumer.php.

References $activationVisibility.

Referenced by loadRepositoryActivationSettings().

135  {
136  $this->activationVisibility = $activationVisibility;
137  }
+ Here is the caller graph for this function:

◆ setCustomActivityId()

ilObjLTIConsumer::setCustomActivityId ( string  $custom_activity_id)
Parameters
string$custom_activity_id

Definition at line 323 of file class.ilObjLTIConsumer.php.

References $custom_activity_id.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

324  {
325  $this->custom_activity_id = $custom_activity_id;
326  }
+ Here is the caller graph for this function:

◆ setCustomLaunchKey()

ilObjLTIConsumer::setCustomLaunchKey ( string  $customLaunchKey)
Parameters
string$customLaunchKey

Definition at line 251 of file class.ilObjLTIConsumer.php.

References $customLaunchKey.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

252  {
253  $this->customLaunchKey = $customLaunchKey;
254  }
+ Here is the caller graph for this function:

◆ setCustomLaunchSecret()

ilObjLTIConsumer::setCustomLaunchSecret ( string  $customLaunchSecret)
Parameters
string$customLaunchSecret

Definition at line 267 of file class.ilObjLTIConsumer.php.

References $customLaunchSecret.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

268  {
269  $this->customLaunchSecret = $customLaunchSecret;
270  }
+ Here is the caller graph for this function:

◆ setHighscoreAchievedTS()

ilObjLTIConsumer::setHighscoreAchievedTS (   $a_achieved_ts)

Sets if the date and time of the scores achievement should be displayed.

Parameters
bool$a_achieved_ts

Definition at line 572 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

573  {
574  $this->_highscore_achieved_ts = (bool) $a_achieved_ts;
575  }
+ Here is the caller graph for this function:

◆ setHighscoreEnabled()

ilObjLTIConsumer::setHighscoreEnabled (   $a_enabled)

Sets if the highscore feature should be enabled.

Parameters
bool$a_enabled

Definition at line 551 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

552  {
553  $this->_highscore_enabled = (bool) $a_enabled;
554  }
+ Here is the caller graph for this function:

◆ setHighscoreMode()

ilObjLTIConsumer::setHighscoreMode (   $mode)
Parameters
$modeint

Definition at line 720 of file class.ilObjLTIConsumer.php.

References setHighscoreOwnTable(), and setHighscoreTopTable().

Referenced by ilLTIConsumerSettingsFormGUI\initObject().

721  {
722  switch ($mode) {
723  case self::HIGHSCORE_SHOW_ALL_TABLES:
724  $this->setHighscoreTopTable(1);
725  $this->setHighscoreOwnTable(1);
726  break;
727 
728  case self::HIGHSCORE_SHOW_TOP_TABLE:
729  $this->setHighscoreTopTable(1);
730  $this->setHighscoreOwnTable(0);
731  break;
732 
733  case self::HIGHSCORE_SHOW_OWN_TABLE:
734  default:
735  $this->setHighscoreTopTable(0);
736  $this->setHighscoreOwnTable(1);
737  break;
738  }
739  }
setHighscoreTopTable($a_top_table)
Sets if the top-rankings table should be shown.
setHighscoreOwnTable($a_own_table)
Sets if the table with the own ranking should be shown.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setHighscoreOwnTable()

ilObjLTIConsumer::setHighscoreOwnTable (   $a_own_table)

Sets if the table with the own ranking should be shown.

Parameters
bool$a_own_tableTrue, if table with own ranking should be shown.

Definition at line 632 of file class.ilObjLTIConsumer.php.

Referenced by load(), and setHighscoreMode().

633  {
634  $this->_highscore_own_table = (bool) $a_own_table;
635  }
+ Here is the caller graph for this function:

◆ setHighscorePercentage()

ilObjLTIConsumer::setHighscorePercentage (   $a_percentage)

Sets if the percentages of the scores pass should be shown.

Parameters
bool$a_percentage

Definition at line 592 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

593  {
594  $this->_highscore_percentage = (bool) $a_percentage;
595  }
+ Here is the caller graph for this function:

◆ setHighscoreTopNum()

ilObjLTIConsumer::setHighscoreTopNum (   $a_top_num)

Sets the number of entries which are to be shown in the top-rankings table.

Parameters
integer$a_top_numNumber of entries in the top-rankings table.

Definition at line 673 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

674  {
675  $this->_highscore_top_num = (int) $a_top_num;
676  }
+ Here is the caller graph for this function:

◆ setHighscoreTopTable()

ilObjLTIConsumer::setHighscoreTopTable (   $a_top_table)

Sets if the top-rankings table should be shown.

Parameters
bool$a_top_table

Definition at line 652 of file class.ilObjLTIConsumer.php.

Referenced by load(), and setHighscoreMode().

653  {
654  $this->_highscore_top_table = (bool) $a_top_table;
655  }
+ Here is the caller graph for this function:

◆ setHighscoreWTime()

ilObjLTIConsumer::setHighscoreWTime (   $a_wtime)

Sets if the workingtime of the scores should be shown.

Parameters
bool$a_wtime

Definition at line 612 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

613  {
614  $this->_highscore_wtime = (bool) $a_wtime;
615  }
+ Here is the caller graph for this function:

◆ setLaunchMethod()

ilObjLTIConsumer::setLaunchMethod ( string  $launchMethod)
Parameters
string$launchMethod

Definition at line 235 of file class.ilObjLTIConsumer.php.

References $launchMethod.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

236  {
237  $this->launchMethod = $launchMethod;
238  }
+ Here is the caller graph for this function:

◆ setMasteryScore()

ilObjLTIConsumer::setMasteryScore ( float  $mastery_score)
Parameters
float$mastery_score

Definition at line 150 of file class.ilObjLTIConsumer.php.

References $mastery_score.

Referenced by load().

151  {
152  $this->mastery_score = $mastery_score;
153  }
+ Here is the caller graph for this function:

◆ setMasteryScorePercent()

ilObjLTIConsumer::setMasteryScorePercent ( float  $mastery_score_percent)
Parameters
float$mastery_score_percent

Definition at line 166 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initObject().

167  {
168  $this->mastery_score = $mastery_score_percent / 100;
169  }
+ Here is the caller graph for this function:

◆ setProvider()

ilObjLTIConsumer::setProvider ( ilLTIConsumeProvider  $provider)
Parameters
ilLTIConsumeProvider$provider

Definition at line 203 of file class.ilObjLTIConsumer.php.

References $provider.

Referenced by load().

204  {
205  $this->provider = $provider;
206  }
+ Here is the caller graph for this function:

◆ setProviderId()

ilObjLTIConsumer::setProviderId ( int  $providerId)
Parameters
int$providerId

Definition at line 182 of file class.ilObjLTIConsumer.php.

References $providerId.

Referenced by load().

183  {
184  $this->providerId = $providerId;
185  }
+ Here is the caller graph for this function:

◆ setStatementsReportEnabled()

ilObjLTIConsumer::setStatementsReportEnabled (   $statementsReportEnabled)
Parameters
bool$statementsReportEnabled

Definition at line 351 of file class.ilObjLTIConsumer.php.

References $statementsReportEnabled.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

352  {
353  $this->statementsReportEnabled = $statementsReportEnabled;
354  }
+ Here is the caller graph for this function:

◆ setUseXapi()

ilObjLTIConsumer::setUseXapi ( bool  $use_xapi)
Parameters
bool$use_xapi

Definition at line 307 of file class.ilObjLTIConsumer.php.

References $use_xapi.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

308  {
309  $this->use_xapi = $use_xapi;
310  }
+ Here is the caller graph for this function:

Field Documentation

◆ $_highscore_achieved_ts

ilObjLTIConsumer::$_highscore_achieved_ts = 1
protected

Definition at line 513 of file class.ilObjLTIConsumer.php.

Referenced by getHighscoreAchievedTS().

◆ $_highscore_enabled

ilObjLTIConsumer::$_highscore_enabled = 0
protected

Definition at line 503 of file class.ilObjLTIConsumer.php.

Referenced by getHighscoreEnabled().

◆ $_highscore_own_table

ilObjLTIConsumer::$_highscore_own_table = 1
protected

Definition at line 528 of file class.ilObjLTIConsumer.php.

Referenced by getHighscoreOwnTable().

◆ $_highscore_percentage

ilObjLTIConsumer::$_highscore_percentage = 1
protected

Definition at line 518 of file class.ilObjLTIConsumer.php.

Referenced by getHighscorePercentage().

◆ $_highscore_top_num

ilObjLTIConsumer::$_highscore_top_num = 10
protected

Definition at line 538 of file class.ilObjLTIConsumer.php.

Referenced by getHighscoreTopNum().

◆ $_highscore_top_table

ilObjLTIConsumer::$_highscore_top_table = 1
protected

Definition at line 533 of file class.ilObjLTIConsumer.php.

Referenced by getHighscoreTopTable().

◆ $_highscore_wtime

ilObjLTIConsumer::$_highscore_wtime = 1
protected

Definition at line 523 of file class.ilObjLTIConsumer.php.

Referenced by getHighscoreWTime().

◆ $activationEndingTime

ilObjLTIConsumer::$activationEndingTime
protected

Definition at line 23 of file class.ilObjLTIConsumer.php.

Referenced by getActivationEndingTime(), and setActivationEndingTime().

◆ $activationLimited

ilObjLTIConsumer::$activationLimited
protected

repository object activation settings (handled by ilObject)

Definition at line 21 of file class.ilObjLTIConsumer.php.

Referenced by isActivationLimited(), and setActivationLimited().

◆ $activationStartingTime

ilObjLTIConsumer::$activationStartingTime
protected

◆ $activationVisibility

ilObjLTIConsumer::$activationVisibility
protected

Definition at line 24 of file class.ilObjLTIConsumer.php.

Referenced by getActivationVisibility(), and setActivationVisibility().

◆ $anonymity

ilObjLTIConsumer::$anonymity = 0
protected

Definition at line 508 of file class.ilObjLTIConsumer.php.

◆ $custom_activity_id

ilObjLTIConsumer::$custom_activity_id = ''
protected

◆ $customLaunchKey

ilObjLTIConsumer::$customLaunchKey = ''
protected

Definition at line 54 of file class.ilObjLTIConsumer.php.

Referenced by getCustomLaunchKey(), and setCustomLaunchKey().

◆ $customLaunchSecret

ilObjLTIConsumer::$customLaunchSecret = ''
protected

Definition at line 58 of file class.ilObjLTIConsumer.php.

Referenced by getCustomLaunchSecret(), and setCustomLaunchSecret().

◆ $launchMethod

ilObjLTIConsumer::$launchMethod = self::LAUNCH_METHOD_NEW_WIN
protected

Definition at line 49 of file class.ilObjLTIConsumer.php.

Referenced by getLaunchMethod(), and setLaunchMethod().

◆ $mastery_score

ilObjLTIConsumer::$mastery_score = 0.5
protected

Definition at line 44 of file class.ilObjLTIConsumer.php.

Referenced by getMasteryScore(), and setMasteryScore().

◆ $provider

ilObjLTIConsumer::$provider = null
protected

Definition at line 34 of file class.ilObjLTIConsumer.php.

Referenced by getProvider(), and setProvider().

◆ $providerId

ilObjLTIConsumer::$providerId = 0
protected

Definition at line 29 of file class.ilObjLTIConsumer.php.

Referenced by getProviderId(), and setProviderId().

◆ $statementsReportEnabled

ilObjLTIConsumer::$statementsReportEnabled = false
protected

◆ $use_xapi

ilObjLTIConsumer::$use_xapi = false
protected

Definition at line 40 of file class.ilObjLTIConsumer.php.

Referenced by getUseXapi(), and setUseXapi().

◆ DB_TABLE_NAME

const ilObjLTIConsumer::DB_TABLE_NAME = 'lti_consumer_settings'

Definition at line 16 of file class.ilObjLTIConsumer.php.

◆ HIGHSCORE_SHOW_ALL_TABLES

const ilObjLTIConsumer::HIGHSCORE_SHOW_ALL_TABLES = 1

Definition at line 540 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initForm().

◆ HIGHSCORE_SHOW_OWN_TABLE

const ilObjLTIConsumer::HIGHSCORE_SHOW_OWN_TABLE = 3

Definition at line 542 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initForm().

◆ HIGHSCORE_SHOW_TOP_TABLE

const ilObjLTIConsumer::HIGHSCORE_SHOW_TOP_TABLE = 2

Definition at line 541 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initForm().

◆ LAUNCH_METHOD_EMBEDDED

const ilObjLTIConsumer::LAUNCH_METHOD_EMBEDDED = 'embedded'

Definition at line 38 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initForm().

◆ LAUNCH_METHOD_NEW_WIN

const ilObjLTIConsumer::LAUNCH_METHOD_NEW_WIN = 'newWin'

Definition at line 37 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initForm().

◆ LAUNCH_METHOD_OWN_WIN

const ilObjLTIConsumer::LAUNCH_METHOD_OWN_WIN = 'ownWin'

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

Referenced by ilLTIConsumerSettingsFormGUI\initForm().


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