ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilCmiXapiLrsType Class Reference
+ Collaboration diagram for ilCmiXapiLrsType:

Public Member Functions

 __construct (int $a_type_id=0)
 Constructor. More...
 
 setTypeId (int $a_type_id)
 
 getTypeId ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setDescription (string $a_description)
 
 getDescription ()
 
 setAvailability (int $a_availability)
 
 getAvailability ()
 
 isAvailable ()
 
 setTimeToDelete (?int $a_time_to_delete)
 
 getTimeToDelete ()
 
 setLrsEndpoint (string $a_endpoint)
 
 getLrsEndpoint ()
 
 setLrsKey (string $a_lrs_key)
 
 getLrsKey ()
 
 setLrsSecret (string $a_lrs_secret)
 
 getLrsSecret ()
 
 setPrivacyIdent (int $a_option)
 
 getPrivacyIdent ()
 
 setPrivacyName (int $a_option)
 
 getPrivacyName ()
 
 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)
 
 getForcePrivacySettings ()
 
 setForcePrivacySettings (bool $force_privacy_settings)
 
 setPrivacyCommentDefault (string $a_option)
 
 getPrivacyCommentDefault ()
 
 setExternalLrs (bool $a_option)
 
 getExternalLrs ()
 
 getLaunchType ()
 
 setRemarks (string $a_remarks)
 
 getRemarks ()
 
 isBypassProxyEnabled ()
 
 setBypassProxyEnabled (bool $bypassProxyEnabled)
 
 save ()
 
 getLrsEndpointStatementsLink ()
 
 getLrsEndpointStatementsAggregationLink ()
 
 getBasicAuth ()
 
 getBasicAuthWithoutBasic ()
 

Static Public Member Functions

static getDbTableName ()
 
static buildBasicAuth ($lrsKey, $lrsSecret)
 
static buildBasicAuthWithoutBasic ($lrsKey, $lrsSecret)
 

Data Fields

const DB_TABLE_NAME = 'cmix_lrs_types'
 
const AVAILABILITY_NONE = 0
 
const AVAILABILITY_EXISTING = 1
 
const AVAILABILITY_CREATE = 2
 
const LAUNCH_TYPE_PAGE = "page"
 
const LAUNCH_TYPE_LINK = "link"
 
const LAUNCH_TYPE_EMBED = "embed"
 
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 ENDPOINT_STATEMENTS_SUFFIX = 'statements'
 
const ENDPOINT_AGGREGATE_SUFFIX = 'statements/aggregate'
 

Protected Member Functions

 read ()
 
 create ()
 
 update ()
 
 delete ()
 

Protected Attributes

int $type_id = 0
 
string $title = ""
 
string $description = ""
 
int $availability = self::AVAILABILITY_CREATE
 
string $lrs_endpoint = ""
 
string $lrs_key = ""
 
string $lrs_secret = ""
 
int $privacy_ident = 3
 
int $privacy_name = 0
 
bool $force_privacy_settings = false
 
string $privacy_comment_default = ""
 
bool $external_lrs = false
 
int $time_to_delete = null
 
string $launch_type = self::LAUNCH_TYPE_LINK
 
string $remarks = ""
 
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
 

Private Attributes

ilDBInterface $database
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilCmiXapiLrsType::__construct ( int  $a_type_id = 0)

Constructor.

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

References $DIC, and read().

117  {
118  global $DIC;
119  $this->database = $DIC->database();
120  if ($a_type_id) {
121  $this->type_id = $a_type_id;
122  $this->read();
123  }
124  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ buildBasicAuth()

static ilCmiXapiLrsType::buildBasicAuth (   $lrsKey,
  $lrsSecret 
)
static

Definition at line 558 of file class.ilCmiXapiLrsType.php.

Referenced by ilLTIConsumerScoringGUI\initTableData(), and ilLTIConsumerXapiStatementsGUI\initTableData().

558  : string
559  {
560  return 'Basic ' . base64_encode("{$lrsKey}:{$lrsSecret}");
561  }
+ Here is the caller graph for this function:

◆ buildBasicAuthWithoutBasic()

static ilCmiXapiLrsType::buildBasicAuthWithoutBasic (   $lrsKey,
  $lrsSecret 
)
static

Definition at line 568 of file class.ilCmiXapiLrsType.php.

568  : string
569  {
570  return base64_encode("{$lrsKey}:{$lrsSecret}");
571  }

◆ create()

ilCmiXapiLrsType::create ( )
protected

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

References setTypeId(), and update().

Referenced by save().

487  : void
488  {
489  $this->setTypeId($this->database->nextId(self::DB_TABLE_NAME));
490  $this->update();
491  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ delete()

ilCmiXapiLrsType::delete ( )
protected

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

References $query, and getTypeId().

535  : bool
536  {
537  $query = "DELETE FROM " . self::DB_TABLE_NAME . " WHERE type_id = %s";
538  $this->database->manipulateF($query, ['integer'], [$this->getTypeId()]);
539 
540  return true;
541  }
$query
+ Here is the call graph for this function:

◆ getAchieved()

ilCmiXapiLrsType::getAchieved ( )

Definition at line 249 of file class.ilCmiXapiLrsType.php.

References $achieved.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), update(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

249  : bool
250  {
251  return $this->achieved;
252  }
+ Here is the caller graph for this function:

◆ getAnswered()

ilCmiXapiLrsType::getAnswered ( )

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

References $answered.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), update(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

259  : bool
260  {
261  return $this->answered;
262  }
+ Here is the caller graph for this function:

◆ getAvailability()

ilCmiXapiLrsType::getAvailability ( )

Definition at line 161 of file class.ilCmiXapiLrsType.php.

References $availability.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), isAvailable(), and update().

161  : int
162  {
163  return $this->availability;
164  }
+ Here is the caller graph for this function:

◆ getBasicAuth()

ilCmiXapiLrsType::getBasicAuth ( )

Definition at line 553 of file class.ilCmiXapiLrsType.php.

References getLrsKey(), and getLrsSecret().

Referenced by ilObjCmiXapi\getLastStatement().

553  : string
554  {
555  return self::buildBasicAuth($this->getLrsKey(), $this->getLrsSecret());
556  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBasicAuthWithoutBasic()

ilCmiXapiLrsType::getBasicAuthWithoutBasic ( )

Definition at line 563 of file class.ilCmiXapiLrsType.php.

References getLrsKey(), and getLrsSecret().

563  : string
564  {
565  return self::buildBasicAuthWithoutBasic($this->getLrsKey(), $this->getLrsSecret());
566  }
+ Here is the call graph for this function:

◆ getCompleted()

ilCmiXapiLrsType::getCompleted ( )

Definition at line 269 of file class.ilCmiXapiLrsType.php.

References $completed.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), update(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

269  : bool
270  {
271  return $this->completed;
272  }
+ Here is the caller graph for this function:

◆ getDbTableName()

static ilCmiXapiLrsType::getDbTableName ( )
static

Definition at line 33 of file class.ilCmiXapiLrsType.php.

Referenced by ilCmiXapiLrsTypeList\getCountTypesForCreate(), ilCmiXapiLrsTypeList\getTypeOptions(), and ilCmiXapiLrsTypeList\getTypesData().

33  : string
34  {
35  return self::DB_TABLE_NAME;
36  }
+ Here is the caller graph for this function:

◆ getDescription()

ilCmiXapiLrsType::getDescription ( )

Definition at line 151 of file class.ilCmiXapiLrsType.php.

References $description.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), and update().

151  : string
152  {
153  return $this->description;
154  }
+ Here is the caller graph for this function:

◆ getDuration()

ilCmiXapiLrsType::getDuration ( )

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

References $duration.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), update(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

359  : bool
360  {
361  return $this->duration;
362  }
+ Here is the caller graph for this function:

◆ getExternalLrs()

ilCmiXapiLrsType::getExternalLrs ( )

Definition at line 404 of file class.ilCmiXapiLrsType.php.

References $external_lrs.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), and update().

404  : bool
405  {
406  return $this->external_lrs;
407  }
+ Here is the caller graph for this function:

◆ getFailed()

ilCmiXapiLrsType::getFailed ( )

Definition at line 279 of file class.ilCmiXapiLrsType.php.

References $failed.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), update(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

279  : bool
280  {
281  return $this->failed;
282  }
+ Here is the caller graph for this function:

◆ getForcePrivacySettings()

ilCmiXapiLrsType::getForcePrivacySettings ( )

Definition at line 379 of file class.ilCmiXapiLrsType.php.

References $force_privacy_settings.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), and update().

379  : bool
380  {
382  }
+ Here is the caller graph for this function:

◆ getHideData()

ilCmiXapiLrsType::getHideData ( )

Definition at line 339 of file class.ilCmiXapiLrsType.php.

References $hide_data.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), update(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

339  : bool
340  {
341  return $this->hide_data;
342  }
+ Here is the caller graph for this function:

◆ getInitialized()

ilCmiXapiLrsType::getInitialized ( )

Definition at line 289 of file class.ilCmiXapiLrsType.php.

References $initialized.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), update(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

289  : bool
290  {
291  return $this->initialized;
292  }
+ Here is the caller graph for this function:

◆ getLaunchType()

ilCmiXapiLrsType::getLaunchType ( )

Definition at line 409 of file class.ilCmiXapiLrsType.php.

References $launch_type.

409  : string
410  {
411  return $this->launch_type;
412  }

◆ getLrsEndpoint()

ilCmiXapiLrsType::getLrsEndpoint ( )

Definition at line 194 of file class.ilCmiXapiLrsType.php.

References $lrs_endpoint.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), getLrsEndpointStatementsAggregationLink(), getLrsEndpointStatementsLink(), and update().

194  : string
195  {
196  return $this->lrs_endpoint;
197  }
+ Here is the caller graph for this function:

◆ getLrsEndpointStatementsAggregationLink()

ilCmiXapiLrsType::getLrsEndpointStatementsAggregationLink ( )

Definition at line 548 of file class.ilCmiXapiLrsType.php.

References getLrsEndpoint().

Referenced by ilObjCmiXapi\getLastStatement().

548  : string
549  {
550  return dirname($this->getLrsEndpoint(), 2) . '/api/' . self::ENDPOINT_AGGREGATE_SUFFIX;
551  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLrsEndpointStatementsLink()

ilCmiXapiLrsType::getLrsEndpointStatementsLink ( )

Definition at line 543 of file class.ilCmiXapiLrsType.php.

References getLrsEndpoint().

543  : string
544  {
545  return $this->getLrsEndpoint() . '/' . self::ENDPOINT_STATEMENTS_SUFFIX;
546  }
+ Here is the call graph for this function:

◆ getLrsKey()

ilCmiXapiLrsType::getLrsKey ( )

Definition at line 204 of file class.ilCmiXapiLrsType.php.

References $lrs_key.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), getBasicAuth(), getBasicAuthWithoutBasic(), and update().

204  : string
205  {
206  return $this->lrs_key;
207  }
+ Here is the caller graph for this function:

◆ getLrsSecret()

ilCmiXapiLrsType::getLrsSecret ( )

Definition at line 214 of file class.ilCmiXapiLrsType.php.

References $lrs_secret.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), getBasicAuth(), getBasicAuthWithoutBasic(), and update().

214  : string
215  {
216  return $this->lrs_secret;
217  }
+ Here is the caller graph for this function:

◆ getNoSubstatements()

ilCmiXapiLrsType::getNoSubstatements ( )

Definition at line 369 of file class.ilCmiXapiLrsType.php.

References $no_substatements.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), update(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

369  : bool
370  {
372  }
+ Here is the caller graph for this function:

◆ getOnlyMoveon()

ilCmiXapiLrsType::getOnlyMoveon ( )

Definition at line 239 of file class.ilCmiXapiLrsType.php.

References $only_moveon.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), update(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

239  : bool
240  {
241  return $this->only_moveon;
242  }
+ Here is the caller graph for this function:

◆ getPassed()

ilCmiXapiLrsType::getPassed ( )

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

References $passed.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), update(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

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

◆ getPrivacyCommentDefault()

ilCmiXapiLrsType::getPrivacyCommentDefault ( )

Definition at line 394 of file class.ilCmiXapiLrsType.php.

References $privacy_comment_default.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), and update().

394  : string
395  {
397  }
+ Here is the caller graph for this function:

◆ getPrivacyIdent()

ilCmiXapiLrsType::getPrivacyIdent ( )

Definition at line 224 of file class.ilCmiXapiLrsType.php.

References $privacy_ident.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), update(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

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

◆ getPrivacyName()

ilCmiXapiLrsType::getPrivacyName ( )

Definition at line 234 of file class.ilCmiXapiLrsType.php.

References $privacy_name.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), update(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

234  : int
235  {
236  return $this->privacy_name;
237  }
+ Here is the caller graph for this function:

◆ getProgressed()

ilCmiXapiLrsType::getProgressed ( )

Definition at line 309 of file class.ilCmiXapiLrsType.php.

References $progressed.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), update(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

309  : bool
310  {
311  return $this->progressed;
312  }
+ Here is the caller graph for this function:

◆ getRemarks()

ilCmiXapiLrsType::getRemarks ( )

Definition at line 419 of file class.ilCmiXapiLrsType.php.

References $remarks.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), and update().

419  : string
420  {
421  return $this->remarks;
422  }
+ Here is the caller graph for this function:

◆ getSatisfied()

ilCmiXapiLrsType::getSatisfied ( )

Definition at line 319 of file class.ilCmiXapiLrsType.php.

References $satisfied.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), update(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

319  : bool
320  {
321  return $this->satisfied;
322  }
+ Here is the caller graph for this function:

◆ getTerminated()

ilCmiXapiLrsType::getTerminated ( )

Definition at line 329 of file class.ilCmiXapiLrsType.php.

References $terminated.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), update(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

329  : bool
330  {
331  return $this->terminated;
332  }
+ Here is the caller graph for this function:

◆ getTimestamp()

ilCmiXapiLrsType::getTimestamp ( )

Definition at line 349 of file class.ilCmiXapiLrsType.php.

References $timestamp.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), update(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

349  : bool
350  {
351  return $this->timestamp;
352  }
+ Here is the caller graph for this function:

◆ getTimeToDelete()

ilCmiXapiLrsType::getTimeToDelete ( )

Definition at line 184 of file class.ilCmiXapiLrsType.php.

References $time_to_delete.

Referenced by update().

184  : ?int
185  {
186  return $this->time_to_delete;
187  }
+ Here is the caller graph for this function:

◆ getTitle()

ilCmiXapiLrsType::getTitle ( )

Definition at line 141 of file class.ilCmiXapiLrsType.php.

References $title.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), and update().

141  : string
142  {
143  return $this->title;
144  }
+ Here is the caller graph for this function:

◆ getTypeId()

ilCmiXapiLrsType::getTypeId ( )

Definition at line 131 of file class.ilCmiXapiLrsType.php.

References $type_id.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), delete(), read(), save(), update(), ilObjCmiXapi\updateByPassProxyFromLrsType(), and ilObjCmiXapi\updatePrivacySettingsFromLrsType().

131  : int
132  {
133  return $this->type_id;
134  }
+ Here is the caller graph for this function:

◆ isAvailable()

ilCmiXapiLrsType::isAvailable ( )

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

References getAvailability().

166  : bool
167  {
168  if ($this->getAvailability() == self::AVAILABILITY_CREATE) {
169  return true;
170  }
171 
172  if ($this->getAvailability() == self::AVAILABILITY_EXISTING) {
173  return true;
174  }
175 
176  return false;
177  }
+ Here is the call graph for this function:

◆ isBypassProxyEnabled()

ilCmiXapiLrsType::isBypassProxyEnabled ( )

Definition at line 424 of file class.ilCmiXapiLrsType.php.

References $bypassProxyEnabled.

Referenced by ilObjCmiXapiAdministrationGUI\buildLrsTypeForm(), update(), and ilObjCmiXapi\updateByPassProxyFromLrsType().

424  : bool
425  {
427  }
+ Here is the caller graph for this function:

◆ read()

ilCmiXapiLrsType::read ( )
protected

Definition at line 434 of file class.ilCmiXapiLrsType.php.

References $query, $res, getTypeId(), setAchieved(), setAnswered(), setAvailability(), setBypassProxyEnabled(), setCompleted(), setDescription(), setDuration(), setExternalLrs(), setFailed(), setForcePrivacySettings(), setHideData(), setInitialized(), setLrsEndpoint(), setLrsKey(), setLrsSecret(), setNoSubstatements(), setOnlyMoveon(), setPassed(), setPrivacyCommentDefault(), setPrivacyIdent(), setPrivacyName(), setProgressed(), setRemarks(), setSatisfied(), setTerminated(), setTimestamp(), setTimeToDelete(), setTitle(), and setTypeId().

Referenced by __construct().

434  : bool
435  {
436  $query = "SELECT * FROM " . self::DB_TABLE_NAME . " WHERE type_id = %s";
437 
438  $res = $this->database->queryF($query, ['integer'], [$this->getTypeId()]);
439  $row = $this->database->fetchObject($res);
440  if ($row) {
441  $this->setTypeId((int) $row->type_id);
442  $this->setTitle($row->title);
443  $this->setDescription($row->description);
444  $this->setAvailability((int) $row->availability);
445  $this->setLrsEndpoint($row->lrs_endpoint);
446  $this->setLrsKey($row->lrs_key);
447  $this->setLrsSecret($row->lrs_secret);
448  $this->setPrivacyIdent((int) $row->privacy_ident);
449  $this->setPrivacyName((int) $row->privacy_name);
450  $this->setForcePrivacySettings((bool) $row->force_privacy_settings);
451  $this->setPrivacyCommentDefault($row->privacy_comment_default);
452  $this->setExternalLrs((bool) $row->external_lrs);
453  $this->setTimeToDelete((int) $row->time_to_delete);
454  $this->setRemarks($row->remarks);
455  $this->setBypassProxyEnabled((bool) $row->bypass_proxy);
456  $this->setOnlyMoveon((bool) $row->only_moveon);
457  $this->setAchieved((bool) $row->achieved);
458  $this->setAnswered((bool) $row->answered);
459  $this->setCompleted((bool) $row->completed);
460  $this->setFailed((bool) $row->failed);
461  $this->setInitialized((bool) $row->initialized);
462  $this->setPassed((bool) $row->passed);
463  $this->setProgressed((bool) $row->progressed);
464  $this->setSatisfied((bool) $row->satisfied);
465  $this->setTerminated((bool) $row->c_terminated);
466  $this->setHideData((bool) $row->hide_data);
467  $this->setTimestamp((bool) $row->c_timestamp);
468  $this->setDuration((bool) $row->duration);
469  $this->setNoSubstatements((bool) $row->no_substatements);
470 
471  return true;
472  }
473 
474  return false;
475  }
$res
Definition: ltiservices.php:69
setTitle(string $a_title)
setSatisfied(bool $satisfied)
setAchieved(bool $achieved)
setPrivacyIdent(int $a_option)
setPrivacyName(int $a_option)
setProgressed(bool $progressed)
setTimestamp(bool $timestamp)
setLrsSecret(string $a_lrs_secret)
setAnswered(bool $answered)
setHideData(bool $hide_data)
setForcePrivacySettings(bool $force_privacy_settings)
setRemarks(string $a_remarks)
setInitialized(bool $initialized)
setOnlyMoveon(bool $only_moveon)
setDuration(bool $duration)
setTimeToDelete(?int $a_time_to_delete)
setExternalLrs(bool $a_option)
$query
setPrivacyCommentDefault(string $a_option)
setNoSubstatements(bool $no_substatements)
setLrsKey(string $a_lrs_key)
setDescription(string $a_description)
setLrsEndpoint(string $a_endpoint)
setCompleted(bool $completed)
setBypassProxyEnabled(bool $bypassProxyEnabled)
setTerminated(bool $terminated)
setAvailability(int $a_availability)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilCmiXapiLrsType::save ( )

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

References create(), getTypeId(), and update().

477  : void
478  {
479  if ($this->getTypeId() != 0) {
480  $this->update();
481  } else {
482  $this->create();
483  }
484  }
+ Here is the call graph for this function:

◆ setAchieved()

ilCmiXapiLrsType::setAchieved ( bool  $achieved)

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

References $achieved.

Referenced by read().

254  : void
255  {
256  $this->achieved = $achieved;
257  }
+ Here is the caller graph for this function:

◆ setAnswered()

ilCmiXapiLrsType::setAnswered ( bool  $answered)

Definition at line 264 of file class.ilCmiXapiLrsType.php.

References $answered.

Referenced by read().

264  : void
265  {
266  $this->answered = $answered;
267  }
+ Here is the caller graph for this function:

◆ setAvailability()

ilCmiXapiLrsType::setAvailability ( int  $a_availability)

Definition at line 156 of file class.ilCmiXapiLrsType.php.

Referenced by read().

156  : void
157  {
158  $this->availability = $a_availability;
159  }
+ Here is the caller graph for this function:

◆ setBypassProxyEnabled()

ilCmiXapiLrsType::setBypassProxyEnabled ( bool  $bypassProxyEnabled)

Definition at line 429 of file class.ilCmiXapiLrsType.php.

References $bypassProxyEnabled.

Referenced by read().

429  : void
430  {
431  $this->bypassProxyEnabled = $bypassProxyEnabled;
432  }
+ Here is the caller graph for this function:

◆ setCompleted()

ilCmiXapiLrsType::setCompleted ( bool  $completed)

Definition at line 274 of file class.ilCmiXapiLrsType.php.

References $completed.

Referenced by read().

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

◆ setDescription()

ilCmiXapiLrsType::setDescription ( string  $a_description)

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

Referenced by read().

146  : void
147  {
148  $this->description = $a_description;
149  }
+ Here is the caller graph for this function:

◆ setDuration()

ilCmiXapiLrsType::setDuration ( bool  $duration)

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

References $duration.

Referenced by read().

364  : void
365  {
366  $this->duration = $duration;
367  }
+ Here is the caller graph for this function:

◆ setExternalLrs()

ilCmiXapiLrsType::setExternalLrs ( bool  $a_option)

Definition at line 399 of file class.ilCmiXapiLrsType.php.

Referenced by read().

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

◆ setFailed()

ilCmiXapiLrsType::setFailed ( bool  $failed)

Definition at line 284 of file class.ilCmiXapiLrsType.php.

References $failed.

Referenced by read().

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

◆ setForcePrivacySettings()

ilCmiXapiLrsType::setForcePrivacySettings ( bool  $force_privacy_settings)

Definition at line 384 of file class.ilCmiXapiLrsType.php.

References $force_privacy_settings.

Referenced by read().

384  : void
385  {
386  $this->force_privacy_settings = $force_privacy_settings;
387  }
+ Here is the caller graph for this function:

◆ setHideData()

ilCmiXapiLrsType::setHideData ( bool  $hide_data)

Definition at line 344 of file class.ilCmiXapiLrsType.php.

References $hide_data.

Referenced by read().

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

◆ setInitialized()

ilCmiXapiLrsType::setInitialized ( bool  $initialized)

Definition at line 294 of file class.ilCmiXapiLrsType.php.

References $initialized.

Referenced by read().

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

◆ setLrsEndpoint()

ilCmiXapiLrsType::setLrsEndpoint ( string  $a_endpoint)

Definition at line 189 of file class.ilCmiXapiLrsType.php.

Referenced by read().

189  : void
190  {
191  $this->lrs_endpoint = $a_endpoint;
192  }
+ Here is the caller graph for this function:

◆ setLrsKey()

ilCmiXapiLrsType::setLrsKey ( string  $a_lrs_key)

Definition at line 199 of file class.ilCmiXapiLrsType.php.

Referenced by read().

199  : void
200  {
201  $this->lrs_key = $a_lrs_key;
202  }
+ Here is the caller graph for this function:

◆ setLrsSecret()

ilCmiXapiLrsType::setLrsSecret ( string  $a_lrs_secret)

Definition at line 209 of file class.ilCmiXapiLrsType.php.

Referenced by read().

209  : void
210  {
211  $this->lrs_secret = $a_lrs_secret;
212  }
+ Here is the caller graph for this function:

◆ setNoSubstatements()

ilCmiXapiLrsType::setNoSubstatements ( bool  $no_substatements)

Definition at line 374 of file class.ilCmiXapiLrsType.php.

References $no_substatements.

Referenced by read().

374  : void
375  {
376  $this->no_substatements = $no_substatements;
377  }
+ Here is the caller graph for this function:

◆ setOnlyMoveon()

ilCmiXapiLrsType::setOnlyMoveon ( bool  $only_moveon)

Definition at line 244 of file class.ilCmiXapiLrsType.php.

References $only_moveon.

Referenced by read().

244  : void
245  {
246  $this->only_moveon = $only_moveon;
247  }
+ Here is the caller graph for this function:

◆ setPassed()

ilCmiXapiLrsType::setPassed ( bool  $passed)

Definition at line 304 of file class.ilCmiXapiLrsType.php.

References $passed.

Referenced by read().

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

◆ setPrivacyCommentDefault()

ilCmiXapiLrsType::setPrivacyCommentDefault ( string  $a_option)

Definition at line 389 of file class.ilCmiXapiLrsType.php.

Referenced by read().

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

◆ setPrivacyIdent()

ilCmiXapiLrsType::setPrivacyIdent ( int  $a_option)

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

Referenced by read().

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

◆ setPrivacyName()

ilCmiXapiLrsType::setPrivacyName ( int  $a_option)

Definition at line 229 of file class.ilCmiXapiLrsType.php.

Referenced by read().

229  : void
230  {
231  $this->privacy_name = $a_option;
232  }
+ Here is the caller graph for this function:

◆ setProgressed()

ilCmiXapiLrsType::setProgressed ( bool  $progressed)

Definition at line 314 of file class.ilCmiXapiLrsType.php.

References $progressed.

Referenced by read().

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

◆ setRemarks()

ilCmiXapiLrsType::setRemarks ( string  $a_remarks)

Definition at line 414 of file class.ilCmiXapiLrsType.php.

Referenced by read().

414  : void
415  {
416  $this->remarks = $a_remarks;
417  }
+ Here is the caller graph for this function:

◆ setSatisfied()

ilCmiXapiLrsType::setSatisfied ( bool  $satisfied)

Definition at line 324 of file class.ilCmiXapiLrsType.php.

References $satisfied.

Referenced by read().

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

◆ setTerminated()

ilCmiXapiLrsType::setTerminated ( bool  $terminated)

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

References $terminated.

Referenced by read().

334  : void
335  {
336  $this->terminated = $terminated;
337  }
+ Here is the caller graph for this function:

◆ setTimestamp()

ilCmiXapiLrsType::setTimestamp ( bool  $timestamp)

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

References $timestamp.

Referenced by read().

354  : void
355  {
356  $this->timestamp = $timestamp;
357  }
+ Here is the caller graph for this function:

◆ setTimeToDelete()

ilCmiXapiLrsType::setTimeToDelete ( ?int  $a_time_to_delete)

Definition at line 179 of file class.ilCmiXapiLrsType.php.

Referenced by read().

179  : void
180  {
181  $this->time_to_delete = $a_time_to_delete;
182  }
+ Here is the caller graph for this function:

◆ setTitle()

ilCmiXapiLrsType::setTitle ( string  $a_title)

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

Referenced by read().

136  : void
137  {
138  $this->title = $a_title;
139  }
+ Here is the caller graph for this function:

◆ setTypeId()

ilCmiXapiLrsType::setTypeId ( int  $a_type_id)

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

Referenced by create(), and read().

126  : void
127  {
128  $this->type_id = $a_type_id;
129  }
+ Here is the caller graph for this function:

◆ update()

ilCmiXapiLrsType::update ( )
protected

Definition at line 493 of file class.ilCmiXapiLrsType.php.

References getAchieved(), getAnswered(), getAvailability(), getCompleted(), getDescription(), getDuration(), getExternalLrs(), getFailed(), getForcePrivacySettings(), getHideData(), getInitialized(), getLrsEndpoint(), getLrsKey(), getLrsSecret(), getNoSubstatements(), getOnlyMoveon(), getPassed(), getPrivacyCommentDefault(), getPrivacyIdent(), getPrivacyName(), getProgressed(), getRemarks(), getSatisfied(), getTerminated(), getTimestamp(), getTimeToDelete(), getTitle(), getTypeId(), and isBypassProxyEnabled().

Referenced by create(), and save().

493  : bool
494  {
495  $this->database->replace(
496  self::DB_TABLE_NAME,
497  array(
498  'type_id' => array('integer', $this->getTypeId())
499  ),
500  array(
501  'title' => array('text', $this->getTitle()),
502  'description' => array('clob', $this->getDescription()),
503  'availability' => array('integer', $this->getAvailability()),
504  'remarks' => array('clob', $this->getRemarks()),
505  'time_to_delete' => array('integer', $this->getTimeToDelete()),
506  'lrs_endpoint' => array('text', $this->getLrsEndpoint()),
507  'lrs_key' => array('text', $this->getLrsKey()),
508  'lrs_secret' => array('text', $this->getLrsSecret()),
509  'privacy_ident' => array('integer', $this->getPrivacyIdent()),
510  'privacy_name' => array('integer', $this->getPrivacyName()),
511  'force_privacy_settings' => array('integer', (int) $this->getForcePrivacySettings()),
512  'privacy_comment_default' => array('text', $this->getPrivacyCommentDefault()),
513  'external_lrs' => array('integer', $this->getExternalLrs()),
514  'bypass_proxy' => array('integer', (int) $this->isBypassProxyEnabled()),
515  'only_moveon' => array('integer', (int) $this->getOnlyMoveon()),
516  'achieved' => array('integer', (int) $this->getAchieved()),
517  'answered' => array('integer', (int) $this->getAnswered()),
518  'completed' => array('integer', (int) $this->getCompleted()),
519  'failed' => array('integer', (int) $this->getFailed()),
520  'initialized' => array('integer', (int) $this->getInitialized()),
521  'passed' => array('integer', (int) $this->getPassed()),
522  'progressed' => array('integer', (int) $this->getProgressed()),
523  'satisfied' => array('integer', (int) $this->getSatisfied()),
524  'c_terminated' => array('integer', (int) $this->getTerminated()),
525  'hide_data' => array('integer', (int) $this->getHideData()),
526  'c_timestamp' => array('integer', (int) $this->getTimestamp()),
527  'duration' => array('integer', (int) $this->getDuration()),
528  'no_substatements' => array('integer', (int) $this->getNoSubstatements())
529  )
530  );
531 
532  return true;
533  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $achieved

bool ilCmiXapiLrsType::$achieved = true
protected

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

Referenced by getAchieved(), and setAchieved().

◆ $answered

bool ilCmiXapiLrsType::$answered = true
protected

Definition at line 87 of file class.ilCmiXapiLrsType.php.

Referenced by getAnswered(), and setAnswered().

◆ $availability

int ilCmiXapiLrsType::$availability = self::AVAILABILITY_CREATE
protected

Definition at line 66 of file class.ilCmiXapiLrsType.php.

Referenced by getAvailability().

◆ $bypassProxyEnabled

bool ilCmiXapiLrsType::$bypassProxyEnabled = false
protected

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

Referenced by isBypassProxyEnabled(), and setBypassProxyEnabled().

◆ $completed

bool ilCmiXapiLrsType::$completed = true
protected

Definition at line 89 of file class.ilCmiXapiLrsType.php.

Referenced by getCompleted(), and setCompleted().

◆ $database

ilDBInterface ilCmiXapiLrsType::$database
private

Definition at line 111 of file class.ilCmiXapiLrsType.php.

◆ $description

string ilCmiXapiLrsType::$description = ""
protected

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

Referenced by getDescription().

◆ $duration

bool ilCmiXapiLrsType::$duration = true
protected

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

Referenced by getDuration(), and setDuration().

◆ $external_lrs

bool ilCmiXapiLrsType::$external_lrs = false
protected

Definition at line 74 of file class.ilCmiXapiLrsType.php.

Referenced by getExternalLrs().

◆ $failed

bool ilCmiXapiLrsType::$failed = true
protected

Definition at line 91 of file class.ilCmiXapiLrsType.php.

Referenced by getFailed(), and setFailed().

◆ $force_privacy_settings

bool ilCmiXapiLrsType::$force_privacy_settings = false
protected

Definition at line 72 of file class.ilCmiXapiLrsType.php.

Referenced by getForcePrivacySettings(), and setForcePrivacySettings().

◆ $hide_data

bool ilCmiXapiLrsType::$hide_data = false
protected

Definition at line 103 of file class.ilCmiXapiLrsType.php.

Referenced by getHideData(), and setHideData().

◆ $initialized

bool ilCmiXapiLrsType::$initialized = true
protected

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

Referenced by getInitialized(), and setInitialized().

◆ $launch_type

string ilCmiXapiLrsType::$launch_type = self::LAUNCH_TYPE_LINK
protected

Definition at line 77 of file class.ilCmiXapiLrsType.php.

Referenced by getLaunchType().

◆ $lrs_endpoint

string ilCmiXapiLrsType::$lrs_endpoint = ""
protected

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

Referenced by getLrsEndpoint().

◆ $lrs_key

string ilCmiXapiLrsType::$lrs_key = ""
protected

Definition at line 68 of file class.ilCmiXapiLrsType.php.

Referenced by getLrsKey().

◆ $lrs_secret

string ilCmiXapiLrsType::$lrs_secret = ""
protected

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

Referenced by getLrsSecret().

◆ $no_substatements

bool ilCmiXapiLrsType::$no_substatements = false
protected

Definition at line 109 of file class.ilCmiXapiLrsType.php.

Referenced by getNoSubstatements(), and setNoSubstatements().

◆ $only_moveon

bool ilCmiXapiLrsType::$only_moveon = false
protected

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

Referenced by getOnlyMoveon(), and setOnlyMoveon().

◆ $passed

bool ilCmiXapiLrsType::$passed = true
protected

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

Referenced by getPassed(), and setPassed().

◆ $privacy_comment_default

string ilCmiXapiLrsType::$privacy_comment_default = ""
protected

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

Referenced by getPrivacyCommentDefault().

◆ $privacy_ident

int ilCmiXapiLrsType::$privacy_ident = 3
protected

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

Referenced by getPrivacyIdent().

◆ $privacy_name

int ilCmiXapiLrsType::$privacy_name = 0
protected

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

Referenced by getPrivacyName().

◆ $progressed

bool ilCmiXapiLrsType::$progressed = true
protected

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

Referenced by getProgressed(), and setProgressed().

◆ $remarks

string ilCmiXapiLrsType::$remarks = ""
protected

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

Referenced by getRemarks().

◆ $satisfied

bool ilCmiXapiLrsType::$satisfied = true
protected

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

Referenced by getSatisfied(), and setSatisfied().

◆ $terminated

bool ilCmiXapiLrsType::$terminated = true
protected

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

Referenced by getTerminated(), and setTerminated().

◆ $time_to_delete

int ilCmiXapiLrsType::$time_to_delete = null
protected

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

Referenced by getTimeToDelete().

◆ $timestamp

bool ilCmiXapiLrsType::$timestamp = false
protected

Definition at line 105 of file class.ilCmiXapiLrsType.php.

Referenced by getTimestamp(), and setTimestamp().

◆ $title

string ilCmiXapiLrsType::$title = ""
protected

Definition at line 64 of file class.ilCmiXapiLrsType.php.

Referenced by getTitle().

◆ $type_id

int ilCmiXapiLrsType::$type_id = 0
protected

Definition at line 62 of file class.ilCmiXapiLrsType.php.

Referenced by getTypeId().

◆ AVAILABILITY_CREATE

const ilCmiXapiLrsType::AVAILABILITY_CREATE = 2

◆ AVAILABILITY_EXISTING

const ilCmiXapiLrsType::AVAILABILITY_EXISTING = 1

◆ AVAILABILITY_NONE

const ilCmiXapiLrsType::AVAILABILITY_NONE = 0

◆ DB_TABLE_NAME

const ilCmiXapiLrsType::DB_TABLE_NAME = 'cmix_lrs_types'

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

◆ ENDPOINT_AGGREGATE_SUFFIX

const ilCmiXapiLrsType::ENDPOINT_AGGREGATE_SUFFIX = 'statements/aggregate'

Definition at line 60 of file class.ilCmiXapiLrsType.php.

◆ ENDPOINT_STATEMENTS_SUFFIX

const ilCmiXapiLrsType::ENDPOINT_STATEMENTS_SUFFIX = 'statements'

Definition at line 59 of file class.ilCmiXapiLrsType.php.

◆ LAUNCH_TYPE_EMBED

const ilCmiXapiLrsType::LAUNCH_TYPE_EMBED = "embed"

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

◆ LAUNCH_TYPE_LINK

const ilCmiXapiLrsType::LAUNCH_TYPE_LINK = "link"

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

◆ LAUNCH_TYPE_PAGE

const ilCmiXapiLrsType::LAUNCH_TYPE_PAGE = "page"

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

◆ PRIVACY_IDENT_IL_UUID_EXT_ACCOUNT

const ilCmiXapiLrsType::PRIVACY_IDENT_IL_UUID_EXT_ACCOUNT = 1

◆ PRIVACY_IDENT_IL_UUID_LOGIN

const ilCmiXapiLrsType::PRIVACY_IDENT_IL_UUID_LOGIN = 2

◆ PRIVACY_IDENT_IL_UUID_RANDOM

◆ PRIVACY_IDENT_IL_UUID_SHA256

◆ PRIVACY_IDENT_IL_UUID_SHA256URL

◆ PRIVACY_IDENT_IL_UUID_USER_ID

const ilCmiXapiLrsType::PRIVACY_IDENT_IL_UUID_USER_ID = 0

◆ PRIVACY_IDENT_REAL_EMAIL

const ilCmiXapiLrsType::PRIVACY_IDENT_REAL_EMAIL = 3

◆ PRIVACY_NAME_FIRSTNAME

const ilCmiXapiLrsType::PRIVACY_NAME_FIRSTNAME = 1

◆ PRIVACY_NAME_FULLNAME

const ilCmiXapiLrsType::PRIVACY_NAME_FULLNAME = 3

◆ PRIVACY_NAME_LASTNAME

const ilCmiXapiLrsType::PRIVACY_NAME_LASTNAME = 2

◆ PRIVACY_NAME_NONE

const ilCmiXapiLrsType::PRIVACY_NAME_NONE = 0

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