Fix language terms and add default icon in course settings page - refs #7307

1.9.x
Yannick Warnier 11 years ago
parent 1cf9bffeba
commit d35c2e9f0d
  1. 16
      main/inc/lib/plugin.lib.php
  2. 4
      plugin/courselegal/CourseLegalPlugin.php
  3. 32
      plugin/courselegal/lang/english.php
  4. 27
      plugin/courselegal/lang/french.php
  5. 2
      plugin/courselegal/lang/spanish.php
  6. 2
      plugin/courselegal/start.php

@ -501,7 +501,21 @@ class AppPlugin
$plugin_name = $obj->get_name();
$pluginTitle = $obj->get_title();
if (!empty($obj->course_settings)) {
$icon = Display::return_icon($plugin_name.'.png', Security::remove_XSS($pluginTitle),'', ICON_SIZE_SMALL);
if (is_file(api_get_path(SYS_CODE_PATH).'img/icons/'.ICON_SIZE_SMALL.'/'.$plugin_name.'.png')) {
$icon = Display::return_icon(
$plugin_name . '.png',
Security::remove_XSS($pluginTitle),
'',
ICON_SIZE_SMALL
);
} else {
$icon = Display::return_icon(
'plugins.png',
Security::remove_XSS($pluginTitle),
'',
ICON_SIZE_SMALL
);
}
//$icon = null;
$form->addElement('html', '<div><h3>'.$icon.' '.Security::remove_XSS($pluginTitle).'</h3><div>');

@ -76,7 +76,7 @@ class CourseLegalPlugin extends Plugin
WHERE user_id = $userId AND c_id = $courseId AND session_id = $sessionId";
$result = Database::query($sql);
$data = array();
if (Database::num_rows($result) > 0 ) {
if (Database::num_rows($result) > 0) {
$data = Database::fetch_array($result, 'ASSOC');
}
@ -310,7 +310,7 @@ class CourseLegalPlugin extends Plugin
}
$result = Database::query($sql);
$data = array();
if (Database::num_rows($result) > 0 ) {
if (Database::num_rows($result) > 0) {
$data = Database::store_result($result, 'ASSOC');
}

@ -1,24 +1,26 @@
<?php
$strings['plugin_title'] = "Course legal agreement";
$strings['plugin_comment'] = "Add a legal agreement per course and even course in a session";
$strings['plugin_comment'] = "Add a legal agreement per course (also works with courses in sessions)";
$strings['tool_enable'] = 'Enable plugin';
$strings['tool_enable_help'] = 'Once enabled, you will have to configure the plugin inside the course configuration, then from the course homepage (a button will appear there only for the teacher)';
$strings['CourseLegal'] = 'Course legal agreement';
$strings['WebAgreement'] = 'Web agreement';
$strings['MailAgreement'] = 'Mail agreement';
$strings['MailAgreementWasSentWithClickX'] = 'Click to the link below to agree with the terms and conditions of course %s: <br /> %s';
$strings['AgreementUpdated'] = 'Agreement Updated';
$strings['AgreementWasUpdatedClickHere'] = 'Agreement was updated click here %s';
$strings['YouNeedToConfirmYourAgreementCheckYourEmail'] = 'You need to confirm your agreement check your email.';
$strings['DeleteFile'] = 'Delete file';
$strings['RemoveAllUserAgreements'] = 'Remove all user agreements';
$strings['WarnAllUsersByEmail'] = 'Warn all users by email';
$strings['WarnAllUsersByEmailAndSendAttachment'] = 'Warn all users by email and send the attachment.';
$strings['ReSendMailAgreementLink'] = 'Re send mail agreement link';
$strings['SendOnlyWarning'] = 'Send only warning';
$strings['SendAgreementFile'] = 'Send warning and attach the agreement';
$strings['NoSendWarning'] = 'No send warning';
$strings['TheAgreementIsAttachedInThisEmail'] = 'A copy of the agreement is attached in this email';
$strings['MailAgreement'] = 'Agreement by e-mail';
$strings['MailAgreementWasSentWithClickX'] = 'Click on the link below to agree with the terms and conditions to access course %s: <br /> %s';
$strings['AgreementUpdated'] = 'Agreement updated';
$strings['AgreementWasUpdatedClickHere'] = 'The agreement was updated. Click here: %s';
$strings['YouNeedToConfirmYourAgreementCheckYourEmail'] = 'You need to confirm that you agree. Please check your email.';
$strings['DeleteFile'] = 'Delete the file attachment';
$strings['RemoveAllUserAgreements'] = 'Remove all previous user agreements';
$strings['WarnAllUsersByEmail'] = 'Notify all users by email';
$strings['WarnAllUsersByEmailAndSendAttachment'] = 'Notify all users by email and send them the attachment.';
$strings['ReSendMailAgreementLink'] = 'Send e-mail agreement link again';
$strings['SendOnlyWarning'] = 'Send only notification';
$strings['SendAgreementFile'] = 'Send notification and attach the agreement';
$strings['NoSendWarning'] = 'Do not send notification';
$strings['TheAgreementIsAttachedInThisEmail'] = 'A copy of the agreement document is attached to this email';

@ -0,0 +1,27 @@
<?php
$strings['plugin_title'] = "Termes légaux d'utilisation de cours";
$strings['plugin_comment'] = "Ajouter des termes d'utilisation par cours (fonctionne également avec les cours dans des sessions), avec possibilité de demander confirmation par mail.";
$strings['tool_enable'] = 'Activer le plugin';
$strings['tool_enable_help'] = 'Une fois activé, il vous faudra configurer le plugin dans chaque cours (outil de configuration du cours), puis depuis la page d\'accueil du cours (un bouton apparaîtra au professeur uniquement)';
$strings['CourseLegal'] = 'Termes d\'utilisation du cours';
$strings['WebAgreement'] = 'Accord web';
$strings['MailAgreement'] = 'Accord par mail';
$strings['MailAgreementWasSentWithClickX'] = 'Cliquez sur le lien suivant pour accepter les termes d\'accès au cours %s: <br /> %s';
$strings['AgreementUpdated'] = 'Termes mis à jour';
$strings['AgreementWasUpdatedClickHere'] = 'Les termes d\'utilisation ont été mis à jour. Cliquez ici: %s';
$strings['YouNeedToConfirmYourAgreementCheckYourEmail'] = 'Veuillez confirmer votre accord. Vérifiez votre e-mail.';
$strings['DeleteFile'] = 'Éliminez la pièce jointe';
$strings['RemoveAllUserAgreements'] = 'Supprimer tous les accords utilisateurs antérieurs';
$strings['WarnAllUsersByEmail'] = 'Avertir tous les utilisateurs par mail';
$strings['WarnAllUsersByEmailAndSendAttachment'] = 'Avertir tous les utilisateurs par mail avec la pièce jointe.';
$strings['ReSendMailAgreementLink'] = 'Envoyer le lien d\'accord par mail de nouveau';
$strings['SendOnlyWarning'] = 'Envoyer seulement l\'avertissement';
$strings['SendAgreementFile'] = 'Envoyer à nouveau l\'avertissement avec la pièce jointe';
$strings['NoSendWarning'] = 'Ne pas envoyer l\'avertissement';
$strings['TheAgreementIsAttachedInThisEmail'] = 'Une copie du document d\'accord est joint à cet e-mail';

@ -2,3 +2,5 @@
$strings['plugin_title'] = "Course agreements";
$strings['plugin_comment'] = "Course agreements";
$strings['tool_enable'] = 'Activar la configuración del plugin en los cursos';
$strings['tool_enable_help'] = 'Una vez activado, tendrá que configurar el plugin dentro de la página de configuración del curso, y luego desde la página principal del curso (un botón aparecerá solo al profesor)';

@ -21,7 +21,7 @@ $url = api_get_self().'?'.api_get_cidreq();
$courseId = api_get_course_int_id();
$sessionId = api_get_session_id();
$form = new FormValidator('plugin', 'post', $url );
$form = new FormValidator('plugin', 'post', $url);
$form->addElement('header', $legal->get_lang('CourseLegal'));
$form->addElement('hidden', 'session_id', $sessionId);
$form->addElement('hidden', 'c_id', $courseId);

Loading…
Cancel
Save