19declare(strict_types=1);
33 protected int $id = 0;
317 return (
bool) strlen($this->providerIcon->getFilename());
363 foreach (self::getValidCategories() as
$category) {
367 $translation =
$DIC->language()->txt(
'rep_add_new_def_grp_organisation');
371 $translation =
$DIC->language()->txt(
'rep_add_new_def_grp_communication');
375 $translation =
$DIC->language()->txt(
'rep_add_new_def_grp_content');
379 $translation =
$DIC->language()->txt(
'rep_add_new_def_grp_assessment');
383 $translation =
$DIC->language()->txt(
'rep_add_new_def_grp_feedback');
406 return in_array(
$category, self::getValidCategories());
471 return $this->mastery_score * 100;
476 $this->mastery_score = $mastery_score_percent / 100;
617 foreach (explode(
';', $this->
getKeywords()) as $keyword) {
686 if ($this->client_id ==
'') {
806 foreach ($dbRow as $field => $value) {
808 case 'id': $this->
setId((
int) $value);
810 case 'title': $this->
setTitle($value);
820 case 'log_level': $this->
setLogLevel((
int) $value);
844 case 'keep_lp': $this->
setKeepLp((
bool) $value);
858 case 'use_xapi': $this->
setUseXapi((
bool) $value);
870 case 'keywords': $this->
setKeywords((
string) $value);
872 case 'creator': $this->
setCreator((
int) $value);
882 case 'client_id': $this->
setClientId((
string) $value);
886 case 'key_type': $this->
setKeyType((
string) $value);
888 case 'public_key': $this->
setPublicKey((
string) $value);
918 $query =
"SELECT * FROM lti_ext_provider WHERE id = %s";
919 $res =
$DIC->database()->queryF($query, array(
'integer'), array($this->
getId()));
921 while ($row =
$DIC->database()->fetchAssoc(
$res)) {
933 $query =
"SELECT * FROM lti_ext_provider WHERE client_id = %s";
936 while ($row =
$DIC->database()->fetchAssoc(
$res)) {
949 if ($this->
getId() !== 0) {
975 'id' => array(
'integer', $this->
getId()),
983 $this->
setId($DIC->database()->nextId(
'lti_ext_provider'));
994 'id' => array(
'integer', $this->
getId()),
995 'title' => array(
'text', $this->
getTitle()),
998 'remarks' => array(
'text', $this->
getRemarks()),
1005 'category' => array(
'text', $this->
getCategory()),
1011 'keep_lp' => array(
'integer', $this->
isKeepLp()),
1018 'use_xapi' => array(
'integer', $this->
getUseXapi()),
1024 'keywords' => array(
'text', $this->
getKeywords()),
1025 'creator' => array(
'integer', $this->
getCreator()),
1027 'global' => array(
'integer', (
int) $this->
isGlobal()),
1030 'client_id' => array(
'text', $this->
getClientId()),
1032 'key_type' => array(
'text', $this->
getKeyType()),
1037 'content_item' => array(
'integer', (
int) $this->
isContentItem()),
1044 public function delete():
void
1048 $DIC->database()->manipulateF(
1049 "DELETE FROM lti_ext_provider WHERE id = %s",
Indicates general problems with the input or output operations.
setProviderUrl(string $provider_url)
setPublicKey(string $public_key)
setPrivacyCommentDefault(string $privacy_comment_default)
setClientId(string $client_id)
static getCategoriesSelectOptions()
setPrivacyName(int $privacy_name)
const PRIVACY_NAME_FULLNAME
getProviderIconUploadFileData()
setPrivacyIdent(int $privacy_ident)
setUseProviderId(bool $use_provider_id)
const PRIVACY_IDENT_IL_UUID_USER_ID
const AVAILABILITY_CREATE
array $providerIconUploadFileData
string $privacy_comment_default
setCustomParams(string $custom_params)
bool $instructor_send_name
bool $include_user_picture
__construct(?int $providerId=null)
ilLTIConsumeProvider constructor.
const PRIVACY_NAME_FIRSTNAME
setTimeToDelete(int $time_to_delete)
const PRIVACY_IDENT_IL_UUID_EXT_ACCOUNT
hasProviderIconUploadInput()
setPublicKeyset(string $public_keyset)
isProviderKeyCustomizable()
const PRIVACY_IDENT_REAL_EMAIL
setRemarks(string $remarks)
ilLTIConsumeProviderIcon $providerIcon
setDescription(string $description)
setProviderIconUploadFileData(array $providerIconUploadFileData)
ilImageFileInputGUI $providerIconUploadInput
const PRIVACY_IDENT_IL_UUID_SHA256URL
bool $is_external_provider
setProviderIconUploadInput(ilFormPropertyGUI $providerIconUploadInput)
setInstructorSendEmail(bool $instructor_send_email)
setXapiLaunchSecret(string $xapi_launch_secret)
setInstructorSendName(bool $instructor_send_name)
setProviderIconFilename(string $provider_icon_filename)
setAcceptedBy(int $accepted_by)
string $provider_icon_filename
isResetableToUserDefined()
getProviderIconUploadInput()
setProviderKey(string $provider_key)
setMasteryScorePercent(float $mastery_score_percent)
string $enabled_capability
setAvailability(int $availability)
setLtiVersion(string $lti_version)
setMasteryScore(float $mastery_score)
static getProviderIdFromClientId(string $clientId)
static getInstance(?int $providerId=null)
Inits class static.
setIncludeUserPicture(bool $include_user_picture)
setLogLevel(int $log_level)
assignFromDbRow(array $dbRow)
const CATEGORY_ASSESSMENT
setIsExternalProvider(bool $is_external_provider)
setXapiLaunchUrl(string $xapi_launch_url)
setHasOutcome(bool $has_outcome)
const PRIVACY_NAME_LASTNAME
setContentItemUrl(string $content_item_url)
setAlwaysLearner(bool $always_learner)
setIsGlobal(bool $is_global)
bool $provider_key_customizable
setRedirectionUris(string $redirection_uris)
setProviderKeyCustomizable(bool $provider_key_customizable)
const PRIVACY_IDENT_IL_UUID_SHA256
const CATEGORY_COMMUNICATION
setKeywords(string $keywords)
setProviderIcon(ilLTIConsumeProviderIcon $providerIcon)
setXapiActivityId(string $xapi_activity_id)
setContentItem(bool $content_item)
setInitiateLogin(string $initiate_login)
setUseXapi(bool $use_xapi)
getProviderIconFilename()
bool $instructor_send_email
setGradeSynchronization(bool $grade_synchronization)
getPrivacyCommentDefault()
setKeyType(string $key_type)
const AVAILABILITY_EXISTING
setXapiLaunchKey(string $xapi_launch_key)
bool $grade_synchronization
setLaunchMethod(string $launch_method)
const CATEGORY_ORGANISATION
setProviderSecret(string $provider_secret)
string $xapi_launch_secret
static getValidCategories()
setCategory(string $category)
setProviderXml(string $provider_xml)
isValidCategory(string $category)
const PRIVACY_IDENT_IL_UUID_LOGIN
setEnabledCapability(string $enabled_capability)
if(empty($clientId)) $providerId