ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables 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)
 
 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', ?int $launchedByRefId=null)
 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
 __construct (int $id=0, bool $reference=true)
 
 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 $desc)
 
 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 _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
 
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
 
int $id
 
bool $referenced
 
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 = ""
 
bool $offline = false
 
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 155 of file class.ilObjCmiXapi.php.

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

156  {
157  global $DIC;
158  $this->database = $DIC->database();
159 
160  $this->lrsTypeId = 0;
161 
162  $this->contentType = self::CONT_TYPE_GENERIC;
163  $this->sourceType = self::SRC_TYPE_REMOTE;
164 
165  $this->activityId = '';
166 
167  $this->publisherId = '';
168 
169  $this->instructions = '';
170 
171  $this->launchUrl = '';
172  $this->launchParameters = '';
173  $this->moveOn = '';
174  $this->entitlementKey = '';
175 
176  $this->authFetchUrlEnabled = false;
177 
178  $this->launchMethod = self::LAUNCH_METHOD_NEW_WIN;
179  $this->launchMode = self::LAUNCH_MODE_NORMAL;
180 
181  $this->switchToReviewEnabled = true;
182 
183  $this->masteryScore = self::LMS_MASTERY_SCORE;
184  $this->keepLpStatusEnabled = true;
185 
186  $this->userIdent = self::PRIVACY_IDENT_IL_UUID_USER_ID;
187  $this->userName = self::PRIVACY_NAME_NONE;
188  $this->userPrivacyComment = '';
189 
190  $this->currentCmixUser = null;
191 
192  $this->statementsReportEnabled = false;
193 
194  $this->xmlManifest = '';
195  $this->version = 0;
196 
197  $this->bypassProxyEnabled = false;
198 
199  parent::__construct($a_id, $a_reference);
200  }
global $DIC
Definition: feed.php:28
__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 1228 of file class.ilObjCmiXapi.php.

References ilObject2\cloneMetaData(), getAchieved(), getActivityId(), getAnswered(), getCompleted(), getContentType(), 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().

1228  : void
1229  {
1230  assert($new_obj instanceof ilObjCmiXapi);
1231 
1232  $this->cloneMetaData($new_obj);
1233 
1234  $new_obj->setLrsTypeId($this->getLrsTypeId());
1235  $new_obj->setContentType($this->getContentType());
1236  $new_obj->setSourceType($this->getSourceType());
1237  $new_obj->setActivityId($this->getActivityId());
1238  $new_obj->setPublisherId($this->getPublisherId());
1239  $new_obj->setInstructions($this->getInstructions());
1240  $new_obj->setLaunchUrl($this->getLaunchUrl());
1241  $new_obj->setLaunchParameters($this->getLaunchParameters());
1242  $new_obj->setMoveOn($this->getMoveOn());
1243  $new_obj->setEntitlementKey($this->getEntitlementKey());
1244  $new_obj->setAuthFetchUrlEnabled($this->isAuthFetchUrlEnabled());
1245  $new_obj->setLaunchMethod($this->getLaunchMethod());
1246  $new_obj->setLaunchMode($this->getLaunchMode());
1247  $new_obj->setSwitchToReviewEnabled($this->isSwitchToReviewEnabled());
1248  $new_obj->setMasteryScore($this->getMasteryScore());
1249  $new_obj->setKeepLpStatusEnabled($this->isKeepLpStatusEnabled());
1250  $new_obj->setPrivacyIdent($this->getPrivacyIdent());
1251  $new_obj->setPrivacyName($this->getPrivacyName());
1252  $new_obj->setUserPrivacyComment($this->getUserPrivacyComment());
1253  $new_obj->setStatementsReportEnabled($this->isStatementsReportEnabled());
1254  $new_obj->setXmlManifest($this->getXmlManifest());
1255  $new_obj->setVersion($this->getVersion());
1256  $new_obj->setHighscoreEnabled($this->getHighscoreEnabled());
1257  $new_obj->setHighscoreAchievedTS($this->getHighscoreAchievedTS());
1258  $new_obj->setHighscorePercentage($this->getHighscorePercentage());
1259  $new_obj->setHighscoreWTime($this->getHighscoreWTime());
1260  $new_obj->setHighscoreOwnTable($this->getHighscoreOwnTable());
1261  $new_obj->setHighscoreTopTable($this->getHighscoreTopTable());
1262  $new_obj->setHighscoreTopNum($this->getHighscoreTopNum());
1263  $new_obj->setBypassProxyEnabled($this->isBypassProxyEnabled());
1264  $new_obj->setOnlyMoveon($this->getOnlyMoveon());
1265  $new_obj->setAchieved($this->getAchieved());
1266  $new_obj->setAnswered($this->getAnswered());
1267  $new_obj->setCompleted($this->getCompleted());
1268  $new_obj->setFailed($this->getFailed());
1269  $new_obj->setInitialized($this->getInitialized());
1270  $new_obj->setPassed($this->getPassed());
1271  $new_obj->setProgressed($this->getProgressed());
1272  $new_obj->setSatisfied($this->getSatisfied());
1273  $new_obj->setTerminated($this->getTerminated());
1274  $new_obj->setHideData($this->getHideData());
1275  $new_obj->setTimestamp($this->getTimestamp());
1276  $new_obj->setDuration($this->getDuration());
1277  $new_obj->setNoSubstatements($this->getNoSubstatements());
1278  $new_obj->update();
1279 
1280  if ($this->getSourceType() == self::SRC_TYPE_LOCAL) {
1281  $dirUtil = new ilCmiXapiContentUploadImporter($new_obj);
1282  $dirUtil->ensureCreatedObjectDirectory();
1283  $newDir = implode(DIRECTORY_SEPARATOR, [ilFileUtils::getWebspaceDir(), $dirUtil->getWebDataDirRelativeObjectDirectory()]);
1284  $dirUtil = new ilCmiXapiContentUploadImporter($this);
1285  $thisDir = implode(DIRECTORY_SEPARATOR, [ilFileUtils::getWebspaceDir(), $dirUtil->getWebDataDirRelativeObjectDirectory()]);
1286  ilFileUtils::rCopy($thisDir, $newDir);
1287  }
1288  }
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 1290 of file class.ilObjCmiXapi.php.

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

1290  : void
1291  {
1292  // delete file data entry
1293  $query = "DELETE FROM " . self::DB_TABLE_NAME . " WHERE obj_id = " . $this->database->quote($this->getId(), 'integer');
1294  $this->database->manipulate($query);
1296 
1297  // delete entire directory and its content
1298  $dirUtil = new ilCmiXapiContentUploadImporter($this);
1299  $thisDir = implode(DIRECTORY_SEPARATOR, [ilFileUtils::getWebspaceDir(), $dirUtil->getWebDataDirRelativeObjectDirectory()]);
1300  if (is_dir($thisDir)) {
1301  ilFileUtils::delDir($thisDir);
1302  }
1303 
1304  // delete meta data
1305  $this->deleteMetaData();
1306 
1307  //delete results
1308  $query = "DELETE FROM " . self::DB_RESULTS_TABLE_NAME .
1309  " WHERE obj_id = " . $this->database->quote($this->getId(), 'integer');
1310  $this->database->manipulate($query);
1311 
1312  // TODO check xapidel
1313  }
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
$query
+ Here is the call graph for this function:

◆ doRead()

ilObjCmiXapi::doRead ( )
protected

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

References load().

Referenced by getDataSetMapping().

681  : void
682  {
683  $this->load();
684  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doUpdate()

ilObjCmiXapi::doUpdate ( )
protected

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

References save().

757  : void
758  {
759  $this->save();
760  }
+ 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 1647 of file class.ilObjCmiXapi.php.

References getCurrentCmixUser(), and getStatement().

1647  : array
1648  {
1649  if (null === $cmixUser) {
1650  $cmixUser = $this->getCurrentCmixUser();
1651  }
1652  $statement = $this->getStatement('abandoned', $cmixUser);
1653  // overwrite session with abandoned oldSession
1654  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/sessionid'] = $sessionId;
1655  $statement['result'] = array(
1656  'duration' => $duration
1657  );
1658  return $statement;
1659  }
getStatement(string $verb, ?ilCmiXapiUser $cmixUser=null)
blueprint statement
+ Here is the call graph for this function:

◆ getAchieved()

ilObjCmiXapi::getAchieved ( )

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

References $achieved.

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

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

◆ getActivationEndingTime()

ilObjCmiXapi::getActivationEndingTime ( )

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

References $activationEndingTime.

Referenced by saveRepositoryActivationSettings().

1814  : ?int
1815  {
1817  }
+ Here is the caller graph for this function:

◆ getActivationStartingTime()

ilObjCmiXapi::getActivationStartingTime ( )

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

References $activationStartingTime.

Referenced by saveRepositoryActivationSettings().

1804  : ?int
1805  {
1807  }
+ Here is the caller graph for this function:

◆ getActivationVisibility()

ilObjCmiXapi::getActivationVisibility ( )

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

References $activationVisibility.

Referenced by saveRepositoryActivationSettings().

1824  : ?bool
1825  {
1827  }
+ Here is the caller graph for this function:

◆ getActivityId()

ilObjCmiXapi::getActivityId ( )

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

References $activityId.

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

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

◆ getAnswered()

ilObjCmiXapi::getAnswered ( )

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

References $answered.

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

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

◆ getCompleted()

ilObjCmiXapi::getCompleted ( )

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

References $completed.

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

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

◆ getContentType()

ilObjCmiXapi::getContentType ( )

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

References $contentType.

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

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

◆ getCurrentCmixUser()

ilObjCmiXapi::getCurrentCmixUser ( )

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

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

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

1351  : \ilCmiXapiUser
1352  {
1353  global $DIC;
1354  if (null === $this->currentCmixUser) {
1355  $this->currentCmixUser = new ilCmiXapiUser($this->getId(), $DIC->user()->getId(), $this->getPrivacyIdent());
1356  }
1357  return $this->currentCmixUser;
1358  }
global $DIC
Definition: feed.php:28
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 1169 of file class.ilObjCmiXapi.php.

References doRead(), getAchieved(), getActivityId(), getAnswered(), getCompleted(), getContentType(), 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(), and isSwitchToReviewEnabled().

1169  : array
1170  {
1171  if (null === ($lrsTypeId = $this->getLrsTypeId())) {
1172  $this->doRead();
1173  }
1174  return [
1175  'obj_id' => $this->getId(),
1176  'lrs_type_id' => $this->getLrsTypeId(),
1177  'content_type' => $this->getContentType(),
1178  'source_type' => $this->getSourceType(),
1179  'activity_id' => $this->getActivityId(),
1180  'publisher_id' => $this->getPublisherId(),
1181  'instructions' => $this->getInstructions(),
1182  'launch_url' => $this->getLaunchUrl(),
1183  'launch_parameters' => $this->getLaunchParameters(),
1184  'moveon' => $this->getMoveOn(),
1185  'entitlement_key' => $this->getEntitlementKey(),
1186  'auth_fetch_url' => (int) $this->isAuthFetchUrlEnabled(),
1187  'launch_method' => $this->getLaunchMethod(),
1188  'launch_mode' => $this->getLaunchMode(),
1189  'switch_to_review' => (int) $this->isSwitchToReviewEnabled(),
1190  'mastery_score' => $this->getMasteryScore(),
1191  'keep_lp' => (int) $this->isKeepLpStatusEnabled(),
1192  'privacy_ident' => $this->getPrivacyIdent(),
1193  'privacy_name' => $this->getPrivacyName(),
1194  'usr_privacy_comment' => $this->getUserPrivacyComment(),
1195  'show_statements' => (int) $this->isStatementsReportEnabled(),
1196  'xml_manifest' => $this->getXmlManifest(),
1197  'version' => $this->getVersion(),
1198  'highscore_enabled' => (int) $this->getHighscoreEnabled(),
1199  'highscore_achieved_ts' => (int) $this->getHighscoreAchievedTS(),
1200  'highscore_percentage' => (int) $this->getHighscorePercentage(),
1201  'highscore_wtime' => (int) $this->getHighscoreWTime(),
1202  'highscore_own_table' => (int) $this->getHighscoreOwnTable(),
1203  'highscore_top_table' => (int) $this->getHighscoreTopTable(),
1204  'highscore_top_num' => $this->getHighscoreTopNum(),
1205  'only_moveon' => (int) $this->getOnlyMoveon(),
1206  'achieved' => (int) $this->getAchieved(),
1207  'answered' => (int) $this->getAnswered(),
1208  'completed' => (int) $this->getCompleted(),
1209  'failed' => (int) $this->getFailed(),
1210  'initialized' => (int) $this->getInitialized(),
1211  'passed' => (int) $this->getPassed(),
1212  'progressed' => (int) $this->getProgressed(),
1213  'satisfied' => (int) $this->getSatisfied(),
1214  'c_terminated' => (int) $this->getTerminated(),
1215  'hide_data' => (int) $this->getHideData(),
1216  'c_timestamp' => (int) $this->getTimestamp(),
1217  'duration' => (int) $this->getDuration(),
1218  'no_substatements' => (int) $this->getNoSubstatements()
1219  //'bypass_proxy' => (int) $this->isBypassProxyEnabled()
1220  ];
1221  }
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.
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:

◆ getDuration()

ilObjCmiXapi::getDuration ( )

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

References $duration.

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

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

◆ getEntitlementKey()

ilObjCmiXapi::getEntitlementKey ( )

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

References $entitlementKey.

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

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

◆ getFailed()

ilObjCmiXapi::getFailed ( )

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

References $failed.

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

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

◆ getHideData()

ilObjCmiXapi::getHideData ( )

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

References $hide_data.

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

590  : bool
591  {
592  return $this->hide_data;
593  }
+ 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 1027 of file class.ilObjCmiXapi.php.

References $_highscore_achieved_ts.

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

1027  : bool
1028  {
1030  }
+ 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 1010 of file class.ilObjCmiXapi.php.

References $_highscore_enabled.

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

1010  : bool
1011  {
1013  }
bool $_highscore_enabled
HIGHSCORE.
+ Here is the caller graph for this function:

◆ getHighscoreMode()

ilObjCmiXapi::getHighscoreMode ( )

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

References getHighscoreOwnTable(), and getHighscoreTopTable().

1127  : int
1128  {
1129  switch (true) {
1130  case $this->getHighscoreOwnTable() && $this->getHighscoreTopTable():
1132 
1133  case $this->getHighscoreTopTable():
1135 
1136  case $this->getHighscoreOwnTable():
1137  default:
1139  }
1140  }
getHighscoreTopTable()
Gets, if the top-rankings table should be shown.
const HIGHSCORE_SHOW_OWN_TABLE
getHighscoreOwnTable()
Gets if the own rankings table should be shown.
return['3gp', '7z', 'ai', 'aif', 'aifc', 'aiff', 'au', 'arw', 'avi', 'backup', 'bak', 'bas', 'bpmn', 'bpmn2', 'bmp', 'bib', 'bibtex', 'bz', 'bz2', 'c', 'c++', 'cc', 'cct', 'cdf', 'cer', 'class', 'cls', 'conf', 'cpp', 'crt', 'crs', 'crw', 'cr2', 'css', 'cst', 'csv', 'cur', 'db', 'dcr', 'des', 'dng', 'doc', 'docx', 'dot', 'dotx', 'dtd', 'dvi', 'el', 'eps', 'epub', 'f', 'f77', 'f90', 'flv', 'for', 'g3', 'gif', 'gl', 'gan', 'ggb', 'gsd', 'gsm', 'gtar', 'gz', 'gzip', 'h', 'hpp', 'htm', 'html', 'htmls', 'ibooks', 'ico', 'ics', 'ini', 'ipynb', 'java', 'jbf', 'jpeg', 'jpg', 'js', 'jsf', 'jso', 'json', 'latex', 'lang', 'less', 'log', 'lsp', 'ltx', 'm1v', 'm2a', 'm2v', 'm3u', 'm4a', 'm4v', 'markdown', 'm', 'mat', 'md', 'mdl', 'mdown', 'mid', 'min', 'midi', 'mobi', 'mod', 'mov', 'movie', 'mp2', 'mp3', 'mp4', 'mpa', 'mpeg', 'mpg', 'mph', 'mpga', 'mpp', 'mpt', 'mpv', 'mpx', 'mv', 'mw', 'mv4', 'nb', 'nbp', 'nef', 'nif', 'niff', 'obj', 'obm', 'odt', 'ods', 'odp', 'odg', 'odf', 'oga', 'ogg', 'ogv', 'old', 'p', 'pas', 'pbm', 'pcl', 'pct', 'pcx', 'pdf', 'pgm', 'pic', 'pict', 'png', 'por', 'pov', 'project', 'properties', 'ppa', 'ppm', 'pps', 'ppsx', 'ppt', 'pptx', 'ppz', 'ps', 'psd', 'pwz', 'qt', 'qtc', 'qti', 'qtif', 'r', 'ra', 'ram', 'rar', 'rast', 'rda', 'rev', 'rexx', 'ris', 'rf', 'rgb', 'rm', 'rmd', 'rmi', 'rmm', 'rmp', 'rt', 'rtf', 'rtx', 'rv', 's', 's3m', 'sav', 'sbs', 'sec', 'sdml', 'sgm', 'sgml', 'smi', 'smil', 'srt', 'sps', 'spv', 'stl', 'svg', 'swa', 'swf', 'swz', 'tar', 'tex', 'texi', 'texinfo', 'text', 'tgz', 'tif', 'tiff', 'ttf', 'txt', 'tmp', 'uvproj', 'vdf', 'vimeo', 'viv', 'vivo', 'vrml', 'vsdx', 'wav', 'webm', 'wmv', 'wmx', 'wmz', 'woff', 'wwd', 'xhtml', 'xif', 'xls', 'xlsx', 'xmind', 'xml', 'xsl', 'xsd', 'zip']
const HIGHSCORE_SHOW_ALL_TABLES
const HIGHSCORE_SHOW_TOP_TABLE
+ 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 1079 of file class.ilObjCmiXapi.php.

References $_highscore_own_table.

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

1079  : bool
1080  {
1082  }
+ 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 1044 of file class.ilObjCmiXapi.php.

References $_highscore_percentage.

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

1044  : bool
1045  {
1047  }
+ 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 1117 of file class.ilObjCmiXapi.php.

References $_highscore_top_num.

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

1117  : ?int
1118  {
1119  $retval = $a_retval;
1120  if ($this->_highscore_top_num != 0) {
1121  $retval = $this->_highscore_top_num;
1122  }
1123 
1124  return $retval;
1125  }
+ 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 1096 of file class.ilObjCmiXapi.php.

References $_highscore_top_table.

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

1096  : bool
1097  {
1099  }
+ 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 1061 of file class.ilObjCmiXapi.php.

References $_highscore_wtime.

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

1061  : bool
1062  {
1063  return $this->_highscore_wtime;
1064  }
+ Here is the caller graph for this function:

◆ getInitialized()

ilObjCmiXapi::getInitialized ( )

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

References $initialized.

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

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

◆ getInstance()

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

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

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

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

◆ getInstructions()

ilObjCmiXapi::getInstructions ( )

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

References $instructions.

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

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

◆ getLastStatement()

ilObjCmiXapi::getLastStatement ( string  $sess)

get latest statement from session

Returns
mixed|null

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

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

1684  {
1685  global $DIC;
1686  $lrsType = $this->getLrsType();
1687 
1688  //$this->getLrsEndpoint())) . '/api/' . self::ENDPOINT_AGGREGATE_SUFFIX;
1690  //$fallbackLrs = $lrsType->getLrsFallbackEndpoint();
1691  $defaultBasicAuth = $lrsType->getBasicAuth();
1692  //$fallbackBasicAuth = $lrsType->getFallbackBasicAuth();
1693  $defaultHeaders = [
1694  'X-Experience-API-Version' => '1.0.3',
1695  'Authorization' => $defaultBasicAuth,
1696  'Cache-Control' => 'no-cache, no-store, must-revalidate'
1697  ];
1698  /*
1699  $fallbackHeaders = [
1700  'X-Experience-API-Version' => '1.0.3',
1701  'Authorization' => $fallbackBasicAuth,
1702  'Content-Type' => 'application/json;charset=utf-8',
1703  'Cache-Control' => 'no-cache, no-store, must-revalidate'
1704  ];
1705  */
1706  $pipeline = json_encode($this->getLastStatementPipline($sess));
1707  $defaultLastStatementUrl = $defaultLrs . "?pipeline=" . urlencode($pipeline);
1708  $client = new GuzzleHttp\Client();
1709  $req_opts = array(
1710  GuzzleHttp\RequestOptions::VERIFY => true,
1711  GuzzleHttp\RequestOptions::CONNECT_TIMEOUT => 10,
1712  GuzzleHttp\RequestOptions::HTTP_ERRORS => false
1713  );
1714  $defaultLastStatementRequest = new GuzzleHttp\Psr7\Request(
1715  'GET',
1716  $defaultLastStatementUrl,
1717  $defaultHeaders
1718  );
1719  $promises = array();
1720  $promises['defaultLastStatement'] = $client->sendAsync($defaultLastStatementRequest, $req_opts);
1721  try {
1722  $responses = GuzzleHttp\Promise\Utils::settle($promises)->wait();
1723  $body = '';
1724  ilCmiXapiAbstractRequest::checkResponse($responses['defaultLastStatement'], $body, [200]);
1725  return json_decode($body, (bool) JSON_OBJECT_AS_ARRAY);
1726  } catch (Exception $e) {
1727  $this->log()->error('error:' . $e->getMessage());
1728  return null;
1729  }
1730  }
global $DIC
Definition: feed.php:28
$client
ilCmiXapiLrsType $lrsType
getLastStatementPipline(string $sess)
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 1735 of file class.ilObjCmiXapi.php.

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

Referenced by getLastStatement().

1735  : array
1736  {
1737  global $DIC;
1738  $pipeline = array();
1739 
1740  // filter activityId
1741  $match = array();
1742  $match['statement.object.objectType'] = 'Activity';
1743  $match['statement.actor.objectType'] = 'Agent';
1744 
1745  $activityId = array();
1746 
1747  if ($this->getContentType() == ilObjCmiXapi::CONT_TYPE_CMI5 && !$this->isMixedContentType()) {
1748  // https://github.com/AICC/CMI-5_Spec_Current/blob/quartz/cmi5_spec.md#963-extensions
1749  $activityId['statement.context.extensions.https://ilias&46;de/cmi5/activityid'] = $this->getActivityId();
1750  } else {
1751  $activityQuery = [
1752  '$regex' => '^' . preg_quote($this->getActivityId()) . ''
1753  ];
1754  $activityId['$or'] = [];
1755  $activityId['$or'][] = ['statement.object.id' => $activityQuery];
1756  $activityId['$or'][] = ['statement.context.contextActivities.parent.id' => $activityQuery];
1757  }
1758 
1759  $sessionId = array();
1760  $sessionId['statement.context.extensions.https://w3id&46;org/xapi/cmi5/context/extensions/sessionid'] = $sess;
1761  $match['$and'] = array();
1762  $match['$and'][] = $activityId;
1763  $match['$and'][] = $sessionId;
1764  $sort = array('statement.timestamp' => -1);
1765  $project = array('statement.timestamp' => 1, 'statement.verb.id' => 1);
1766  $pipeline[] = array('$match' => $match);
1767  $pipeline[] = array('$sort' => $sort);
1768  $pipeline[] = array('$limit' => 1);
1769  $pipeline[] = array('$project' => $project);
1770 
1771  return $pipeline;
1772  }
global $DIC
Definition: feed.php:28
+ 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',
?int  $launchedByRefId = null 
)

LMS.LaunchData.

Returns
array<string, mixed>

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

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

1375  : array
1376  {
1377  global $DIC;
1378  if (null === $cmixUser) {
1379  $cmixUser = $this->getCurrentCmixUser();
1380  }
1381  // ToDo
1382  $moveOn = $this->getLMSMoveOn();
1383  if (!$moveOn || $moveOn == '') {
1384  $moveOn = 'Completed';
1385  }
1386  $launchMode = $this->getLaunchMode();
1387  // only check switch if self::LAUNCH_MODE_NORMAL
1388  if ($launchMode == self::LAUNCH_MODE_NORMAL) {
1389  if ($cmixUser->getSatisfied() && $this->isSwitchToReviewEnabled()) {
1390  $launchMode = self::LAUNCH_MODE_REVIEW;
1391  }
1392  }
1393  $ctxTemplate = [
1394  "contextTemplate" => $this->getLaunchedContextTemplate($cmixUser),
1395  "launchMode" => ucfirst($launchMode),
1396  "launchMethod" => "OwnWindow",
1397  "moveOn" => $moveOn
1398  ];
1399  $lmsLaunchMethod = $this->getLaunchMethod();
1400  if ($lmsLaunchMethod === "ownWin") {
1401  if (is_int($launchedByRefId)) {
1402  $href = ilLink::_getStaticLink(
1403  $launchedByRefId,
1405  );
1406  } else {
1407  $href = ilLink::_getStaticLink(
1408  $this->getRefId(),
1409  $this->getType()
1410  );
1411  }
1412  $ctxTemplate['returnURL'] = $href;
1413  } else {
1414  $ctxTemplate['returnURL'] = ILIAS_HTTP_PATH . "/Modules/CmiXapi/xapiexit.php?lang={$lang}";
1415  }
1416  if (!empty($this->getMasteryScore())) {
1417  $ctxTemplate['masteryScore'] = $this->getMasteryScore();
1418  }
1419  if (!empty($this->getLaunchParameters())) {
1420  $ctxTemplate['launchParameters'] = $this->getLaunchParameters();
1421  }
1422  if (!empty($this->getEntitlementKey())) {
1423  $ctxTemplate['entitlementKey'] = array("courseStructure" => $this->getEntitlementKey());
1424  }
1425  return $ctxTemplate;
1426  }
getLaunchedContextTemplate(?ilCmiXapiUser $cmixUser=null)
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28
getLMSMoveOn()
for CMI5 statements | state moveOn values
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:

◆ getLaunchedContextTemplate()

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

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

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

Referenced by getLaunchData().

1431  : array
1432  {
1433  if (null === $cmixUser) {
1434  $cmixUser = $this->getCurrentCmixUser();
1435  }
1436  $launchMode = $this->getLaunchMode();
1437  // only check switch if self::LAUNCH_MODE_NORMAL
1438  if ($launchMode == self::LAUNCH_MODE_NORMAL) {
1439  if ($cmixUser->getSatisfied() && $this->isSwitchToReviewEnabled()) {
1440  $launchMode = self::LAUNCH_MODE_REVIEW;
1441  }
1442  }
1443  $extensions = $this->getStatementExtensions($cmixUser);
1444  $extensions['https://w3id.org/xapi/cmi5/context/extensions/launchmode'] = $launchMode;
1445  if (!empty($this->getLMSMoveOn())) {
1446  $extensions['https://w3id.org/xapi/cmi5/context/extensions/moveon'] = $this->getLMSMoveOn();
1447  }
1448  if (!empty($this->getLaunchParameters())) {
1449  $extensions['https://w3id.org/xapi/cmi5/context/extensions/launchparameters'] = $this->getLaunchParameters();
1450  }
1451  if (!empty($this->getMasteryScore())) {
1452  $extensions['https://w3id.org/xapi/cmi5/context/extensions/masteryscore'] = $this->getMasteryScore();
1453  }
1454  return array(
1455  "contextActivities" => $this->getStatementContextActivities(),
1456  "extensions" => $extensions
1457  );
1458  }
getStatementExtensions(?ilCmiXapiUser $cmixUser=null)
Minimal extensions.
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 1616 of file class.ilObjCmiXapi.php.

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

1616  : array
1617  {
1618  if (null === $cmixUser) {
1619  $cmixUser = $this->getCurrentCmixUser();
1620  }
1621  $launchMode = $this->getLaunchMode();
1622  // only check switch if self::LAUNCH_MODE_NORMAL
1623  if ($launchMode == self::LAUNCH_MODE_NORMAL) {
1624  if ($cmixUser->getSatisfied() && $this->isSwitchToReviewEnabled()) {
1625  $launchMode = self::LAUNCH_MODE_REVIEW;
1626  }
1627  }
1628 
1629  $statement = $this->getStatement('launched', $cmixUser);
1630  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/launchmode'] = $launchMode;
1631  if (!empty($this->getLMSMoveOn())) {
1632  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/moveon'] = $this->getLMSMoveOn();
1633  }
1634  if (!empty($this->getLaunchParameters())) {
1635  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/launchparameters'] = $this->getLaunchParameters();
1636  }
1637  if (!empty($this->getMasteryScore())) {
1638  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/masteryscore'] = $this->getMasteryScore();
1639  }
1640  return $statement;
1641  }
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 405 of file class.ilObjCmiXapi.php.

References $launchMethod.

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

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

◆ getLaunchMode()

ilObjCmiXapi::getLaunchMode ( )

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

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

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

◆ getLaunchParameters()

ilObjCmiXapi::getLaunchParameters ( )

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

References $launchParameters.

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

320  : string
321  {
323  }
+ Here is the caller graph for this function:

◆ getLaunchUrl()

ilObjCmiXapi::getLaunchUrl ( )

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

References $launchUrl.

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

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

◆ getLMSMoveOn()

ilObjCmiXapi::getLMSMoveOn ( )

for CMI5 statements | state moveOn values

Returns
string ilCmiXapiLP::const

Definition at line 362 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().

362  : string
363  {
365  switch ($this->getLPMode()) {
368  break;
372  break;
376  break;
380  break;
381  }
382  return $moveOn;
383  }
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 352 of file class.ilObjCmiXapi.php.

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

Referenced by getLMSMoveOn().

352  : int
353  {
354  $olp = ilObjectLP::getInstance($this->getId());
355  return $olp->getCurrentMode();
356  }
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 223 of file class.ilObjCmiXapi.php.

References $lrsType.

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

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

◆ getLrsTypeId()

ilObjCmiXapi::getLrsTypeId ( )

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

References $lrsTypeId.

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

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

◆ getMasteryScore()

ilObjCmiXapi::getMasteryScore ( )

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

References $masteryScore.

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

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

◆ getMasteryScorePercent()

ilObjCmiXapi::getMasteryScorePercent ( )

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

450  : float
451  {
452  return $this->masteryScore * 100;
453  }

◆ getMoveOn()

ilObjCmiXapi::getMoveOn ( )

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

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

References $moveOn.

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

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

◆ getNoSubstatements()

ilObjCmiXapi::getNoSubstatements ( )

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

References $no_substatements.

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

620  : bool
621  {
623  }
+ Here is the caller graph for this function:

◆ getObjectsHavingBypassProxyEnabledAndRegisteredUsers()

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

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

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

Referenced by ilXapiResultsCronjob\getObjectsToBeReported().

952  : array
953  {
954  global $DIC; /* @var \ILIAS\DI\Container $DIC */
955  // not possible: Move Global Access to Constructor
956  $query = "
957  SELECT DISTINCT s.obj_id FROM " . self::DB_TABLE_NAME . " s
958  INNER JOIN " . self::DB_USERS_TABLE_NAME . " u ON u.obj_id = s.obj_id
959  WHERE bypass_proxy = %s
960  ";
961 
962  $res = $DIC->database()->queryF($query, array('integer'), array(1));
963 
964  $objects = array();
965 
966  while ($row = $DIC->database()->fetchAssoc($res)) {
967  $objects[] = (int) $row['obj_id'];
968  }
969 
970  return $objects;
971  }
$res
Definition: ltiservices.php:69
global $DIC
Definition: feed.php:28
$query
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOnlyMoveon()

ilObjCmiXapi::getOnlyMoveon ( )

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

References $only_moveon.

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

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

◆ getPassed()

ilObjCmiXapi::getPassed ( )

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

References $passed.

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

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

◆ getPrivacyIdent()

ilObjCmiXapi::getPrivacyIdent ( )

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

References $userIdent.

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

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

◆ getPrivacyName()

ilObjCmiXapi::getPrivacyName ( )

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

References $userName.

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

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

◆ getProgressed()

ilObjCmiXapi::getProgressed ( )

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

References $progressed.

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

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

◆ getPublisherId()

ilObjCmiXapi::getPublisherId ( )

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

References $publisherId.

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

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

◆ getSatisfied()

ilObjCmiXapi::getSatisfied ( )

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

References $satisfied.

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

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

◆ getSatisfiedStatement()

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

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

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

1665  : array
1666  {
1667  if (null === $cmixUser) {
1668  $cmixUser = $this->getCurrentCmixUser();
1669  }
1670  $statement = $this->getStatement('satisfied', $cmixUser);
1671  // add type, see https://aicc.github.io/CMI-5_Spec_Current/samples/scenarios/16-not_applicable-no_launch/#satisfied-statement
1672  // see also: https://github.com/AICC/CMI-5_Spec_Current/blob/quartz/cmi5_spec.md#verbs_satisfied
1673  $type = "https://w3id.org/xapi/cmi5/activitytype/course";
1674  $statement['object']['definition']['type'] = $type;
1675  $statement['context']['contextActivities']['grouping'][0]['definition']['type'] = $type;
1676  return $statement;
1677  }
string $type
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 1363 of file class.ilObjCmiXapi.php.

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

Referenced by getStatementExtensions().

1363  : string
1364  {
1365  if (null === $cmixUser) {
1366  $cmixUser = $this->getCurrentCmixUser();
1367  }
1368  return ilCmiXapiAuthToken::getCmi5SessionByUsrIdAndObjIdAndRefId($cmixUser->getUsrId(), $this->getId(), $this->getRefId());
1369  }
static getCmi5SessionByUsrIdAndObjIdAndRefId(int $usrId, int $objId, ?int $refId=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSourceType()

ilObjCmiXapi::getSourceType ( )

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

References $sourceType.

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

260  : string
261  {
262  return $this->sourceType;
263  }
+ 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 1465 of file class.ilObjCmiXapi.php.

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

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

1465  : array
1466  {
1467  if (null === $cmixUser) {
1468  $cmixUser = $this->getCurrentCmixUser();
1469  }
1470  $id = self::guidv4();
1471  $actor = $this->getStatementActor($cmixUser);
1472  $verbUri = ilCmiXapiVerbList::getInstance()->getVerbUri($verb);
1473  $extensions = $this->getStatementExtensions($cmixUser);
1474  $registration = $cmixUser->getRegistration();
1475  $contextActivities = $this->getStatementContextActivities();
1476  $object = $this->getStatementObject();
1477  return array(
1478  'id' => $id,
1479  'actor' => $actor,
1480  'verb' =>
1481  array(
1482  'id' => $verbUri
1483  ),
1484  'context' =>
1485  array(
1486  'extensions' => $extensions,
1487  'registration' => $registration,
1488  'contextActivities' => $contextActivities
1489  ),
1490  'object' => $object
1491  );
1492  }
getStatementExtensions(?ilCmiXapiUser $cmixUser=null)
Minimal extensions.
getStatementActor(?ilCmiXapiUser $cmixUser=null)
statement actor
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 1498 of file class.ilObjCmiXapi.php.

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

Referenced by getStatement().

1498  : array
1499  {
1500  global $DIC;
1501  if (null === $cmixUser) {
1502  $cmixUser = $this->getCurrentCmixUser();
1503  }
1504  $user = new ilObjUser($cmixUser->getUsrId()); // ToDo: Caching Names
1506  if ($name == '') {
1507  $this->log()->error('error: no name in cmixuser');
1508  $name = 'UNDEFINED';
1509  }
1510  $homePage = ($this->anonymousHomePage == true) ? self::ANONYMOUS_HOMEPAGE : self::iliasUrl();
1511  if ($this->getContentType() == self::CONT_TYPE_CMI5) {
1512  $actor = [
1513  'objectType' => 'Agent',
1514  'account' => [
1515  'homePage' => $homePage,
1516  'name' => $cmixUser->getUsrIdent()
1517  ]
1518  ];
1519  if ($name !== '') {
1520  $actor['name'] = $name;
1521  }
1522  } else {
1523  $actor = [
1524  'objectType' => 'Agent',
1525  'mbox' => 'mailto:' . $cmixUser->getUsrIdent()
1526  ];
1527  if ($name !== '') {
1528  $actor['name'] = $name;
1529  }
1530  }
1531  return $actor;
1532  }
global $DIC
Definition: feed.php:28
if($format !==null) $name
Definition: metadata.php:247
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 1554 of file class.ilObjCmiXapi.php.

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

Referenced by getLaunchedContextTemplate(), and getStatement().

1554  : array
1555  {
1556  $publisherId = $this->getPublisherId();
1557  $activityId = $this->getActivityId();
1558  if (empty($publisherId)) {
1560  }
1561  return array(
1562  "grouping" => [
1563  [
1564  "objectType" => "Activity",
1565  "id" => "{$publisherId}",
1566  'definition' =>
1567  array(
1568  'name' =>
1569  array(
1570  'de-DE' => $this->getTitle(),
1571  'en-US' => $this->getTitle()
1572  ),
1573  'description' =>
1574  array(
1575  'de-DE' => $this->getDescription(),
1576  'en-US' => $this->getDescription()
1577  )
1578  )]
1579  ],
1580  "category" => [
1581  [
1582  "id" => "https://w3id.org/xapi/cmi5/context/categories/cmi5",
1583  "objectType" => "Activity"
1584  ]
1585  ]
1586  );
1587  }
+ 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 1539 of file class.ilObjCmiXapi.php.

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

Referenced by getLaunchedContextTemplate(), and getStatement().

1539  : array
1540  {
1541  if (null === $cmixUser) {
1542  $cmixUser = $this->getCurrentCmixUser();
1543  }
1544  return array(
1545  'https://w3id.org/xapi/cmi5/context/extensions/sessionid' => $this->getSessionId($cmixUser),
1546  'https://ilias.de/cmi5/activityid' => $this->getActivityId()
1547  );
1548  }
getSessionId(?ilCmiXapiUser $cmixUser=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 1592 of file class.ilObjCmiXapi.php.

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

Referenced by getStatement().

1592  : array
1593  {
1594  return array(
1595  'id' => $this->getActivityId(),
1596  'definition' =>
1597  array(
1598  'name' =>
1599  array(
1600  'de-DE' => $this->getTitle(),
1601  'en-US' => $this->getTitle()
1602  ),
1603  'description' =>
1604  array(
1605  'de-DE' => $this->getDescription(),
1606  'en-US' => $this->getDescription()
1607  )
1608  )
1609  );
1610  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSwitchToReviewEnabled()

ilObjCmiXapi::getSwitchToReviewEnabled ( )

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

References $switchToReviewEnabled.

430  : bool
431  {
433  }

◆ getTerminated()

ilObjCmiXapi::getTerminated ( )

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

References $terminated.

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

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

◆ getTimestamp()

ilObjCmiXapi::getTimestamp ( )

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

References $timestamp.

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

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

◆ getUserPrivacyComment()

ilObjCmiXapi::getUserPrivacyComment ( )

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

References $userPrivacyComment.

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

630  : string
631  {
633  }
+ Here is the caller graph for this function:

◆ getVersion()

ilObjCmiXapi::getVersion ( )

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

References $version.

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

660  : int
661  {
662  return $this->version;
663  }
+ Here is the caller graph for this function:

◆ getXmlManifest()

ilObjCmiXapi::getXmlManifest ( )

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

References $xmlManifest.

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

650  : string
651  {
652  return $this->xmlManifest;
653  }
+ Here is the caller graph for this function:

◆ guidv4()

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

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

References $data.

Referenced by ilCmiXapiLaunchGUI\CMI5preLaunch().

1336  : string
1337  {
1338  // Generate 16 bytes (128 bits) of random data or use the data passed into the function.
1339  $data ??= random_bytes(16);
1340  assert(strlen($data) == 16);
1341 
1342  // Set version to 0100
1343  $data[6] = chr(ord($data[6]) & 0x0f | 0x40);
1344  // Set bits 6-7 to 10
1345  $data[8] = chr(ord($data[8]) & 0x3f | 0x80);
1346 
1347  // Output the 36 character UUID.
1348  return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
1349  }
+ Here is the caller graph for this function:

◆ iliasUrl()

static ilObjCmiXapi::iliasUrl ( )
static

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

References $DIC.

1774  : string
1775  {
1776  global $DIC;
1777  $regex = '/^(https?:\/\/[^\/]+).*/';
1778  preg_match($regex, (string) $DIC->http()->request()->getUri(), $request_parts);
1779  return $request_parts[1];
1780  }
global $DIC
Definition: feed.php:28

◆ initLrsType()

ilObjCmiXapi::initLrsType ( )

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

References getLrsTypeId(), and setLrsType().

Referenced by load().

233  : void
234  {
235  $this->setLrsType(new ilCmiXapiLrsType($this->getLrsTypeId()));
236  }
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 208 of file class.ilObjCmiXapi.php.

208  : void
209  {
210  $this->type = "cmix";
211  }

◆ isActivationLimited()

ilObjCmiXapi::isActivationLimited ( )

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

References $activationLimited.

Referenced by saveRepositoryActivationSettings().

1793  : ?bool
1794  {
1795  return $this->activationLimited;
1796  }
bool $activationLimited
repository object activation settings (handled by ilObject)
+ Here is the caller graph for this function:

◆ isAuthFetchUrlEnabled()

ilObjCmiXapi::isAuthFetchUrlEnabled ( )

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

References $authFetchUrlEnabled.

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

395  : bool
396  {
398  }
+ Here is the caller graph for this function:

◆ isBypassProxyEnabled()

ilObjCmiXapi::isBypassProxyEnabled ( )

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

References $bypassProxyEnabled.

Referenced by doCloneObject(), and save().

670  : bool
671  {
673  }
+ Here is the caller graph for this function:

◆ isKeepLpStatusEnabled()

ilObjCmiXapi::isKeepLpStatusEnabled ( )

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

References $keepLpStatusEnabled.

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

460  : bool
461  {
463  }
+ Here is the caller graph for this function:

◆ isMixedContentType()

ilObjCmiXapi::isMixedContentType ( )

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

References getContentType(), and getPublisherId().

Referenced by getLastStatementPipline().

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

◆ isSourceTypeExternal()

ilObjCmiXapi::isSourceTypeExternal ( )

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

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

◆ isSourceTypeRemote()

ilObjCmiXapi::isSourceTypeRemote ( )

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

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

◆ isStatementsReportEnabled()

ilObjCmiXapi::isStatementsReportEnabled ( )

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

References $statementsReportEnabled.

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

640  : bool
641  {
643  }
+ Here is the caller graph for this function:

◆ isSwitchToReviewEnabled()

ilObjCmiXapi::isSwitchToReviewEnabled ( )

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

References $switchToReviewEnabled.

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

425  : bool
426  {
428  }
+ Here is the caller graph for this function:

◆ load()

ilObjCmiXapi::load ( )
protected

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

References $query, $res, ilObject\getId(), initLrsType(), loadRepositoryActivationSettings(), setAchieved(), setActivityId(), setAnswered(), setAuthFetchUrlEnabled(), setBypassProxyEnabled(), setCompleted(), setContentType(), 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().

686  : void
687  {
688  $query = "SELECT * FROM " . self::DB_TABLE_NAME . " WHERE obj_id = %s";
689  $res = $this->database->queryF($query, ['integer'], [$this->getId()]);
690 
691  while ($row = $this->database->fetchAssoc($res)) {
692  if ($row['lrs_type_id']) {
693  $this->setLrsTypeId((int) $row['lrs_type_id']);
694  $this->initLrsType();
695  }
696 
697  $this->setContentType((string) $row['content_type']);
698  $this->setSourceType((string) $row['source_type']);
699 
700  $this->setActivityId((string) $row['activity_id']);
701  $this->setPublisherId((string) $row['publisher_id']);
702  $this->setInstructions((string) $row['instructions']);
703 
704  $this->setLaunchUrl((string) $row['launch_url']);
705  $this->setLaunchParameters((string) $row['launch_parameters']);
706  $this->setMoveOn((string) $row['moveon']);
707  $this->setEntitlementKey((string) $row['entitlement_key']);
708  $this->setAuthFetchUrlEnabled((bool) $row['auth_fetch_url']);
709 
710  $this->setLaunchMethod((string) $row['launch_method']);
711 
712  $this->setLaunchMode((string) $row['launch_mode']);
713  $this->setSwitchToReviewEnabled((bool) $row['switch_to_review']);
714  $this->setMasteryScore((float) $row['mastery_score']);
715  $this->setKeepLpStatusEnabled((bool) $row['keep_lp']);
716 
717  $this->setPrivacyIdent((int) $row['privacy_ident']);
718  $this->setPrivacyName((int) $row['privacy_name']);
719 
720  $this->setOnlyMoveon((bool) $row['only_moveon']);
721  $this->setAchieved((bool) $row['achieved']);
722  $this->setAnswered((bool) $row['answered']);
723  $this->setCompleted((bool) $row['completed']);
724  $this->setFailed((bool) $row['failed']);
725  $this->setInitialized((bool) $row['initialized']);
726  $this->setPassed((bool) $row['passed']);
727  $this->setProgressed((bool) $row['progressed']);
728  $this->setSatisfied((bool) $row['satisfied']);
729  $this->setTerminated((bool) $row['c_terminated']);
730  $this->setHideData((bool) $row['hide_data']);
731  $this->setTimestamp((bool) $row['c_timestamp']);
732  $this->setDuration((bool) $row['duration']);
733  $this->setNoSubstatements((bool) $row['no_substatements']);
734 
735  $this->setUserPrivacyComment((string) $row['usr_privacy_comment']);
736 
737  $this->setStatementsReportEnabled((bool) $row['show_statements']);
738 
739  $this->setXmlManifest((string) $row['xml_manifest']);
740  $this->setVersion((int) $row['version']);
741 
742  $this->setBypassProxyEnabled((bool) $row['bypass_proxy']);
743 
744  $this->setHighscoreEnabled((bool) $row['highscore_enabled']);
745  $this->setHighscoreAchievedTS((bool) $row['highscore_achieved_ts']);
746  $this->setHighscorePercentage((bool) $row['highscore_percentage']);
747  $this->setHighscoreWTime((bool) $row['highscore_wtime']);
748  $this->setHighscoreOwnTable((bool) $row['highscore_own_table']);
749  $this->setHighscoreTopTable((bool) $row['highscore_top_table']);
750  $this->setHighscoreTopNum((int) $row['highscore_top_num']);
751  }
752 
754  }
setDuration(bool $duration)
setPublisherId(string $publisherId)
setPrivacyIdent(int $userIdent)
setContentType(string $contentType)
$res
Definition: ltiservices.php:69
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)
$query
setInitialized(bool $initialized)
setVersion(int $version)
setProgressed(bool $progressed)
setUserPrivacyComment(string $userPrivacyComment)
setSatisfied(bool $satisfied)
setPrivacyName(int $userName)
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 818 of file class.ilObjCmiXapi.php.

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

Referenced by load().

818  : void
819  {
820  if ($this->ref_id) {
821  $activation = ilObjectActivation::getItem($this->ref_id);
822  switch ($activation["timing_type"]) {
824  $this->setActivationLimited(true);
825  if (!is_null($activation["timing_start"])) {
826  $activation["timing_start"] = (int) $activation["timing_start"];
827  }
828  $this->setActivationStartingTime($activation["timing_start"]);
829  if (!is_null($activation["timing_end"])) {
830  $activation["timing_end"] = (int) $activation["timing_end"];
831  }
832  $this->setActivationEndingTime($activation["timing_end"]);
833  $this->setActivationVisibility((bool) $activation["visible"]);
834  break;
835 
836  default:
837  $this->setActivationLimited(false);
838  break;
839  }
840  }
841  }
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 1782 of file class.ilObjCmiXapi.php.

References ilObject\$log.

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

1782  : ilLogger
1783  {
1784  if (self::PLUGIN) {
1785  global $log;
1786  return $log;
1787  } else {
1788  return \ilLoggerFactory::getLogger('cmix');
1789  }
1790  }
ilLogger $log
+ Here is the caller graph for this function:

◆ save()

ilObjCmiXapi::save ( )

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

References $DIC, getAchieved(), getActivityId(), getAnswered(), getCompleted(), getContentType(), 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().

762  : void
763  {
764  global $DIC; /* @var \ILIAS\DI\Container $DIC */
765  // not possible: Move Global Access to Constructor
766  $DIC->database()->replace(self::DB_TABLE_NAME, [
767  'obj_id' => ['integer', $this->getId()]
768  ], [
769  'lrs_type_id' => ['integer', $this->getLrsTypeId()],
770  'content_type' => ['text', $this->getContentType()],
771  'source_type' => ['text', $this->getSourceType()],
772  'activity_id' => ['text', $this->getActivityId()],
773  'publisher_id' => ['text', $this->getPublisherId()],
774  'instructions' => ['text', $this->getInstructions()],
775  'launch_url' => ['text', $this->getLaunchUrl()],
776  'launch_parameters' => ['text', $this->getLaunchParameters()],
777  'moveon' => ['text', $this->getMoveOn()],
778  'entitlement_key' => ['text', $this->getEntitlementKey()],
779  'auth_fetch_url' => ['integer', (int) $this->isAuthFetchUrlEnabled()],
780  'launch_method' => ['text', $this->getLaunchMethod()],
781  'launch_mode' => ['text', $this->getLaunchMode()],
782  'switch_to_review' => ['integer', (int) $this->isSwitchToReviewEnabled()],
783  'mastery_score' => ['float', $this->getMasteryScore()],
784  'keep_lp' => ['integer', (int) $this->isKeepLpStatusEnabled()],
785  'privacy_ident' => ['integer', $this->getPrivacyIdent()],
786  'privacy_name' => ['integer', $this->getPrivacyName()],
787  'usr_privacy_comment' => ['text', $this->getUserPrivacyComment()],
788  'show_statements' => ['integer', (int) $this->isStatementsReportEnabled()],
789  'xml_manifest' => ['text', $this->getXmlManifest()],
790  'version' => ['integer', $this->getVersion()],
791  'bypass_proxy' => ['integer', (int) $this->isBypassProxyEnabled()],
792  'highscore_enabled' => ['integer', (int) $this->getHighscoreEnabled()],
793  'highscore_achieved_ts' => ['integer', (int) $this->getHighscoreAchievedTS()],
794  'highscore_percentage' => ['integer', (int) $this->getHighscorePercentage()],
795  'highscore_wtime' => ['integer', (int) $this->getHighscoreWTime()],
796  'highscore_own_table' => ['integer', (int) $this->getHighscoreOwnTable()],
797  'highscore_top_table' => ['integer', (int) $this->getHighscoreTopTable()],
798  'highscore_top_num' => ['integer', $this->getHighscoreTopNum()],
799  'only_moveon' => ['integer', (int) $this->getOnlyMoveon()],
800  'achieved' => ['integer', (int) $this->getAchieved()],
801  'answered' => ['integer', (int) $this->getAnswered()],
802  'completed' => ['integer', (int) $this->getCompleted()],
803  'failed' => ['integer', (int) $this->getFailed()],
804  'initialized' => ['integer', (int) $this->getInitialized()],
805  'passed' => ['integer', (int) $this->getPassed()],
806  'progressed' => ['integer', (int) $this->getProgressed()],
807  'satisfied' => ['integer', (int) $this->getSatisfied()],
808  'c_terminated' => ['integer', (int) $this->getTerminated()],
809  'hide_data' => ['integer', (int) $this->getHideData()],
810  'c_timestamp' => ['integer', (int) $this->getTimestamp()],
811  'duration' => ['integer', (int) $this->getDuration()],
812  'no_substatements' => ['integer', (int) $this->getNoSubstatements()]
813  ]);
814 
816  }
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...
global $DIC
Definition: feed.php:28
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:
+ Here is the caller graph for this function:

◆ saveRepositoryActivationSettings()

ilObjCmiXapi::saveRepositoryActivationSettings ( )
protected

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

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

Referenced by save().

843  : void
844  {
845  if ($this->ref_id) {
846  ilObjectActivation::getItem($this->ref_id);
847 
848  $item = new ilObjectActivation();
849  if (!$this->isActivationLimited()) {
850  $item->setTimingType(ilObjectActivation::TIMINGS_DEACTIVATED);
851  } else {
852  $item->setTimingType(ilObjectActivation::TIMINGS_ACTIVATION);
853  $item->setTimingStart($this->getActivationStartingTime());
854  $item->setTimingEnd($this->getActivationEndingTime());
855  $item->toggleVisible($this->getActivationVisibility());
856  }
857 
858  $item->update($this->ref_id);
859  }
860  }
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 505 of file class.ilObjCmiXapi.php.

References $achieved.

Referenced by load().

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

◆ setActivationEndingTime()

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

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

References $activationEndingTime.

Referenced by loadRepositoryActivationSettings().

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

◆ setActivationLimited()

ilObjCmiXapi::setActivationLimited ( bool  $activationLimited)

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

References $activationLimited.

Referenced by loadRepositoryActivationSettings().

1799  : void
1800  {
1801  $this->activationLimited = $activationLimited;
1802  }
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 1809 of file class.ilObjCmiXapi.php.

References $activationStartingTime.

Referenced by loadRepositoryActivationSettings().

1809  : void
1810  {
1811  $this->activationStartingTime = $activationStartingTime;
1812  }
+ Here is the caller graph for this function:

◆ setActivationVisibility()

ilObjCmiXapi::setActivationVisibility ( bool  $activationVisibility)

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

References $activationVisibility.

Referenced by loadRepositoryActivationSettings().

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

◆ setActivityId()

ilObjCmiXapi::setActivityId ( string  $activityId)

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

References $activityId.

Referenced by load().

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

◆ setAnswered()

ilObjCmiXapi::setAnswered ( bool  $answered)

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

References $answered.

Referenced by load().

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

◆ setAuthFetchUrlEnabled()

ilObjCmiXapi::setAuthFetchUrlEnabled ( bool  $authFetchUrlEnabled)

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

References $authFetchUrlEnabled.

Referenced by load().

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

◆ setBypassProxyEnabled()

ilObjCmiXapi::setBypassProxyEnabled ( bool  $bypassProxyEnabled)

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

References $bypassProxyEnabled.

Referenced by load().

675  : void
676  {
677  $this->bypassProxyEnabled = $bypassProxyEnabled;
678  }
+ Here is the caller graph for this function:

◆ setCompleted()

ilObjCmiXapi::setCompleted ( bool  $completed)

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

References $completed.

Referenced by load().

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

◆ setContentType()

ilObjCmiXapi::setContentType ( string  $contentType)

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

References $contentType.

Referenced by load().

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

◆ setDuration()

ilObjCmiXapi::setDuration ( bool  $duration)

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

References $duration.

Referenced by load().

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

◆ setEntitlementKey()

ilObjCmiXapi::setEntitlementKey ( string  $entitlementKey)

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

References $entitlementKey.

Referenced by load().

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

◆ setFailed()

ilObjCmiXapi::setFailed ( bool  $failed)

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

References $failed.

Referenced by load().

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

◆ setHideData()

ilObjCmiXapi::setHideData ( bool  $hide_data)

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

References $hide_data.

Referenced by load().

595  : void
596  {
597  $this->hide_data = $hide_data;
598  }
+ 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 1018 of file class.ilObjCmiXapi.php.

Referenced by load().

1018  : void
1019  {
1020  $this->_highscore_achieved_ts = $a_achieved_ts;
1021  }
+ 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 1001 of file class.ilObjCmiXapi.php.

Referenced by load().

1001  : void
1002  {
1003  $this->_highscore_enabled = $a_enabled;
1004  }
+ Here is the caller graph for this function:

◆ setHighscoreMode()

ilObjCmiXapi::setHighscoreMode ( int  $mode)

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

References setHighscoreOwnTable(), and setHighscoreTopTable().

1143  : void
1144  {
1145  switch ($mode) {
1146  case self::HIGHSCORE_SHOW_ALL_TABLES:
1147  $this->setHighscoreTopTable(true);
1148  $this->setHighscoreOwnTable(true);
1149  break;
1150 
1151  case self::HIGHSCORE_SHOW_TOP_TABLE:
1152  $this->setHighscoreTopTable(true);
1153  $this->setHighscoreOwnTable(false);
1154  break;
1155 
1156  case self::HIGHSCORE_SHOW_OWN_TABLE:
1157  default:
1158  $this->setHighscoreTopTable(false);
1159  $this->setHighscoreOwnTable(true);
1160  break;
1161  }
1162  }
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 1070 of file class.ilObjCmiXapi.php.

Referenced by load(), and setHighscoreMode().

1070  : void
1071  {
1072  $this->_highscore_own_table = $a_own_table;
1073  }
+ 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 1035 of file class.ilObjCmiXapi.php.

Referenced by load().

1035  : void
1036  {
1037  $this->_highscore_percentage = $a_percentage;
1038  }
+ 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 1106 of file class.ilObjCmiXapi.php.

Referenced by load().

1106  : void
1107  {
1108  $this->_highscore_top_num = $a_top_num;
1109  }
+ 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 1087 of file class.ilObjCmiXapi.php.

Referenced by load(), and setHighscoreMode().

1087  : void
1088  {
1089  $this->_highscore_top_table = $a_top_table;
1090  }
+ 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 1052 of file class.ilObjCmiXapi.php.

Referenced by load().

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

◆ setInitialized()

ilObjCmiXapi::setInitialized ( bool  $initialized)

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

References $initialized.

Referenced by load().

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

◆ setInstructions()

ilObjCmiXapi::setInstructions ( string  $instructions)

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

References $instructions.

Referenced by load().

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

◆ setKeepLpStatusEnabled()

ilObjCmiXapi::setKeepLpStatusEnabled ( bool  $keepLpStatusEnabled)

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

References $keepLpStatusEnabled.

Referenced by load().

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

◆ setLaunchMethod()

ilObjCmiXapi::setLaunchMethod ( string  $launchMethod)

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

References $launchMethod.

Referenced by load().

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

◆ setLaunchMode()

ilObjCmiXapi::setLaunchMode ( string  $launchMode)

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

Referenced by load().

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

◆ setLaunchParameters()

ilObjCmiXapi::setLaunchParameters ( string  $launchParameters)

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

References $launchParameters.

Referenced by load().

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

◆ setLaunchUrl()

ilObjCmiXapi::setLaunchUrl ( string  $launchUrl)

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

References $launchUrl.

Referenced by load().

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

◆ setLrsType()

ilObjCmiXapi::setLrsType ( \ilCmiXapiLrsType  $lrsType)

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

References $lrsType.

Referenced by initLrsType().

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

◆ setLrsTypeId()

ilObjCmiXapi::setLrsTypeId ( int  $lrsTypeId)

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

References $lrsTypeId.

Referenced by load().

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

◆ setMasteryScore()

ilObjCmiXapi::setMasteryScore ( float  $masteryScore)

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

References $masteryScore.

Referenced by load().

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

◆ setMasteryScorePercent()

ilObjCmiXapi::setMasteryScorePercent ( float  $masteryScorePercent)

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

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

◆ setMoveOn()

ilObjCmiXapi::setMoveOn ( string  $moveOn)

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

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

References $moveOn.

Referenced by load().

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

◆ setNoSubstatements()

ilObjCmiXapi::setNoSubstatements ( bool  $no_substatements)

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

References $no_substatements.

Referenced by load().

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

◆ setOnlyMoveon()

ilObjCmiXapi::setOnlyMoveon ( bool  $only_moveon)

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

References $only_moveon.

Referenced by load().

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

◆ setPassed()

ilObjCmiXapi::setPassed ( bool  $passed)

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

References $passed.

Referenced by load().

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

◆ setPrivacyIdent()

ilObjCmiXapi::setPrivacyIdent ( int  $userIdent)

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

References $userIdent.

Referenced by load().

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

◆ setPrivacyName()

ilObjCmiXapi::setPrivacyName ( int  $userName)

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

References $userName.

Referenced by load().

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

◆ setProgressed()

ilObjCmiXapi::setProgressed ( bool  $progressed)

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

References $progressed.

Referenced by load().

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

◆ setPublisherId()

ilObjCmiXapi::setPublisherId ( string  $publisherId)

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

References $publisherId.

Referenced by load().

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

◆ setSatisfied()

ilObjCmiXapi::setSatisfied ( bool  $satisfied)

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

References $satisfied.

Referenced by load().

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

◆ setSourceType()

ilObjCmiXapi::setSourceType ( string  $sourceType)

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

References $sourceType.

Referenced by load().

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

◆ setStatementsReportEnabled()

ilObjCmiXapi::setStatementsReportEnabled ( bool  $statementsReportEnabled)

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

References $statementsReportEnabled.

Referenced by load().

645  : void
646  {
647  $this->statementsReportEnabled = $statementsReportEnabled;
648  }
+ Here is the caller graph for this function:

◆ setSwitchToReviewEnabled()

ilObjCmiXapi::setSwitchToReviewEnabled ( bool  $switchToReviewEnabled)

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

References $switchToReviewEnabled.

Referenced by load().

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

◆ setTerminated()

ilObjCmiXapi::setTerminated ( bool  $terminated)

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

References $terminated.

Referenced by load().

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

◆ setTimestamp()

ilObjCmiXapi::setTimestamp ( bool  $timestamp)

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

References $timestamp.

Referenced by load().

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

◆ setUserPrivacyComment()

ilObjCmiXapi::setUserPrivacyComment ( string  $userPrivacyComment)

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

References $userPrivacyComment.

Referenced by load().

635  : void
636  {
637  $this->userPrivacyComment = $userPrivacyComment;
638  }
+ Here is the caller graph for this function:

◆ setVersion()

ilObjCmiXapi::setVersion ( int  $version)

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

References $version.

Referenced by load().

665  : void
666  {
667  $this->version = $version;
668  }
+ Here is the caller graph for this function:

◆ setXmlManifest()

ilObjCmiXapi::setXmlManifest ( string  $xmlManifest)

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

References $xmlManifest.

Referenced by load().

655  : void
656  {
657  $this->xmlManifest = $xmlManifest;
658  }
+ Here is the caller graph for this function:

◆ updateByPassProxyFromLrsType()

static ilObjCmiXapi::updateByPassProxyFromLrsType ( ilCmiXapiLrsType  $lrsType)
static

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

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

Referenced by ilObjCmiXapiAdministrationGUI\saveLrsTypeFormCmd().

930  : void
931  {
932  global $DIC; /* @var \ILIAS\DI\Container $DIC */
933  // not possible: Move Global Access to Constructor
934  $tableName = self::DB_TABLE_NAME;
935 
936  $query = "
937  UPDATE {$tableName}
938  SET bypass_proxy = %s
939  WHERE lrs_type_id = %s
940  ";
941 
942  $DIC->database()->manipulateF(
943  $query,
944  ['integer', 'integer'],
945  [$lrsType->isBypassProxyEnabled(), $lrsType->getTypeId()]
946  );
947  }
global $DIC
Definition: feed.php:28
$query
+ 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 862 of file class.ilObjCmiXapi.php.

References $DIC, $query, ilCmiXapiLrsType\getAchieved(), ilCmiXapiLrsType\getAnswered(), ilCmiXapiLrsType\getCompleted(), 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().

862  : void
863  {
864  global $DIC; /* @var \ILIAS\DI\Container $DIC */
865  //not possible: Move Global Access to Constructor
866  $tableName = self::DB_TABLE_NAME;
867 
868  $query = "
869  UPDATE {$tableName}
870  SET privacy_ident = %s,
871  privacy_name = %s,
872  only_moveon = %s,
873  achieved = %s,
874  answered = %s,
875  completed = %s,
876  failed = %s,
877  initialized = %s,
878  passed = %s,
879  progressed = %s,
880  satisfied = %s,
881  c_terminated = %s,
882  hide_data = %s,
883  c_timestamp = %s,
884  duration = %s,
885  no_substatements = %s
886  WHERE lrs_type_id = %s
887  ";
888 
889  $DIC->database()->manipulateF(
890  $query,
891  ['integer',
892  'integer',
893  'integer',
894  'integer',
895  'integer',
896  'integer',
897  'integer',
898  'integer',
899  'integer',
900  'integer',
901  'integer',
902  'integer',
903  'integer',
904  'integer',
905  'integer',
906  'integer',
907  'integer'
908  ],
909  [$lrsType->getPrivacyIdent(),
910  $lrsType->getPrivacyName(),
911  $lrsType->getOnlyMoveon(),
912  $lrsType->getAchieved(),
913  $lrsType->getAnswered(),
914  $lrsType->getCompleted(),
915  $lrsType->getFailed(),
916  $lrsType->getInitialized(),
917  $lrsType->getPassed(),
918  $lrsType->getProgressed(),
919  $lrsType->getSatisfied(),
920  $lrsType->getTerminated(),
921  $lrsType->getHideData(),
922  $lrsType->getTimestamp(),
923  $lrsType->getDuration(),
924  $lrsType->getNoSubstatements(),
925  $lrsType->getTypeId()
926  ]
927  );
928  }
global $DIC
Definition: feed.php:28
$query
+ 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 982 of file class.ilObjCmiXapi.php.

Referenced by getHighscoreAchievedTS().

◆ $_highscore_enabled

bool ilObjCmiXapi::$_highscore_enabled = false
protected

HIGHSCORE.

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

Referenced by getHighscoreEnabled().

◆ $_highscore_own_table

bool ilObjCmiXapi::$_highscore_own_table = true
protected

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

Referenced by getHighscoreOwnTable().

◆ $_highscore_percentage

bool ilObjCmiXapi::$_highscore_percentage = true
protected

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

Referenced by getHighscorePercentage().

◆ $_highscore_top_num

int ilObjCmiXapi::$_highscore_top_num = 10
protected

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

Referenced by getHighscoreTopNum().

◆ $_highscore_top_table

bool ilObjCmiXapi::$_highscore_top_table = true
protected

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

Referenced by getHighscoreTopTable().

◆ $_highscore_wtime

bool ilObjCmiXapi::$_highscore_wtime = true
protected

Definition at line 986 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 980 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 148 of file class.ilObjCmiXapi.php.

Referenced by getCurrentCmixUser().

◆ $database

ilDBInterface ilObjCmiXapi::$database
private

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

◆ $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 994 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiSettingsGUI\buildForm().

◆ HIGHSCORE_SHOW_OWN_TABLE

const ilObjCmiXapi::HIGHSCORE_SHOW_OWN_TABLE = 3

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

Referenced by ilCmiXapiSettingsGUI\buildForm().

◆ HIGHSCORE_SHOW_TOP_TABLE

const ilObjCmiXapi::HIGHSCORE_SHOW_TOP_TABLE = 2

Definition at line 995 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'

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