diff --git a/plugin/lti_provider/LtiProviderPlugin.php b/plugin/lti_provider/LtiProviderPlugin.php index c6d315918d..8078e9fc84 100644 --- a/plugin/lti_provider/LtiProviderPlugin.php +++ b/plugin/lti_provider/LtiProviderPlugin.php @@ -25,14 +25,14 @@ class LtiProviderPlugin extends Plugin $author = 'Christian Beeznest'; $publicKey = $this->getPublicKey(); - $message = Display::return_message($this->get_lang('description')); + $message = Display::return_message($this->get_lang('Description')); if (empty($publicKey)) { $publicKey = $this->get_lang('GenerateKeyPairInfo'); } $pkHtml = '
'.$publicKey.'diff --git a/plugin/lti_provider/db/lti13_cookie.php b/plugin/lti_provider/db/lti13_cookie.php index 59022d2230..5a602af79c 100644 --- a/plugin/lti_provider/db/lti13_cookie.php +++ b/plugin/lti_provider/db/lti13_cookie.php @@ -19,21 +19,21 @@ class Lti13Cookie implements Lti1p3Cookie public function setCookie($name, $value, $exp = 3600, $options = []): self { - $cookie_options = [ + $cookieOptions = [ 'expires' => time() + $exp ]; // SameSite none and secure will be required for tools to work inside iframes - /*$same_site_options = [ + $sameSiteOptions = [ 'samesite' => 'None', 'secure' => false, 'httponly' => true - ];*/ + ]; - setcookie($name, $value, array_merge($cookie_options, $same_site_options, $options)); + setcookie($name, $value, array_merge($cookieOptions, $sameSiteOptions, $options)); // Set a second fallback cookie in the event that "SameSite" is not supported - setcookie("LEGACY_" . $name, $value, array_merge($cookie_options, $options)); + setcookie("LEGACY_" . $name, $value, array_merge($cookieOptions, $options)); return $this; } } diff --git a/plugin/lti_provider/delete.php b/plugin/lti_provider/delete.php index b6486ab479..b6b65ae7fd 100644 --- a/plugin/lti_provider/delete.php +++ b/plugin/lti_provider/delete.php @@ -13,7 +13,7 @@ if (!isset($_REQUEST['id'])) { api_not_allowed(true); } -$platformId = (int)$_REQUEST['id']; +$platformId = (int) $_REQUEST['id']; $plugin = LtiProviderPlugin::create(); $em = Database::getManager(); diff --git a/plugin/lti_provider/edit.php b/plugin/lti_provider/edit.php index b87c2afeef..e1ea0b24bb 100644 --- a/plugin/lti_provider/edit.php +++ b/plugin/lti_provider/edit.php @@ -14,7 +14,7 @@ if (!isset($_REQUEST['id'])) { api_not_allowed(true); } -$platformId = (int)$_REQUEST['id']; +$platformId = (int) $_REQUEST['id']; $plugin = LtiProviderPlugin::create(); $em = Database::getManager(); diff --git a/plugin/lti_provider/lang/english.php b/plugin/lti_provider/lang/english.php index 41c23c3781..cdaf848376 100644 --- a/plugin/lti_provider/lang/english.php +++ b/plugin/lti_provider/lang/english.php @@ -3,7 +3,7 @@ $strings['plugin_title'] = 'LTI 1.3 Advantage Provider'; $strings['plugin_comment'] = 'Simple application developed as a way to demonstrate how to build an IMS LTI tool provider'; -$strings['description'] = 'The application allows a student inside a course of the platform with external tools which is scored (Assigment and Grade Services) and generating reporting of their members (NRP Services). +$strings['Description'] = 'The application allows a student inside a course of the platform with external tools which is scored (Assigment and Grade Services) and generating reporting of their members (NRP Services). Here are your LTI connection details to try out this app:'; $strings['LtiProviderDescription'] = 'First thing you will need is to configure your registration and deployment. To configure your registration fill in the form the required values for deployment in your platform'; @@ -13,18 +13,18 @@ $strings['EditPlatform'] = 'Edit the customer platform'; $strings['PlatformName'] = 'LMS (issuer)'; $strings['PlatformEdited'] = 'Platform details edited'; $strings['PlatformDeleted'] = 'Platform deleted'; -$strings['client_id'] = 'Client ID'; -$strings['launch_url'] = 'Launch URL'; -$strings['login_url'] = 'Login URL'; -$strings['redirect_url'] = 'Redirect URL'; -$strings['auth_login_url'] = 'OIDC Auth URL'; -$strings['auth_token_url'] = 'OAuth2 Access Token URL'; -$strings['key_set_url'] = 'Keyset URL'; -$strings['deployment_id'] = 'Deployment ID'; -$strings['kid'] = 'kid'; -$strings['public_key'] = 'Public key'; -$strings['name'] = 'Provider name'; -$strings['enabled'] = 'Enabled'; +$strings['ClientId'] = 'Client ID'; +$strings['LaunchUrl'] = 'Launch URL'; +$strings['LoginUrl'] = 'Login URL'; +$strings['RedirectUrl'] = 'Redirect URL'; +$strings['AuthLoginUrl'] = 'OIDC Auth URL'; +$strings['AuthTokenUrl'] = 'OAuth2 Access Token URL'; +$strings['KeySetUrl'] = 'Keyset URL'; +$strings['DeploymentId'] = 'Deployment ID'; +$strings['KeyId'] = 'key id (kid)'; +$strings['PublicKey'] = 'Public key'; +$strings['Name'] = 'Provider name'; +$strings['Enabled'] = 'Enabled'; $strings['GenerateKeyPairInfo'] = 'A new private and public key pair will be created when enabling.'; $strings['URLs'] = 'Endpoints Urls'; $strings['PlatformConnectionAdded'] = 'A platform connection is added.'; diff --git a/plugin/lti_provider/lang/french.php b/plugin/lti_provider/lang/french.php index a2f0201978..a16c3cf785 100644 --- a/plugin/lti_provider/lang/french.php +++ b/plugin/lti_provider/lang/french.php @@ -3,7 +3,7 @@ $strings['plugin_title'] = 'LTI 1.3 Advantage Provider'; $strings['plugin_comment'] = 'Une application simple développée pour montrer comment créer un outil IMS LTI'; -$strings['description'] = 'L\'application permet à un étudiant à l\'intérieur d\'un cours de la plate-forme avec des outils externes qui est noté (Services d\'affectation et de notes) et de générer des rapports de leurs membres (Services NRP). +$strings['Description'] = 'L\'application permet à un étudiant à l\'intérieur d\'un cours de la plate-forme avec des outils externes qui est noté (Services d\'affectation et de notes) et de générer des rapports de leurs membres (Services NRP). Voici les détails de votre connexion LTI pour essayer cette application :'; $strings['LtiProviderDescription'] = 'La première chose dont vous aurez besoin est de configurer votre enregistrement et votre déploiement. Pour configurer votre inscription remplissez le formulaire les valeurs requises pour le déploiement dans votre plateforme'; @@ -13,18 +13,18 @@ $strings['EditPlatform'] = 'Modifier la plateforme client'; $strings['PlatformName'] = 'LMS (émetteur)'; $strings['PlatformEdited'] = 'Détails de la plateforme modifiés'; $strings['PlatformDeleted'] = 'Plateforme supprimée'; -$strings['client_id'] = 'Client ID'; -$strings['launch_url'] = 'Lancer l\'URL'; -$strings['login_url'] = 'URL de connexion'; -$strings['redirect_url'] = 'URL de redirection'; -$strings['auth_login_url'] = 'URL d\'authentification OIDC'; -$strings['auth_token_url'] = 'URL du jeton d\'accès OAuth2'; -$strings['key_set_url'] = 'URL du jeu de clés'; -$strings['deployment_id'] = 'ID de déploiement'; -$strings['kid'] = 'kid'; -$strings['public_key'] = 'Clé publique'; -$strings['name'] = 'Nom du fournisseur'; -$strings['enabled'] = 'Enabled'; +$strings['ClientId'] = 'Client ID'; +$strings['LaunchUrl'] = 'Lancer l\'URL'; +$strings['LoginUrl'] = 'URL de connexion'; +$strings['RedirectUrl'] = 'URL de redirection'; +$strings['AuthLoginUrl'] = 'URL d\'authentification OIDC'; +$strings['AuthTokenUrl'] = 'URL du jeton d\'accès OAuth2'; +$strings['KeySetUrl'] = 'URL du jeu de clés'; +$strings['DeploymentId'] = 'ID de déploiement'; +$strings['KeyId'] = 'Key Id'; +$strings['PublicKey'] = 'Clé publique'; +$strings['Name'] = 'Nom du fournisseur'; +$strings['Enabled'] = 'Enabled'; $strings['GenerateKeyPairInfo'] = 'Une nouvelle paire de clés privée et publique sera créée lors de l\'activation.'; $strings['URLs'] = 'Endpoints Urls'; $strings['PlatformConnectionAdded'] = 'Une connexion de plate-forme est ajoutée.'; diff --git a/plugin/lti_provider/lang/spanish.php b/plugin/lti_provider/lang/spanish.php index 68aa50318d..04983162f2 100644 --- a/plugin/lti_provider/lang/spanish.php +++ b/plugin/lti_provider/lang/spanish.php @@ -3,7 +3,7 @@ $strings['plugin_title'] = 'Proveedor de ventajas LTI 1.3'; $strings['plugin_comment'] = 'Aplicación simple desarrollada como una forma de demostrar cómo construir un proveedor de herramientas IMS LTI'; -$strings['description'] = 'La aplicación permite a un alumno entrar en un curso de la plataforma con herramientas externas que se puntúan (Assigment and Grade Services) y generar informes de sus miembros (NRP Services). +$strings['Description'] = 'La aplicación permite a un alumno entrar en un curso de la plataforma con herramientas externas que se puntúan (Assigment and Grade Services) y generar informes de sus miembros (NRP Services). Aquí están los detalles de su conexión LTI para probar esta aplicación: '; $strings['LtiProviderDescription'] = 'Lo primero que necesitará es configurar su registro y despliegue. Para configurar su registro complete el formulario con los valores requeridos para el despliegue en su plataforma '; @@ -13,18 +13,18 @@ $strings['EditPlatform'] = 'Edite la plataforma del cliente'; $strings['PlatformName'] = 'LMS (emisor)'; $strings['PlatformEdited'] = 'Detalles de la plataforma editados'; $strings['PlatformDeleted'] = 'Plataforma eliminada'; -$strings['client_id'] = 'ID de cliente'; -$strings['launch_url'] = 'URL de lanzamiento'; -$strings['login_url'] = 'URL de inicio de sesión'; -$strings['redirect_url'] = 'URL de redireccionamiento'; -$strings['auth_login_url'] = 'URL de autenticación OIDC'; -$strings['auth_token_url'] = 'URL del token de acceso de OAuth2'; -$strings['key_set_url'] = 'URL del conjunto de claves'; -$strings['deployment_id'] = 'ID de implementación'; -$strings['kid'] = 'Kid'; -$strings['public_key'] = 'Clave pública'; -$strings['name'] = 'Nombre del proveedor'; -$strings['enabled'] = 'Habilitado'; +$strings['ClientId'] = 'ID de cliente'; +$strings['LaunchUrl'] = 'URL de lanzamiento'; +$strings['LoginUrl'] = 'URL de inicio de sesión'; +$strings['RedirectUrl'] = 'URL de redireccionamiento'; +$strings['AuthLoginUrl'] = 'URL de autenticación OIDC'; +$strings['AuthTokenUrl'] = 'URL del token de acceso de OAuth2'; +$strings['KeySetUrl'] = 'URL del conjunto de claves'; +$strings['DeploymentId'] = 'ID de implementación'; +$strings['KeyId'] = 'Key Id'; +$strings['PublicKey'] = 'Clave pública'; +$strings['Name'] = 'Nombre del proveedor'; +$strings['Enabled'] = 'Habilitado'; $strings['GenerateKeyPairInfo'] = 'Se creará un nuevo par de claves pública y privada cuando se habilite.'; $strings['URLs'] = 'URL de puntos finales'; $strings['PlatformConnectionAdded'] = 'Se agrega una conexión de plataforma.'; diff --git a/plugin/lti_provider/provider_settings.php b/plugin/lti_provider/provider_settings.php index 7d5ca7822e..c0f85b342a 100644 --- a/plugin/lti_provider/provider_settings.php +++ b/plugin/lti_provider/provider_settings.php @@ -33,23 +33,23 @@ try { $html = '
'.$publicKey.'
{{ 'auth_login_url'|get_plugin_lang('LtiProviderPlugin') }}:
{{ platform.getAuthLoginUrl }}
{{ 'auth_token_url'|get_plugin_lang('LtiProviderPlugin') }}:
{{ platform.getAuthTokenUrl }}
{{ 'key_set_url'|get_plugin_lang('LtiProviderPlugin') }}:
{{ platform.getKeySetUrl }}
{{ 'AuthLoginUrl'|get_plugin_lang('LtiProviderPlugin') }}:
{{ platform.getAuthLoginUrl }}
{{ 'AuthTokenUrl'|get_plugin_lang('LtiProviderPlugin') }}:
{{ platform.getAuthTokenUrl }}
{{ 'KeySetUrl'|get_plugin_lang('LtiProviderPlugin') }}:
{{ platform.getKeySetUrl }}