ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilObjCmiXapi Class Reference
+ Inheritance diagram for ilObjCmiXapi:
+ Collaboration diagram for ilObjCmiXapi:

Public Member Functions

 __construct (int $a_id=0, bool $a_reference=true)
 ilObjCmiXapi constructor. More...
 
 getLrsTypeId ()
 
 setLrsTypeId (int $lrsTypeId)
 
 getLrsType ()
 
 setLrsType (\ilCmiXapiLrsType $lrsType)
 
 initLrsType ()
 
 getContentType ()
 
 setContentType (string $contentType)
 
 isMixedContentType ()
 
 getSourceType ()
 
 isSourceTypeRemote ()
 
 isSourceTypeExternal ()
 
 setSourceType (string $sourceType)
 
 getActivityId ()
 
 setActivityId (string $activityId)
 
 getPublisherId ()
 
 setPublisherId (string $publisherId)
 
 getInstructions ()
 
 setInstructions (string $instructions)
 
 getLaunchUrl ()
 
 setLaunchUrl (string $launchUrl)
 
 getLaunchParameters ()
 
 setLaunchParameters (string $launchParameters)
 
 getMoveOn ()
 Attention: this is the original imported moveOn for using in LaunchData and LaunchStatement use getLMSMoveOn! More...
 
 setMoveOn (string $moveOn)
 Attention: this is the original moveOn from course import should only be set on import! More...
 
 getLPMode ()
 only for internal LMS usage More...
 
 getLMSMoveOn ()
 for CMI5 statements | state moveOn values More...
 
 getEntitlementKey ()
 
 setEntitlementKey (string $entitlementKey)
 
 isAuthFetchUrlEnabled ()
 
 setAuthFetchUrlEnabled (bool $authFetchUrlEnabled)
 
 getLaunchMethod ()
 
 setLaunchMethod (string $launchMethod)
 
 getLaunchMode ()
 
 setLaunchMode (string $launchMode)
 
 isSwitchToReviewEnabled ()
 
 getSwitchToReviewEnabled ()
 
 setSwitchToReviewEnabled (bool $switchToReviewEnabled)
 
 getMasteryScore ()
 
 setMasteryScore (float $masteryScore)
 
 getMasteryScorePercent ()
 
 setMasteryScorePercent (float $masteryScorePercent)
 
 isKeepLpStatusEnabled ()
 
 setKeepLpStatusEnabled (bool $keepLpStatusEnabled)
 
 getPrivacyIdent ()
 
 setPrivacyIdent (int $userIdent)
 
 getPrivacyName ()
 
 setPrivacyName (int $userName)
 
 getOnlyMoveon ()
 
 setOnlyMoveon (bool $only_moveon)
 
 getAchieved ()
 
 setAchieved (bool $achieved)
 
 getAnswered ()
 
 setAnswered (bool $answered)
 
 getCompleted ()
 
 setCompleted (bool $completed)
 
 getFailed ()
 
 setFailed (bool $failed)
 
 getInitialized ()
 
 setInitialized (bool $initialized)
 
 getPassed ()
 
 setPassed (bool $passed)
 
 getProgressed ()
 
 setProgressed (bool $progressed)
 
 getSatisfied ()
 
 setSatisfied (bool $satisfied)
 
 getTerminated ()
 
 setTerminated (bool $terminated)
 
 getHideData ()
 
 setHideData (bool $hide_data)
 
 getTimestamp ()
 
 setTimestamp (bool $timestamp)
 
 getDuration ()
 
 setDuration (bool $duration)
 
 getNoSubstatements ()
 
 setNoSubstatements (bool $no_substatements)
 
 getDeleteData ()
 
 setDeleteData (int $deleteData)
 
 getUserPrivacyComment ()
 
 setUserPrivacyComment (string $userPrivacyComment)
 
 isStatementsReportEnabled ()
 
 setStatementsReportEnabled (bool $statementsReportEnabled)
 
 getXmlManifest ()
 
 setXmlManifest (string $xmlManifest)
 
 getVersion ()
 
 setVersion (int $version)
 
 isBypassProxyEnabled ()
 
 setBypassProxyEnabled (bool $bypassProxyEnabled)
 
 save ()
 
 setHighscoreEnabled (bool $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 (bool $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 (bool $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 (bool $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 (bool $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 (bool $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 (int $a_top_num)
 Sets the number of entries which are to be shown in the top-rankings table. More...
 
 getHighscoreTopNum (?int $a_retval=10)
 Gets the number of entries which are to be shown in the top-rankings table. More...
 
 getHighscoreMode ()
 
 setHighscoreMode (int $mode)
 
 getDataSetMapping ()
 
 getCurrentCmixUser ()
 
 getSessionId (?ilCmiXapiUser $cmixUser=null)
 
 getLaunchData (?ilCmiXapiUser $cmixUser=null, string $lang='en')
 LMS.LaunchData. More...
 
 getLaunchedContextTemplate (?ilCmiXapiUser $cmixUser=null)
 
 getStatement (string $verb, ?ilCmiXapiUser $cmixUser=null)
 blueprint statement More...
 
 getStatementActor (?ilCmiXapiUser $cmixUser=null)
 statement actor More...
 
 getStatementExtensions (?ilCmiXapiUser $cmixUser=null)
 Minimal extensions. More...
 
 getStatementContextActivities ()
 Minimal statementActivities. More...
 
 getStatementObject ()
 
 getLaunchedStatement (?ilCmiXapiUser $cmixUser=null)
 
 getAbandonedStatement (?string $sessionId, ?string $duration, ?ilCmiXapiUser $cmixUser=null)
 
 getSatisfiedStatement (?ilCmiXapiUser $cmixUser=null)
 
 getLastStatement (string $sess)
 get latest statement from session More...
 
 getLastStatementPipline (string $sess)
 
 isActivationLimited ()
 
 setActivationLimited (bool $activationLimited)
 
 getActivationStartingTime ()
 
 setActivationStartingTime (?int $activationStartingTime=null)
 
 getActivationEndingTime ()
 
 setActivationEndingTime (?int $activationEndingTime=null)
 
 getActivationVisibility ()
 
 setActivationVisibility (bool $activationVisibility)
 
- Public Member Functions inherited from ilObject2
 __construct (int $a_id=0, bool $a_reference=true)
 Constructor. More...
 
 read ()
 
 create (bool $a_clone_mode=false)
 
 update ()
 
 delete ()
 
 cloneMetaData (ilObject $target_obj)
 
 cloneObject (int $target_id, int $copy_id=0, bool $omit_tree=false)
 
- Public Member Functions inherited from ilObject
 getObjectProperties ()
 
 flushObjectProperties ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 processAutoRating ()
 
 read ()
 
 getId ()
 
 setId (int $id)
 
 setRefId (int $ref_id)
 
 getRefId ()
 
 getType ()
 
 setType (string $type)
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 
 getUntranslatedTitle ()
 Get untranslated object title WebDAV needs to access the untranslated title of an object. More...
 
 setTitle (string $title)
 
 getDescription ()
 
 setDescription (string $description)
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 
 setImportId (string $import_id)
 
 setOfflineStatus (bool $status)
 
 getOfflineStatus ()
 
 supportsOfflineHandling ()
 
 getOwner ()
 
 getOwnerName ()
 get full name of object owner More...
 
 setOwner (int $usr_id)
 
 getCreateDate ()
 Get create date in YYYY-MM-DD HH-MM-SS format. More...
 
 getLastUpdateDate ()
 Get last update date in YYYY-MM-DD HH-MM-SS format. More...
 
 create ()
 note: title, description and type should be set when this function is called More...
 
 update ()
 
 MDUpdateListener (string $element)
 Metadata update listener. More...
 
 createMetaData ()
 
 updateMetaData ()
 
 deleteMetaData ()
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree (int $parent_ref_id)
 maybe this method should be in tree object!? More...
 
 setPermissions (int $parent_ref_id)
 
 setParentRolePermissions (int $parent_ref_id)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! 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. More...
 
 applyDidacticTemplate (int $tpl_id)
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo (int $target_id, int $copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies (int $target_id, int $copy_id)
 Clone object dependencies. More...
 
 cloneMetaData (ilObject $target_obj)
 Copy meta data. More...
 
 selfOrParentWithRatingEnabled ()
 
 getPossibleSubObjects (bool $filter=true)
 get all possible sub objects of this type the object can decide which types of sub objects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static getInstance (int $a_id=0, bool $a_reference=true)
 
static updatePrivacySettingsFromLrsType (ilCmiXapiLrsType $lrsType)
 
static updateByPassProxyFromLrsType (ilCmiXapiLrsType $lrsType)
 
static getObjectsHavingBypassProxyEnabledAndRegisteredUsers ()
 
static guidv4 (?string $data=null)
 
static iliasUrl ()
 
static log ()
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId (string $import_id)
 Get (latest) object id for an import id. More...
 
static _lookupImportId (int $obj_id)
 
static _lookupOwnerName (int $owner_id)
 Lookup owner name for owner id. More...
 
static _getIdForImportId (string $import_id)
 
static _getAllReferences (int $id)
 get all reference ids for object ID More...
 
static _lookupTitle (int $obj_id)
 
static lookupOfflineStatus (int $obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner (int $obj_id)
 Lookup owner user ID for object ID. More...
 
static _getIdsForTitle (string $title, string $type='', bool $partial_match=false)
 
static _lookupDescription (int $obj_id)
 
static _lookupLastUpdate (int $obj_id, bool $formatted=false)
 
static _getLastUpdateOfObjects (array $obj_ids)
 
static _lookupObjId (int $ref_id)
 
static _setDeletedDate (int $ref_id, int $deleted_by)
 
static setDeletedDates (array $ref_ids, int $user_id)
 
static _resetDeletedDate (int $ref_id)
 
static _lookupDeletedDate (int $ref_id)
 
static _writeTitle (int $obj_id, string $title)
 write title to db (static) More...
 
static _writeDescription (int $obj_id, string $desc)
 write description to db (static) More...
 
static _writeImportId (int $obj_id, string $import_id)
 write import id to db (static) More...
 
static _lookupType (int $id, bool $reference=false)
 
static _isInTrash (int $ref_id)
 
static _hasUntrashedReference (int $obj_id)
 checks whether an object has at least one reference that is not in trash More...
 
static _lookupObjectId (int $ref_id)
 
static _getObjectsDataForType (string $type, bool $omit_trash=false)
 get all objects of a certain type More...
 
static _exists (int $id, bool $reference=false, ?string $type=null)
 checks if an object exists in object_data More...
 
static _getObjectsByType (string $obj_type="", ?int $owner=null)
 
static _prepareCloneSelection (array $ref_ids, string $new_type, bool $show_path=true)
 Prepare copy wizard object selection. More...
 
static getIconForType (string $type)
 
static _getIcon (int $obj_id=0, string $size="big", string $type="", bool $offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (array &$deps, int $ref_id, int $obj_id, string $type, int $depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies (int $obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $obj_ids)
 
static getAllOwnedRepositoryObjects (int $user_id)
 
static fixMissingTitles ($type, array &$obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate (int $obj_id)
 
static _getObjectTypeIdByTitle (string $type, ?\ilDBInterface $ilDB=null)
 

Data Fields

const PLUGIN = false
 
const DB_TABLE_NAME = 'cmix_settings'
 
const DB_USERS_TABLE_NAME = 'cmix_users'
 
const DB_RESULTS_TABLE_NAME = 'cmix_results'
 
const CONT_TYPE_GENERIC = 'generic'
 
const CONT_TYPE_CMI5 = 'cmi5'
 
const SRC_TYPE_REMOTE = 'remoteSource'
 
const SRC_TYPE_LOCAL = 'localSource'
 
const SRC_TYPE_EXTERNAL = 'externalSource'
 
const ANONYMOUS_HOMEPAGE = 'https://example.org'
 
const LAUNCH_METHOD_OWN_WIN = 'ownWin'
 
const LAUNCH_METHOD_NEW_WIN = 'newWin'
 
const LAUNCH_METHOD_IFRAME = 'iframe'
 
const LAUNCH_MODE_NORMAL = 'Normal'
 
const LAUNCH_MODE_BROWSE = 'Browse'
 
const LAUNCH_MODE_REVIEW = 'Review'
 
const LMS_MASTERY_SCORE = 0.7
 
const PRIVACY_IDENT_IL_UUID_USER_ID = 0
 
const PRIVACY_IDENT_IL_UUID_EXT_ACCOUNT = 1
 
const PRIVACY_IDENT_IL_UUID_LOGIN = 2
 
const PRIVACY_IDENT_REAL_EMAIL = 3
 
const PRIVACY_IDENT_IL_UUID_RANDOM = 4
 
const PRIVACY_IDENT_IL_UUID_SHA256 = 5
 
const PRIVACY_IDENT_IL_UUID_SHA256URL = 6
 
const PRIVACY_NAME_NONE = 0
 
const PRIVACY_NAME_FIRSTNAME = 1
 
const PRIVACY_NAME_LASTNAME = 2
 
const PRIVACY_NAME_FULLNAME = 3
 
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
 
const DESC_LENGTH = 128
 
const LONG_DESC_LENGTH = 4000
 
const TABLE_OBJECT_DATA = "object_data"
 
array $objectList
 
string $untranslatedTitle
 

Protected Member Functions

 initType ()
 
 doRead ()
 
 load ()
 
 doUpdate ()
 
 loadRepositoryActivationSettings ()
 
 saveRepositoryActivationSettings ()
 
 doCloneObject (ilObject2 $new_obj, int $a_target_id, ?int $a_copy_id=null)
 
 doDelete ()
 
- Protected Member Functions inherited from ilObject2
 initType ()
 
 doRead ()
 
 doCreate (bool $clone_mode=false)
 
 beforeCreate ()
 If overwritten this method should return true, there is currently no "abort" handling for cases where "false" is returned. More...
 
 doUpdate ()
 
 beforeUpdate ()
 
 doDelete ()
 
 beforeDelete ()
 
 doCloneObject (ilObject2 $new_obj, int $a_target_id, ?int $a_copy_id=null)
 
 beforeCloneObject ()
 
- Protected Member Functions inherited from ilObject
 doMDUpdateListener (string $a_element)
 
 beforeMDUpdateListener (string $a_element)
 
 doCreateMetaData ()
 
 beforeCreateMetaData ()
 
 doUpdateMetaData ()
 
 beforeUpdateMetaData ()
 
 doDeleteMetaData ()
 
 beforeDeleteMetaData ()
 
 handleAutoRating ()
 
 hasAutoRating ()
 

Protected Attributes

bool $activationLimited = null
 repository object activation settings (handled by ilObject) More...
 
int $activationStartingTime = null
 
int $activationEndingTime = null
 
bool $activationVisibility = null
 
int $lrsTypeId
 
ilCmiXapiLrsType $lrsType
 
string $contentType
 
string $sourceType
 
string $activityId
 
string $publisherId
 
string $instructions
 
string $launchUrl
 
string $launchParameters
 
string $moveOn
 
string $entitlementKey
 
bool $authFetchUrlEnabled = false
 
bool $anonymousHomePage = false
 
string $launchMethod
 
string $launchMode
 
bool $switchToReviewEnabled = false
 
float $masteryScore
 
bool $keepLpStatusEnabled = false
 
int $userIdent
 
int $userName
 
string $userPrivacyComment = ""
 
bool $statementsReportEnabled = false
 
string $xmlManifest = ""
 
int $version
 
bool $bypassProxyEnabled = false
 
bool $only_moveon = false
 
bool $achieved = true
 
bool $answered = true
 
bool $completed = true
 
bool $failed = true
 
bool $initialized = true
 
bool $passed = true
 
bool $progressed = true
 
bool $satisfied = true
 
bool $terminated = true
 
bool $hide_data = false
 
bool $timestamp = false
 
bool $duration = true
 
bool $no_substatements = false
 
int $deleteData = 0
 
ilCmiXapiUser $currentCmixUser = null
 
bool $_highscore_enabled = false
 HIGHSCORE. More...
 
int $anonymity = 0
 
bool $_highscore_achieved_ts = true
 
bool $_highscore_percentage = true
 
bool $_highscore_wtime = true
 
bool $_highscore_own_table = true
 
bool $_highscore_top_table = true
 
int $_highscore_top_num = 10
 
- Protected Attributes inherited from ilObject
ilLogger $obj_log
 
ILIAS $ilias
 
ilObjectDefinition $obj_definition
 
ilDBInterface $db
 
ilLogger $log
 
ilErrorHandling $error
 
ilTree $tree
 
ilAppEventHandler $app_event_handler
 
ilRbacAdmin $rbac_admin
 
ilRbacReview $rbac_review
 
ilObjUser $user
 
ilLanguage $lng
 
LOMServices $lom_services
 
bool $call_by_reference
 
int $max_title = self::TITLE_LENGTH
 
int $max_desc = self::DESC_LENGTH
 
bool $add_dots = true
 
int $ref_id = null
 
string $type = ""
 
string $title = ""
 
string $desc = ""
 
string $long_desc = ""
 
int $owner = 0
 
string $create_date = ""
 
string $last_update = ""
 
string $import_id = ""
 
bool $register = false
 

Private Attributes

ilDBInterface $database
 

Detailed Description

Definition at line 30 of file class.ilObjCmiXapi.php.

Constructor & Destructor Documentation

◆ __construct()

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

ilObjCmiXapi constructor.

Definition at line 157 of file class.ilObjCmiXapi.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and null.

158  {
159  global $DIC;
160  $this->database = $DIC->database();
161 
162  $this->lrsTypeId = 0;
163 
164  $this->contentType = self::CONT_TYPE_GENERIC;
165  $this->sourceType = self::SRC_TYPE_REMOTE;
166 
167  $this->activityId = '';
168 
169  $this->publisherId = '';
170 
171  $this->instructions = '';
172 
173  $this->launchUrl = '';
174  $this->launchParameters = '';
175  $this->moveOn = '';
176  $this->entitlementKey = '';
177 
178  $this->authFetchUrlEnabled = false;
179 
180  $this->launchMethod = self::LAUNCH_METHOD_NEW_WIN;
181  $this->launchMode = self::LAUNCH_MODE_NORMAL;
182 
183  $this->switchToReviewEnabled = true;
184 
185  $this->masteryScore = self::LMS_MASTERY_SCORE;
186  $this->keepLpStatusEnabled = true;
187 
188  $this->userIdent = self::PRIVACY_IDENT_IL_UUID_USER_ID;
189  $this->userName = self::PRIVACY_NAME_NONE;
190  $this->userPrivacyComment = '';
191 
192  $this->currentCmixUser = null;
193 
194  $this->statementsReportEnabled = false;
195 
196  $this->xmlManifest = '';
197  $this->version = 0;
198 
199  $this->bypassProxyEnabled = false;
200 
201  parent::__construct($a_id, $a_reference);
202  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ doCloneObject()

ilObjCmiXapi::doCloneObject ( ilObject2  $new_obj,
int  $a_target_id,
?int  $a_copy_id = null 
)
protected
Exceptions

Definition at line 1246 of file class.ilObjCmiXapi.php.

References ilObject2\cloneMetaData(), getAchieved(), getActivityId(), getAnswered(), getCompleted(), getContentType(), getDeleteData(), getDuration(), getEntitlementKey(), getFailed(), getHideData(), getHighscoreAchievedTS(), getHighscoreEnabled(), getHighscoreOwnTable(), getHighscorePercentage(), getHighscoreTopNum(), getHighscoreTopTable(), getHighscoreWTime(), getInitialized(), getInstructions(), getLaunchMethod(), getLaunchMode(), getLaunchParameters(), getLaunchUrl(), getLrsTypeId(), getMasteryScore(), getMoveOn(), getNoSubstatements(), getOnlyMoveon(), getPassed(), getPrivacyIdent(), getPrivacyName(), getProgressed(), getPublisherId(), getSatisfied(), getSourceType(), getTerminated(), getTimestamp(), getUserPrivacyComment(), getVersion(), ilFileUtils\getWebspaceDir(), getXmlManifest(), isAuthFetchUrlEnabled(), isBypassProxyEnabled(), isKeepLpStatusEnabled(), isStatementsReportEnabled(), isSwitchToReviewEnabled(), ilFileUtils\rCopy(), and ilObject2\update().

1246  : void
1247  {
1248  assert($new_obj instanceof ilObjCmiXapi);
1249 
1250  $this->cloneMetaData($new_obj);
1251 
1252  $new_obj->setLrsTypeId($this->getLrsTypeId());
1253  $new_obj->setContentType($this->getContentType());
1254  $new_obj->setSourceType($this->getSourceType());
1255  $new_obj->setActivityId($this->getActivityId());
1256  $new_obj->setPublisherId($this->getPublisherId());
1257  $new_obj->setInstructions($this->getInstructions());
1258  $new_obj->setLaunchUrl($this->getLaunchUrl());
1259  $new_obj->setLaunchParameters($this->getLaunchParameters());
1260  $new_obj->setMoveOn($this->getMoveOn());
1261  $new_obj->setEntitlementKey($this->getEntitlementKey());
1262  $new_obj->setAuthFetchUrlEnabled($this->isAuthFetchUrlEnabled());
1263  $new_obj->setLaunchMethod($this->getLaunchMethod());
1264  $new_obj->setLaunchMode($this->getLaunchMode());
1265  $new_obj->setSwitchToReviewEnabled($this->isSwitchToReviewEnabled());
1266  $new_obj->setMasteryScore($this->getMasteryScore());
1267  $new_obj->setKeepLpStatusEnabled($this->isKeepLpStatusEnabled());
1268  $new_obj->setPrivacyIdent($this->getPrivacyIdent());
1269  $new_obj->setPrivacyName($this->getPrivacyName());
1270  $new_obj->setUserPrivacyComment($this->getUserPrivacyComment());
1271  $new_obj->setStatementsReportEnabled($this->isStatementsReportEnabled());
1272  $new_obj->setXmlManifest($this->getXmlManifest());
1273  $new_obj->setVersion($this->getVersion());
1274  $new_obj->setHighscoreEnabled($this->getHighscoreEnabled());
1275  $new_obj->setHighscoreAchievedTS($this->getHighscoreAchievedTS());
1276  $new_obj->setHighscorePercentage($this->getHighscorePercentage());
1277  $new_obj->setHighscoreWTime($this->getHighscoreWTime());
1278  $new_obj->setHighscoreOwnTable($this->getHighscoreOwnTable());
1279  $new_obj->setHighscoreTopTable($this->getHighscoreTopTable());
1280  $new_obj->setHighscoreTopNum($this->getHighscoreTopNum());
1281  $new_obj->setBypassProxyEnabled($this->isBypassProxyEnabled());
1282  $new_obj->setOnlyMoveon($this->getOnlyMoveon());
1283  $new_obj->setAchieved($this->getAchieved());
1284  $new_obj->setAnswered($this->getAnswered());
1285  $new_obj->setCompleted($this->getCompleted());
1286  $new_obj->setFailed($this->getFailed());
1287  $new_obj->setInitialized($this->getInitialized());
1288  $new_obj->setPassed($this->getPassed());
1289  $new_obj->setProgressed($this->getProgressed());
1290  $new_obj->setSatisfied($this->getSatisfied());
1291  $new_obj->setTerminated($this->getTerminated());
1292  $new_obj->setHideData($this->getHideData());
1293  $new_obj->setTimestamp($this->getTimestamp());
1294  $new_obj->setDuration($this->getDuration());
1295  $new_obj->setNoSubstatements($this->getNoSubstatements());
1296  $new_obj->setDeleteData($this->getDeleteData());
1297  $new_obj->update();
1298 
1299  if ($this->getSourceType() == self::SRC_TYPE_LOCAL) {
1300  $dirUtil = new ilCmiXapiContentUploadImporter($new_obj);
1301  $dirUtil->ensureCreatedObjectDirectory();
1302  $newDir = implode(DIRECTORY_SEPARATOR, [ilFileUtils::getWebspaceDir(), $dirUtil->getWebDataDirRelativeObjectDirectory()]);
1303  $dirUtil = new ilCmiXapiContentUploadImporter($this);
1304  $thisDir = implode(DIRECTORY_SEPARATOR, [ilFileUtils::getWebspaceDir(), $dirUtil->getWebDataDirRelativeObjectDirectory()]);
1305  ilFileUtils::rCopy($thisDir, $newDir);
1306  }
1307  }
static getWebspaceDir(string $mode="filesystem")
get webspace directory
getHighscoreTopTable()
Gets, if the top-rankings table should be shown.
cloneMetaData(ilObject $target_obj)
getHighscoreWTime()
Gets if the column with the workingtime should be shown.
static rCopy(string $a_sdir, string $a_tdir, bool $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
getHighscoreTopNum(?int $a_retval=10)
Gets the number of entries which are to be shown in the top-rankings table.
getHighscoreOwnTable()
Gets if the own rankings table should be shown.
getMoveOn()
Attention: this is the original imported moveOn for using in LaunchData and LaunchStatement use getLM...
getHighscoreEnabled()
Gets the setting which determines if the highscore feature is enabled.
getHighscorePercentage()
Gets if the percentage column should be shown.
getHighscoreAchievedTS()
Returns if date and time of the scores achievement should be displayed.
+ Here is the call graph for this function:

◆ doDelete()

ilObjCmiXapi::doDelete ( )
protected

Definition at line 1309 of file class.ilObjCmiXapi.php.

References ilHistory\_removeEntriesForObject(), ilFileUtils\delDir(), ilObject\deleteMetaData(), ilObject\getId(), and ilFileUtils\getWebspaceDir().

1309  : void
1310  {
1311  // delete file data entry
1312  $query = "DELETE FROM " . self::DB_TABLE_NAME . " WHERE obj_id = " . $this->database->quote($this->getId(), 'integer');
1313  $this->database->manipulate($query);
1315 
1316  // delete entire directory and its content
1317  $dirUtil = new ilCmiXapiContentUploadImporter($this);
1318  $thisDir = implode(DIRECTORY_SEPARATOR, [ilFileUtils::getWebspaceDir(), $dirUtil->getWebDataDirRelativeObjectDirectory()]);
1319  if (is_dir($thisDir)) {
1320  ilFileUtils::delDir($thisDir);
1321  }
1322 
1323  // delete meta data
1324  $this->deleteMetaData();
1325 
1326  //delete results
1327  $query = "DELETE FROM " . self::DB_RESULTS_TABLE_NAME .
1328  " WHERE obj_id = " . $this->database->quote($this->getId(), 'integer');
1329  $this->database->manipulate($query);
1330 
1331  // TODO check xapidel
1332  }
static getWebspaceDir(string $mode="filesystem")
get webspace directory
static _removeEntriesForObject(int $a_obj_id)
remove all history entries for an object
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
+ Here is the call graph for this function:

◆ doRead()

ilObjCmiXapi::doRead ( )
protected

Definition at line 693 of file class.ilObjCmiXapi.php.

References load().

Referenced by getDataSetMapping().

693  : void
694  {
695  $this->load();
696  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doUpdate()

ilObjCmiXapi::doUpdate ( )
protected

Definition at line 770 of file class.ilObjCmiXapi.php.

References save().

770  : void
771  {
772  $this->save();
773  }
+ Here is the call graph for this function:

◆ getAbandonedStatement()

ilObjCmiXapi::getAbandonedStatement ( ?string  $sessionId,
?string  $duration,
?ilCmiXapiUser  $cmixUser = null 
)
Returns
array<string, mixed>
Exceptions
Exception

Definition at line 1658 of file class.ilObjCmiXapi.php.

References getCurrentCmixUser(), getStatement(), and null.

1658  : array
1659  {
1660  if (null === $cmixUser) {
1661  $cmixUser = $this->getCurrentCmixUser();
1662  }
1663  $statement = $this->getStatement('abandoned', $cmixUser);
1664  // overwrite session with abandoned oldSession
1665  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/sessionid'] = $sessionId;
1666  $statement['result'] = array(
1667  'duration' => $duration
1668  );
1669  return $statement;
1670  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getStatement(string $verb, ?ilCmiXapiUser $cmixUser=null)
blueprint statement
+ Here is the call graph for this function:

◆ getAchieved()

ilObjCmiXapi::getAchieved ( )

Definition at line 502 of file class.ilObjCmiXapi.php.

References $achieved.

Referenced by doCloneObject(), getDataSetMapping(), and save().

502  : bool
503  {
504  return $this->achieved;
505  }
+ Here is the caller graph for this function:

◆ getActivationEndingTime()

ilObjCmiXapi::getActivationEndingTime ( )

Definition at line 1825 of file class.ilObjCmiXapi.php.

References $activationEndingTime.

Referenced by saveRepositoryActivationSettings().

1825  : ?int
1826  {
1828  }
+ Here is the caller graph for this function:

◆ getActivationStartingTime()

ilObjCmiXapi::getActivationStartingTime ( )

Definition at line 1815 of file class.ilObjCmiXapi.php.

References $activationStartingTime.

Referenced by saveRepositoryActivationSettings().

1815  : ?int
1816  {
1818  }
+ Here is the caller graph for this function:

◆ getActivationVisibility()

ilObjCmiXapi::getActivationVisibility ( )

Definition at line 1835 of file class.ilObjCmiXapi.php.

References $activationVisibility.

Referenced by saveRepositoryActivationSettings().

1835  : ?bool
1836  {
1838  }
+ Here is the caller graph for this function:

◆ getActivityId()

ilObjCmiXapi::getActivityId ( )

Definition at line 282 of file class.ilObjCmiXapi.php.

References $activityId.

Referenced by doCloneObject(), getDataSetMapping(), getLastStatementPipline(), getStatementContextActivities(), getStatementExtensions(), getStatementObject(), and save().

282  : string
283  {
284  return $this->activityId;
285  }
+ Here is the caller graph for this function:

◆ getAnswered()

ilObjCmiXapi::getAnswered ( )

Definition at line 512 of file class.ilObjCmiXapi.php.

References $answered.

Referenced by doCloneObject(), getDataSetMapping(), and save().

512  : bool
513  {
514  return $this->answered;
515  }
+ Here is the caller graph for this function:

◆ getCompleted()

ilObjCmiXapi::getCompleted ( )

Definition at line 522 of file class.ilObjCmiXapi.php.

References $completed.

Referenced by doCloneObject(), getDataSetMapping(), and save().

522  : bool
523  {
524  return $this->completed;
525  }
+ Here is the caller graph for this function:

◆ getContentType()

ilObjCmiXapi::getContentType ( )

Definition at line 240 of file class.ilObjCmiXapi.php.

References $contentType.

Referenced by doCloneObject(), getDataSetMapping(), getLastStatementPipline(), getStatementActor(), isMixedContentType(), and save().

240  : string
241  {
242  return $this->contentType;
243  }
+ Here is the caller graph for this function:

◆ getCurrentCmixUser()

ilObjCmiXapi::getCurrentCmixUser ( )

Definition at line 1370 of file class.ilObjCmiXapi.php.

References $currentCmixUser, $DIC, ilObject\getId(), getPrivacyIdent(), and null.

Referenced by getAbandonedStatement(), getLaunchData(), getLaunchedContextTemplate(), getLaunchedStatement(), getSatisfiedStatement(), getSessionId(), getStatement(), getStatementActor(), and getStatementExtensions().

1370  : \ilCmiXapiUser
1371  {
1372  global $DIC;
1373  if (null === $this->currentCmixUser) {
1374  $this->currentCmixUser = new ilCmiXapiUser($this->getId(), $DIC->user()->getId(), $this->getPrivacyIdent());
1375  }
1376  return $this->currentCmixUser;
1377  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:22
ilCmiXapiUser $currentCmixUser
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDataSetMapping()

ilObjCmiXapi::getDataSetMapping ( )
Returns
array<string, float>|array<string, int>|array<string, string>

Definition at line 1186 of file class.ilObjCmiXapi.php.

References doRead(), getAchieved(), getActivityId(), getAnswered(), getCompleted(), getContentType(), getDeleteData(), getDuration(), getEntitlementKey(), getFailed(), getHideData(), getHighscoreAchievedTS(), getHighscoreEnabled(), getHighscoreOwnTable(), getHighscorePercentage(), getHighscoreTopNum(), getHighscoreTopTable(), getHighscoreWTime(), ilObject\getId(), getInitialized(), getInstructions(), getLaunchMethod(), getLaunchMode(), getLaunchParameters(), getLaunchUrl(), getLrsTypeId(), getMasteryScore(), getMoveOn(), getNoSubstatements(), getOnlyMoveon(), getPassed(), getPrivacyIdent(), getPrivacyName(), getProgressed(), getPublisherId(), getSatisfied(), getSourceType(), getTerminated(), getTimestamp(), getUserPrivacyComment(), getVersion(), getXmlManifest(), ILIAS\Repository\int(), isAuthFetchUrlEnabled(), isKeepLpStatusEnabled(), isStatementsReportEnabled(), isSwitchToReviewEnabled(), and null.

1186  : array
1187  {
1188  if (null === ($lrsTypeId = $this->getLrsTypeId())) {
1189  $this->doRead();
1190  }
1191  return [
1192  'obj_id' => $this->getId(),
1193  'lrs_type_id' => $this->getLrsTypeId(),
1194  'content_type' => $this->getContentType(),
1195  'source_type' => $this->getSourceType(),
1196  'activity_id' => $this->getActivityId(),
1197  'publisher_id' => $this->getPublisherId(),
1198  'instructions' => $this->getInstructions(),
1199  'launch_url' => $this->getLaunchUrl(),
1200  'launch_parameters' => $this->getLaunchParameters(),
1201  'moveon' => $this->getMoveOn(),
1202  'entitlement_key' => $this->getEntitlementKey(),
1203  'auth_fetch_url' => (int) $this->isAuthFetchUrlEnabled(),
1204  'launch_method' => $this->getLaunchMethod(),
1205  'launch_mode' => $this->getLaunchMode(),
1206  'switch_to_review' => (int) $this->isSwitchToReviewEnabled(),
1207  'mastery_score' => $this->getMasteryScore(),
1208  'keep_lp' => (int) $this->isKeepLpStatusEnabled(),
1209  'privacy_ident' => $this->getPrivacyIdent(),
1210  'privacy_name' => $this->getPrivacyName(),
1211  'usr_privacy_comment' => $this->getUserPrivacyComment(),
1212  'show_statements' => (int) $this->isStatementsReportEnabled(),
1213  'xml_manifest' => $this->getXmlManifest(),
1214  'version' => $this->getVersion(),
1215  'highscore_enabled' => (int) $this->getHighscoreEnabled(),
1216  'highscore_achieved_ts' => (int) $this->getHighscoreAchievedTS(),
1217  'highscore_percentage' => (int) $this->getHighscorePercentage(),
1218  'highscore_wtime' => (int) $this->getHighscoreWTime(),
1219  'highscore_own_table' => (int) $this->getHighscoreOwnTable(),
1220  'highscore_top_table' => (int) $this->getHighscoreTopTable(),
1221  'highscore_top_num' => $this->getHighscoreTopNum(),
1222  'only_moveon' => (int) $this->getOnlyMoveon(),
1223  'achieved' => (int) $this->getAchieved(),
1224  'answered' => (int) $this->getAnswered(),
1225  'completed' => (int) $this->getCompleted(),
1226  'failed' => (int) $this->getFailed(),
1227  'initialized' => (int) $this->getInitialized(),
1228  'passed' => (int) $this->getPassed(),
1229  'progressed' => (int) $this->getProgressed(),
1230  'satisfied' => (int) $this->getSatisfied(),
1231  'c_terminated' => (int) $this->getTerminated(),
1232  'hide_data' => (int) $this->getHideData(),
1233  'c_timestamp' => (int) $this->getTimestamp(),
1234  'duration' => (int) $this->getDuration(),
1235  'no_substatements' => (int) $this->getNoSubstatements(),
1236  'delete_data' => (int) $this->getDeleteData()
1237  //'bypass_proxy' => (int) $this->isBypassProxyEnabled()
1238  ];
1239  }
getHighscoreTopTable()
Gets, if the top-rankings table should be shown.
getHighscoreWTime()
Gets if the column with the workingtime should be shown.
getHighscoreTopNum(?int $a_retval=10)
Gets the number of entries which are to be shown in the top-rankings table.
getHighscoreOwnTable()
Gets if the own rankings table should be shown.
getMoveOn()
Attention: this is the original imported moveOn for using in LaunchData and LaunchStatement use getLM...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getHighscoreEnabled()
Gets the setting which determines if the highscore feature is enabled.
getHighscorePercentage()
Gets if the percentage column should be shown.
getHighscoreAchievedTS()
Returns if date and time of the scores achievement should be displayed.
+ Here is the call graph for this function:

◆ getDeleteData()

ilObjCmiXapi::getDeleteData ( )

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

References $deleteData.

Referenced by doCloneObject(), getDataSetMapping(), and save().

632  : int
633  {
634  return $this->deleteData;
635  }
+ Here is the caller graph for this function:

◆ getDuration()

ilObjCmiXapi::getDuration ( )

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

References $duration.

Referenced by doCloneObject(), getDataSetMapping(), and save().

612  : bool
613  {
614  return $this->duration;
615  }
+ Here is the caller graph for this function:

◆ getEntitlementKey()

ilObjCmiXapi::getEntitlementKey ( )

Definition at line 387 of file class.ilObjCmiXapi.php.

References $entitlementKey.

Referenced by doCloneObject(), getDataSetMapping(), getLaunchData(), and save().

387  : string
388  {
389  return $this->entitlementKey;
390  }
+ Here is the caller graph for this function:

◆ getFailed()

ilObjCmiXapi::getFailed ( )

Definition at line 532 of file class.ilObjCmiXapi.php.

References $failed.

Referenced by doCloneObject(), getDataSetMapping(), and save().

532  : bool
533  {
534  return $this->failed;
535  }
+ Here is the caller graph for this function:

◆ getHideData()

ilObjCmiXapi::getHideData ( )

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

References $hide_data.

Referenced by doCloneObject(), getDataSetMapping(), and save().

592  : bool
593  {
594  return $this->hide_data;
595  }
+ Here is the caller graph for this function:

◆ getHighscoreAchievedTS()

ilObjCmiXapi::getHighscoreAchievedTS ( )

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

Returns
bool True, if column should be shown.

Definition at line 1044 of file class.ilObjCmiXapi.php.

References $_highscore_achieved_ts.

Referenced by doCloneObject(), getDataSetMapping(), and save().

1044  : bool
1045  {
1047  }
+ Here is the caller graph for this function:

◆ getHighscoreEnabled()

ilObjCmiXapi::getHighscoreEnabled ( )

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

Returns
bool True, if highscore is enabled.

Definition at line 1027 of file class.ilObjCmiXapi.php.

References $_highscore_enabled.

Referenced by doCloneObject(), getDataSetMapping(), and save().

1027  : bool
1028  {
1030  }
bool $_highscore_enabled
HIGHSCORE.
+ Here is the caller graph for this function:

◆ getHighscoreMode()

ilObjCmiXapi::getHighscoreMode ( )

Definition at line 1144 of file class.ilObjCmiXapi.php.

References getHighscoreOwnTable(), and getHighscoreTopTable().

1144  : int
1145  {
1146  switch (true) {
1147  case $this->getHighscoreOwnTable() && $this->getHighscoreTopTable():
1149 
1150  case $this->getHighscoreTopTable():
1152 
1153  case $this->getHighscoreOwnTable():
1154  default:
1156  }
1157  }
getHighscoreTopTable()
Gets, if the top-rankings table should be shown.
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getHighscoreOwnTable()
Gets if the own rankings table should be shown.
+ Here is the call graph for this function:

◆ getHighscoreOwnTable()

ilObjCmiXapi::getHighscoreOwnTable ( )

Gets if the own rankings table should be shown.

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

Definition at line 1096 of file class.ilObjCmiXapi.php.

References $_highscore_own_table.

Referenced by doCloneObject(), getDataSetMapping(), getHighscoreMode(), and save().

1096  : bool
1097  {
1099  }
+ Here is the caller graph for this function:

◆ getHighscorePercentage()

ilObjCmiXapi::getHighscorePercentage ( )

Gets if the percentage column should be shown.

Returns
bool True, if percentage column should be shown.

Definition at line 1061 of file class.ilObjCmiXapi.php.

References $_highscore_percentage.

Referenced by doCloneObject(), getDataSetMapping(), and save().

1061  : bool
1062  {
1064  }
+ Here is the caller graph for this function:

◆ getHighscoreTopNum()

ilObjCmiXapi::getHighscoreTopNum ( ?int  $a_retval = 10)

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

Default: 10 entries

Parameters
int | null$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 1134 of file class.ilObjCmiXapi.php.

References $_highscore_top_num.

Referenced by doCloneObject(), getDataSetMapping(), and save().

1134  : ?int
1135  {
1136  $retval = $a_retval;
1137  if ($this->_highscore_top_num != 0) {
1138  $retval = $this->_highscore_top_num;
1139  }
1140 
1141  return $retval;
1142  }
+ Here is the caller graph for this function:

◆ getHighscoreTopTable()

ilObjCmiXapi::getHighscoreTopTable ( )

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

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

Definition at line 1113 of file class.ilObjCmiXapi.php.

References $_highscore_top_table.

Referenced by doCloneObject(), getDataSetMapping(), getHighscoreMode(), and save().

1113  : bool
1114  {
1116  }
+ Here is the caller graph for this function:

◆ getHighscoreWTime()

ilObjCmiXapi::getHighscoreWTime ( )

Gets if the column with the workingtime should be shown.

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

Definition at line 1078 of file class.ilObjCmiXapi.php.

References $_highscore_wtime.

Referenced by doCloneObject(), getDataSetMapping(), and save().

1078  : bool
1079  {
1080  return $this->_highscore_wtime;
1081  }
+ Here is the caller graph for this function:

◆ getInitialized()

ilObjCmiXapi::getInitialized ( )

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

References $initialized.

Referenced by doCloneObject(), getDataSetMapping(), and save().

542  : bool
543  {
544  return $this->initialized;
545  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilObjCmiXapi::getInstance ( int  $a_id = 0,
bool  $a_reference = true 
)
static

Definition at line 205 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiStatementsReport\__construct(), ilCmiXapiAbstractReportLinkBuilder\getObj(), XapiProxy\XapiProxyRequest\handleGetStatementsRequest(), and ilCmiXapiHighscoreReport\initTableData().

205  : \ilObjCmiXapi
206  {
207  return new self($a_id, $a_reference);
208  }
+ Here is the caller graph for this function:

◆ getInstructions()

ilObjCmiXapi::getInstructions ( )

Definition at line 302 of file class.ilObjCmiXapi.php.

References $instructions.

Referenced by doCloneObject(), getDataSetMapping(), and save().

302  : string
303  {
304  return $this->instructions;
305  }
+ Here is the caller graph for this function:

◆ getLastStatement()

ilObjCmiXapi::getLastStatement ( string  $sess)

get latest statement from session

Returns
mixed|null

Definition at line 1694 of file class.ilObjCmiXapi.php.

References $client, $DIC, Vendor\Package\$e, ilCmiXapiAbstractRequest\checkResponse(), ilCmiXapiLrsType\getBasicAuth(), getLastStatementPipline(), ilCmiXapiLrsType\getLrsEndpointStatementsAggregationLink(), getLrsType(), log(), and null.

1694  : mixed
1695  {
1696  global $DIC;
1697  $lrsType = $this->getLrsType();
1698 
1699  //$this->getLrsEndpoint())) . '/api/' . self::ENDPOINT_AGGREGATE_SUFFIX;
1701  //$fallbackLrs = $lrsType->getLrsFallbackEndpoint();
1702  $defaultBasicAuth = $lrsType->getBasicAuth();
1703  //$fallbackBasicAuth = $lrsType->getFallbackBasicAuth();
1704  $defaultHeaders = [
1705  'X-Experience-API-Version' => '1.0.3',
1706  'Authorization' => $defaultBasicAuth,
1707  'Cache-Control' => 'no-cache, no-store, must-revalidate'
1708  ];
1709  /*
1710  $fallbackHeaders = [
1711  'X-Experience-API-Version' => '1.0.3',
1712  'Authorization' => $fallbackBasicAuth,
1713  'Content-Type' => 'application/json;charset=utf-8',
1714  'Cache-Control' => 'no-cache, no-store, must-revalidate'
1715  ];
1716  */
1717  $pipeline = json_encode($this->getLastStatementPipline($sess));
1718  $defaultLastStatementUrl = $defaultLrs . "?pipeline=" . urlencode($pipeline);
1719  $client = new GuzzleHttp\Client();
1720  $req_opts = array(
1721  GuzzleHttp\RequestOptions::VERIFY => true,
1722  GuzzleHttp\RequestOptions::CONNECT_TIMEOUT => 10,
1723  GuzzleHttp\RequestOptions::HTTP_ERRORS => false
1724  );
1725  $defaultLastStatementRequest = new GuzzleHttp\Psr7\Request(
1726  'GET',
1727  $defaultLastStatementUrl,
1728  $defaultHeaders
1729  );
1730  $promises = array();
1731  $promises['defaultLastStatement'] = $client->sendAsync($defaultLastStatementRequest, $req_opts);
1732  try {
1733  $responses = GuzzleHttp\Promise\Utils::settle($promises)->wait();
1734  $body = '';
1735  ilCmiXapiAbstractRequest::checkResponse($responses['defaultLastStatement'], $body, [200]);
1736  return json_decode($body, (bool) JSON_OBJECT_AS_ARRAY);
1737  } catch (Exception $e) {
1738  $this->log()->error('error:' . $e->getMessage());
1739  return null;
1740  }
1741  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$client
ilCmiXapiLrsType $lrsType
getLastStatementPipline(string $sess)
global $DIC
Definition: shib_login.php:22
static checkResponse(array $response, &$body, array $allowedStatus=[200, 204])
+ Here is the call graph for this function:

◆ getLastStatementPipline()

ilObjCmiXapi::getLastStatementPipline ( string  $sess)
Returns
array<int, mixed[]>

Definition at line 1746 of file class.ilObjCmiXapi.php.

References $activityId, $DIC, CONT_TYPE_CMI5, getActivityId(), getContentType(), and isMixedContentType().

Referenced by getLastStatement().

1746  : array
1747  {
1748  global $DIC;
1749  $pipeline = array();
1750 
1751  // filter activityId
1752  $match = array();
1753  $match['statement.object.objectType'] = 'Activity';
1754  $match['statement.actor.objectType'] = 'Agent';
1755 
1756  $activityId = array();
1757 
1758  if ($this->getContentType() == ilObjCmiXapi::CONT_TYPE_CMI5 && !$this->isMixedContentType()) {
1759  // https://github.com/AICC/CMI-5_Spec_Current/blob/quartz/cmi5_spec.md#963-extensions
1760  $activityId['statement.context.extensions.https://ilias&46;de/cmi5/activityid'] = $this->getActivityId();
1761  } else {
1762  $activityQuery = [
1763  '$regex' => '^' . preg_quote($this->getActivityId()) . ''
1764  ];
1765  $activityId['$or'] = [];
1766  $activityId['$or'][] = ['statement.object.id' => $activityQuery];
1767  $activityId['$or'][] = ['statement.context.contextActivities.parent.id' => $activityQuery];
1768  }
1769 
1770  $sessionId = array();
1771  $sessionId['statement.context.extensions.https://w3id&46;org/xapi/cmi5/context/extensions/sessionid'] = $sess;
1772  $match['$and'] = array();
1773  $match['$and'][] = $activityId;
1774  $match['$and'][] = $sessionId;
1775  $sort = array('statement.timestamp' => -1);
1776  $project = array('statement.timestamp' => 1, 'statement.verb.id' => 1);
1777  $pipeline[] = array('$match' => $match);
1778  $pipeline[] = array('$sort' => $sort);
1779  $pipeline[] = array('$limit' => 1);
1780  $pipeline[] = array('$project' => $project);
1781 
1782  return $pipeline;
1783  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLaunchData()

ilObjCmiXapi::getLaunchData ( ?ilCmiXapiUser  $cmixUser = null,
string  $lang = 'en' 
)

LMS.LaunchData.

Returns
array<string, mixed>

Definition at line 1394 of file class.ilObjCmiXapi.php.

References $moveOn, ilLink\_getStaticLink(), getCurrentCmixUser(), getEntitlementKey(), getLaunchedContextTemplate(), getLaunchMethod(), getLaunchMode(), getLaunchParameters(), getLMSMoveOn(), getMasteryScore(), ilObject\getRefId(), ilObject\getType(), isSwitchToReviewEnabled(), and null.

1394  : array
1395  {
1396  if (null === $cmixUser) {
1397  $cmixUser = $this->getCurrentCmixUser();
1398  }
1399  // ToDo
1400  $moveOn = $this->getLMSMoveOn();
1401  if (!$moveOn || $moveOn == '') {
1402  $moveOn = 'Completed';
1403  }
1404  $launchMode = $this->getLaunchMode();
1405  // only check switch if self::LAUNCH_MODE_NORMAL
1406  if ($launchMode == self::LAUNCH_MODE_NORMAL) {
1407  if ($cmixUser->getSatisfied() && $this->isSwitchToReviewEnabled()) {
1408  $launchMode = self::LAUNCH_MODE_REVIEW;
1409  }
1410  }
1411  $ctxTemplate = [
1412  "contextTemplate" => $this->getLaunchedContextTemplate($cmixUser),
1413  "launchMode" => ucfirst($launchMode),
1414  "launchMethod" => "OwnWindow",
1415  "moveOn" => $moveOn
1416  ];
1417  $lmsLaunchMethod = $this->getLaunchMethod();
1418  if ($lmsLaunchMethod === "ownWin") {
1419  $href = ilLink::_getStaticLink(
1420  $this->getRefId(),
1421  $this->getType()
1422  );
1423  $ctxTemplate['returnURL'] = $href;
1424  } else {
1425  $ctxTemplate['returnURL'] = ILIAS_HTTP_PATH . "/components/ILIAS/CmiXapi/xapiexit.php?lang={$lang}";
1426  }
1427  if (!empty($this->getMasteryScore())) {
1428  $ctxTemplate['masteryScore'] = $this->getMasteryScore();
1429  }
1430  if (!empty($this->getLaunchParameters())) {
1431  $ctxTemplate['launchParameters'] = $this->getLaunchParameters();
1432  }
1433  if (!empty($this->getEntitlementKey())) {
1434  $ctxTemplate['entitlementKey'] = array("courseStructure" => $this->getEntitlementKey());
1435  }
1436  return $ctxTemplate;
1437  }
getLaunchedContextTemplate(?ilCmiXapiUser $cmixUser=null)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getLMSMoveOn()
for CMI5 statements | state moveOn values
+ Here is the call graph for this function:

◆ getLaunchedContextTemplate()

ilObjCmiXapi::getLaunchedContextTemplate ( ?ilCmiXapiUser  $cmixUser = null)
Returns
array<string, mixed>

Definition at line 1442 of file class.ilObjCmiXapi.php.

References $launchMode, getCurrentCmixUser(), getLaunchMode(), getLaunchParameters(), getLMSMoveOn(), getMasteryScore(), getStatementContextActivities(), getStatementExtensions(), isSwitchToReviewEnabled(), and null.

Referenced by getLaunchData().

1442  : array
1443  {
1444  if (null === $cmixUser) {
1445  $cmixUser = $this->getCurrentCmixUser();
1446  }
1447  $launchMode = $this->getLaunchMode();
1448  // only check switch if self::LAUNCH_MODE_NORMAL
1449  if ($launchMode == self::LAUNCH_MODE_NORMAL) {
1450  if ($cmixUser->getSatisfied() && $this->isSwitchToReviewEnabled()) {
1451  $launchMode = self::LAUNCH_MODE_REVIEW;
1452  }
1453  }
1454  $extensions = $this->getStatementExtensions($cmixUser);
1455  $extensions['https://w3id.org/xapi/cmi5/context/extensions/launchmode'] = $launchMode;
1456  if (!empty($this->getLMSMoveOn())) {
1457  $extensions['https://w3id.org/xapi/cmi5/context/extensions/moveon'] = $this->getLMSMoveOn();
1458  }
1459  if (!empty($this->getLaunchParameters())) {
1460  $extensions['https://w3id.org/xapi/cmi5/context/extensions/launchparameters'] = $this->getLaunchParameters();
1461  }
1462  if (!empty($this->getMasteryScore())) {
1463  $extensions['https://w3id.org/xapi/cmi5/context/extensions/masteryscore'] = $this->getMasteryScore();
1464  }
1465  return array(
1466  "contextActivities" => $this->getStatementContextActivities(),
1467  "extensions" => $extensions
1468  );
1469  }
getStatementExtensions(?ilCmiXapiUser $cmixUser=null)
Minimal extensions.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getLMSMoveOn()
for CMI5 statements | state moveOn values
getStatementContextActivities()
Minimal statementActivities.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLaunchedStatement()

ilObjCmiXapi::getLaunchedStatement ( ?ilCmiXapiUser  $cmixUser = null)
Returns
array<string, mixed>
Exceptions
Exception

Definition at line 1627 of file class.ilObjCmiXapi.php.

References $launchMode, getCurrentCmixUser(), getLaunchMode(), getLaunchParameters(), getLMSMoveOn(), getMasteryScore(), getStatement(), isSwitchToReviewEnabled(), and null.

1627  : array
1628  {
1629  if (null === $cmixUser) {
1630  $cmixUser = $this->getCurrentCmixUser();
1631  }
1632  $launchMode = $this->getLaunchMode();
1633  // only check switch if self::LAUNCH_MODE_NORMAL
1634  if ($launchMode == self::LAUNCH_MODE_NORMAL) {
1635  if ($cmixUser->getSatisfied() && $this->isSwitchToReviewEnabled()) {
1636  $launchMode = self::LAUNCH_MODE_REVIEW;
1637  }
1638  }
1639 
1640  $statement = $this->getStatement('launched', $cmixUser);
1641  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/launchmode'] = $launchMode;
1642  if (!empty($this->getLMSMoveOn())) {
1643  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/moveon'] = $this->getLMSMoveOn();
1644  }
1645  if (!empty($this->getLaunchParameters())) {
1646  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/launchparameters'] = $this->getLaunchParameters();
1647  }
1648  if (!empty($this->getMasteryScore())) {
1649  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/masteryscore'] = $this->getMasteryScore();
1650  }
1651  return $statement;
1652  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getStatement(string $verb, ?ilCmiXapiUser $cmixUser=null)
blueprint statement
getLMSMoveOn()
for CMI5 statements | state moveOn values
+ Here is the call graph for this function:

◆ getLaunchMethod()

ilObjCmiXapi::getLaunchMethod ( )

Definition at line 407 of file class.ilObjCmiXapi.php.

References $launchMethod.

Referenced by doCloneObject(), getDataSetMapping(), getLaunchData(), and save().

407  : string
408  {
409  return $this->launchMethod;
410  }
+ Here is the caller graph for this function:

◆ getLaunchMode()

ilObjCmiXapi::getLaunchMode ( )

Definition at line 417 of file class.ilObjCmiXapi.php.

Referenced by doCloneObject(), getDataSetMapping(), getLaunchData(), getLaunchedContextTemplate(), getLaunchedStatement(), and save().

417  : string
418  {
419  return ucfirst($this->launchMode);
420  }
+ Here is the caller graph for this function:

◆ getLaunchParameters()

ilObjCmiXapi::getLaunchParameters ( )

Definition at line 322 of file class.ilObjCmiXapi.php.

References $launchParameters.

Referenced by doCloneObject(), getDataSetMapping(), getLaunchData(), getLaunchedContextTemplate(), getLaunchedStatement(), and save().

322  : string
323  {
325  }
+ Here is the caller graph for this function:

◆ getLaunchUrl()

ilObjCmiXapi::getLaunchUrl ( )

Definition at line 312 of file class.ilObjCmiXapi.php.

References $launchUrl.

Referenced by doCloneObject(), getDataSetMapping(), and save().

312  : string
313  {
314  return $this->launchUrl;
315  }
+ Here is the caller graph for this function:

◆ getLMSMoveOn()

ilObjCmiXapi::getLMSMoveOn ( )

for CMI5 statements | state moveOn values

Returns
string ilCmiXapiLP::const

Definition at line 364 of file class.ilObjCmiXapi.php.

References $moveOn, getLPMode(), ilLPObjSettings\LP_MODE_CMIX_COMPL_OR_PASSED_WITH_FAILED, ilLPObjSettings\LP_MODE_CMIX_COMPL_WITH_FAILED, ilLPObjSettings\LP_MODE_CMIX_COMPLETED, ilLPObjSettings\LP_MODE_CMIX_COMPLETED_OR_PASSED, ilLPObjSettings\LP_MODE_CMIX_PASSED, ilLPObjSettings\LP_MODE_CMIX_PASSED_WITH_FAILED, ilLPObjSettings\LP_MODE_DEACTIVATED, ilCmiXapiLP\MOVEON_COMPLETED, ilCmiXapiLP\MOVEON_COMPLETED_OR_PASSED, ilCmiXapiLP\MOVEON_NOT_APPLICABLE, and ilCmiXapiLP\MOVEON_PASSED.

Referenced by getLaunchData(), getLaunchedContextTemplate(), and getLaunchedStatement().

364  : string
365  {
367  switch ($this->getLPMode()) {
370  break;
374  break;
378  break;
382  break;
383  }
384  return $moveOn;
385  }
const MOVEON_NOT_APPLICABLE
getLPMode()
only for internal LMS usage
const LP_MODE_CMIX_COMPL_OR_PASSED_WITH_FAILED
const MOVEON_COMPLETED_OR_PASSED
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLPMode()

ilObjCmiXapi::getLPMode ( )

only for internal LMS usage

Returns
int ilLPObjSettings::const

Definition at line 354 of file class.ilObjCmiXapi.php.

References ilObject\getId(), and ilObjectLP\getInstance().

Referenced by getLMSMoveOn().

354  : int
355  {
356  $olp = ilObjectLP::getInstance($this->getId());
357  return $olp->getCurrentMode();
358  }
static getInstance(int $obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLrsType()

ilObjCmiXapi::getLrsType ( )

Definition at line 225 of file class.ilObjCmiXapi.php.

References $lrsType.

Referenced by ilXapiCompliantStatementsReportLinkBuilder\__construct(), and getLastStatement().

226  {
227  return $this->lrsType;
228  }
ilCmiXapiLrsType $lrsType
+ Here is the caller graph for this function:

◆ getLrsTypeId()

ilObjCmiXapi::getLrsTypeId ( )

Definition at line 215 of file class.ilObjCmiXapi.php.

References $lrsTypeId.

Referenced by doCloneObject(), getDataSetMapping(), initLrsType(), and save().

215  : ?int
216  {
217  return $this->lrsTypeId;
218  }
+ Here is the caller graph for this function:

◆ getMasteryScore()

ilObjCmiXapi::getMasteryScore ( )

Definition at line 442 of file class.ilObjCmiXapi.php.

References $masteryScore.

Referenced by doCloneObject(), getDataSetMapping(), getLaunchData(), getLaunchedContextTemplate(), getLaunchedStatement(), and save().

442  : float
443  {
444  return $this->masteryScore;
445  }
+ Here is the caller graph for this function:

◆ getMasteryScorePercent()

ilObjCmiXapi::getMasteryScorePercent ( )

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

452  : float
453  {
454  return $this->masteryScore * 100;
455  }

◆ getMoveOn()

ilObjCmiXapi::getMoveOn ( )

Attention: this is the original imported moveOn for using in LaunchData and LaunchStatement use getLMSMoveOn!

Definition at line 336 of file class.ilObjCmiXapi.php.

References $moveOn.

Referenced by doCloneObject(), getDataSetMapping(), and save().

336  : string
337  {
338  return $this->moveOn;
339  }
+ Here is the caller graph for this function:

◆ getNoSubstatements()

ilObjCmiXapi::getNoSubstatements ( )

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

References $no_substatements.

Referenced by doCloneObject(), getDataSetMapping(), and save().

622  : bool
623  {
625  }
+ Here is the caller graph for this function:

◆ getObjectsHavingBypassProxyEnabledAndRegisteredUsers()

static ilObjCmiXapi::getObjectsHavingBypassProxyEnabledAndRegisteredUsers ( )
static
Returns
mixed[]

Definition at line 969 of file class.ilObjCmiXapi.php.

References $DIC, $res, and ILIAS\Repository\int().

Referenced by ilXapiResultsCronjob\getObjectsToBeReported().

969  : array
970  {
971  global $DIC; /* @var \ILIAS\DI\Container $DIC */
972  // not possible: Move Global Access to Constructor
973  $query = "
974  SELECT DISTINCT s.obj_id FROM " . self::DB_TABLE_NAME . " s
975  INNER JOIN " . self::DB_USERS_TABLE_NAME . " u ON u.obj_id = s.obj_id
976  WHERE bypass_proxy = %s
977  ";
978 
979  $res = $DIC->database()->queryF($query, array('integer'), array(1));
980 
981  $objects = array();
982 
983  while ($row = $DIC->database()->fetchAssoc($res)) {
984  $objects[] = (int) $row['obj_id'];
985  }
986 
987  return $objects;
988  }
$res
Definition: ltiservices.php:66
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOnlyMoveon()

ilObjCmiXapi::getOnlyMoveon ( )

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

References $only_moveon.

Referenced by doCloneObject(), getDataSetMapping(), and save().

492  : bool
493  {
494  return $this->only_moveon;
495  }
+ Here is the caller graph for this function:

◆ getPassed()

ilObjCmiXapi::getPassed ( )

Definition at line 552 of file class.ilObjCmiXapi.php.

References $passed.

Referenced by doCloneObject(), getDataSetMapping(), and save().

552  : bool
553  {
554  return $this->passed;
555  }
+ Here is the caller graph for this function:

◆ getPrivacyIdent()

ilObjCmiXapi::getPrivacyIdent ( )

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

References $userIdent.

Referenced by ilCmiXapiRegistrationGUI\__construct(), doCloneObject(), getCurrentCmixUser(), getDataSetMapping(), and save().

472  : int
473  {
474  return $this->userIdent;
475  }
+ Here is the caller graph for this function:

◆ getPrivacyName()

ilObjCmiXapi::getPrivacyName ( )

Definition at line 482 of file class.ilObjCmiXapi.php.

References $userName.

Referenced by doCloneObject(), getDataSetMapping(), getStatementActor(), and save().

482  : int
483  {
484  return $this->userName;
485  }
+ Here is the caller graph for this function:

◆ getProgressed()

ilObjCmiXapi::getProgressed ( )

Definition at line 562 of file class.ilObjCmiXapi.php.

References $progressed.

Referenced by doCloneObject(), getDataSetMapping(), and save().

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

◆ getPublisherId()

ilObjCmiXapi::getPublisherId ( )

Definition at line 292 of file class.ilObjCmiXapi.php.

References $publisherId.

Referenced by doCloneObject(), getDataSetMapping(), getStatementContextActivities(), isMixedContentType(), and save().

292  : string
293  {
294  return $this->publisherId;
295  }
+ Here is the caller graph for this function:

◆ getSatisfied()

ilObjCmiXapi::getSatisfied ( )

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

References $satisfied.

Referenced by doCloneObject(), getDataSetMapping(), and save().

572  : bool
573  {
574  return $this->satisfied;
575  }
+ Here is the caller graph for this function:

◆ getSatisfiedStatement()

ilObjCmiXapi::getSatisfiedStatement ( ?ilCmiXapiUser  $cmixUser = null)
Returns
array<string, mixed>
Exceptions
Exception

Definition at line 1676 of file class.ilObjCmiXapi.php.

References ilObject\$type, getCurrentCmixUser(), getStatement(), and null.

1676  : array
1677  {
1678  if (null === $cmixUser) {
1679  $cmixUser = $this->getCurrentCmixUser();
1680  }
1681  $statement = $this->getStatement('satisfied', $cmixUser);
1682  // add type, see https://aicc.github.io/CMI-5_Spec_Current/samples/scenarios/16-not_applicable-no_launch/#satisfied-statement
1683  // see also: https://github.com/AICC/CMI-5_Spec_Current/blob/quartz/cmi5_spec.md#verbs_satisfied
1684  $type = "https://w3id.org/xapi/cmi5/activitytype/course";
1685  $statement['object']['definition']['type'] = $type;
1686  $statement['context']['contextActivities']['grouping'][0]['definition']['type'] = $type;
1687  return $statement;
1688  }
string $type
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getStatement(string $verb, ?ilCmiXapiUser $cmixUser=null)
blueprint statement
+ Here is the call graph for this function:

◆ getSessionId()

ilObjCmiXapi::getSessionId ( ?ilCmiXapiUser  $cmixUser = null)
Exceptions
ilCmiXapiException

Definition at line 1382 of file class.ilObjCmiXapi.php.

References ilCmiXapiAuthToken\getCmi5SessionByUsrIdAndObjIdAndRefId(), getCurrentCmixUser(), ilObject\getId(), ilObject\getRefId(), and null.

Referenced by getStatementExtensions().

1382  : string
1383  {
1384  if (null === $cmixUser) {
1385  $cmixUser = $this->getCurrentCmixUser();
1386  }
1387  return ilCmiXapiAuthToken::getCmi5SessionByUsrIdAndObjIdAndRefId($cmixUser->getUsrId(), $this->getId(), $this->getRefId());
1388  }
static getCmi5SessionByUsrIdAndObjIdAndRefId(int $usrId, int $objId, ?int $refId=null)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSourceType()

ilObjCmiXapi::getSourceType ( )

Definition at line 262 of file class.ilObjCmiXapi.php.

References $sourceType.

Referenced by doCloneObject(), getDataSetMapping(), and save().

262  : string
263  {
264  return $this->sourceType;
265  }
+ Here is the caller graph for this function:

◆ getStatement()

ilObjCmiXapi::getStatement ( string  $verb,
?ilCmiXapiUser  $cmixUser = null 
)

blueprint statement

Returns
array<string, mixed>
Exceptions
Exception

Definition at line 1476 of file class.ilObjCmiXapi.php.

References $id, getCurrentCmixUser(), ilCmiXapiVerbList\getInstance(), getStatementActor(), getStatementContextActivities(), getStatementExtensions(), getStatementObject(), and null.

Referenced by getAbandonedStatement(), getLaunchedStatement(), and getSatisfiedStatement().

1476  : array
1477  {
1478  if (null === $cmixUser) {
1479  $cmixUser = $this->getCurrentCmixUser();
1480  }
1481  $id = self::guidv4();
1482  $actor = $this->getStatementActor($cmixUser);
1483  $verbUri = ilCmiXapiVerbList::getInstance()->getVerbUri($verb);
1484  $extensions = $this->getStatementExtensions($cmixUser);
1485  $registration = $cmixUser->getRegistration();
1486  $contextActivities = $this->getStatementContextActivities();
1487  $object = $this->getStatementObject();
1488  return array(
1489  'id' => $id,
1490  'actor' => $actor,
1491  'verb' =>
1492  array(
1493  'id' => $verbUri
1494  ),
1495  'context' =>
1496  array(
1497  'extensions' => $extensions,
1498  'registration' => $registration,
1499  'contextActivities' => $contextActivities
1500  ),
1501  'object' => $object
1502  );
1503  }
getStatementExtensions(?ilCmiXapiUser $cmixUser=null)
Minimal extensions.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getStatementActor(?ilCmiXapiUser $cmixUser=null)
statement actor
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
getStatementContextActivities()
Minimal statementActivities.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStatementActor()

ilObjCmiXapi::getStatementActor ( ?ilCmiXapiUser  $cmixUser = null)

statement actor

Returns
array<string, mixed[]>

Definition at line 1509 of file class.ilObjCmiXapi.php.

References $DIC, ilObject\$user, getContentType(), getCurrentCmixUser(), ilCmiXapiUser\getName(), getPrivacyName(), log(), and null.

Referenced by getStatement().

1509  : array
1510  {
1511  global $DIC;
1512  if (null === $cmixUser) {
1513  $cmixUser = $this->getCurrentCmixUser();
1514  }
1515  $user = new ilObjUser($cmixUser->getUsrId()); // ToDo: Caching Names
1516  $name = ilCmiXapiUser::getName($this->getPrivacyName(), $user);
1517  if ($name == '') {
1518  $this->log()->error('error: no name in cmixuser');
1519  $name = 'UNDEFINED';
1520  }
1521  $homePage = ($this->anonymousHomePage == true) ? self::ANONYMOUS_HOMEPAGE : self::iliasUrl();
1522  if ($this->getContentType() == self::CONT_TYPE_CMI5) {
1523  $actor = [
1524  'objectType' => 'Agent',
1525  'account' => [
1526  'homePage' => $homePage,
1527  'name' => $cmixUser->getUsrIdent()
1528  ]
1529  ];
1530  if ($name !== '') {
1531  $actor['name'] = $name;
1532  }
1533  } else {
1534  $actor = [
1535  'objectType' => 'Agent',
1536  'mbox' => 'mailto:' . $cmixUser->getUsrIdent()
1537  ];
1538  if ($name !== '') {
1539  $actor['name'] = $name;
1540  }
1541  }
1542  return $actor;
1543  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:22
static getName(int $userNameMode, ilObjUser $user)
ilObjUser $user
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStatementContextActivities()

ilObjCmiXapi::getStatementContextActivities ( )

Minimal statementActivities.

Returns
array<string, array<int, array<string, array<string, array<string, string>>|string>>>

Definition at line 1565 of file class.ilObjCmiXapi.php.

References $activityId, getActivityId(), ilObject\getDescription(), getPublisherId(), and ilObject\getTitle().

Referenced by getLaunchedContextTemplate(), and getStatement().

1565  : array
1566  {
1567  $publisherId = $this->getPublisherId();
1568  $activityId = $this->getActivityId();
1569  if (empty($publisherId)) {
1571  }
1572  return array(
1573  "grouping" => [
1574  [
1575  "objectType" => "Activity",
1576  "id" => "{$publisherId}",
1577  'definition' =>
1578  array(
1579  'name' =>
1580  array(
1581  'de-DE' => $this->getTitle(),
1582  'en-US' => $this->getTitle()
1583  ),
1584  'description' =>
1585  array(
1586  'de-DE' => $this->getDescription(),
1587  'en-US' => $this->getDescription()
1588  )
1589  )]
1590  ],
1591  "category" => [
1592  [
1593  "id" => "https://w3id.org/xapi/cmi5/context/categories/cmi5",
1594  "objectType" => "Activity"
1595  ]
1596  ]
1597  );
1598  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStatementExtensions()

ilObjCmiXapi::getStatementExtensions ( ?ilCmiXapiUser  $cmixUser = null)

Minimal extensions.

Returns
array<string, mixed>
Exceptions
ilCmiXapiException

Definition at line 1550 of file class.ilObjCmiXapi.php.

References getActivityId(), getCurrentCmixUser(), getSessionId(), and null.

Referenced by getLaunchedContextTemplate(), and getStatement().

1550  : array
1551  {
1552  if (null === $cmixUser) {
1553  $cmixUser = $this->getCurrentCmixUser();
1554  }
1555  return array(
1556  'https://w3id.org/xapi/cmi5/context/extensions/sessionid' => $this->getSessionId($cmixUser),
1557  'https://ilias.de/cmi5/activityid' => $this->getActivityId()
1558  );
1559  }
getSessionId(?ilCmiXapiUser $cmixUser=null)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStatementObject()

ilObjCmiXapi::getStatementObject ( )
Returns
array<string, mixed[]>

Definition at line 1603 of file class.ilObjCmiXapi.php.

References getActivityId(), ilObject\getDescription(), and ilObject\getTitle().

Referenced by getStatement().

1603  : array
1604  {
1605  return array(
1606  'id' => $this->getActivityId(),
1607  'definition' =>
1608  array(
1609  'name' =>
1610  array(
1611  'de-DE' => $this->getTitle(),
1612  'en-US' => $this->getTitle()
1613  ),
1614  'description' =>
1615  array(
1616  'de-DE' => $this->getDescription(),
1617  'en-US' => $this->getDescription()
1618  )
1619  )
1620  );
1621  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSwitchToReviewEnabled()

ilObjCmiXapi::getSwitchToReviewEnabled ( )

Definition at line 432 of file class.ilObjCmiXapi.php.

References $switchToReviewEnabled.

432  : bool
433  {
435  }

◆ getTerminated()

ilObjCmiXapi::getTerminated ( )

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

References $terminated.

Referenced by doCloneObject(), getDataSetMapping(), and save().

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

◆ getTimestamp()

ilObjCmiXapi::getTimestamp ( )

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

References $timestamp.

Referenced by doCloneObject(), getDataSetMapping(), and save().

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

◆ getUserPrivacyComment()

ilObjCmiXapi::getUserPrivacyComment ( )

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

References $userPrivacyComment.

Referenced by doCloneObject(), getDataSetMapping(), and save().

642  : string
643  {
645  }
+ Here is the caller graph for this function:

◆ getVersion()

ilObjCmiXapi::getVersion ( )

Definition at line 672 of file class.ilObjCmiXapi.php.

References $version.

Referenced by doCloneObject(), getDataSetMapping(), and save().

672  : int
673  {
674  return $this->version;
675  }
+ Here is the caller graph for this function:

◆ getXmlManifest()

ilObjCmiXapi::getXmlManifest ( )

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

References $xmlManifest.

Referenced by doCloneObject(), getDataSetMapping(), and save().

662  : string
663  {
664  return $this->xmlManifest;
665  }
+ Here is the caller graph for this function:

◆ guidv4()

static ilObjCmiXapi::guidv4 ( ?string  $data = null)
static
Returns
string[]
Exceptions
Exception

Definition at line 1355 of file class.ilObjCmiXapi.php.

References $data.

Referenced by ilCmiXapiLaunchGUI\CMI5preLaunch().

1355  : string
1356  {
1357  // Generate 16 bytes (128 bits) of random data or use the data passed into the function.
1358  $data ??= random_bytes(16);
1359  assert(strlen($data) == 16);
1360 
1361  // Set version to 0100
1362  $data[6] = chr(ord($data[6]) & 0x0f | 0x40);
1363  // Set bits 6-7 to 10
1364  $data[8] = chr(ord($data[8]) & 0x3f | 0x80);
1365 
1366  // Output the 36 character UUID.
1367  return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
1368  }
+ Here is the caller graph for this function:

◆ iliasUrl()

static ilObjCmiXapi::iliasUrl ( )
static

Definition at line 1785 of file class.ilObjCmiXapi.php.

References $DIC.

1785  : string
1786  {
1787  global $DIC;
1788  $regex = '/^(https?:\/\/[^\/]+).*/';
1789  preg_match($regex, (string) $DIC->http()->request()->getUri(), $request_parts);
1790  return $request_parts[1];
1791  }
global $DIC
Definition: shib_login.php:22

◆ initLrsType()

ilObjCmiXapi::initLrsType ( )

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

References getLrsTypeId(), and setLrsType().

Referenced by load().

235  : void
236  {
237  $this->setLrsType(new ilCmiXapiLrsType($this->getLrsTypeId()));
238  }
setLrsType(\ilCmiXapiLrsType $lrsType)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initType()

ilObjCmiXapi::initType ( )
protected

Definition at line 210 of file class.ilObjCmiXapi.php.

210  : void
211  {
212  $this->type = "cmix";
213  }

◆ isActivationLimited()

ilObjCmiXapi::isActivationLimited ( )

Definition at line 1804 of file class.ilObjCmiXapi.php.

References $activationLimited.

Referenced by saveRepositoryActivationSettings().

1804  : ?bool
1805  {
1806  return $this->activationLimited;
1807  }
bool $activationLimited
repository object activation settings (handled by ilObject)
+ Here is the caller graph for this function:

◆ isAuthFetchUrlEnabled()

ilObjCmiXapi::isAuthFetchUrlEnabled ( )

Definition at line 397 of file class.ilObjCmiXapi.php.

References $authFetchUrlEnabled.

Referenced by doCloneObject(), getDataSetMapping(), and save().

397  : bool
398  {
400  }
+ Here is the caller graph for this function:

◆ isBypassProxyEnabled()

ilObjCmiXapi::isBypassProxyEnabled ( )

Definition at line 682 of file class.ilObjCmiXapi.php.

References $bypassProxyEnabled.

Referenced by doCloneObject(), and save().

682  : bool
683  {
685  }
+ Here is the caller graph for this function:

◆ isKeepLpStatusEnabled()

ilObjCmiXapi::isKeepLpStatusEnabled ( )

Definition at line 462 of file class.ilObjCmiXapi.php.

References $keepLpStatusEnabled.

Referenced by doCloneObject(), getDataSetMapping(), and save().

462  : bool
463  {
465  }
+ Here is the caller graph for this function:

◆ isMixedContentType()

ilObjCmiXapi::isMixedContentType ( )

Definition at line 254 of file class.ilObjCmiXapi.php.

References getContentType(), and getPublisherId().

Referenced by getLastStatementPipline().

254  : bool
255  {
256  // after 21-07-24 and before cmi5 refactoring
257  // launched before cmi5 refactoring ident in: statement.actor.mbox
258  // launched after cmi5 refactoring ident in: statement.actor.account.name
259  return (($this->getContentType() == self::CONT_TYPE_CMI5) && empty($this->getPublisherId()));
260  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSourceTypeExternal()

ilObjCmiXapi::isSourceTypeExternal ( )

Definition at line 272 of file class.ilObjCmiXapi.php.

272  : bool
273  {
274  return $this->sourceType == self::SRC_TYPE_EXTERNAL;
275  }

◆ isSourceTypeRemote()

ilObjCmiXapi::isSourceTypeRemote ( )

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

267  : bool
268  {
269  return $this->sourceType == self::SRC_TYPE_REMOTE;
270  }

◆ isStatementsReportEnabled()

ilObjCmiXapi::isStatementsReportEnabled ( )

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

References $statementsReportEnabled.

Referenced by doCloneObject(), getDataSetMapping(), and save().

652  : bool
653  {
655  }
+ Here is the caller graph for this function:

◆ isSwitchToReviewEnabled()

ilObjCmiXapi::isSwitchToReviewEnabled ( )

Definition at line 427 of file class.ilObjCmiXapi.php.

References $switchToReviewEnabled.

Referenced by doCloneObject(), getDataSetMapping(), getLaunchData(), getLaunchedContextTemplate(), getLaunchedStatement(), and save().

427  : bool
428  {
430  }
+ Here is the caller graph for this function:

◆ load()

ilObjCmiXapi::load ( )
protected

Definition at line 698 of file class.ilObjCmiXapi.php.

References $res, ilObject\getId(), initLrsType(), loadRepositoryActivationSettings(), setAchieved(), setActivityId(), setAnswered(), setAuthFetchUrlEnabled(), setBypassProxyEnabled(), setCompleted(), setContentType(), setDeleteData(), setDuration(), setEntitlementKey(), setFailed(), setHideData(), setHighscoreAchievedTS(), setHighscoreEnabled(), setHighscoreOwnTable(), setHighscorePercentage(), setHighscoreTopNum(), setHighscoreTopTable(), setHighscoreWTime(), setInitialized(), setInstructions(), setKeepLpStatusEnabled(), setLaunchMethod(), setLaunchMode(), setLaunchParameters(), setLaunchUrl(), setLrsTypeId(), setMasteryScore(), setMoveOn(), setNoSubstatements(), setOnlyMoveon(), setPassed(), setPrivacyIdent(), setPrivacyName(), setProgressed(), setPublisherId(), setSatisfied(), setSourceType(), setStatementsReportEnabled(), setSwitchToReviewEnabled(), setTerminated(), setTimestamp(), setUserPrivacyComment(), setVersion(), and setXmlManifest().

Referenced by doRead().

698  : void
699  {
700  $query = "SELECT * FROM " . self::DB_TABLE_NAME . " WHERE obj_id = %s";
701  $res = $this->database->queryF($query, ['integer'], [$this->getId()]);
702 
703  while ($row = $this->database->fetchAssoc($res)) {
704  if ($row['lrs_type_id']) {
705  $this->setLrsTypeId((int) $row['lrs_type_id']);
706  $this->initLrsType();
707  }
708 
709  $this->setContentType((string) $row['content_type']);
710  $this->setSourceType((string) $row['source_type']);
711 
712  $this->setActivityId((string) $row['activity_id']);
713  $this->setPublisherId((string) $row['publisher_id']);
714  $this->setInstructions((string) $row['instructions']);
715 
716  $this->setLaunchUrl((string) $row['launch_url']);
717  $this->setLaunchParameters((string) $row['launch_parameters']);
718  $this->setMoveOn((string) $row['moveon']);
719  $this->setEntitlementKey((string) $row['entitlement_key']);
720  $this->setAuthFetchUrlEnabled((bool) $row['auth_fetch_url']);
721 
722  $this->setLaunchMethod((string) $row['launch_method']);
723 
724  $this->setLaunchMode((string) $row['launch_mode']);
725  $this->setSwitchToReviewEnabled((bool) $row['switch_to_review']);
726  $this->setMasteryScore((float) $row['mastery_score']);
727  $this->setKeepLpStatusEnabled((bool) $row['keep_lp']);
728 
729  $this->setPrivacyIdent((int) $row['privacy_ident']);
730  $this->setPrivacyName((int) $row['privacy_name']);
731 
732  $this->setOnlyMoveon((bool) $row['only_moveon']);
733  $this->setAchieved((bool) $row['achieved']);
734  $this->setAnswered((bool) $row['answered']);
735  $this->setCompleted((bool) $row['completed']);
736  $this->setFailed((bool) $row['failed']);
737  $this->setInitialized((bool) $row['initialized']);
738  $this->setPassed((bool) $row['passed']);
739  $this->setProgressed((bool) $row['progressed']);
740  $this->setSatisfied((bool) $row['satisfied']);
741  $this->setTerminated((bool) $row['c_terminated']);
742  $this->setHideData((bool) $row['hide_data']);
743  $this->setTimestamp((bool) $row['c_timestamp']);
744  $this->setDuration((bool) $row['duration']);
745  $this->setNoSubstatements((bool) $row['no_substatements']);
746  $this->setDeleteData((int) $row['delete_data']);
747 
748  $this->setUserPrivacyComment((string) $row['usr_privacy_comment']);
749 
750  $this->setStatementsReportEnabled((bool) $row['show_statements']);
751 
752  $this->setXmlManifest((string) $row['xml_manifest']);
753  $this->setVersion((int) $row['version']);
754 
755  $this->setBypassProxyEnabled((bool) $row['bypass_proxy']);
756 
757  $this->setHighscoreEnabled((bool) $row['highscore_enabled']);
758  $this->setHighscoreAchievedTS((bool) $row['highscore_achieved_ts']);
759  $this->setHighscorePercentage((bool) $row['highscore_percentage']);
760  $this->setHighscoreWTime((bool) $row['highscore_wtime']);
761  $this->setHighscoreOwnTable((bool) $row['highscore_own_table']);
762  $this->setHighscoreTopTable((bool) $row['highscore_top_table']);
763  $this->setHighscoreTopNum((int) $row['highscore_top_num']);
764  }
765 
767  }
setDuration(bool $duration)
setPublisherId(string $publisherId)
setPrivacyIdent(int $userIdent)
setContentType(string $contentType)
$res
Definition: ltiservices.php:66
setXmlManifest(string $xmlManifest)
setEntitlementKey(string $entitlementKey)
setNoSubstatements(bool $no_substatements)
setOnlyMoveon(bool $only_moveon)
setAchieved(bool $achieved)
setSourceType(string $sourceType)
setHighscoreWTime(bool $a_wtime)
Sets if the workingtime of the scores should be shown.
setAuthFetchUrlEnabled(bool $authFetchUrlEnabled)
setHighscoreOwnTable(bool $a_own_table)
Sets if the table with the own ranking should be shown.
setKeepLpStatusEnabled(bool $keepLpStatusEnabled)
setLaunchMode(string $launchMode)
setSwitchToReviewEnabled(bool $switchToReviewEnabled)
setBypassProxyEnabled(bool $bypassProxyEnabled)
setLaunchMethod(string $launchMethod)
setTerminated(bool $terminated)
setFailed(bool $failed)
setActivityId(string $activityId)
setMasteryScore(float $masteryScore)
setPassed(bool $passed)
setCompleted(bool $completed)
setHighscorePercentage(bool $a_percentage)
Sets if the percentages of the scores pass should be shown.
setMoveOn(string $moveOn)
Attention: this is the original moveOn from course import should only be set on import! ...
setStatementsReportEnabled(bool $statementsReportEnabled)
setInitialized(bool $initialized)
setVersion(int $version)
setProgressed(bool $progressed)
setUserPrivacyComment(string $userPrivacyComment)
setSatisfied(bool $satisfied)
setPrivacyName(int $userName)
setDeleteData(int $deleteData)
setLaunchParameters(string $launchParameters)
setTimestamp(bool $timestamp)
setAnswered(bool $answered)
setLaunchUrl(string $launchUrl)
setHideData(bool $hide_data)
setHighscoreAchievedTS(bool $a_achieved_ts)
Sets if the date and time of the scores achievement should be displayed.
setInstructions(string $instructions)
setHighscoreTopTable(bool $a_top_table)
Sets if the top-rankings table should be shown.
setLrsTypeId(int $lrsTypeId)
setHighscoreEnabled(bool $a_enabled)
Sets if the highscore feature should be enabled.
setHighscoreTopNum(int $a_top_num)
Sets the number of entries which are to be shown in the top-rankings table.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadRepositoryActivationSettings()

ilObjCmiXapi::loadRepositoryActivationSettings ( )
protected

Definition at line 832 of file class.ilObjCmiXapi.php.

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

Referenced by load().

832  : void
833  {
834  if ($this->ref_id) {
835  $activation = ilObjectActivation::getItem($this->ref_id);
836  switch ($activation["timing_type"]) {
838  $this->setActivationLimited(true);
839  if (!is_null($activation["timing_start"])) {
840  $activation["timing_start"] = (int) $activation["timing_start"];
841  }
842  $this->setActivationStartingTime($activation["timing_start"]);
843  if (!is_null($activation["timing_end"])) {
844  $activation["timing_end"] = (int) $activation["timing_end"];
845  }
846  $this->setActivationEndingTime($activation["timing_end"]);
847  $this->setActivationVisibility((bool) $activation["visible"]);
848  break;
849 
850  default:
851  $this->setActivationLimited(false);
852  break;
853  }
854  }
855  }
setActivationStartingTime(?int $activationStartingTime=null)
setActivationLimited(bool $activationLimited)
static getItem(int $ref_id)
setActivationEndingTime(?int $activationEndingTime=null)
setActivationVisibility(bool $activationVisibility)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ log()

static ilObjCmiXapi::log ( )
static

Definition at line 1793 of file class.ilObjCmiXapi.php.

References ilObject\$log, and ILIAS\Test\ExportImport\PLUGIN.

Referenced by ilCmiXapiAbstractRequest\checkResponse(), ilCmiXapiStatementsReport\fetchObjectInfo(), ilCmiXapiStatementsReport\fetchObjectName(), getLastStatement(), getStatementActor(), and ilCmiXapiAbstractRequest\sendRequest().

1793  : ilLogger
1794  {
1795  if (self::PLUGIN) {
1796  global $log;
1797  return $log;
1798  } else {
1799  return \ilLoggerFactory::getLogger('cmix');
1800  }
1801  }
ilLogger $log
+ Here is the caller graph for this function:

◆ save()

ilObjCmiXapi::save ( )

Definition at line 775 of file class.ilObjCmiXapi.php.

References $DIC, getAchieved(), getActivityId(), getAnswered(), getCompleted(), getContentType(), getDeleteData(), getDuration(), getEntitlementKey(), getFailed(), getHideData(), getHighscoreAchievedTS(), getHighscoreEnabled(), getHighscoreOwnTable(), getHighscorePercentage(), getHighscoreTopNum(), getHighscoreTopTable(), getHighscoreWTime(), ilObject\getId(), getInitialized(), getInstructions(), getLaunchMethod(), getLaunchMode(), getLaunchParameters(), getLaunchUrl(), getLrsTypeId(), getMasteryScore(), getMoveOn(), getNoSubstatements(), getOnlyMoveon(), getPassed(), getPrivacyIdent(), getPrivacyName(), getProgressed(), getPublisherId(), getSatisfied(), getSourceType(), getTerminated(), getTimestamp(), getUserPrivacyComment(), getVersion(), getXmlManifest(), isAuthFetchUrlEnabled(), isBypassProxyEnabled(), isKeepLpStatusEnabled(), isStatementsReportEnabled(), isSwitchToReviewEnabled(), and saveRepositoryActivationSettings().

Referenced by doUpdate().

775  : void
776  {
777  global $DIC; /* @var \ILIAS\DI\Container $DIC */
778  // not possible: Move Global Access to Constructor
779  $DIC->database()->replace(self::DB_TABLE_NAME, [
780  'obj_id' => ['integer', $this->getId()]
781  ], [
782  'lrs_type_id' => ['integer', $this->getLrsTypeId()],
783  'content_type' => ['text', $this->getContentType()],
784  'source_type' => ['text', $this->getSourceType()],
785  'activity_id' => ['text', $this->getActivityId()],
786  'publisher_id' => ['text', $this->getPublisherId()],
787  'instructions' => ['text', $this->getInstructions()],
788  'launch_url' => ['text', $this->getLaunchUrl()],
789  'launch_parameters' => ['text', $this->getLaunchParameters()],
790  'moveon' => ['text', $this->getMoveOn()],
791  'entitlement_key' => ['text', $this->getEntitlementKey()],
792  'auth_fetch_url' => ['integer', (int) $this->isAuthFetchUrlEnabled()],
793  'launch_method' => ['text', $this->getLaunchMethod()],
794  'launch_mode' => ['text', $this->getLaunchMode()],
795  'switch_to_review' => ['integer', (int) $this->isSwitchToReviewEnabled()],
796  'mastery_score' => ['float', $this->getMasteryScore()],
797  'keep_lp' => ['integer', (int) $this->isKeepLpStatusEnabled()],
798  'privacy_ident' => ['integer', $this->getPrivacyIdent()],
799  'privacy_name' => ['integer', $this->getPrivacyName()],
800  'usr_privacy_comment' => ['text', $this->getUserPrivacyComment()],
801  'show_statements' => ['integer', (int) $this->isStatementsReportEnabled()],
802  'xml_manifest' => ['text', $this->getXmlManifest()],
803  'version' => ['integer', $this->getVersion()],
804  'bypass_proxy' => ['integer', (int) $this->isBypassProxyEnabled()],
805  'highscore_enabled' => ['integer', (int) $this->getHighscoreEnabled()],
806  'highscore_achieved_ts' => ['integer', (int) $this->getHighscoreAchievedTS()],
807  'highscore_percentage' => ['integer', (int) $this->getHighscorePercentage()],
808  'highscore_wtime' => ['integer', (int) $this->getHighscoreWTime()],
809  'highscore_own_table' => ['integer', (int) $this->getHighscoreOwnTable()],
810  'highscore_top_table' => ['integer', (int) $this->getHighscoreTopTable()],
811  'highscore_top_num' => ['integer', $this->getHighscoreTopNum()],
812  'only_moveon' => ['integer', (int) $this->getOnlyMoveon()],
813  'achieved' => ['integer', (int) $this->getAchieved()],
814  'answered' => ['integer', (int) $this->getAnswered()],
815  'completed' => ['integer', (int) $this->getCompleted()],
816  'failed' => ['integer', (int) $this->getFailed()],
817  'initialized' => ['integer', (int) $this->getInitialized()],
818  'passed' => ['integer', (int) $this->getPassed()],
819  'progressed' => ['integer', (int) $this->getProgressed()],
820  'satisfied' => ['integer', (int) $this->getSatisfied()],
821  'c_terminated' => ['integer', (int) $this->getTerminated()],
822  'hide_data' => ['integer', (int) $this->getHideData()],
823  'c_timestamp' => ['integer', (int) $this->getTimestamp()],
824  'duration' => ['integer', (int) $this->getDuration()],
825  'no_substatements' => ['integer', (int) $this->getNoSubstatements()],
826  'delete_data' => ['integer', $this->getDeleteData()]
827  ]);
828 
830  }
getHighscoreTopTable()
Gets, if the top-rankings table should be shown.
getHighscoreWTime()
Gets if the column with the workingtime should be shown.
getHighscoreTopNum(?int $a_retval=10)
Gets the number of entries which are to be shown in the top-rankings table.
getHighscoreOwnTable()
Gets if the own rankings table should be shown.
getMoveOn()
Attention: this is the original imported moveOn for using in LaunchData and LaunchStatement use getLM...
getHighscoreEnabled()
Gets the setting which determines if the highscore feature is enabled.
global $DIC
Definition: shib_login.php:22
getHighscorePercentage()
Gets if the percentage column should be shown.
getHighscoreAchievedTS()
Returns if date and time of the scores achievement should be displayed.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveRepositoryActivationSettings()

ilObjCmiXapi::saveRepositoryActivationSettings ( )
protected

Definition at line 857 of file class.ilObjCmiXapi.php.

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

Referenced by save().

857  : void
858  {
859  if ($this->ref_id) {
860  ilObjectActivation::getItem($this->ref_id);
861 
862  $item = new ilObjectActivation();
863  if (!$this->isActivationLimited()) {
864  $item->setTimingType(ilObjectActivation::TIMINGS_DEACTIVATED);
865  } else {
866  $item->setTimingType(ilObjectActivation::TIMINGS_ACTIVATION);
867  $item->setTimingStart($this->getActivationStartingTime());
868  $item->setTimingEnd($this->getActivationEndingTime());
869  $item->toggleVisible($this->getActivationVisibility());
870  }
871 
872  $item->update($this->ref_id);
873  }
874  }
static getItem(int $ref_id)
Class ilObjectActivation.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAchieved()

ilObjCmiXapi::setAchieved ( bool  $achieved)

Definition at line 507 of file class.ilObjCmiXapi.php.

References $achieved.

Referenced by load().

507  : void
508  {
509  $this->achieved = $achieved;
510  }
+ Here is the caller graph for this function:

◆ setActivationEndingTime()

ilObjCmiXapi::setActivationEndingTime ( ?int  $activationEndingTime = null)

Definition at line 1830 of file class.ilObjCmiXapi.php.

References $activationEndingTime.

Referenced by loadRepositoryActivationSettings().

1830  : void
1831  {
1832  $this->activationEndingTime = $activationEndingTime;
1833  }
+ Here is the caller graph for this function:

◆ setActivationLimited()

ilObjCmiXapi::setActivationLimited ( bool  $activationLimited)

Definition at line 1810 of file class.ilObjCmiXapi.php.

References $activationLimited.

Referenced by loadRepositoryActivationSettings().

1810  : void
1811  {
1812  $this->activationLimited = $activationLimited;
1813  }
bool $activationLimited
repository object activation settings (handled by ilObject)
+ Here is the caller graph for this function:

◆ setActivationStartingTime()

ilObjCmiXapi::setActivationStartingTime ( ?int  $activationStartingTime = null)

Definition at line 1820 of file class.ilObjCmiXapi.php.

References $activationStartingTime.

Referenced by loadRepositoryActivationSettings().

1820  : void
1821  {
1822  $this->activationStartingTime = $activationStartingTime;
1823  }
+ Here is the caller graph for this function:

◆ setActivationVisibility()

ilObjCmiXapi::setActivationVisibility ( bool  $activationVisibility)

Definition at line 1840 of file class.ilObjCmiXapi.php.

References $activationVisibility.

Referenced by loadRepositoryActivationSettings().

1840  : void
1841  {
1842  $this->activationVisibility = $activationVisibility;
1843  }
+ Here is the caller graph for this function:

◆ setActivityId()

ilObjCmiXapi::setActivityId ( string  $activityId)

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

References $activityId.

Referenced by load().

287  : void
288  {
289  $this->activityId = $activityId;
290  }
+ Here is the caller graph for this function:

◆ setAnswered()

ilObjCmiXapi::setAnswered ( bool  $answered)

Definition at line 517 of file class.ilObjCmiXapi.php.

References $answered.

Referenced by load().

517  : void
518  {
519  $this->answered = $answered;
520  }
+ Here is the caller graph for this function:

◆ setAuthFetchUrlEnabled()

ilObjCmiXapi::setAuthFetchUrlEnabled ( bool  $authFetchUrlEnabled)

Definition at line 402 of file class.ilObjCmiXapi.php.

References $authFetchUrlEnabled.

Referenced by load().

402  : void
403  {
404  $this->authFetchUrlEnabled = $authFetchUrlEnabled;
405  }
+ Here is the caller graph for this function:

◆ setBypassProxyEnabled()

ilObjCmiXapi::setBypassProxyEnabled ( bool  $bypassProxyEnabled)

Definition at line 687 of file class.ilObjCmiXapi.php.

References $bypassProxyEnabled.

Referenced by load().

687  : void
688  {
689  $this->bypassProxyEnabled = $bypassProxyEnabled;
690  }
+ Here is the caller graph for this function:

◆ setCompleted()

ilObjCmiXapi::setCompleted ( bool  $completed)

Definition at line 527 of file class.ilObjCmiXapi.php.

References $completed.

Referenced by load().

527  : void
528  {
529  $this->completed = $completed;
530  }
+ Here is the caller graph for this function:

◆ setContentType()

ilObjCmiXapi::setContentType ( string  $contentType)

Definition at line 245 of file class.ilObjCmiXapi.php.

References $contentType.

Referenced by load().

245  : void
246  {
247  //bug before 21-07-24
248  if ($contentType == "learning") {
249  $contentType = self::CONT_TYPE_GENERIC;
250  }
251  $this->contentType = $contentType;
252  }
+ Here is the caller graph for this function:

◆ setDeleteData()

ilObjCmiXapi::setDeleteData ( int  $deleteData)

Definition at line 637 of file class.ilObjCmiXapi.php.

References $deleteData.

Referenced by load().

637  : void
638  {
639  $this->deleteData = $deleteData;
640  }
+ Here is the caller graph for this function:

◆ setDuration()

ilObjCmiXapi::setDuration ( bool  $duration)

Definition at line 617 of file class.ilObjCmiXapi.php.

References $duration.

Referenced by load().

617  : void
618  {
619  $this->duration = $duration;
620  }
+ Here is the caller graph for this function:

◆ setEntitlementKey()

ilObjCmiXapi::setEntitlementKey ( string  $entitlementKey)

Definition at line 392 of file class.ilObjCmiXapi.php.

References $entitlementKey.

Referenced by load().

392  : void
393  {
394  $this->entitlementKey = $entitlementKey;
395  }
+ Here is the caller graph for this function:

◆ setFailed()

ilObjCmiXapi::setFailed ( bool  $failed)

Definition at line 537 of file class.ilObjCmiXapi.php.

References $failed.

Referenced by load().

537  : void
538  {
539  $this->failed = $failed;
540  }
+ Here is the caller graph for this function:

◆ setHideData()

ilObjCmiXapi::setHideData ( bool  $hide_data)

Definition at line 597 of file class.ilObjCmiXapi.php.

References $hide_data.

Referenced by load().

597  : void
598  {
599  $this->hide_data = $hide_data;
600  }
+ Here is the caller graph for this function:

◆ setHighscoreAchievedTS()

ilObjCmiXapi::setHighscoreAchievedTS ( bool  $a_achieved_ts)

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

Definition at line 1035 of file class.ilObjCmiXapi.php.

Referenced by load().

1035  : void
1036  {
1037  $this->_highscore_achieved_ts = $a_achieved_ts;
1038  }
+ Here is the caller graph for this function:

◆ setHighscoreEnabled()

ilObjCmiXapi::setHighscoreEnabled ( bool  $a_enabled)

Sets if the highscore feature should be enabled.

Definition at line 1018 of file class.ilObjCmiXapi.php.

Referenced by load().

1018  : void
1019  {
1020  $this->_highscore_enabled = $a_enabled;
1021  }
+ Here is the caller graph for this function:

◆ setHighscoreMode()

ilObjCmiXapi::setHighscoreMode ( int  $mode)

Definition at line 1160 of file class.ilObjCmiXapi.php.

References setHighscoreOwnTable(), and setHighscoreTopTable().

1160  : void
1161  {
1162  switch ($mode) {
1163  case self::HIGHSCORE_SHOW_ALL_TABLES:
1164  $this->setHighscoreTopTable(true);
1165  $this->setHighscoreOwnTable(true);
1166  break;
1167 
1168  case self::HIGHSCORE_SHOW_TOP_TABLE:
1169  $this->setHighscoreTopTable(true);
1170  $this->setHighscoreOwnTable(false);
1171  break;
1172 
1173  case self::HIGHSCORE_SHOW_OWN_TABLE:
1174  default:
1175  $this->setHighscoreTopTable(false);
1176  $this->setHighscoreOwnTable(true);
1177  break;
1178  }
1179  }
setHighscoreOwnTable(bool $a_own_table)
Sets if the table with the own ranking should be shown.
setHighscoreTopTable(bool $a_top_table)
Sets if the top-rankings table should be shown.
+ Here is the call graph for this function:

◆ setHighscoreOwnTable()

ilObjCmiXapi::setHighscoreOwnTable ( bool  $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 1087 of file class.ilObjCmiXapi.php.

Referenced by load(), and setHighscoreMode().

1087  : void
1088  {
1089  $this->_highscore_own_table = $a_own_table;
1090  }
+ Here is the caller graph for this function:

◆ setHighscorePercentage()

ilObjCmiXapi::setHighscorePercentage ( bool  $a_percentage)

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

Definition at line 1052 of file class.ilObjCmiXapi.php.

Referenced by load().

1052  : void
1053  {
1054  $this->_highscore_percentage = $a_percentage;
1055  }
+ Here is the caller graph for this function:

◆ setHighscoreTopNum()

ilObjCmiXapi::setHighscoreTopNum ( int  $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 1123 of file class.ilObjCmiXapi.php.

Referenced by load().

1123  : void
1124  {
1125  $this->_highscore_top_num = $a_top_num;
1126  }
+ Here is the caller graph for this function:

◆ setHighscoreTopTable()

ilObjCmiXapi::setHighscoreTopTable ( bool  $a_top_table)

Sets if the top-rankings table should be shown.

Definition at line 1104 of file class.ilObjCmiXapi.php.

Referenced by load(), and setHighscoreMode().

1104  : void
1105  {
1106  $this->_highscore_top_table = $a_top_table;
1107  }
+ Here is the caller graph for this function:

◆ setHighscoreWTime()

ilObjCmiXapi::setHighscoreWTime ( bool  $a_wtime)

Sets if the workingtime of the scores should be shown.

Definition at line 1069 of file class.ilObjCmiXapi.php.

Referenced by load().

1069  : void
1070  {
1071  $this->_highscore_wtime = $a_wtime;
1072  }
+ Here is the caller graph for this function:

◆ setInitialized()

ilObjCmiXapi::setInitialized ( bool  $initialized)

Definition at line 547 of file class.ilObjCmiXapi.php.

References $initialized.

Referenced by load().

547  : void
548  {
549  $this->initialized = $initialized;
550  }
+ Here is the caller graph for this function:

◆ setInstructions()

ilObjCmiXapi::setInstructions ( string  $instructions)

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

References $instructions.

Referenced by load().

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

◆ setKeepLpStatusEnabled()

ilObjCmiXapi::setKeepLpStatusEnabled ( bool  $keepLpStatusEnabled)

Definition at line 467 of file class.ilObjCmiXapi.php.

References $keepLpStatusEnabled.

Referenced by load().

467  : void
468  {
469  $this->keepLpStatusEnabled = $keepLpStatusEnabled;
470  }
+ Here is the caller graph for this function:

◆ setLaunchMethod()

ilObjCmiXapi::setLaunchMethod ( string  $launchMethod)

Definition at line 412 of file class.ilObjCmiXapi.php.

References $launchMethod.

Referenced by load().

412  : void
413  {
414  $this->launchMethod = $launchMethod;
415  }
+ Here is the caller graph for this function:

◆ setLaunchMode()

ilObjCmiXapi::setLaunchMode ( string  $launchMode)

Definition at line 422 of file class.ilObjCmiXapi.php.

Referenced by load().

422  : void
423  {
424  $this->launchMode = ucfirst($launchMode);
425  }
+ Here is the caller graph for this function:

◆ setLaunchParameters()

ilObjCmiXapi::setLaunchParameters ( string  $launchParameters)

Definition at line 327 of file class.ilObjCmiXapi.php.

References $launchParameters.

Referenced by load().

327  : void
328  {
329  $this->launchParameters = $launchParameters;
330  }
+ Here is the caller graph for this function:

◆ setLaunchUrl()

ilObjCmiXapi::setLaunchUrl ( string  $launchUrl)

Definition at line 317 of file class.ilObjCmiXapi.php.

References $launchUrl.

Referenced by load().

317  : void
318  {
319  $this->launchUrl = $launchUrl;
320  }
+ Here is the caller graph for this function:

◆ setLrsType()

ilObjCmiXapi::setLrsType ( \ilCmiXapiLrsType  $lrsType)

Definition at line 230 of file class.ilObjCmiXapi.php.

References $lrsType.

Referenced by initLrsType().

230  : void
231  {
232  $this->lrsType = $lrsType;
233  }
ilCmiXapiLrsType $lrsType
+ Here is the caller graph for this function:

◆ setLrsTypeId()

ilObjCmiXapi::setLrsTypeId ( int  $lrsTypeId)

Definition at line 220 of file class.ilObjCmiXapi.php.

References $lrsTypeId.

Referenced by load().

220  : void
221  {
222  $this->lrsTypeId = $lrsTypeId;
223  }
+ Here is the caller graph for this function:

◆ setMasteryScore()

ilObjCmiXapi::setMasteryScore ( float  $masteryScore)

Definition at line 447 of file class.ilObjCmiXapi.php.

References $masteryScore.

Referenced by load().

447  : void
448  {
449  $this->masteryScore = $masteryScore;
450  }
+ Here is the caller graph for this function:

◆ setMasteryScorePercent()

ilObjCmiXapi::setMasteryScorePercent ( float  $masteryScorePercent)

Definition at line 457 of file class.ilObjCmiXapi.php.

457  : void
458  {
459  $this->masteryScore = $masteryScorePercent / 100;
460  }

◆ setMoveOn()

ilObjCmiXapi::setMoveOn ( string  $moveOn)

Attention: this is the original moveOn from course import should only be set on import!

Definition at line 345 of file class.ilObjCmiXapi.php.

References $moveOn.

Referenced by load().

345  : void
346  {
347  $this->moveOn = $moveOn;
348  }
+ Here is the caller graph for this function:

◆ setNoSubstatements()

ilObjCmiXapi::setNoSubstatements ( bool  $no_substatements)

Definition at line 627 of file class.ilObjCmiXapi.php.

References $no_substatements.

Referenced by load().

627  : void
628  {
629  $this->no_substatements = $no_substatements;
630  }
+ Here is the caller graph for this function:

◆ setOnlyMoveon()

ilObjCmiXapi::setOnlyMoveon ( bool  $only_moveon)

Definition at line 497 of file class.ilObjCmiXapi.php.

References $only_moveon.

Referenced by load().

497  : void
498  {
499  $this->only_moveon = $only_moveon;
500  }
+ Here is the caller graph for this function:

◆ setPassed()

ilObjCmiXapi::setPassed ( bool  $passed)

Definition at line 557 of file class.ilObjCmiXapi.php.

References $passed.

Referenced by load().

557  : void
558  {
559  $this->passed = $passed;
560  }
+ Here is the caller graph for this function:

◆ setPrivacyIdent()

ilObjCmiXapi::setPrivacyIdent ( int  $userIdent)

Definition at line 477 of file class.ilObjCmiXapi.php.

References $userIdent.

Referenced by load().

477  : void
478  {
479  $this->userIdent = $userIdent;
480  }
+ Here is the caller graph for this function:

◆ setPrivacyName()

ilObjCmiXapi::setPrivacyName ( int  $userName)

Definition at line 487 of file class.ilObjCmiXapi.php.

References $userName.

Referenced by load().

487  : void
488  {
489  $this->userName = $userName;
490  }
+ Here is the caller graph for this function:

◆ setProgressed()

ilObjCmiXapi::setProgressed ( bool  $progressed)

Definition at line 567 of file class.ilObjCmiXapi.php.

References $progressed.

Referenced by load().

567  : void
568  {
569  $this->progressed = $progressed;
570  }
+ Here is the caller graph for this function:

◆ setPublisherId()

ilObjCmiXapi::setPublisherId ( string  $publisherId)

Definition at line 297 of file class.ilObjCmiXapi.php.

References $publisherId.

Referenced by load().

297  : void
298  {
299  $this->publisherId = $publisherId;
300  }
+ Here is the caller graph for this function:

◆ setSatisfied()

ilObjCmiXapi::setSatisfied ( bool  $satisfied)

Definition at line 577 of file class.ilObjCmiXapi.php.

References $satisfied.

Referenced by load().

577  : void
578  {
579  $this->satisfied = $satisfied;
580  }
+ Here is the caller graph for this function:

◆ setSourceType()

ilObjCmiXapi::setSourceType ( string  $sourceType)

Definition at line 277 of file class.ilObjCmiXapi.php.

References $sourceType.

Referenced by load().

277  : void
278  {
279  $this->sourceType = $sourceType;
280  }
+ Here is the caller graph for this function:

◆ setStatementsReportEnabled()

ilObjCmiXapi::setStatementsReportEnabled ( bool  $statementsReportEnabled)

Definition at line 657 of file class.ilObjCmiXapi.php.

References $statementsReportEnabled.

Referenced by load().

657  : void
658  {
659  $this->statementsReportEnabled = $statementsReportEnabled;
660  }
+ Here is the caller graph for this function:

◆ setSwitchToReviewEnabled()

ilObjCmiXapi::setSwitchToReviewEnabled ( bool  $switchToReviewEnabled)

Definition at line 437 of file class.ilObjCmiXapi.php.

References $switchToReviewEnabled.

Referenced by load().

437  : void
438  {
439  $this->switchToReviewEnabled = $switchToReviewEnabled;
440  }
+ Here is the caller graph for this function:

◆ setTerminated()

ilObjCmiXapi::setTerminated ( bool  $terminated)

Definition at line 587 of file class.ilObjCmiXapi.php.

References $terminated.

Referenced by load().

587  : void
588  {
589  $this->terminated = $terminated;
590  }
+ Here is the caller graph for this function:

◆ setTimestamp()

ilObjCmiXapi::setTimestamp ( bool  $timestamp)

Definition at line 607 of file class.ilObjCmiXapi.php.

References $timestamp.

Referenced by load().

607  : void
608  {
609  $this->timestamp = $timestamp;
610  }
+ Here is the caller graph for this function:

◆ setUserPrivacyComment()

ilObjCmiXapi::setUserPrivacyComment ( string  $userPrivacyComment)

Definition at line 647 of file class.ilObjCmiXapi.php.

References $userPrivacyComment.

Referenced by load().

647  : void
648  {
649  $this->userPrivacyComment = $userPrivacyComment;
650  }
+ Here is the caller graph for this function:

◆ setVersion()

ilObjCmiXapi::setVersion ( int  $version)

Definition at line 677 of file class.ilObjCmiXapi.php.

References $version.

Referenced by load().

677  : void
678  {
679  $this->version = $version;
680  }
+ Here is the caller graph for this function:

◆ setXmlManifest()

ilObjCmiXapi::setXmlManifest ( string  $xmlManifest)

Definition at line 667 of file class.ilObjCmiXapi.php.

References $xmlManifest.

Referenced by load().

667  : void
668  {
669  $this->xmlManifest = $xmlManifest;
670  }
+ Here is the caller graph for this function:

◆ updateByPassProxyFromLrsType()

static ilObjCmiXapi::updateByPassProxyFromLrsType ( ilCmiXapiLrsType  $lrsType)
static

Definition at line 947 of file class.ilObjCmiXapi.php.

References $DIC, ilCmiXapiLrsType\getTypeId(), and ilCmiXapiLrsType\isBypassProxyEnabled().

Referenced by ilObjCmiXapiAdministrationGUI\saveLrsTypeFormCmd().

947  : void
948  {
949  global $DIC; /* @var \ILIAS\DI\Container $DIC */
950  // not possible: Move Global Access to Constructor
951  $tableName = self::DB_TABLE_NAME;
952 
953  $query = "
954  UPDATE {$tableName}
955  SET bypass_proxy = %s
956  WHERE lrs_type_id = %s
957  ";
958 
959  $DIC->database()->manipulateF(
960  $query,
961  ['integer', 'integer'],
962  [$lrsType->isBypassProxyEnabled(), $lrsType->getTypeId()]
963  );
964  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updatePrivacySettingsFromLrsType()

static ilObjCmiXapi::updatePrivacySettingsFromLrsType ( ilCmiXapiLrsType  $lrsType)
static

Definition at line 876 of file class.ilObjCmiXapi.php.

References $DIC, ilCmiXapiLrsType\getAchieved(), ilCmiXapiLrsType\getAnswered(), ilCmiXapiLrsType\getCompleted(), ilCmiXapiLrsType\getDeleteData(), ilCmiXapiLrsType\getDuration(), ilCmiXapiLrsType\getFailed(), ilCmiXapiLrsType\getHideData(), ilCmiXapiLrsType\getInitialized(), ilCmiXapiLrsType\getNoSubstatements(), ilCmiXapiLrsType\getOnlyMoveon(), ilCmiXapiLrsType\getPassed(), ilCmiXapiLrsType\getPrivacyIdent(), ilCmiXapiLrsType\getPrivacyName(), ilCmiXapiLrsType\getProgressed(), ilCmiXapiLrsType\getSatisfied(), ilCmiXapiLrsType\getTerminated(), ilCmiXapiLrsType\getTimestamp(), and ilCmiXapiLrsType\getTypeId().

Referenced by ilObjCmiXapiAdministrationGUI\saveLrsTypeFormCmd().

876  : void
877  {
878  global $DIC; /* @var \ILIAS\DI\Container $DIC */
879  //not possible: Move Global Access to Constructor
880  $tableName = self::DB_TABLE_NAME;
881 
882  $query = "
883  UPDATE {$tableName}
884  SET privacy_ident = %s,
885  privacy_name = %s,
886  only_moveon = %s,
887  achieved = %s,
888  answered = %s,
889  completed = %s,
890  failed = %s,
891  initialized = %s,
892  passed = %s,
893  progressed = %s,
894  satisfied = %s,
895  c_terminated = %s,
896  hide_data = %s,
897  c_timestamp = %s,
898  duration = %s,
899  no_substatements = %s,
900  delete_data = %s
901  WHERE lrs_type_id = %s
902  ";
903 
904  $DIC->database()->manipulateF(
905  $query,
906  ['integer',
907  'integer',
908  'integer',
909  'integer',
910  'integer',
911  'integer',
912  'integer',
913  'integer',
914  'integer',
915  'integer',
916  'integer',
917  'integer',
918  'integer',
919  'integer',
920  'integer',
921  'integer',
922  'integer',
923  'integer'
924  ],
925  [$lrsType->getPrivacyIdent(),
926  $lrsType->getPrivacyName(),
927  $lrsType->getOnlyMoveon(),
928  $lrsType->getAchieved(),
929  $lrsType->getAnswered(),
930  $lrsType->getCompleted(),
931  $lrsType->getFailed(),
932  $lrsType->getInitialized(),
933  $lrsType->getPassed(),
934  $lrsType->getProgressed(),
935  $lrsType->getSatisfied(),
936  $lrsType->getTerminated(),
937  $lrsType->getHideData(),
938  $lrsType->getTimestamp(),
939  $lrsType->getDuration(),
940  $lrsType->getNoSubstatements(),
941  $lrsType->getDeleteData(),
942  $lrsType->getTypeId()
943  ]
944  );
945  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $_highscore_achieved_ts

bool ilObjCmiXapi::$_highscore_achieved_ts = true
protected

Definition at line 999 of file class.ilObjCmiXapi.php.

Referenced by getHighscoreAchievedTS().

◆ $_highscore_enabled

bool ilObjCmiXapi::$_highscore_enabled = false
protected

HIGHSCORE.

Definition at line 995 of file class.ilObjCmiXapi.php.

Referenced by getHighscoreEnabled().

◆ $_highscore_own_table

bool ilObjCmiXapi::$_highscore_own_table = true
protected

Definition at line 1005 of file class.ilObjCmiXapi.php.

Referenced by getHighscoreOwnTable().

◆ $_highscore_percentage

bool ilObjCmiXapi::$_highscore_percentage = true
protected

Definition at line 1001 of file class.ilObjCmiXapi.php.

Referenced by getHighscorePercentage().

◆ $_highscore_top_num

int ilObjCmiXapi::$_highscore_top_num = 10
protected

Definition at line 1009 of file class.ilObjCmiXapi.php.

Referenced by getHighscoreTopNum().

◆ $_highscore_top_table

bool ilObjCmiXapi::$_highscore_top_table = true
protected

Definition at line 1007 of file class.ilObjCmiXapi.php.

Referenced by getHighscoreTopTable().

◆ $_highscore_wtime

bool ilObjCmiXapi::$_highscore_wtime = true
protected

Definition at line 1003 of file class.ilObjCmiXapi.php.

Referenced by getHighscoreWTime().

◆ $achieved

bool ilObjCmiXapi::$achieved = true
protected

Definition at line 122 of file class.ilObjCmiXapi.php.

Referenced by getAchieved(), and setAchieved().

◆ $activationEndingTime

int ilObjCmiXapi::$activationEndingTime = null
protected

Definition at line 43 of file class.ilObjCmiXapi.php.

Referenced by getActivationEndingTime(), and setActivationEndingTime().

◆ $activationLimited

bool ilObjCmiXapi::$activationLimited = null
protected

repository object activation settings (handled by ilObject)

Definition at line 41 of file class.ilObjCmiXapi.php.

Referenced by isActivationLimited(), and setActivationLimited().

◆ $activationStartingTime

int ilObjCmiXapi::$activationStartingTime = null
protected

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

Referenced by getActivationStartingTime(), and setActivationStartingTime().

◆ $activationVisibility

bool ilObjCmiXapi::$activationVisibility = null
protected

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

Referenced by getActivationVisibility(), and setActivationVisibility().

◆ $activityId

string ilObjCmiXapi::$activityId
protected

◆ $anonymity

int ilObjCmiXapi::$anonymity = 0
protected

Definition at line 997 of file class.ilObjCmiXapi.php.

◆ $anonymousHomePage

bool ilObjCmiXapi::$anonymousHomePage = false
protected

Definition at line 75 of file class.ilObjCmiXapi.php.

◆ $answered

bool ilObjCmiXapi::$answered = true
protected

Definition at line 124 of file class.ilObjCmiXapi.php.

Referenced by getAnswered(), and setAnswered().

◆ $authFetchUrlEnabled

bool ilObjCmiXapi::$authFetchUrlEnabled = false
protected

Definition at line 73 of file class.ilObjCmiXapi.php.

Referenced by isAuthFetchUrlEnabled(), and setAuthFetchUrlEnabled().

◆ $bypassProxyEnabled

bool ilObjCmiXapi::$bypassProxyEnabled = false
protected

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

Referenced by isBypassProxyEnabled(), and setBypassProxyEnabled().

◆ $completed

bool ilObjCmiXapi::$completed = true
protected

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

Referenced by getCompleted(), and setCompleted().

◆ $contentType

string ilObjCmiXapi::$contentType
protected

Definition at line 50 of file class.ilObjCmiXapi.php.

Referenced by getContentType(), and setContentType().

◆ $currentCmixUser

ilCmiXapiUser ilObjCmiXapi::$currentCmixUser = null
protected

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

Referenced by getCurrentCmixUser().

◆ $database

ilDBInterface ilObjCmiXapi::$database
private

Definition at line 152 of file class.ilObjCmiXapi.php.

◆ $deleteData

int ilObjCmiXapi::$deleteData = 0
protected

Definition at line 148 of file class.ilObjCmiXapi.php.

Referenced by getDeleteData(), and setDeleteData().

◆ $duration

bool ilObjCmiXapi::$duration = true
protected

Definition at line 144 of file class.ilObjCmiXapi.php.

Referenced by getDuration(), and setDuration().

◆ $entitlementKey

string ilObjCmiXapi::$entitlementKey
protected

Definition at line 71 of file class.ilObjCmiXapi.php.

Referenced by getEntitlementKey(), and setEntitlementKey().

◆ $failed

bool ilObjCmiXapi::$failed = true
protected

Definition at line 128 of file class.ilObjCmiXapi.php.

Referenced by getFailed(), and setFailed().

◆ $hide_data

bool ilObjCmiXapi::$hide_data = false
protected

Definition at line 140 of file class.ilObjCmiXapi.php.

Referenced by getHideData(), and setHideData().

◆ $initialized

bool ilObjCmiXapi::$initialized = true
protected

Definition at line 130 of file class.ilObjCmiXapi.php.

Referenced by getInitialized(), and setInitialized().

◆ $instructions

string ilObjCmiXapi::$instructions
protected

Definition at line 63 of file class.ilObjCmiXapi.php.

Referenced by getInstructions(), and setInstructions().

◆ $keepLpStatusEnabled

bool ilObjCmiXapi::$keepLpStatusEnabled = false
protected

Definition at line 93 of file class.ilObjCmiXapi.php.

Referenced by isKeepLpStatusEnabled(), and setKeepLpStatusEnabled().

◆ $launchMethod

string ilObjCmiXapi::$launchMethod
protected

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

Referenced by getLaunchMethod(), and setLaunchMethod().

◆ $launchMode

string ilObjCmiXapi::$launchMode
protected

Definition at line 83 of file class.ilObjCmiXapi.php.

Referenced by getLaunchedContextTemplate(), and getLaunchedStatement().

◆ $launchParameters

string ilObjCmiXapi::$launchParameters
protected

Definition at line 67 of file class.ilObjCmiXapi.php.

Referenced by getLaunchParameters(), and setLaunchParameters().

◆ $launchUrl

string ilObjCmiXapi::$launchUrl
protected

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

Referenced by getLaunchUrl(), and setLaunchUrl().

◆ $lrsType

ilCmiXapiLrsType ilObjCmiXapi::$lrsType
protected

Definition at line 48 of file class.ilObjCmiXapi.php.

Referenced by getLrsType(), and setLrsType().

◆ $lrsTypeId

int ilObjCmiXapi::$lrsTypeId
protected

Definition at line 46 of file class.ilObjCmiXapi.php.

Referenced by getLrsTypeId(), and setLrsTypeId().

◆ $masteryScore

float ilObjCmiXapi::$masteryScore
protected

Definition at line 90 of file class.ilObjCmiXapi.php.

Referenced by getMasteryScore(), and setMasteryScore().

◆ $moveOn

string ilObjCmiXapi::$moveOn
protected

Definition at line 69 of file class.ilObjCmiXapi.php.

Referenced by getLaunchData(), getLMSMoveOn(), getMoveOn(), and setMoveOn().

◆ $no_substatements

bool ilObjCmiXapi::$no_substatements = false
protected

Definition at line 146 of file class.ilObjCmiXapi.php.

Referenced by getNoSubstatements(), and setNoSubstatements().

◆ $only_moveon

bool ilObjCmiXapi::$only_moveon = false
protected

Definition at line 120 of file class.ilObjCmiXapi.php.

Referenced by getOnlyMoveon(), and setOnlyMoveon().

◆ $passed

bool ilObjCmiXapi::$passed = true
protected

Definition at line 132 of file class.ilObjCmiXapi.php.

Referenced by getPassed(), and setPassed().

◆ $progressed

bool ilObjCmiXapi::$progressed = true
protected

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

Referenced by getProgressed(), and setProgressed().

◆ $publisherId

string ilObjCmiXapi::$publisherId
protected

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

Referenced by getPublisherId(), and setPublisherId().

◆ $satisfied

bool ilObjCmiXapi::$satisfied = true
protected

Definition at line 136 of file class.ilObjCmiXapi.php.

Referenced by getSatisfied(), and setSatisfied().

◆ $sourceType

string ilObjCmiXapi::$sourceType
protected

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

Referenced by getSourceType(), and setSourceType().

◆ $statementsReportEnabled

bool ilObjCmiXapi::$statementsReportEnabled = false
protected

◆ $switchToReviewEnabled

bool ilObjCmiXapi::$switchToReviewEnabled = false
protected

◆ $terminated

bool ilObjCmiXapi::$terminated = true
protected

Definition at line 138 of file class.ilObjCmiXapi.php.

Referenced by getTerminated(), and setTerminated().

◆ $timestamp

bool ilObjCmiXapi::$timestamp = false
protected

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

Referenced by getTimestamp(), and setTimestamp().

◆ $userIdent

int ilObjCmiXapi::$userIdent
protected

Definition at line 95 of file class.ilObjCmiXapi.php.

Referenced by getPrivacyIdent(), and setPrivacyIdent().

◆ $userName

int ilObjCmiXapi::$userName
protected

Definition at line 104 of file class.ilObjCmiXapi.php.

Referenced by getPrivacyName(), and setPrivacyName().

◆ $userPrivacyComment

string ilObjCmiXapi::$userPrivacyComment = ""
protected

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

Referenced by getUserPrivacyComment(), and setUserPrivacyComment().

◆ $version

int ilObjCmiXapi::$version
protected

Definition at line 116 of file class.ilObjCmiXapi.php.

Referenced by getVersion(), and setVersion().

◆ $xmlManifest

string ilObjCmiXapi::$xmlManifest = ""
protected

Definition at line 114 of file class.ilObjCmiXapi.php.

Referenced by getXmlManifest(), and setXmlManifest().

◆ ANONYMOUS_HOMEPAGE

const ilObjCmiXapi::ANONYMOUS_HOMEPAGE = 'https://example.org'

Definition at line 76 of file class.ilObjCmiXapi.php.

◆ CONT_TYPE_CMI5

◆ CONT_TYPE_GENERIC

◆ DB_RESULTS_TABLE_NAME

const ilObjCmiXapi::DB_RESULTS_TABLE_NAME = 'cmix_results'

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

◆ DB_TABLE_NAME

const ilObjCmiXapi::DB_TABLE_NAME = 'cmix_settings'

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

◆ DB_USERS_TABLE_NAME

const ilObjCmiXapi::DB_USERS_TABLE_NAME = 'cmix_users'

Definition at line 35 of file class.ilObjCmiXapi.php.

◆ HIGHSCORE_SHOW_ALL_TABLES

const ilObjCmiXapi::HIGHSCORE_SHOW_ALL_TABLES = 1

Definition at line 1011 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiSettingsGUI\buildForm().

◆ HIGHSCORE_SHOW_OWN_TABLE

const ilObjCmiXapi::HIGHSCORE_SHOW_OWN_TABLE = 3

Definition at line 1013 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiSettingsGUI\buildForm().

◆ HIGHSCORE_SHOW_TOP_TABLE

const ilObjCmiXapi::HIGHSCORE_SHOW_TOP_TABLE = 2

Definition at line 1012 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiSettingsGUI\buildForm().

◆ LAUNCH_METHOD_IFRAME

const ilObjCmiXapi::LAUNCH_METHOD_IFRAME = 'iframe'

Definition at line 81 of file class.ilObjCmiXapi.php.

◆ LAUNCH_METHOD_NEW_WIN

const ilObjCmiXapi::LAUNCH_METHOD_NEW_WIN = 'newWin'

Definition at line 80 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiSettingsGUI\buildForm().

◆ LAUNCH_METHOD_OWN_WIN

const ilObjCmiXapi::LAUNCH_METHOD_OWN_WIN = 'ownWin'

Definition at line 79 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiSettingsGUI\buildForm().

◆ LAUNCH_MODE_BROWSE

const ilObjCmiXapi::LAUNCH_MODE_BROWSE = 'Browse'

Definition at line 85 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiSettingsGUI\buildForm().

◆ LAUNCH_MODE_NORMAL

◆ LAUNCH_MODE_REVIEW

const ilObjCmiXapi::LAUNCH_MODE_REVIEW = 'Review'

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

Referenced by ilCmiXapiSettingsGUI\buildForm().

◆ LMS_MASTERY_SCORE

const ilObjCmiXapi::LMS_MASTERY_SCORE = 0.7

◆ PLUGIN

const ilObjCmiXapi::PLUGIN = false

Definition at line 32 of file class.ilObjCmiXapi.php.

◆ PRIVACY_IDENT_IL_UUID_EXT_ACCOUNT

const ilObjCmiXapi::PRIVACY_IDENT_IL_UUID_EXT_ACCOUNT = 1

Definition at line 97 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getIdent(), and ilCmiXapiUser\getIdentAsId().

◆ PRIVACY_IDENT_IL_UUID_LOGIN

const ilObjCmiXapi::PRIVACY_IDENT_IL_UUID_LOGIN = 2

Definition at line 98 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getIdent(), and ilCmiXapiUser\getIdentAsId().

◆ PRIVACY_IDENT_IL_UUID_RANDOM

const ilObjCmiXapi::PRIVACY_IDENT_IL_UUID_RANDOM = 4

◆ PRIVACY_IDENT_IL_UUID_SHA256

const ilObjCmiXapi::PRIVACY_IDENT_IL_UUID_SHA256 = 5

Definition at line 101 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getIdent(), and ilCmiXapiUser\getIdentAsId().

◆ PRIVACY_IDENT_IL_UUID_SHA256URL

const ilObjCmiXapi::PRIVACY_IDENT_IL_UUID_SHA256URL = 6

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

Referenced by ilCmiXapiUser\getIdent(), and ilCmiXapiUser\getIdentAsId().

◆ PRIVACY_IDENT_IL_UUID_USER_ID

const ilObjCmiXapi::PRIVACY_IDENT_IL_UUID_USER_ID = 0

Definition at line 96 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getIdent(), and ilCmiXapiUser\getIdentAsId().

◆ PRIVACY_IDENT_REAL_EMAIL

const ilObjCmiXapi::PRIVACY_IDENT_REAL_EMAIL = 3

Definition at line 99 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getIdent(), and ilCmiXapiUser\getIdentAsId().

◆ PRIVACY_NAME_FIRSTNAME

const ilObjCmiXapi::PRIVACY_NAME_FIRSTNAME = 1

Definition at line 106 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getName().

◆ PRIVACY_NAME_FULLNAME

const ilObjCmiXapi::PRIVACY_NAME_FULLNAME = 3

Definition at line 108 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getName().

◆ PRIVACY_NAME_LASTNAME

const ilObjCmiXapi::PRIVACY_NAME_LASTNAME = 2

Definition at line 107 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getName().

◆ PRIVACY_NAME_NONE

const ilObjCmiXapi::PRIVACY_NAME_NONE = 0

◆ SRC_TYPE_EXTERNAL

const ilObjCmiXapi::SRC_TYPE_EXTERNAL = 'externalSource'

Definition at line 57 of file class.ilObjCmiXapi.php.

Referenced by ilObjCmiXapiGUI\afterSave().

◆ SRC_TYPE_LOCAL

const ilObjCmiXapi::SRC_TYPE_LOCAL = 'localSource'

◆ SRC_TYPE_REMOTE

const ilObjCmiXapi::SRC_TYPE_REMOTE = 'remoteSource'

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