Merge branch 'master' of github.com:chamilo/chamilo-lms into alpha

alpha
Yannick Warnier 1 year ago
commit b74e45139d
  1. 27
      public/main/inc/lib/fileManage.lib.php
  2. 2
      public/main/template/default/admin/career_dashboard.html.twig
  3. 2
      public/main/template/default/admin/gradebook_dependency.html.twig
  4. 2
      public/main/template/default/admin/gradebook_list.html.twig
  5. 12
      public/main/template/default/admin/resource_sequence.html.twig
  6. 2
      public/main/template/default/admin/teacher_time_report.html.twig
  7. 30
      public/main/template/default/admin/teachers_time_by_session_report.html.twig
  8. 4
      public/main/template/default/agenda/planification.html.twig
  9. 2
      public/main/template/default/auth/hrm_courses.html.twig
  10. 16
      public/main/template/default/auth/session_catalog.html.twig
  11. 4
      public/main/template/default/blog/blog.html.twig
  12. 8
      public/main/template/default/blog/post.html.twig
  13. 4
      public/main/template/default/course_description/edit.html.twig
  14. 2
      public/main/template/default/course_description/upload.html.twig
  15. 2
      public/main/template/default/coursecopy/import_moodle.html.twig
  16. 2
      public/main/template/default/dashboard/index.html.twig
  17. 4
      public/main/template/default/document/recycle.html.twig
  18. 2
      public/main/template/default/exercise/reading_comprehension.html.twig
  19. 20
      public/main/template/default/export/table_pdf.html.twig
  20. 6
      public/main/template/default/gamification/my_progress.html.twig
  21. 10
      public/main/template/default/gradebook/certificate_report.html.twig
  22. 18
      public/main/template/default/gradebook/my_certificates.html.twig
  23. 24
      public/main/template/default/gradebook/search.html.twig
  24. 2
      public/main/template/default/my_space/accessoverview.html.twig
  25. 16
      public/main/template/default/my_space/partials/tracking_user_overview.html.twig
  26. 12
      public/main/template/default/my_space/pdf_tracking_lp.html.twig
  27. 14
      public/main/template/default/my_space/user_summary.html.twig
  28. 14
      public/main/template/default/my_space/works_in_session_report.html.twig
  29. 4
      public/main/template/default/social/avatar_block.html.twig
  30. 4
      public/main/template/default/social/form_modals.html.twig
  31. 4
      public/main/template/default/social/group_view.html.twig
  32. 8
      public/main/template/default/social/home.html.twig
  33. 4
      public/main/template/default/social/personal_data.html.twig
  34. 8
      public/main/template/default/social/profile.html.twig
  35. 8
      public/main/template/default/social/skills_block.html.twig
  36. 12
      public/main/template/default/social/user_block.html.twig
  37. 2
      public/main/template/default/social/whoisonline.html.twig
  38. 4
      public/main/template/default/survey/pending.html.twig
  39. 6
      public/main/template/default/user_portal/classic_courses_with_category.html.twig
  40. 6
      public/main/template/default/user_portal/classic_courses_without_category.html.twig
  41. 6
      public/main/template/default/user_portal/classic_session.html.twig
  42. 4
      public/main/template/default/user_portal/course_categories.html.twig
  43. 6
      public/main/template/default/user_portal/grid_courses_with_category.html.twig
  44. 10
      public/main/template/default/user_portal/grid_courses_without_category.html.twig
  45. 10
      public/main/template/default/user_portal/grid_session.html.twig
  46. 6
      public/main/template/default/user_portal/list_courses.html.twig
  47. 8
      public/main/template/default/user_portal/list_sessions.html.twig
  48. 127
      tests/scripts/switch_files_to_gettext.php

@ -74,17 +74,12 @@ function copyDirTo($source, $destination, $move = true)
/**
* Get a list of all PHP (.php) files in a given directory. Includes .tpl files.
*
* @param string $base_path The base path in which to find the corresponding files
* @param bool $includeStatic Include static .html, .htm and .css files
*
* @return array
*/
function getAllPhpFiles($base_path, $includeStatic = false)
function getAllPhpFiles(string $base_path, bool $includeStatic = false): array
{
$list = scandir($base_path);
$files = [];
$extensionsArray = ['.php', '.tpl'];
$extensionsArray = ['.php', '.tpl', '.html.twig'];
if ($includeStatic) {
$extensionsArray[] = 'html';
$extensionsArray[] = '.htm';
@ -94,21 +89,21 @@ function getAllPhpFiles($base_path, $includeStatic = false)
if ('.' == substr($item, 0, 1)) {
continue;
}
$special_dirs = [api_get_path(SYS_TEST_PATH), api_get_path(SYS_COURSE_PATH), api_get_path(SYS_LANG_PATH), api_get_path(SYS_ARCHIVE_PATH)];
if (in_array($base_path.$item.'/', $special_dirs)) {
$special_dirs = []; // Modify this array as needed
if (in_array($base_path . $item . '/', $special_dirs)) {
continue;
}
if (is_dir($base_path.$item)) {
$files = array_merge($files, getAllPhpFiles($base_path.$item.'/', $includeStatic));
if (is_dir($base_path . $item)) {
$files = array_merge($files, getAllPhpFiles($base_path . $item . '/', $includeStatic));
} else {
//only analyse php files
$sub = substr($item, -4);
if (in_array($sub, $extensionsArray)) {
$files[] = $base_path.$item;
foreach ($extensionsArray as $extension) {
if (substr($item, -strlen($extension)) == $extension) {
$files[] = $base_path . $item;
break;
}
}
}
}
$list = null;
return $files;
}

@ -22,7 +22,7 @@
<table class="table promotions">
<thead class="title">
<th>{{ 'Promotions' | get_lang }}</th>
<th>{{ 'StudyCycle' | get_lang }} </th>
<th>{{ 'Semester' | get_lang }} </th>
<th>{{ 'Courses' | get_lang }} </th>
</thead>
{% for promotions in item.career %}

@ -8,7 +8,7 @@
({{ gradebook_category.courseCode }})
{% endif %}
</h3>
{{ 'MinimumGradebookToValidate' | get_lang }} : {{ min_to_validate }}
{{ 'Minimum to validate' | get_lang }} : {{ min_to_validate }}
<br/>
{{ 'MandatoryCourses' | get_lang }}
{% for course in mandatory_courses %}

@ -10,7 +10,7 @@
<tr>
<th>{{ 'Name' | get_lang }}</th>
<th>{{ 'Course' | get_lang }}</th>
<th>{{ 'Actions' | get_lang }} </th>
<th>{{ 'Detail' | get_lang }} </th>
</tr>
</thead>
{% for item in gradebook_list %}

@ -259,7 +259,7 @@
</script>
<div class="panel panel-default">
<div class="panel-body">
<div class="section-title-sequence">{{ 'SequenceSelection' | get_lang }}</div>
<div class="section-title-sequence">{{ 'Sequence selection' | get_lang }}</div>
<div class="row">
<div class="col-md-6">
{{ create_sequence }}
@ -273,7 +273,7 @@
<div class="panel panel-default">
<div class="panel-body">
<div class="section-title-sequence">{{ 'SequenceConfiguration' | get_lang }}</div>
<div class="section-title-sequence">{{ 'Sequence configuration' | get_lang }}</div>
<div class="row">
{{ configure_sequence }}
@ -283,11 +283,11 @@
</div>
<div class="panel panel-default">
<div class="panel-body">
<div class="section-title-sequence">{{ 'SequencePreview' | get_lang }}</div>
<div class="section-title-sequence">{{ 'Sequence preview' | get_lang }}</div>
<div class="row">
<div class="col-md-9">
<h4 class="title-sequence">
{{ 'ItemsTheReferenceDependsOn' | get_lang }}
{{ 'Items the reference depends on' | get_lang }}
</h4>
<div id="parents">
</div>
@ -300,13 +300,13 @@
<div class="border-sequence">
<div class="arrow-sequence"></div>
</div>
<h4 class="title-sequence">{{ 'Dependencies' | get_lang }}</h4>
<h4 class="title-sequence">{{ 'Items that depend on the reference' | get_lang }}</h4>
<div id="children">
</div>
</div>
<div class="col-md-3">
<h4 class="title-sequence">{{ 'GraphDependencyTree' | get_lang }}</h4>
<h4 class="title-sequence">{{ 'Dependency tree' | get_lang }}</h4>
<div id="show_graph"></div>
</div>

@ -37,7 +37,7 @@
<th>{{ 'Course' | get_lang }}</th>
{% endif %}
<th>{{ 'Coach' | get_lang }}</th>
<th class="text-center">{{ 'TotalTime' | get_lang }}</th>
<th class="text-center">{{ 'Total time' | get_lang }}</th>
</tr>
</thead>
<tbody>

@ -7,17 +7,17 @@
<table class="table table-hover table-striped">
<thead>
<tr>
<th>{{ 'OfficialCode'|get_lang }}</th>
<th>{{ 'CoachName'|get_lang }}</th>
<th>{{ 'TimeSpentOnThePlatform'|get_lang }}</th>
<th>{{ 'FirstLoginInPlatform'|get_lang }}</th>
<th>{{ 'LatestLoginInPlatform'|get_lang }}</th>
<th>{{ 'Code'|get_lang }}</th>
<th>{{ 'Coach name'|get_lang }}</th>
<th>{{ 'Time spent in portal'|get_lang }}</th>
<th>{{ 'First login in platform'|get_lang }}</th>
<th>{{ 'Latest login in platform'|get_lang }}</th>
{% for course_code in courses %}
<th>{{ course_code }}</th>
<th>{{ 'NumberOfWorks'|get_lang }}</th>
<th>{{ 'LastWork'|get_lang }}</th>
<th>{{ 'TimeReportForCourseX'|get_lang|format(course_code) }}</th>
<th>{{ 'Number of works'|get_lang }}</th>
<th>{{ 'Last work'|get_lang }}</th>
<th>{{ 'Time report for course %s'|get_lang|format(course_code) }}</th>
{% endfor %}
</tr>
</thead>
@ -38,17 +38,17 @@
<table class="table table-hover table-striped">
<thead>
<tr>
<th>{{ 'OfficialCode'|get_lang }}</th>
<th>{{ 'Code'|get_lang }}</th>
<th>{{ 'Name'|get_lang }}</th>
<th>{{ 'TimeSpentOnThePlatform'|get_lang }}</th>
<th>{{ 'FirstLoginInPlatform'|get_lang }}</th>
<th>{{ 'LatestLoginInPlatform'|get_lang }}</th>
<th>{{ 'Time spent in portal'|get_lang }}</th>
<th>{{ 'First login in platform'|get_lang }}</th>
<th>{{ 'Latest login in platform'|get_lang }}</th>
{% for course in row.courses %}
<th>{{ course.code }}</th>
<th>{{ 'NumberOfWorks'|get_lang }}</th>
<th>{{ 'LastWork'|get_lang }}</th>
<th>{{ 'TimeReportForCourseX'|get_lang|format(course_code) }}</th>
<th>{{ 'Number of works'|get_lang }}</th>
<th>{{ 'Last work'|get_lang }}</th>
<th>{{ 'Time report for course %s'|get_lang|format(course_code) }}</th>
{% endfor %}
</tr>
</thead>

@ -30,7 +30,7 @@
<tr>
<th class="col-session">{{ 'Session'|get_lang }}</th>
{% for i in 1..52 %}
<th class="col-week text-center" title="{{ 'WeekX'|get_lang|format(i) }}"><span>{{ i }}</span></th>
<th class="col-week text-center" title="{{ 'Week %s'|get_lang|format(i) }}"><span>{{ i }}</span></th>
{% endfor %}
</tr>
</thead>
@ -65,7 +65,7 @@
</div>
{% else %}
<div class="alert alert-warning">
{{ 'ThereIsNotStillASession'|get_lang }}
{{ 'There are no sessions available'|get_lang }}
</div>
{% endif %}
{% endautoescape %}

@ -9,7 +9,7 @@
</div>
<div class="panel-body">
{% if not user.course_list %}
<div class="alert alert-warning">{{ 'UserHasNoCourse'|get_lang }}</div>
<div class="alert alert-warning">{{ 'This user is not subscribed to any course'|get_lang }}</div>
{% else %}
{{ user.course_list }}
{% endif %}

@ -15,7 +15,7 @@
<div class="col-md-6">
<form method="post" action="{{ _p.web_self }}?action=display_sessions">
<div class="form-group">
<label>{{ "ByDate"|get_lang }}</label>
<label>{{ 'By date'|get_lang }}</label>
<div class="input-group">
<input type="date" name="date" id="date" title="{{ 'Date'|get_lang }}"
class="form-control" value="{{ search_date }}" readonly>
@ -30,9 +30,9 @@
</div>
<div class="col-md-6">
<form method="post" action="{{ _p.web_self }}?action=search_tag">
<label>{{ "ByTag"|get_lang }}</label>
<label>{{ 'By tag'|get_lang }}</label>
<div class="input-group">
<input type="text" name="search_tag" title="{{ 'ByTag'|get_lang }}" class="form-control"
<input type="text" name="search_tag" title="{{ 'By tag'|get_lang }}" class="form-control"
value="{{ search_tag }}"/>
<span class="input-group-btn">
<button class="btn btn--plain" type="submit">
@ -72,7 +72,7 @@
<a href="{{ coach.url }}" class="ajax" data-title="{{ coach.name }}">
{{ coach.name }}
</a>
<p>{{ 'SessionGeneralCoach'|get_lang }}</p>
<p>{{ 'Session general coach'|get_lang }}</p>
</div>
{% endfor %}
{% endif %}
@ -105,7 +105,7 @@
<div class="btn-group btn-group-sm" role="group">
{% if not item.sequences is empty %}
<a class="btn btn--primary btn-sm" role="button"
title="{{ 'SeeSequences'|get_lang }}" data-toggle="popover"
title="{{ 'See sequences'|get_lang }}" data-toggle="popover"
id="session-{{ item.id }}-sequences">
<i class="fas fa-sitemap"></i>
</a>
@ -128,7 +128,7 @@
{% for sequence in item.sequences %}
content += '<p class="lead">{{ sequence.title }}</p>';
{% if sequence.requirements %}
content += '<p><em class="fa fa-sort-amount-desc"></em> {{ 'RequiredSessions'|get_lang }}</p>';
content += '<p><em class="fa fa-sort-amount-desc"></em> {{ 'Required sessions'|get_lang }}</p>';
content += '<ul>';
{% for requirement in sequence.requirements %}
@ -141,7 +141,7 @@
{% endif %}
{% if sequence.dependencies %}
content += '<p><em class="fa fa-sort-amount-desc"></em> {{ 'DependentSessions'|get_lang }}</p>';
content += '<p><em class="fa fa-sort-amount-desc"></em> {{ 'Dependent sessions'|get_lang }}</p>';
content += '<ul>';
{% for dependency in sequence.dependencies %}
@ -158,7 +158,7 @@
{% endif %}
{% endfor %}
{% else %}
content = "{{ 'NoDependencies'|get_lang }}";
content = "{{ 'No dependencies'|get_lang }}";
{% endif %}
return content;

@ -39,7 +39,7 @@
<p>
{{ item.extract }}
<button type="button" class="btn btn-link btn-read-more" data-id="{{ item.id_post }}">
{{ 'ReadMore'|get_lang }}
{{ 'Read more...'|get_lang }}
</button>
</p>
</div>
@ -88,7 +88,7 @@
</div>
<div id="task-blog" class="card">
<div class="card-body">
<h5 class="card-title">{{ 'MyTasks'|get_lang }}</h5>
<h5 class="card-title">{{ 'My tasks'|get_lang }}</h5>
{{ task }}
</div>
</div>

@ -61,7 +61,7 @@
<div class="card" id="blog-header">
<div class="panel-heading">
<div id="post-action" class="text-right">
<div class="btn-group btn-group-sm" role="group" aria-label="{{ 'Actions'|get_lang }}">
<div class="btn-group btn-group-sm" role="group" aria-label="{{ 'Detail'|get_lang }}">
{{ post.actions }}
</div>
</div>
@ -78,7 +78,7 @@
</li>
<li class="comments">
<i class="fa fa-comment-o"
aria-hidden="true"></i> {{ 'XComments'|get_lang|format(post.n_comments) }}
aria-hidden="true"></i> {{ '%s comments'|get_lang|format(post.n_comments) }}
</li>
<li class="autor">
<i class="fa fa-user" aria-hidden="true"></i>
@ -102,7 +102,7 @@
{{ post.frm_rating ?: '' }}
</article>
<div class="comments-post">
<h3 class="title">{{ 'XComments'|get_lang|format(post.n_comments) }}</h3>
<h3 class="title">{{ '%s comments'|get_lang|format(post.n_comments) }}</h3>
<div id="list-comments" class="media-list">
{% for item in post.comments %}
{{ nested.comment_template(item) }}
@ -142,7 +142,7 @@
</div>
<div id="task-blog" class="card">
<div class="card-body">
<h5 class="card-title">{{ 'MyTasks'|get_lang }}</h5>
<h5 class="card-title">{{ 'My tasks'|get_lang }}</h5>
{{ task }}
</div>
</div>

@ -7,7 +7,7 @@
{% if is_allowed_to_edit %}
<div class="btn-toolbar actions-bar" >
<div class="btn-group">
<a href="{{root}}&amp;action=listing" class="btn btn--plain" title="{{'ImportCSV'|get_lang}}">
<a href="{{root}}&amp;action=listing" class="btn btn--plain" title="{{'Import CSV'|get_lang}}">
<em class="size-32 icon-back"></em>
</a>
</div>
@ -25,7 +25,7 @@
{% if type.question %}
<div class="normal-message">
<div>
<strong>{{'QuestionPlan'|get_lang}}</strong>
<strong>{{'Help'|get_lang}}</strong>
</div>
{{type.question}}
</div>

@ -6,7 +6,7 @@
<div class="btn-toolbar actions-bar" >
<div class="btn-group">
<a href="{{root}}&amp;action=listing" class="btn" title="{{'ImportCSV'|get_lang}}">
<a href="{{root}}&amp;action=listing" class="btn" title="{{'Import CSV'|get_lang}}">
<em class="size-32 icon-back"></em>
</a>
</div>

@ -10,7 +10,7 @@
<script>
$(function() {
$(".btn--primary").click(function() {
$("#loader").html('<div class="wobblebar-loader"></div><p> {{ 'ProcessingImportPleaseDontCloseThisWindowThisActionMayTakeLongTimePlaseWait' | get_lang }} </p>');
$("#loader").html('<div class="wobblebar-loader"></div><p> {{ 'Processing the import... Please don't close this window. This process may take a considerable amount of time. Please be patient.' | get_lang }} </p>');
});
});
</script>

@ -12,7 +12,7 @@
{% endfor %}
{% else %}
<div class="alert alert-info" role="alert">
{{ 'YouHaveNotEnabledBlocks'| get_lang }}
{{ 'You haven't enabled any block'| get_lang }}
</div>
{% endif %}
</div>

@ -24,7 +24,7 @@
<tr>
<th>{{ 'Path' | get_lang }}</th>
<th>{{ 'Size' | get_lang }}</th>
<th>{{ 'Actions' | get_lang }}</th>
<th>{{ 'Detail' | get_lang }}</th>
</tr>
{% for file in files %}
<tr>
@ -43,6 +43,6 @@
{% endfor %}
</table>
{% else %}
{{ 'NoData' | get_lang }}
{{ 'No data available' | get_lang }}
{% endif %}

@ -2,7 +2,7 @@
<div class="question-reading-comprehension-overlay"></div>
{% if exercise_type == 1 %} {# all in one page #}
<button type="button" class="btn btn--plain btn-lg" id="question-{{ id }}-start">
{{ 'StartTimeWindow'|get_lang }}
{{ 'Start'|get_lang }}
<span class="fa fa-play" aria-hidden="true"></span>
</button>
{% endif %}

@ -13,7 +13,7 @@
{% if pdf_student_info %}
<tr>
<td style="background-color: #E5E5E5; text-align: left; width:130px; ">
<strong>{{ "Student" | get_lang }}:</strong>
<strong>{{ 'Learner' | get_lang }}:</strong>
</td>
<td>
{{ pdf_student_info.complete_name }}
@ -23,7 +23,7 @@
{% if pdf_teachers %}
<tr>
<td style="background-color: #E5E5E5; text-align: left; width:130px;">
<strong>{{ "Teacher" | get_lang }}:</strong>
<strong>{{ 'Trainer' | get_lang }}:</strong>
</td>
<td>
{{ pdf_teachers }}
@ -34,12 +34,12 @@
{% if pdf_session_info %}
<tr>
<td style="background-color: #E5E5E5; text-align: left; width:130px;">
<strong>{{ "Session" | get_lang }}:</strong> {{ pdf_session_info.title }}
<strong>{{ 'Session' | get_lang }}:</strong> {{ pdf_session_info.title }}
</td>
{% if pdf_session_info.description %}
<td>
<strong>{{ "Description" | get_lang }}:</strong> {{ pdf_session_info.description }}
<strong>{{ 'Description' | get_lang }}:</strong> {{ pdf_session_info.description }}
</td>
{% endif %}
</tr>
@ -47,10 +47,10 @@
{% if pdf_session_info.access_start_date != '' and pdf_session_info.access_end_date is not empty and pdf_session_info.access_end_date != '0000-00-00' %}
<tr>
<td style="background-color: #E5E5E5; text-align: left; width:130px;">
<strong>{{ "PeriodToDisplay" | get_lang }}:</strong>
<strong>{{ 'Period' | get_lang }}:</strong>
</td>
<td>
{{ "FromDateXToDateY"| get_lang | format(pdf_session_info.access_start_date, pdf_session_info.access_end_date ) }}
{{ 'From %s to %s'| get_lang | format(pdf_session_info.access_start_date, pdf_session_info.access_end_date ) }}
</td>
</tr>
{% endif %}
@ -59,7 +59,7 @@
{% if pdf_course_info %}
<tr>
<td style="background-color: #E5E5E5; text-align: left; width:130px;">
<strong>{{ "Course" | get_lang }}:</strong>
<strong>{{ 'Course' | get_lang }}:</strong>
</td>
<td>
{{ pdf_course_info.title }} ({{ pdf_course_info.code }})
@ -67,7 +67,7 @@
</tr>
{% if pdf_course_category is defined %}
<tr>
<td> <strong>{{ "Category" | get_lang }}:</strong></td>
<td> <strong>{{ 'Category' | get_lang }}:</strong></td>
<td> {{ pdf_course_category }} </td>
</tr>
{% endif %}
@ -76,7 +76,7 @@
{% if pdf_date %}
<tr>
<td style="background-color: #E5E5E5; text-align: left; width:130px;">
<strong>{{ "Date" | get_lang }}:</strong>
<strong>{{ 'Date' | get_lang }}:</strong>
</td>
<td>
{{ pdf_date }}
@ -88,7 +88,7 @@
{% if show_grade_generated_date == true %}
<h5 align="right">
{{ 'GradeGeneratedOnX' | get_lang | format("now"| date("d/m/Y")) }}
{{ 'Grade generated on %s' | get_lang | format("now"| date("d/m/Y")) }}
</h5>
{% endif %}

@ -6,7 +6,7 @@
{{ user_avatar }}
<div class="username">{{ user|user_complete_name }}</div>
<div class="star-progress">
<span class="float-right">{{ 'XPoints'|get_lang|format(gamification_points) }}</span>
<span class="float-right">{{ '%s points'|get_lang|format(gamification_points) }}</span>
{% if gamification_stars > 0 %}
{% for i in 1..gamification_stars %}
@ -26,13 +26,13 @@
<span class="sr-only">{{ gamification_progress }} Complete (success)</span>
</div>
</div>
<div class="progress-percentage text-right">{{ 'XPercent'|get_lang|format(gamification_progress) }}</div>
<div class="progress-percentage text-right">{{ '%s %%'|get_lang|format(gamification_progress) }}</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
{{ 'ShowProgress'|get_lang }}
{{ 'Show progress'|get_lang }}
</div>
<div class="panel-body">
<ul class="list-course">

@ -36,11 +36,11 @@ $(function () {
{{ search_form }}
{% if not certificate_students is empty %}
<h2 class="page-header">{{ "GradebookListOfStudentsCertificates" | get_lang }}</h2>
<h2 class="page-header">{{ 'List of learner certificates' | get_lang }}</h2>
{% if not export_all_link is null %}
<div class="actions">
<a href="{{ export_all_link }}" class="btn btn--info">
<em class="fa fa-check"></em> {{ 'ExportAllCertificatesToPDF' | get_lang }}
<em class="fa fa-check"></em> {{ 'Export all certificates to PDF' | get_lang }}
</a>
</div>
{% endif %}
@ -48,7 +48,7 @@ $(function () {
<table class="table table-striped">
<thead>
<tr>
<th>{{ 'Student' | get_lang }}</th>
<th>{{ 'Learner' | get_lang }}</th>
<th>{{ 'Sesion' | get_lang }}</th>
<th>{{ 'Course' | get_lang }}</th>
<th>{{ 'Date' | get_lang }}</th>
@ -57,7 +57,7 @@ $(function () {
</thead>
<tfoot>
<tr>
<th>{{ 'Student' | get_lang }}</th>
<th>{{ 'Learner' | get_lang }}</th>
<th>{{ 'Sesion' | get_lang }}</th>
<th>{{ 'Course' | get_lang }}</th>
<th>{{ 'Date' | get_lang }}</th>
@ -87,7 +87,7 @@ $(function () {
</tbody>
</table>
{% else %}
<p class="alert alert-info">{{ 'NoResults' | get_lang }}</p>
<p class="alert alert-info">{{ 'No results found' | get_lang }}</p>
{% endif %}
{% endautoescape %}

@ -1,12 +1,12 @@
{% if course_list is not empty %}
<h2 class="page-header">{{ "Courses"|get_lang }}</h2>
<h2 class="page-header">{{ 'Courses'|get_lang }}</h2>
<div class="table-responsive">
<table class="table table-hover table-striped">
<thead>
<tr>
<th>{{ "Course"|get_lang }}</th>
<th class="text-right">{{ "Score"|get_lang }}</th>
<th class="text-center">{{ "Date"|get_lang }}</th>
<th>{{ 'Course'|get_lang }}</th>
<th class="text-right">{{ 'Score'|get_lang }}</th>
<th class="text-center">{{ 'Date'|get_lang }}</th>
<th class="text-right">&nbsp;</th>
</tr>
</thead>
@ -29,15 +29,15 @@
{% endif %}
{% if session_list is not empty %}
<h2 class="page-header">{{ "Sessions"|get_lang }}</h2>
<h2 class="page-header">{{ 'Course sessions'|get_lang }}</h2>
<div class="table-responsive">
<table class="table table-hover table-striped">
<thead>
<tr>
<th>{{ "Session"|get_lang }}</th>
<th>{{ "Course"|get_lang }}</th>
<th class="text-right">{{ "Score"|get_lang }}</th>
<th class="text-center">{{ "Date"|get_lang }}</th>
<th>{{ 'Session'|get_lang }}</th>
<th>{{ 'Course'|get_lang }}</th>
<th class="text-right">{{ 'Score'|get_lang }}</th>
<th class="text-center">{{ 'Date'|get_lang }}</th>
<th class="text-right">&nbsp;</th>
</tr>
</thead>

@ -5,8 +5,8 @@
<table class="table table-hover table-striped">
<thead>
<tr>
<th>{{ "FirstName"|get_lang }}</th>
<th>{{ "LastName"|get_lang }}</th>
<th>{{ 'First name'|get_lang }}</th>
<th>{{ 'Last name'|get_lang }}</th>
<th class="text-right">&nbsp;</th>
</tr>
</thead>
@ -17,7 +17,7 @@
<td>{{ user.lastname }}</td>
<td class="text-right">
<a href="{{ _p.web_main }}gradebook/search.php?id={{ user.id }}" class="btn btn--plain">
<em class="fa fa-external-link"></em> {{ "Certificates"|get_lang }}
<em class="fa fa-external-link"></em> {{ 'Certificates'|get_lang }}
</a>
</td>
</tr>
@ -31,15 +31,15 @@
<h2>{{ user_info.complete_name }}</h2>
{% if course_list is not empty %}
<h3 class="page-header">{{ "Courses"|get_lang }}</h3>
<h3 class="page-header">{{ 'Courses'|get_lang }}</h3>
<div class="table-responsive">
<table class="table table-hover table-striped">
<thead>
<tr>
<th>{{ "Course"|get_lang }}</th>
<th class="text-right">{{ "Score"|get_lang }}</th>
<th class="text-center">{{ "Date"|get_lang }}</th>
<th>{{ 'Course'|get_lang }}</th>
<th class="text-right">{{ 'Score'|get_lang }}</th>
<th class="text-center">{{ 'Date'|get_lang }}</th>
<th class="text-right">&nbsp;</th>
</tr>
</thead>
@ -62,16 +62,16 @@
{% endif %}
{% if session_list is not empty %}
<h3 class="page-header">{{ "Sessions"|get_lang }}</h3>
<h3 class="page-header">{{ 'Course sessions'|get_lang }}</h3>
<div class="table-responsive">
<table class="table table-hover table-striped">
<thead>
<tr>
<th>{{ "Session"|get_lang }}</th>
<th>{{ "Course"|get_lang }}</th>
<th class="text-right">{{ "Score"|get_lang }}</th>
<th class="text-center">{{ "Date"|get_lang }}</th>
<th>{{ 'Session'|get_lang }}</th>
<th>{{ 'Course'|get_lang }}</th>
<th class="text-right">{{ 'Score'|get_lang }}</th>
<th class="text-center">{{ 'Date'|get_lang }}</th>
<th class="text-right">&nbsp;</th>
</tr>
</thead>

@ -1,7 +1,7 @@
{% autoescape false %}
<h2 class="page-header">{{ 'Accesses by user overview'|get_lang }}</h2>
{{ form }}
<h3 class="page-header">{{ 'Results'|get_lang }}</h3>
<h3 class="page-header">{{ 'Results and feedback'|get_lang }}</h3>
{{ table }}
<script>
$(function(){

@ -31,30 +31,30 @@
<span class="code">{{ course.code }}</span>
</div>
<div class="box time-spent" data-toggle="tooltip" data-placement="top"
title="{{ 'CourseTimeInfo'|get_lang }}">
title="{{ 'Time spent in the course'|get_lang }}">
{{ 'alarm' | mdi_icon }}
{{ course.time_spent }}
</div>
<div class="box" data-toggle="tooltip" data-placement="top"
title="{{ 'AvgStudentsProgress'|get_lang }}">
title="{{ 'Progress'|get_lang }}">
<span class="kt-badge student-progress">
{{ course.student_progress }} %
</span>
</div>
<div class="box" data-toggle="tooltip" data-placement="top"
title="{{ 'AvgCourseScore'|get_lang }}">
title="{{ 'Average score in learning paths'|get_lang }}">
<span class="kt-badge student-score">
{{ course.student_score }}
</span>
</div>
<div class="box" data-toggle="tooltip" data-placement="top"
title="{{ 'TotalNumberOfMessages'|get_lang }}">
title="{{ 'Total number of messages'|get_lang }}">
<span class="kt-badge student-message">
{{ course.student_message }}
</span>
</div>
<div class="box" data-toggle="tooltip" data-placement="top"
title="{{ 'TotalNumberOfAssignments'|get_lang }}">
title="{{ 'Total number of assignments'|get_lang }}">
<span class="kt-badge student-assignments">
{{ course.student_assignments }}
</span>
@ -62,20 +62,20 @@
<div class="box">
<span class="kt-badge student-exercises" data-toggle="tooltip"
data-placement="top"
title="{{ 'TotalExercisesScoreObtained'|get_lang }}">
title="{{ 'Total score obtained for tests'|get_lang }}">
{{ course.student_assignments }}
</span>
</div>
<div class="box">
<span class="kt-badge questions-answered" data-toggle="tooltip"
data-placement="top"
title="{{ 'TotalExercisesAnswered'|get_lang }}">
title="{{ 'Number of tests answered'|get_lang }}">
{{ course.questions_answered }}
</span>
</div>
<div class="box box-date" data-toggle="tooltip"
data-placement="top"
title="{{ 'LatestLogin'|get_lang }}">
title="{{ 'Latest login'|get_lang }}">
{% if course.last_connection %}
<span class="kt-badge last-connection">
{{ course.last_connection }}

@ -2,7 +2,7 @@
<h3 style="text-align: center; text-transform: uppercase; font-size: 20px; font-weight: bold;">{{ data.title }}</h3>
<br>
<p>{{ 'Candidate' | get_lang }} : {{ data.candidate }}</p>
<p>{{ 'ScormStartAttemptDate' | get_lang }} : {{ data.start_date }}</p>
<p>{{ 'Date' | get_lang }} : {{ data.start_date }}</p>
<br>
<table style="width: 100%; font-size: 12px; font-weight: normal;">
<tr>
@ -16,10 +16,10 @@
{{ 'Duration'|get_lang }}
</th>
<th style="text-align: center; background: #222222; color: #FFFFFF; border: 2px solid #FFFFFF;">
{{ 'StartTime'|get_lang }}
{{ 'Start Time'|get_lang }}
</th>
<th style="text-align: center; background: #222222; color: #FFFFFF; border: 2px solid #FFFFFF;">
{{ 'EndTime'|get_lang }}
{{ 'End Time'|get_lang }}
</th>
</tr>
<tr>
@ -68,7 +68,7 @@
{% endif %}
</td>
<td style="text-align: left; padding: 5px; display: block; border-bottom: 1px solid #cdcdcd;">
<img src="{{ "bar_progress.png"|icon(22) }}" width="{{ item.score_numeric }}px" height="16px" alt="{{ "Percentage"|get_lang }}"/>
<img src="{{ "bar_progress.png"|icon(22) }}" width="{{ item.score_numeric }}px" height="16px" alt="{{ 'Percentage'|get_lang }}"/>
{% if item.score_numeric == 0 %}
<span style="color: red;">{{ item.score_percentage }}</span>
{% else %}
@ -81,13 +81,13 @@
{% for item in general_score %}
<tr>
<td style="text-align: left; padding: 5px; height:30px; background: #222222; color: #FFFFFF; display: block;">
<b>{{ 'GeneralTotal' | get_lang }}</b>
<b>{{ 'General total' | get_lang }}</b>
</td>
<td style="text-align: center; padding: 5px; display: block;background-color: #f6ffe2;">
{{ item.score }}
</td>
<td style="text-align: left; padding: 5px; display: block; background-color: #f6ffe2;">
<img src="{{ "bar_progress.png"|icon(22) }}" width="{{ item.score_numeric }}px" height="16px" alt="{{ "Percentage"|get_lang }}"/>
<img src="{{ "bar_progress.png"|icon(22) }}" width="{{ item.score_numeric }}px" height="16px" alt="{{ 'Percentage'|get_lang }}"/>
{% if item.score_numeric == 0 %}
<span style="color: red;">{{ item.score_percentage }}</span>
{% else %}

@ -11,37 +11,37 @@
<li>
<span class="cube student-progress">
</span>
{{ 'AvgStudentsProgress'|get_lang }}
{{ 'Progress'|get_lang }}
</li>
<li>
<span class="cube student-score">
</span>
{{ 'AvgCourseScore'|get_lang }}
{{ 'Average score in learning paths'|get_lang }}
</li>
<li>
<span class="cube student-message">
</span>
{{ 'TotalNumberOfMessages'|get_lang }}
{{ 'Total number of messages'|get_lang }}
</li>
<li>
<span class="cube student-assignments">
</span>
{{ 'TotalNumberOfAssignments'|get_lang }}
{{ 'Total number of assignments'|get_lang }}
</li>
<li>
<span class="cube student-exercises">
</span>
{{ 'TotalExercisesScoreObtained'|get_lang }}
{{ 'Total score obtained for tests'|get_lang }}
</li>
<li>
<span class="cube questions-answered">
</span>
{{ 'TotalExercisesAnswered'|get_lang }}
{{ 'Number of tests answered'|get_lang }}
</li>
<li>
<span class="cube last-connection">
</span>
{{ 'LatestLogin'|get_lang }}
{{ 'Latest login'|get_lang }}
</li>
</ul>
</div>

@ -7,16 +7,16 @@
<table class="table table-hover table-striped">
<thead>
<tr>
<th>{{ 'OfficialCode'|get_lang }}</th>
<th>{{ 'StudentName'|get_lang }}</th>
<th>{{ 'TimeSpentOnThePlatform'|get_lang }}</th>
<th>{{ 'FirstLoginInPlatform'|get_lang }}</th>
<th>{{ 'LatestLoginInPlatform'|get_lang }}</th>
<th>{{ 'Code'|get_lang }}</th>
<th>{{ 'Learner name'|get_lang }}</th>
<th>{{ 'Time spent in portal'|get_lang }}</th>
<th>{{ 'First login in platform'|get_lang }}</th>
<th>{{ 'Latest login in platform'|get_lang }}</th>
{% for course_code in courses %}
<th>{{ course_code }} <br />({{ 'BestScore' | get_lang }})</th>
<th>{{ course_code }} <br />({{ 'Best score' | get_lang }})</th>
<th>{{ 'Progress'|get_lang }}</th>
<th>{{ 'LastSentWorkDate'|get_lang }}</th>
<th>{{ 'Last sent work date'|get_lang }}</th>
{% endfor %}
</tr>
</thead>

@ -15,7 +15,7 @@
{% if user_is_group_admin %}
<div id="edit_image" class="buttom-subscribed">
<a class="btn btn--plain" href="{{ url('legacy_main', { 'name' : 'social/group_edit.php', 'id': group_id}) }}">
{{ 'EditGroup'|get_lang }}
{{ 'Edit this group'|get_lang }}
</a>
</div>
<br />
@ -23,7 +23,7 @@
</div>
{% elseif show_user %}
<a href="{{ user_image.big }}" class="expand-image">
<img class="img-responsive img-circle" src="{{ user_image.big }}" alt="{{ 'UserPicture'|get_lang }}">
<img class="img-responsive img-circle" src="{{ user_image.big }}" alt="{{ 'Picture'|get_lang }}">
</a>
{% endif %}
</div>

@ -5,7 +5,7 @@
<button type="button" class="close" data-dismiss="modal" aria-label="{{ 'Close' | get_lang }}">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="send-invitation-modal-title">{{ 'SendInvitation' | get_lang }}</h4>
<h4 class="modal-title" id="send-invitation-modal-title">{{ 'Send invitation' | get_lang }}</h4>
</div>
<div class="modal-body">
<div id="send-invitation-alert"></div>
@ -13,7 +13,7 @@
</div>
<div class="modal-footer">
<button type="button" id="btn-send-invitation" class="btn btn--primary">
<em class="fa fa-send"></em> {{ 'Send' | get_lang }}
<em class="fa fa-send"></em> {{ 'Send message' | get_lang }}
</button>
</div>
</div>

@ -12,9 +12,9 @@
{{ 'Privacy' | get_lang }}
{% if group_info.visibility == 1 %}
{{ 'ThisIsAnOpenGroup' | get_lang }}
{{ 'This is an open group' | get_lang }}
{% else %}
{{ 'ThisIsACloseGroup' | get_lang }}
{{ 'This is a closed group' | get_lang }}
{% endif %}
</div>
{% endif %}

@ -20,7 +20,7 @@
<div class="spinner"></div>
<div class="panel panel-preview panel-default" hidden="true">
<div class="panel-heading">
<h3 class="panel-title">{{ "Url" | get_lang }} - {{ "Preview" | get_lang }}</h3>
<h3 class="panel-title">{{ 'URL' | get_lang }} - {{ 'Preview' | get_lang }}</h3>
</div>
<div class="panel-body">
<div class="url_preview"></div>
@ -47,7 +47,7 @@
href="#listFriends"
aria-expanded="true"
aria-controls="listFriends">
{{ "SocialFriend" | get_lang }}
{{ 'My friends' | get_lang }}
</a>
</h4>
</div>
@ -64,7 +64,7 @@
<div class="geolocalization">
<a class="btn btn-maps" id="profile-tab" href="{{ _p.web }}main/social/map.php" >
{{ 'ObjectIcon::MAP_MARKER'|mdi_icon(32) }}
{{ 'SearchUserByGeolocalization' | get_lang }}
{{ 'By geolocalization' | get_lang }}
</a>
</div>
{% endif %}
@ -85,7 +85,7 @@
<div class="panel-heading" role="tab" id="headingOne">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#session-block" href="#sessionList" aria-expanded="true" aria-controls="sessionList">
{{ "MySessions" | get_lang }}
{{ 'My sessions' | get_lang }}
</a>
</h4>
</div>

@ -17,11 +17,11 @@
{% endif %}
{% if personal_data.officer_name %}
<div class="panel personal-data-responsible">
<div class="panel-title">{{ 'PersonalDataOfficerName' | get_lang }}</div>
<div class="panel-title">{{ 'Personal data officer's name' | get_lang }}</div>
<div class="personal-data-responsible-description">
<a href="mailto:{{ personal_data.officer_email }}">{{ personal_data.officer_name }}</a>
</div>
<div class="panel-title">{{ 'PersonalDataOfficerRole' | get_lang }}</div>
<div class="panel-title">{{ 'Personal data officer's role' | get_lang }}</div>
<div class="personal-data-responsible-description">
{{ personal_data.officer_role }}
</div>

@ -21,7 +21,7 @@
<div class="spinner"></div>
<div class="panel panel-preview panel-default" hidden="true">
<div class="panel-heading">
<h3 class="panel-title">{{ "Url" | get_lang }} - {{ "Preview" | get_lang }}</h3>
<h3 class="panel-title">{{ 'URL' | get_lang }} - {{ 'Preview' | get_lang }}</h3>
</div>
<div class="panel-body">
<div class="url_preview"></div>
@ -38,7 +38,7 @@
<div class="panel-heading" role="tab" id="headingOne">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#blocklistFriends" href="#listFriends" aria-expanded="true" aria-controls="listFriends">
{{ "SocialFriend" | get_lang }}
{{ 'My friends' | get_lang }}
</a>
</h4>
</div>
@ -60,7 +60,7 @@
<div class="panel-heading" role="tab" id="headingOne">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#course-block" href="#courseList" aria-expanded="true" aria-controls="courseList">
{{ "MyCourses" | get_lang }}
{{ 'My courses' | get_lang }}
</a>
</h4>
</div>
@ -81,7 +81,7 @@
<div class="panel-heading" role="tab" id="headingOne">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#session-block" href="#sessionList" aria-expanded="true" aria-controls="sessionList">
{{ "MySessions" | get_lang }}
{{ 'My sessions' | get_lang }}
</a>
</h4>
</div>

@ -26,7 +26,7 @@ $(function () {
{#<div class="panel-heading" role="tab" id="headingOne">#}
{#<h4 class="panel-title">#}
{#<a role="button" data-toggle="collapse" data-parent="#skill-block" href="#skillList" aria-expanded="true" aria-controls="skillList">#}
{#{{ "Skills" | get_lang }}#}
{#{{ 'Skills' | get_lang }}#}
{#</a>#}
{#<div class="btn-group pull-right">#}
{#<a class="btn btn-xs btn--plain dropdown-toggle" data-toggle="dropdown" href="#">#}
@ -35,14 +35,14 @@ $(function () {
{#<ul class="dropdown-menu">#}
{#{% if show_skills_report_link %}#}
{#<li>#}
{#<a href="{{ _p.web_main ~ 'social/my_skills_report.php' }}"> {{'SkillsReport'|get_lang }}</a>#}
{#<a href="{{ _p.web_main ~ 'social/my_skills_report.php' }}"> {{'Skills report'|get_lang }}</a>#}
{#</li>#}
{#{% endif %}#}
{#<li>#}
{#<a href="{{ _p.web_main ~ 'social/skills_wheel.php' }}"> {{ 'SkillsWheel'|get_lang }}</a>#}
{#<a href="{{ _p.web_main ~ 'social/skills_wheel.php' }}"> {{ 'Skills wheel'|get_lang }}</a>#}
{#</li>#}
{#<li>#}
{#<a href="{{ _p.web_main ~ 'social/skills_ranking.php' }}"> {{ 'YourSkillRankingX'|get_lang|format(ranking) }}</a>#}
{#<a href="{{ _p.web_main ~ 'social/skills_ranking.php' }}"> {{ 'Your skill ranking: %s'|get_lang|format(ranking) }}</a>#}
{#</li>#}
{#</ul>#}
{#</div>#}

@ -6,12 +6,12 @@
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#sn-avatar"
href="#sn-avatar-one" aria-expanded="true" aria-controls="sn-avatar-one">
{{ "Profile" | get_lang }}
{{ 'Profile' | get_lang }}
</a>
{% if user.is_admin == 1 %}
<div class="pull-right">
<a class="btn btn--plain btn-sm btn-social-edit"
title="{{ "Edit"|get_lang }}"
title="{{ 'Edit'|get_lang }}"
href="{{ url('index') }}main/admin/user_edit.php?user_id={{ user.id }}"
>
{{ 'ActionIcon::EDIT' | mdi_icon }}
@ -87,7 +87,7 @@
<li class="item">
<a href="{{ vcard_user_link }}">
{{ 'ObjectIcon::VCARD'|mdi_icon_t(22, 'ch-tool-icon', 'BusinessCard') }}
{{ "BusinessCard" | get_lang }}
{{ 'Business card' | get_lang }}
</a>
</li>
{% endif %}
@ -131,8 +131,8 @@
onclick="javascript:chatWith('{{ user.id }}', '{{ user.complete_name }}', '{{ user.user_is_online }}','{{ user.avatar_small }}')"
href="javascript:void(0);"
>
<img src="{{ "online.png" | icon }}" alt="{{ "Online" | get_lang }}">
{{ "Chat" | get_lang }} ({{ "Online" | get_lang }})
<img src="{{ "online.png" | icon }}" alt="{{ 'Online' | get_lang }}">
{{ 'Chat' | get_lang }} ({{ 'Online' | get_lang }})
</a>
</li>
{% endif %}
@ -150,7 +150,7 @@
{% if not profile_edition_link is empty %}
<li class="item">
<a class="btn btn--plain btn-sm btn-block" href="{{ profile_edition_link }}">
<em class="fa fa-edit"></em>{{ "EditProfile" | get_lang }}
<em class="fa fa-edit"></em>{{ 'Edit profile' | get_lang }}
</a>
</li>
{% endif %}

@ -8,7 +8,7 @@
<div class="search-user">
<div class="panel panel-default">
<div class="panel-heading">
{{ 'SearchUsers' | get_lang}}
{{ 'Search users' | get_lang}}
</div>
<div class="panel-body">
{{ social_search }}

@ -34,13 +34,13 @@
</li>
{% endif %}
<li>
{{ 'FromDateXToDateY'|get_lang|format(survey.avail_from|api_convert_and_format_date(2), survey.avail_till|api_convert_and_format_date(2)) }}
{{ 'From %s to %s'|get_lang|format(survey.avail_from|api_convert_and_format_date(2), survey.avail_till|api_convert_and_format_date(2)) }}
</li>
</ul>
</div>
</div>
{% else %}
<div class="alert alert-info">
{{ 'NoPendingSurveys'|get_lang }}
{{ 'No pending surveys'|get_lang }}
</div>
{% endfor %}

@ -74,15 +74,15 @@
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{{ 'Progress: %s %%' | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{{ 'Score: %s %%' | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{{ 'Certificate: %s' | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>
</div>

@ -76,15 +76,15 @@
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{{ 'Progress: %s %%' | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{{ 'Score: %s %%' | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{{ 'Certificate: %s' | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>
</div>

@ -118,15 +118,15 @@
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{{ 'Progress: %s %%' | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{{ 'Score: %s %%' | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{{ 'Certificate: %s' | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>
</div>

@ -1,7 +1,7 @@
{% import '@ChamiloCore/Macros/box.html.twig' as macro %}
<h2>{{ 'CourseCategory'|get_lang }}</h2>
<p>{{ 'MyCoursePageCategoryIntroduction'|get_lang }}</p>
<h2>{{ 'Course category'|get_lang }}</h2>
<p>{{ 'You will find below the list of course categories.'|get_lang }}</p>
{% autoescape false %}
<div class="category-list">
{% for category in course_categories %}

@ -71,15 +71,15 @@
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{{ 'Progress: %s %%' | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{{ 'Score: %s %%' | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
<span title="{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}">
<span title="{{ 'Certificate: %s' | get_lang | format(item.student_info.certificate) }}">
<i class="fa fa-certificate" aria-hidden="true"></i>
{{ item.student_info.certificate }}
</span>

@ -51,7 +51,7 @@
</div>
<div class="block-author">
{% if item.teachers | length > 6 %}
<a id="plist-{{ loop.index }}" data-trigger="focus" tabindex="0" role="button" class="btn btn--plain panel_popover" data-toggle="popover" title="{{ 'CourseTeachers' | get_lang }}" data-html="true">
<a id="plist-{{ loop.index }}" data-trigger="focus" tabindex="0" role="button" class="btn btn--plain panel_popover" data-toggle="popover" title="{{ 'Teachers' | get_lang }}" data-html="true">
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
</a>
<div id="popover-content-plist-{{ loop.index }}" class="hide">
@ -86,7 +86,7 @@
{{ teacher.firstname }} {{ teacher.lastname }}
</a>
</h5>
<p>{{ 'Teacher' | get_lang }}</p>
<p>{{ 'Trainer' | get_lang }}</p>
</div>
{% elseif item.teachers | length <= 6 %}
<a href="{{ teacher.url }}" class="ajax"
@ -105,14 +105,14 @@
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{{ 'Progress: %s %%' | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{{ 'Score: %s %%' | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
<span title="{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}">
<span title="{{ 'Certificate: %s' | get_lang | format(item.student_info.certificate) }}">
<i class="fa fa-certificate" aria-hidden="true"></i>
{{ item.student_info.certificate }}
</span>

@ -47,7 +47,7 @@
tabindex="0" role="button"
class="btn btn--plain panel_popover"
data-toggle="popover"
title="{{ 'CourseTeachers' | get_lang }}"
title="{{ 'Teachers' | get_lang }}"
data-html="true"
>
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
@ -79,7 +79,7 @@
{{ teacher.firstname }} {{ teacher.lastname }}
</a>
</h5>
<p>{{ "Teacher"|get_lang }}</p>
<p>{{ 'Trainer'|get_lang }}</p>
</div>
{% endif %}
{% endfor %}
@ -97,13 +97,13 @@
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{{ 'Progress: %s %%' | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{{ 'Score: %s %%' | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{{ 'Certificate: %s' | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>
</div>

@ -84,15 +84,15 @@
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{{ 'Progress: %s %%' | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{{ 'Score: %s %%' | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{{ 'Certificate: %s' | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>
</div>

@ -16,7 +16,7 @@
{% if item.show_actions %}
<div class="float-right">
<a class="btn btn--secondary-outline btn-sm" title="{{ "Edit"|get_lang }}"
<a class="btn btn--secondary-outline btn-sm" title="{{ 'Edit'|get_lang }}"
href="{{ url('legacy_main', { 'name' : 'session/resume_session.php', 'id_session' : row.id }) }}">
{{ 'ActionIcon::EDIT' | mdi_icon }}
</a>
@ -71,15 +71,15 @@
<div class="card-report">
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{{ 'Progress: %s %%' | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{{ 'Score: %s %%' | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{{ 'Certificate: %s' | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>
</div>

@ -1,90 +1,131 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Script to switch all PHP files in Chamilo to a more Gettext-like syntax.
* Script to switch all language variables in Chamilo to a more Gettext-like syntax.
*/
/**
* Includes and declarations.
*/
die('Remove the "die()" statement on line '.__LINE__.' to execute this script'.PHP_EOL);
require_once __DIR__.'/../../public/main/inc/global.inc.php';
$path = api_get_path(SYS_LANG_PATH).'english';
$path = api_get_path(SYS_PATH) . 'main/lang/english'; // Adjusted path
ini_set('memory_limit', '128M');
/**
* Main code.
*/
$terms = [];
$list = SubLanguageManager::get_lang_folder_files_list($path);
// Verify that the directory content is being read
echo "Reading language files from: $path\n";
foreach ($list as $entry) {
$file = $path.'/'.$entry;
$file = $path . '/' . $entry;
echo "Processing language file: $file\n"; // Add debug message
if (is_file($file)) {
$terms = array_merge($terms, SubLanguageManager::get_all_language_variable_in_file($file, true));
$file_terms = SubLanguageManager::get_all_language_variable_in_file($file, true);
//print_r($file_terms); // Debug: print terms loaded from the file
$terms = array_merge($terms, $file_terms);
}
}
foreach ($terms as $index => $translation) {
$terms[$index] = trim(rtrim($translation, ';'), '"');
}
// get only the array keys (the language variables defined in language files)
// Get only the array keys (the language variables defined in language files)
$defined_terms = array_flip(array_keys($terms));
echo count($defined_terms)." terms were found in language files".PHP_EOL;
echo count($defined_terms) . " terms were found in language files" . PHP_EOL;
//print_r($defined_terms); // Debug: print the terms found
// now get all terms found in all PHP files of Chamilo (this takes some
// time and memory)
// Now get all terms found in all PHP, TPL, and Twig files of Chamilo (this takes some time and memory)
$usedTerms = [];
$l = strlen(api_get_path(SYS_PATH));
$files = getAllPhpFiles(api_get_path(SYS_PATH));
$pathfile = api_get_path(SYS_PATH) . "main/template/"; //Path for the missing files, should be adapted for other use
$files = getAllPhpFiles($pathfile);
//$files = [$pathfile]; // Process only the specific file for now
$rootLength = strlen(api_get_path(SYS_PATH));
$countFiles = 0;
$countReplaces = 0;
// Browse files
foreach ($files as $file) {
if ('vendor' === substr($file, $rootLength, 6) || 'web' === substr($file, $rootLength, 3)) {
continue;
}
//echo 'Analyzing '.$file.PHP_EOL;
$shortFile = substr($file, $l);
//echo 'Analyzing '.$shortFile.PHP_EOL;
echo "Analyzing $file" . PHP_EOL;
$lines = file($file);
$newContent = ''; // Store new file content
$fileModified = false;
// Browse lines inside file $file
foreach ($lines as $line) {
$myTerms = [];
$res = preg_match_all('/get_lang\(([\'"](\\w*)[\'"])\)/m', $line, $myTerms);
foreach ($lines as $lineIndex => $line) {
$lineModified = false;
// Regular expression for {{ 'variable'|get_lang|format() }}
$res = preg_match_all('/\{\{\s*([\'"]\w+[\'"])\s*\|\s*get_lang\s*\|\s*format\s*\((.*?)\)\s*\}\}/m', $line, $myTerms);
if ($res > 0) {
foreach ($myTerms[2] as $term) {
echo "Found term $term - ".print_r($myTerms, 1).PHP_EOL;
if ('lang' == substr($term, 0, 4)) {
$term = substr($term, 4);
echo "Match found for get_lang|format in line: $line" . PHP_EOL;
foreach ($myTerms[1] as $index => $quotedTerm) {
$term = trim($quotedTerm, '\'\"');
if (isset($terms[$term])) {
$translation = $terms[$term];
echo "Replacing $quotedTerm with '$translation'" . PHP_EOL;
$line = str_replace($quotedTerm, "'$translation'", $line);
$lineModified = true;
$countReplaces++;
} else {
echo "Term $term not found in language file" . PHP_EOL; // Debug: term not found
}
if (!empty($terms[$term])) {
}
}
// Regular expression for {{ 'variable'|get_lang }}
$res = preg_match_all('/\{\{\s*([\'"]\w+[\'"])\s*\|\s*get_lang\s*\}\}/m', $line, $myTerms);
if ($res > 0) {
echo "Match found for get_lang in line: $line" . PHP_EOL;
foreach ($myTerms[1] as $index => $quotedTerm) {
$term = trim($quotedTerm, '\'\"');
if (isset($terms[$term])) {
$translation = $terms[$term];
$quotedTerm = $myTerms[1][0];
//echo "Would do sed -i \"s#$quotedTerm#'$translation'#g\" $file here\n";
system("sed -i \"s#$term#'$translation'#g\" $file");
echo "Replacing $quotedTerm with '$translation'" . PHP_EOL;
$line = str_replace($quotedTerm, "'$translation'", $line);
$lineModified = true;
$countReplaces++;
} else {
echo "Term $term not found in language file" . PHP_EOL; // Debug: term not found
}
}
} else {
$res = 0;
$res = preg_match_all('/\{\s*([\'"](\\w*)[\'"])\s*\|get_lang\}/m', $line, $myTerms);
if ($res > 0) {
foreach ($myTerms[2] as $term) {
echo "Found term $term".PHP_EOL;
if ('lang' == substr($term, 0, 4)) {
$term = substr($term, 4);
}
if (!empty($terms[$term])) {
$translation = $terms[$term];
$quotedTerm = $myTerms[1][0];
//echo "Would do sed -i \"s#$quotedTerm#'$translation'#g\" $file here\n";
system("sed -i \"s#$term#'$translation'#g\" $file");
$countReplaces++;
}
}
// Regular expression for get_lang('variable') or get_lang("variable")
$res = preg_match_all('/get_lang\(([\'"](\w+)[\'"])\)/m', $line, $myTerms);
if ($res > 0) {
echo "Match found for get_lang() in line: $line" . PHP_EOL;
foreach ($myTerms[2] as $index => $term) {
if (isset($terms[$term])) {
$translation = $terms[$term];
$quotedTerm = $myTerms[1][$index];
echo "Replacing $quotedTerm with '$translation'" . PHP_EOL;
$line = str_replace($quotedTerm, "'$translation'", $line);
$lineModified = true;
$countReplaces++;
} else {
echo "Term $term not found in language file" . PHP_EOL; // Debug: term not found
}
}
}
$newContent .= $line; // Add modified line to new content
if ($lineModified) {
$fileModified = true;
}
}
// Write the modified content back to the file if there were modifications
if ($fileModified) {
file_put_contents($file, $newContent);
}
$countFiles++;
flush();
}
echo "Done analyzing $countFiles files, with $countReplaces replacements!\n";

Loading…
Cancel
Save