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 @access public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 Read data from db. More...
 
 setRefId ($a_id)
 set reference id @access public More...
 
 getRefId ()
 get reference id @access public More...
 
 getType ()
 get object type @access public More...
 
 setType ($a_type)
 set object type @access public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title @access public More...
 
 getUntranslatedTitle ()
 get untranslated object title @access 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...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date @access public More...
 
 getLastUpdateDate ()
 get last update date @access public More...
 
 create ($a_clone_mode=false)
 
 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...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 delete ()
 
 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) @access public More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 cloneObject ($a_target_id, $a_copy_id=null, $a_omit_tree=false)
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
- Public Member Functions inherited from ilObject
 __construct ($a_id=0, $a_reference=true)
 Constructor @access 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 @access public More...
 
 setId ($a_id)
 set object id @access public More...
 
 setRefId ($a_id)
 set reference id @access public More...
 
 getRefId ()
 get reference id @access public More...
 
 getType ()
 get object type @access public More...
 
 setType ($a_type)
 set object type @access public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title @access public More...
 
 getUntranslatedTitle ()
 get untranslated object title @access 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 @access public More...
 
 getLastUpdateDate ()
 get last update date @access 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) @access 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)
 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 _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 _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@access public More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $a_show_path=true)
 Prepare copy wizard object selection. More...
 
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@access public 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.

66 {
67 parent::__construct($a_id, $a_reference);
68 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct().

+ 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.

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 getIdentAsId($userIdentMode, ilObjUser $user)
static signOAuth($a_params)
sign request data with OAuth
static getByKeys($a_obj_id, $a_usr_id, $a_create=false)
Get a result by object and user key.
getRefId()
get reference id @access public
getDescription()
get object description
getTitle()
get object title @access public
getId()
get object id @access public
$token
Definition: xapitoken.php:57
$DIC
Definition: xapitoken.php:46

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().

+ Here is the call graph for this function:

◆ dbTableName()

ilObjLTIConsumer::dbTableName ( )
protected

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

493 {
494 return self::DB_TABLE_NAME;
495 }

References DB_TABLE_NAME.

Referenced by save().

+ Here is the caller graph for this function:

◆ doRead()

ilObjLTIConsumer::doRead ( )

Reimplemented from ilObject2.

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

381 {
382 $this->load();
383 }

References load().

+ Here is the call graph for this function:

◆ doUpdate()

ilObjLTIConsumer::doUpdate ( )

Reimplemented from ilObject2.

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

421 {
422 $this->save();
423 }

References save().

+ 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().

+ 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().

+ Here is the caller graph for this function:

◆ getActivityId()

ilObjLTIConsumer::getActivityId ( )
Returns
string

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

331 : string
332 {
333 if (strlen($this->getProvider()->getXapiActivityId())) {
334 return $this->getProvider()->getXapiActivityId();
335 }
336
338 }

References $custom_activity_id, and getProvider().

+ Here is the call graph for this function:

◆ getCustomActivityId()

ilObjLTIConsumer::getCustomActivityId ( )
Returns
string

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

315 : string
316 {
318 }

References $custom_activity_id.

Referenced by save().

+ Here is the caller graph for this function:

◆ getCustomLaunchKey()

ilObjLTIConsumer::getCustomLaunchKey ( )
Returns
string

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

243 : string
244 {
246 }

References $customLaunchKey.

Referenced by getLaunchKey(), and save().

+ Here is the caller graph for this function:

◆ getCustomLaunchSecret()

ilObjLTIConsumer::getCustomLaunchSecret ( )
Returns
string

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

259 : string
260 {
262 }

References $customLaunchSecret.

Referenced by getLaunchSecret(), and save().

+ Here is the caller graph for this function:

◆ getCustomParams()

ilObjLTIConsumer::getCustomParams ( )
private
Returns
string[]

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

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

References $param, and getProvider().

Referenced by buildLaunchParameters().

+ 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.

583 {
584 return (bool) $this->_highscore_achieved_ts;
585 }

References $_highscore_achieved_ts.

Referenced by save().

+ 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.

562 {
563 return (bool) $this->_highscore_enabled;
564 }

References $_highscore_enabled.

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

+ Here is the caller graph for this function:

◆ getHighscoreMode()

ilObjLTIConsumer::getHighscoreMode ( )
Returns
int

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

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.

References getHighscoreOwnTable(), getHighscoreTopTable(), HIGHSCORE_SHOW_ALL_TABLES, HIGHSCORE_SHOW_OWN_TABLE, and HIGHSCORE_SHOW_TOP_TABLE.

+ 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.

643 {
644 return (bool) $this->_highscore_own_table;
645 }

References $_highscore_own_table.

Referenced by getHighscoreMode(), and save().

+ 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.

603 {
604 return (bool) $this->_highscore_percentage;
605 }

References $_highscore_percentage.

Referenced by save().

+ 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.

687 {
688 $retval = $a_retval;
689 if ((int) $this->_highscore_top_num != 0) {
691 }
692
693 return $retval;
694 }

References $_highscore_top_num.

Referenced by save().

+ 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.

663 {
664 return (bool) $this->_highscore_top_table;
665 }

References $_highscore_top_table.

Referenced by getHighscoreMode(), and save().

+ 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.

623 {
624 return (bool) $this->_highscore_wtime;
625 }

References $_highscore_wtime.

Referenced by save().

+ Here is the caller graph for this function:

◆ getLaunchKey()

ilObjLTIConsumer::getLaunchKey ( )
Returns
string

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

276 {
277 if ($this->getProvider()->isProviderKeyCustomizable()) {
278 return $this->getCustomLaunchKey();
279 }
280
281 return $this->getProvider()->getProviderKey();
282 }

References getCustomLaunchKey(), and getProvider().

Referenced by buildLaunchParameters().

+ 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.

227 : string
228 {
229 return $this->launchMethod;
230 }

References $launchMethod.

Referenced by buildLaunchParameters(), and save().

+ Here is the caller graph for this function:

◆ getLaunchSecret()

ilObjLTIConsumer::getLaunchSecret ( )
Returns
string

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

288 {
289 if ($this->getProvider()->isProviderKeyCustomizable()) {
290 return $this->getCustomLaunchSecret();
291 }
292
293 return $this->getProvider()->getProviderSecret();
294 }

References getCustomLaunchSecret(), and getProvider().

Referenced by buildLaunchParameters().

+ 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.

142 : float
143 {
145 }

References $mastery_score.

Referenced by save().

+ Here is the caller graph for this function:

◆ getMasteryScorePercent()

ilObjLTIConsumer::getMasteryScorePercent ( )
Returns
float

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

158 : float
159 {
160 return $this->mastery_score * 100;
161 }

Referenced by ilLTIConsumerPlaceholderValues\getMasteryScore().

+ Here is the caller graph for this function:

◆ getProvider()

ilObjLTIConsumer::getProvider ( )

◆ getProviderId()

ilObjLTIConsumer::getProviderId ( )
Returns
int

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

174 : int
175 {
176 return $this->providerId;
177 }

References $providerId.

Referenced by initProvider(), and save().

+ Here is the caller graph for this function:

◆ getUseXapi()

ilObjLTIConsumer::getUseXapi ( )
Returns
bool

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

299 : bool
300 {
301 return $this->use_xapi;
302 }

References $use_xapi.

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

+ Here is the caller graph for this function:

◆ initProvider()

ilObjLTIConsumer::initProvider ( )

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

188 {
189 $this->provider = new ilLTIConsumeProvider($this->getProviderId());
190 }

References getProviderId().

+ Here is the call graph for this function:

◆ initType()

ilObjLTIConsumer::initType ( )
protected

Reimplemented from ilObject2.

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.

79 {
81 }
$activationLimited
repository object activation settings (handled by ilObject)

References $activationLimited.

Referenced by saveRepositoryActivationSettings().

+ 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 }

References LAUNCH_METHOD_EMBEDDED.

◆ 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 }

References LAUNCH_METHOD_OWN_WIN.

◆ isStatementsReportEnabled()

ilObjLTIConsumer::isStatementsReportEnabled ( )
Returns
bool

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

References $statementsReportEnabled.

Referenced by save().

+ Here is the caller graph for this function:

◆ load()

ilObjLTIConsumer::load ( )

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

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 }
setCustomLaunchSecret(string $customLaunchSecret)
setHighscorePercentage($a_percentage)
Sets if the percentages of the scores pass should be shown.
setHighscoreTopTable($a_top_table)
Sets if the top-rankings table should be shown.
setHighscoreTopNum($a_top_num)
Sets the number of entries which are to be shown in the top-rankings table.
setProvider(ilLTIConsumeProvider $provider)
setHighscoreEnabled($a_enabled)
Sets if the highscore feature should be enabled.
setHighscoreAchievedTS($a_achieved_ts)
Sets if the date and time of the scores achievement should be displayed.
setHighscoreWTime($a_wtime)
Sets if the workingtime of the scores should be shown.
setLaunchMethod(string $launchMethod)
setStatementsReportEnabled($statementsReportEnabled)
setHighscoreOwnTable($a_own_table)
Sets if the table with the own ranking should be shown.
setCustomLaunchKey(string $customLaunchKey)
setProviderId(int $providerId)
setMasteryScore(float $mastery_score)
setCustomActivityId(string $custom_activity_id)
setUseXapi(bool $use_xapi)
$query
foreach($_POST as $key=> $value) $res

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().

+ 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.

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 }
setActivationLimited($activationLimited)
setActivationVisibility($activationVisibility)
setActivationStartingTime($activationStartingTime)
setActivationEndingTime($activationEndingTime)
static getItem($a_ref_id)
Get item data.

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

Referenced by load().

+ 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.

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 }
getHighscoreEnabled()
Gets the setting which determines if the highscore feature is enabled.
getHighscorePercentage()
Gets if the percentage column should be shown.
getHighscoreTopNum($a_retval=10)
Gets the number of entries which are to be shown in the top-rankings table.
getHighscoreAchievedTS()
Returns if date and time of the scores achievement should be displayed.
getHighscoreWTime()
Gets if the column with the workingtime should be shown.

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().

+ 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.

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 }
Class ilObjectActivation.
setTimingType($a_type)
Set timing type.

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

Referenced by save().

+ 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.

119 {
120 $this->activationEndingTime = $activationEndingTime;
121 }

References $activationEndingTime.

Referenced by loadRepositoryActivationSettings().

+ Here is the caller graph for this function:

◆ setActivationLimited()

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

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

87 {
88 $this->activationLimited = $activationLimited;
89 }

References $activationLimited.

Referenced by loadRepositoryActivationSettings().

+ Here is the caller graph for this function:

◆ setActivationStartingTime()

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

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

103 {
104 $this->activationStartingTime = $activationStartingTime;
105 }

References $activationStartingTime.

Referenced by loadRepositoryActivationSettings().

+ Here is the caller graph for this function:

◆ setActivationVisibility()

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

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

135 {
136 $this->activationVisibility = $activationVisibility;
137 }

References $activationVisibility.

Referenced by loadRepositoryActivationSettings().

+ 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.

324 {
325 $this->custom_activity_id = $custom_activity_id;
326 }

References $custom_activity_id.

Referenced by load().

+ 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.

252 {
253 $this->customLaunchKey = $customLaunchKey;
254 }

References $customLaunchKey.

Referenced by load().

+ 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.

268 {
269 $this->customLaunchSecret = $customLaunchSecret;
270 }

References $customLaunchSecret.

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

+ 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.

573 {
574 $this->_highscore_achieved_ts = (bool) $a_achieved_ts;
575 }

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

+ 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.

552 {
553 $this->_highscore_enabled = (bool) $a_enabled;
554 }

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

+ Here is the caller graph for this function:

◆ setHighscoreMode()

ilObjLTIConsumer::setHighscoreMode (   $mode)
Parameters
$modeint

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

721 {
722 switch ($mode) {
724 $this->setHighscoreTopTable(1);
725 $this->setHighscoreOwnTable(1);
726 break;
727
729 $this->setHighscoreTopTable(1);
730 $this->setHighscoreOwnTable(0);
731 break;
732
734 default:
735 $this->setHighscoreTopTable(0);
736 $this->setHighscoreOwnTable(1);
737 break;
738 }
739 }

References HIGHSCORE_SHOW_ALL_TABLES, HIGHSCORE_SHOW_OWN_TABLE, HIGHSCORE_SHOW_TOP_TABLE, setHighscoreOwnTable(), and setHighscoreTopTable().

Referenced by ilLTIConsumerSettingsFormGUI\initObject().

+ 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.

633 {
634 $this->_highscore_own_table = (bool) $a_own_table;
635 }

Referenced by load(), and setHighscoreMode().

+ 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.

593 {
594 $this->_highscore_percentage = (bool) $a_percentage;
595 }

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

+ 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.

674 {
675 $this->_highscore_top_num = (int) $a_top_num;
676 }

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

+ 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.

653 {
654 $this->_highscore_top_table = (bool) $a_top_table;
655 }

Referenced by load(), and setHighscoreMode().

+ 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.

613 {
614 $this->_highscore_wtime = (bool) $a_wtime;
615 }

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

+ 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.

236 {
237 $this->launchMethod = $launchMethod;
238 }

References $launchMethod.

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

+ 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.

151 {
152 $this->mastery_score = $mastery_score;
153 }

References $mastery_score.

Referenced by load().

+ 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.

167 {
168 $this->mastery_score = $mastery_score_percent / 100;
169 }

◆ setProvider()

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

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

204 {
205 $this->provider = $provider;
206 }

References $provider.

Referenced by load().

+ 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.

183 {
184 $this->providerId = $providerId;
185 }

References $providerId.

Referenced by load().

+ Here is the caller graph for this function:

◆ setStatementsReportEnabled()

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

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

352 {
353 $this->statementsReportEnabled = $statementsReportEnabled;
354 }

References $statementsReportEnabled.

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

+ 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.

308 {
309 $this->use_xapi = $use_xapi;
310 }

References $use_xapi.

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

+ 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.

Referenced by dbTableName().

◆ HIGHSCORE_SHOW_ALL_TABLES

const ilObjLTIConsumer::HIGHSCORE_SHOW_ALL_TABLES = 1

◆ HIGHSCORE_SHOW_OWN_TABLE

const ilObjLTIConsumer::HIGHSCORE_SHOW_OWN_TABLE = 3

◆ HIGHSCORE_SHOW_TOP_TABLE

const ilObjLTIConsumer::HIGHSCORE_SHOW_TOP_TABLE = 2

◆ LAUNCH_METHOD_EMBEDDED

const ilObjLTIConsumer::LAUNCH_METHOD_EMBEDDED = 'embedded'

◆ 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'

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