Update language variables used in OpenBadges - refs BT#9082

1.10.x
Yannick Warnier 11 years ago
parent 48a2d2e24c
commit 779309faf8
  1. 19
      main/admin/skill_badge_create.php
  2. 2
      main/gradebook/lib/fe/displaygradebook.php
  3. 1
      main/inc/lib/template.lib.php
  4. 15
      main/lang/english/trad4all.inc.php
  5. 18
      main/lang/french/trad4all.inc.php
  6. 15
      main/lang/spanish/trad4all.inc.php
  7. 4
      main/template/default/skill/badge.tpl
  8. 6
      main/template/default/skill/badge_create.tpl
  9. 2
      main/template/default/skill/badge_list.tpl

@ -32,34 +32,35 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (isset($_FILES['image']) && $_FILES['image']['error'] == 0) { if (isset($_FILES['image']) && $_FILES['image']['error'] == 0) {
$dirPermissions = api_get_permissions_for_new_directories(); $dirPermissions = api_get_permissions_for_new_directories();
$sysPath = api_get_path(SYS_PATH); $sysPath = api_get_path(SYS_PATH);
$sysDataPath = api_get_path(SYS_DATA_PATH);
$existsDataDirectory = file_exists($sysPath . 'data/'); $existsDataDirectory = is_dir($sysDataPath);
if (!$existsDataDirectory) { if (!$existsDataDirectory) {
$existsDataDirectory = api_create_protected_dir('data', $sysPath); $existsDataDirectory = api_create_protected_dir('data', $sysPath);
} }
$fileDir = "data/badges/"; $fileDir = "badges/";
$fileName = sha1($_POST['name']) . ".png"; $fileName = sha1($_POST['name']) . ".png";
$existsBadgesDirectory = file_exists($sysPath . 'data/badges/'); $existsBadgesDirectory = is_dir($sysDataPath . 'badges/');
if (!$existsBadgesDirectory) { if (!$existsBadgesDirectory) {
$existsBadgesDirectory = api_create_protected_dir('badges', $sysPath . 'data/'); $existsBadgesDirectory = api_create_protected_dir('badges', $sysDataPath);
} }
if ($existsBadgesDirectory) { if ($existsBadgesDirectory) {
if (!empty($skill['icon'])) { if (!empty($skill['icon'])) {
$iconFileAbsoulePath = $sysPath . $skill['icon']; $iconFileAbsolutePath = $sysDataPath . $skill['icon'];
$iconDirAbsolutePath = $sysPath . $fileDir; $iconDirAbsolutePath = $sysDataPath . $fileDir;
if (Security::check_abs_path($iconFileAbsoulePath, $iconDirAbsolutePath)) { if (Security::check_abs_path($iconFileAbsolutePath, $iconDirAbsolutePath)) {
unlink($sysPath . $skill['icon']); unlink($sysDataPath . $skill['icon']);
} }
} }
$imageExtraField = new Image($_FILES['image']['tmp_name']); $imageExtraField = new Image($_FILES['image']['tmp_name']);
$imageExtraField->send_image($sysPath . $fileDir . $fileName, -1, 'png'); $imageExtraField->send_image($sysDataPath . $fileDir . $fileName, -1, 'png');
$params['icon'] = $fileDir . $fileName; $params['icon'] = $fileDir . $fileName;
} }

@ -460,7 +460,7 @@ class DisplayGradebook
$aditionalButtons .= isset($certificateLinkInfo['badge_link']) ? $certificateLinkInfo['badge_link'] : ''; $aditionalButtons .= isset($certificateLinkInfo['badge_link']) ? $certificateLinkInfo['badge_link'] : '';
$aditionalButtons .= '</div>'; $aditionalButtons .= '</div>';
} }
$scoreinfo .= '<h4>' . get_lang('Total') . ' : ' . $scorecourse_display . $aditionalButtons. '</h4>'; $scoreinfo .= '<h4>' . sprintf(get_lang('TotalX'), $scorecourse_display . $aditionalButtons). '</h4>';
} }
Display :: display_normal_message($scoreinfo, false); Display :: display_normal_message($scoreinfo, false);

@ -444,6 +444,7 @@ class Template
'web_img' => api_get_path(WEB_IMG_PATH), 'web_img' => api_get_path(WEB_IMG_PATH),
'web_plugin' => api_get_path(WEB_PLUGIN_PATH), 'web_plugin' => api_get_path(WEB_PLUGIN_PATH),
'web_lib' => api_get_path(WEB_LIBRARY_PATH), 'web_lib' => api_get_path(WEB_LIBRARY_PATH),
'web_data' => api_get_path(WEB_DATA_PATH),
'web_self' => api_get_self(), 'web_self' => api_get_self(),
'web_query_vars' => api_htmlentities($_SERVER['QUERY_STRING']), 'web_query_vars' => api_htmlentities($_SERVER['QUERY_STRING']),
'web_self_query_vars' => api_htmlentities($_SERVER['REQUEST_URI']), 'web_self_query_vars' => api_htmlentities($_SERVER['REQUEST_URI']),

@ -2,6 +2,19 @@
/* /*
for more information: see languages.txt in the lang folder. for more information: see languages.txt in the lang folder.
*/ */
$OpenBadgesBannerText = "A new online standard to recognize and verify learning in combination with Chamilo skills. Use the tabs to configure it.";
$OpenBadgesIntroduction = "Introducing OpenBadges";
$DesignANewBadgeComment = "Design a new badge, download it from the design tool and upload it on the platform.";
$TheBadgesWillBeSentToThatBackpack = "The badges will be sent to this backpack";
$BackpackDetails = "Backpack details";
$CriteriaToEarnTheBadge = "Criteria to earn the badge";
$BadgePreview = "Badge preview";
$DesignNewBadge = "Design a new badge";
$TotalX = "Total: %s";
$DownloadBadges = "Download badges";
$IssuerDetails = "Badges issuer details";
$CreateBadge = "Create badge";
$Badges = "Badges";
$StudentsWhoAchievedTheSkillX = "Students who acquired skill %s"; $StudentsWhoAchievedTheSkillX = "Students who acquired skill %s";
$AchievedSkillInCourseX = "Skills acquired in course %s"; $AchievedSkillInCourseX = "Skills acquired in course %s";
$SkillsReport = "Skills report"; $SkillsReport = "Skills report";
@ -1726,4 +1739,4 @@ $DataTableSearch = "Search";
$HideColumn = "Hide column"; $HideColumn = "Hide column";
$DisplayColumn = "Show column"; $DisplayColumn = "Show column";
$LegalAgreementAccepted = "Legal agreement accepted"; $LegalAgreementAccepted = "Legal agreement accepted";
?> ?>

@ -2,6 +2,24 @@
/* /*
for more information: see languages.txt in the lang folder. for more information: see languages.txt in the lang folder.
*/ */
$OpenBadgesBannerText = "Un nouveau standard ouvert pour reconnaître et vérifier l'apprentissage, en combinaison avec les compétences de Chamilo. Utilisez les onglets pour le configurer.";
$OpenBadgesIntroduction = "Nous vous présentons OpenBadges";
$DesignANewBadgeComment = "Élaborez un nouveau badge, téléchargez-le et utilisez-le dans le formulaire du badge.";
$TheBadgesWillBeSentToThatBackpack = "Les badges seront envoyés vers ce sac à dos";
$BackpackDetails = "Détails du sac à dos";
$CriteriaToEarnTheBadge = "Critères d'obtention du badge";
$BadgePreview = "Prévisualisation du badge";
$DesignNewBadge = "Élaborer un nouveau badge";
$TotalX = "Total: %s";
$DownloadBadges = "Télécharger les badges";
$IssuerDetails = "Détails émetteur des badges";
$CreateBadge = "Créer un badge";
$Badges = "Badges";
$StudentsWhoAchievedTheSkillX = "Apprenants qui ont acquis la compétence %s";
$AchievedSkillInCourseX = "Compétences acquises grâce au cours %s";
$SkillsReport = "Rapport de compétences";
$AssignedUsersListToStudentBoss = "Liste des utilisateurs assignés au supérieur";
$AssignUsersToBoss = "Assigner des utilisateurs au supérieur";
$RoleStudentBoss = "Chef d'apprenant(s)"; $RoleStudentBoss = "Chef d'apprenant(s)";
$CosecantCsc = "Cosécante:\t\t\t\tcsc(x)"; $CosecantCsc = "Cosécante:\t\t\t\tcsc(x)";
$HyperbolicCosecantCsch = "Cosécante hyperbolique:\t\tcsch(x)"; $HyperbolicCosecantCsch = "Cosécante hyperbolique:\t\tcsch(x)";

@ -2,6 +2,19 @@
/* /*
for more information: see languages.txt in the lang folder. for more information: see languages.txt in the lang folder.
*/ */
$OpenBadgesBannerText = "Un nuevo estándar abierto para reconocer y verificar el aprendizaje en combinación con las competencias de Chamilo. Usa las pestañas para configurarlo.";
$OpenBadgesIntroduction = "Introduciendo OpenBadges";
$DesignANewBadgeComment = "Diseña una nueva insignia, descárgala y súbela en la plataforma.";
$TheBadgesWillBeSentToThatBackpack = "Las insignias se mandarán a esta mochila";
$BackpackDetails = "Detalles de la mochila";
$CriteriaToEarnTheBadge = "Criterios para lograr la insignia";
$BadgePreview = "Previsualización insignia";
$DesignNewBadge = "Diseñar una nueva insignia";
$TotalX = "Total: %s";
$DownloadBadges = "Descargar insignias";
$IssuerDetails = "Detalles del emisor";
$CreateBadge = "Crear insignia";
$Badges = "Insignias";
$StudentsWhoAchievedTheSkillX = "Estudiantes que adquirieron la competencia %s"; $StudentsWhoAchievedTheSkillX = "Estudiantes que adquirieron la competencia %s";
$AchievedSkillInCourseX = "Competencias adquiridas en curso %s"; $AchievedSkillInCourseX = "Competencias adquiridas en curso %s";
$SkillsReport = "Reporte de competencias"; $SkillsReport = "Reporte de competencias";
@ -1731,4 +1744,4 @@ $DataTableSearch = "Buscar";
$HideColumn = "Ocultar columna"; $HideColumn = "Ocultar columna";
$DisplayColumn = "Mostrar columna"; $DisplayColumn = "Mostrar columna";
$LegalAgreementAccepted = "Condiciones legales aceptadas"; $LegalAgreementAccepted = "Condiciones legales aceptadas";
?> ?>

@ -17,8 +17,8 @@
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active"> <div class="tab-pane active">
<div class="hero-unit"> <div class="hero-unit">
<h1>Introducing Open Badges</h1> <h1>{{ 'OpenBadgesIntroduction' | get_lang }}</h1>
<p class="lead">A new online standard to recognize and verify learning</p> <p class="lead">{{ 'OpenBadgesBannerText' | get_lang }}</p>
<p class="lead"> <p class="lead">
<a href="http://openbadges.org/">http://openbadges.org/</a> <a href="http://openbadges.org/">http://openbadges.org/</a>
</p> </p>

@ -59,13 +59,13 @@
<div class="tab-pane active"> <div class="tab-pane active">
<div class="row"> <div class="row">
<div class="span3"> <div class="span3">
<p>Design a new badge. Download from the design tool. And Upload in your platform.</p> <p>{{ 'DesignANewBadgeComment' | get_lang }}</p>
<p> <p>
<button id="btn-open-designer" class="btn btn-info btn-large btn-block" type="button">{{ 'DesignNewBadge' | get_lang }}</button> <button id="btn-open-designer" class="btn btn-info btn-large btn-block" type="button">{{ 'DesignNewBadge' | get_lang }}</button>
</p> </p>
<hr> <hr>
<div class="well well-small {{ skill.icon ? '' : 'hide' }}" id="badge-container"> <div class="well well-small {{ skill.icon ? '' : 'hide' }}" id="badge-container">
<img id="badge-preview" alt="{{ 'BadgePreview' | get_lang }}" src="{{ skill.icon ? [_p.web, skill.icon] | join('') : '' }}"> <img id="badge-preview" alt="{{ 'BadgePreview' | get_lang }}" src="{{ skill.icon ? [_p.web_data, skill.icon] | join('') : '' }}">
</div> </div>
</div> </div>
<div class="span9"> <div class="span9">
@ -91,7 +91,7 @@
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="criteria">{{ 'Criteria' | get_lang }}</label> <label class="control-label" for="criteria">{{ 'CriteriaToEarnTheBadge' | get_lang }}</label>
<div class="controls"> <div class="controls">
<textarea name="criteria" id="criteria" class="input-xxlarge" rows="10">{{ skill.criteria }}</textarea> <textarea name="criteria" id="criteria" class="input-xxlarge" rows="10">{{ skill.criteria }}</textarea>
</div> </div>

@ -36,7 +36,7 @@
<tr> <tr>
<td> <td>
{% if skill.icon %} {% if skill.icon %}
<img src="{{ [_p.web, skill.icon] | join('') }}" width="50" alt="{{ skill.name }}"> <img src="{{ [_p.web_data, skill.icon] | join('') }}" width="50" alt="{{ skill.name }}">
{% endif %} {% endif %}
{{ skill.name }} {{ skill.name }}
</td> </td>

Loading…
Cancel
Save