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. * 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); $list = scandir($base_path);
$files = []; $files = [];
$extensionsArray = ['.php', '.tpl']; $extensionsArray = ['.php', '.tpl', '.html.twig'];
if ($includeStatic) { if ($includeStatic) {
$extensionsArray[] = 'html'; $extensionsArray[] = 'html';
$extensionsArray[] = '.htm'; $extensionsArray[] = '.htm';
@ -94,21 +89,21 @@ function getAllPhpFiles($base_path, $includeStatic = false)
if ('.' == substr($item, 0, 1)) { if ('.' == substr($item, 0, 1)) {
continue; 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)]; $special_dirs = []; // Modify this array as needed
if (in_array($base_path.$item.'/', $special_dirs)) { if (in_array($base_path . $item . '/', $special_dirs)) {
continue; continue;
} }
if (is_dir($base_path.$item)) { if (is_dir($base_path . $item)) {
$files = array_merge($files, getAllPhpFiles($base_path.$item.'/', $includeStatic)); $files = array_merge($files, getAllPhpFiles($base_path . $item . '/', $includeStatic));
} else { } else {
//only analyse php files foreach ($extensionsArray as $extension) {
$sub = substr($item, -4); if (substr($item, -strlen($extension)) == $extension) {
if (in_array($sub, $extensionsArray)) { $files[] = $base_path . $item;
$files[] = $base_path.$item; break;
}
} }
} }
} }
$list = null;
return $files; return $files;
} }

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

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

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

@ -259,7 +259,7 @@
</script> </script>
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-body"> <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="row">
<div class="col-md-6"> <div class="col-md-6">
{{ create_sequence }} {{ create_sequence }}
@ -273,7 +273,7 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-body"> <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"> <div class="row">
{{ configure_sequence }} {{ configure_sequence }}
@ -283,11 +283,11 @@
</div> </div>
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-body"> <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="row">
<div class="col-md-9"> <div class="col-md-9">
<h4 class="title-sequence"> <h4 class="title-sequence">
{{ 'ItemsTheReferenceDependsOn' | get_lang }} {{ 'Items the reference depends on' | get_lang }}
</h4> </h4>
<div id="parents"> <div id="parents">
</div> </div>
@ -300,13 +300,13 @@
<div class="border-sequence"> <div class="border-sequence">
<div class="arrow-sequence"></div> <div class="arrow-sequence"></div>
</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 id="children">
</div> </div>
</div> </div>
<div class="col-md-3"> <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 id="show_graph"></div>
</div> </div>

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

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

@ -30,7 +30,7 @@
<tr> <tr>
<th class="col-session">{{ 'Session'|get_lang }}</th> <th class="col-session">{{ 'Session'|get_lang }}</th>
{% for i in 1..52 %} {% 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 %} {% endfor %}
</tr> </tr>
</thead> </thead>
@ -65,7 +65,7 @@
</div> </div>
{% else %} {% else %}
<div class="alert alert-warning"> <div class="alert alert-warning">
{{ 'ThereIsNotStillASession'|get_lang }} {{ 'There are no sessions available'|get_lang }}
</div> </div>
{% endif %} {% endif %}
{% endautoescape %} {% endautoescape %}

@ -9,7 +9,7 @@
</div> </div>
<div class="panel-body"> <div class="panel-body">
{% if not user.course_list %} {% 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 %} {% else %}
{{ user.course_list }} {{ user.course_list }}
{% endif %} {% endif %}

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

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

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

@ -7,7 +7,7 @@
{% if is_allowed_to_edit %} {% if is_allowed_to_edit %}
<div class="btn-toolbar actions-bar" > <div class="btn-toolbar actions-bar" >
<div class="btn-group"> <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> <em class="size-32 icon-back"></em>
</a> </a>
</div> </div>
@ -25,7 +25,7 @@
{% if type.question %} {% if type.question %}
<div class="normal-message"> <div class="normal-message">
<div> <div>
<strong>{{'QuestionPlan'|get_lang}}</strong> <strong>{{'Help'|get_lang}}</strong>
</div> </div>
{{type.question}} {{type.question}}
</div> </div>

@ -6,7 +6,7 @@
<div class="btn-toolbar actions-bar" > <div class="btn-toolbar actions-bar" >
<div class="btn-group"> <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> <em class="size-32 icon-back"></em>
</a> </a>
</div> </div>

@ -10,7 +10,7 @@
<script> <script>
$(function() { $(function() {
$(".btn--primary").click(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> </script>

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

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

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

@ -13,7 +13,7 @@
{% if pdf_student_info %} {% if pdf_student_info %}
<tr> <tr>
<td style="background-color: #E5E5E5; text-align: left; width:130px; "> <td style="background-color: #E5E5E5; text-align: left; width:130px; ">
<strong>{{ "Student" | get_lang }}:</strong> <strong>{{ 'Learner' | get_lang }}:</strong>
</td> </td>
<td> <td>
{{ pdf_student_info.complete_name }} {{ pdf_student_info.complete_name }}
@ -23,7 +23,7 @@
{% if pdf_teachers %} {% if pdf_teachers %}
<tr> <tr>
<td style="background-color: #E5E5E5; text-align: left; width:130px;"> <td style="background-color: #E5E5E5; text-align: left; width:130px;">
<strong>{{ "Teacher" | get_lang }}:</strong> <strong>{{ 'Trainer' | get_lang }}:</strong>
</td> </td>
<td> <td>
{{ pdf_teachers }} {{ pdf_teachers }}
@ -34,12 +34,12 @@
{% if pdf_session_info %} {% if pdf_session_info %}
<tr> <tr>
<td style="background-color: #E5E5E5; text-align: left; width:130px;"> <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> </td>
{% if pdf_session_info.description %} {% if pdf_session_info.description %}
<td> <td>
<strong>{{ "Description" | get_lang }}:</strong> {{ pdf_session_info.description }} <strong>{{ 'Description' | get_lang }}:</strong> {{ pdf_session_info.description }}
</td> </td>
{% endif %} {% endif %}
</tr> </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' %} {% 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> <tr>
<td style="background-color: #E5E5E5; text-align: left; width:130px;"> <td style="background-color: #E5E5E5; text-align: left; width:130px;">
<strong>{{ "PeriodToDisplay" | get_lang }}:</strong> <strong>{{ 'Period' | get_lang }}:</strong>
</td> </td>
<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> </td>
</tr> </tr>
{% endif %} {% endif %}
@ -59,7 +59,7 @@
{% if pdf_course_info %} {% if pdf_course_info %}
<tr> <tr>
<td style="background-color: #E5E5E5; text-align: left; width:130px;"> <td style="background-color: #E5E5E5; text-align: left; width:130px;">
<strong>{{ "Course" | get_lang }}:</strong> <strong>{{ 'Course' | get_lang }}:</strong>
</td> </td>
<td> <td>
{{ pdf_course_info.title }} ({{ pdf_course_info.code }}) {{ pdf_course_info.title }} ({{ pdf_course_info.code }})
@ -67,7 +67,7 @@
</tr> </tr>
{% if pdf_course_category is defined %} {% if pdf_course_category is defined %}
<tr> <tr>
<td> <strong>{{ "Category" | get_lang }}:</strong></td> <td> <strong>{{ 'Category' | get_lang }}:</strong></td>
<td> {{ pdf_course_category }} </td> <td> {{ pdf_course_category }} </td>
</tr> </tr>
{% endif %} {% endif %}
@ -76,7 +76,7 @@
{% if pdf_date %} {% if pdf_date %}
<tr> <tr>
<td style="background-color: #E5E5E5; text-align: left; width:130px;"> <td style="background-color: #E5E5E5; text-align: left; width:130px;">
<strong>{{ "Date" | get_lang }}:</strong> <strong>{{ 'Date' | get_lang }}:</strong>
</td> </td>
<td> <td>
{{ pdf_date }} {{ pdf_date }}
@ -88,7 +88,7 @@
{% if show_grade_generated_date == true %} {% if show_grade_generated_date == true %}
<h5 align="right"> <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> </h5>
{% endif %} {% endif %}

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

@ -36,11 +36,11 @@ $(function () {
{{ search_form }} {{ search_form }}
{% if not certificate_students is empty %} {% 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 %} {% if not export_all_link is null %}
<div class="actions"> <div class="actions">
<a href="{{ export_all_link }}" class="btn btn--info"> <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> </a>
</div> </div>
{% endif %} {% endif %}
@ -48,7 +48,7 @@ $(function () {
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>{{ 'Student' | get_lang }}</th> <th>{{ 'Learner' | get_lang }}</th>
<th>{{ 'Sesion' | get_lang }}</th> <th>{{ 'Sesion' | get_lang }}</th>
<th>{{ 'Course' | get_lang }}</th> <th>{{ 'Course' | get_lang }}</th>
<th>{{ 'Date' | get_lang }}</th> <th>{{ 'Date' | get_lang }}</th>
@ -57,7 +57,7 @@ $(function () {
</thead> </thead>
<tfoot> <tfoot>
<tr> <tr>
<th>{{ 'Student' | get_lang }}</th> <th>{{ 'Learner' | get_lang }}</th>
<th>{{ 'Sesion' | get_lang }}</th> <th>{{ 'Sesion' | get_lang }}</th>
<th>{{ 'Course' | get_lang }}</th> <th>{{ 'Course' | get_lang }}</th>
<th>{{ 'Date' | get_lang }}</th> <th>{{ 'Date' | get_lang }}</th>
@ -87,7 +87,7 @@ $(function () {
</tbody> </tbody>
</table> </table>
{% else %} {% else %}
<p class="alert alert-info">{{ 'NoResults' | get_lang }}</p> <p class="alert alert-info">{{ 'No results found' | get_lang }}</p>
{% endif %} {% endif %}
{% endautoescape %} {% endautoescape %}

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

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

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

@ -31,30 +31,30 @@
<span class="code">{{ course.code }}</span> <span class="code">{{ course.code }}</span>
</div> </div>
<div class="box time-spent" data-toggle="tooltip" data-placement="top" <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 }} {{ 'alarm' | mdi_icon }}
{{ course.time_spent }} {{ course.time_spent }}
</div> </div>
<div class="box" data-toggle="tooltip" data-placement="top" <div class="box" data-toggle="tooltip" data-placement="top"
title="{{ 'AvgStudentsProgress'|get_lang }}"> title="{{ 'Progress'|get_lang }}">
<span class="kt-badge student-progress"> <span class="kt-badge student-progress">
{{ course.student_progress }} % {{ course.student_progress }} %
</span> </span>
</div> </div>
<div class="box" data-toggle="tooltip" data-placement="top" <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"> <span class="kt-badge student-score">
{{ course.student_score }} {{ course.student_score }}
</span> </span>
</div> </div>
<div class="box" data-toggle="tooltip" data-placement="top" <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"> <span class="kt-badge student-message">
{{ course.student_message }} {{ course.student_message }}
</span> </span>
</div> </div>
<div class="box" data-toggle="tooltip" data-placement="top" <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"> <span class="kt-badge student-assignments">
{{ course.student_assignments }} {{ course.student_assignments }}
</span> </span>
@ -62,20 +62,20 @@
<div class="box"> <div class="box">
<span class="kt-badge student-exercises" data-toggle="tooltip" <span class="kt-badge student-exercises" data-toggle="tooltip"
data-placement="top" data-placement="top"
title="{{ 'TotalExercisesScoreObtained'|get_lang }}"> title="{{ 'Total score obtained for tests'|get_lang }}">
{{ course.student_assignments }} {{ course.student_assignments }}
</span> </span>
</div> </div>
<div class="box"> <div class="box">
<span class="kt-badge questions-answered" data-toggle="tooltip" <span class="kt-badge questions-answered" data-toggle="tooltip"
data-placement="top" data-placement="top"
title="{{ 'TotalExercisesAnswered'|get_lang }}"> title="{{ 'Number of tests answered'|get_lang }}">
{{ course.questions_answered }} {{ course.questions_answered }}
</span> </span>
</div> </div>
<div class="box box-date" data-toggle="tooltip" <div class="box box-date" data-toggle="tooltip"
data-placement="top" data-placement="top"
title="{{ 'LatestLogin'|get_lang }}"> title="{{ 'Latest login'|get_lang }}">
{% if course.last_connection %} {% if course.last_connection %}
<span class="kt-badge last-connection"> <span class="kt-badge last-connection">
{{ course.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> <h3 style="text-align: center; text-transform: uppercase; font-size: 20px; font-weight: bold;">{{ data.title }}</h3>
<br> <br>
<p>{{ 'Candidate' | get_lang }} : {{ data.candidate }}</p> <p>{{ 'Candidate' | get_lang }} : {{ data.candidate }}</p>
<p>{{ 'ScormStartAttemptDate' | get_lang }} : {{ data.start_date }}</p> <p>{{ 'Date' | get_lang }} : {{ data.start_date }}</p>
<br> <br>
<table style="width: 100%; font-size: 12px; font-weight: normal;"> <table style="width: 100%; font-size: 12px; font-weight: normal;">
<tr> <tr>
@ -16,10 +16,10 @@
{{ 'Duration'|get_lang }} {{ 'Duration'|get_lang }}
</th> </th>
<th style="text-align: center; background: #222222; color: #FFFFFF; border: 2px solid #FFFFFF;"> <th style="text-align: center; background: #222222; color: #FFFFFF; border: 2px solid #FFFFFF;">
{{ 'StartTime'|get_lang }} {{ 'Start Time'|get_lang }}
</th> </th>
<th style="text-align: center; background: #222222; color: #FFFFFF; border: 2px solid #FFFFFF;"> <th style="text-align: center; background: #222222; color: #FFFFFF; border: 2px solid #FFFFFF;">
{{ 'EndTime'|get_lang }} {{ 'End Time'|get_lang }}
</th> </th>
</tr> </tr>
<tr> <tr>
@ -68,7 +68,7 @@
{% endif %} {% endif %}
</td> </td>
<td style="text-align: left; padding: 5px; display: block; border-bottom: 1px solid #cdcdcd;"> <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 %} {% if item.score_numeric == 0 %}
<span style="color: red;">{{ item.score_percentage }}</span> <span style="color: red;">{{ item.score_percentage }}</span>
{% else %} {% else %}
@ -81,13 +81,13 @@
{% for item in general_score %} {% for item in general_score %}
<tr> <tr>
<td style="text-align: left; padding: 5px; height:30px; background: #222222; color: #FFFFFF; display: block;"> <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>
<td style="text-align: center; padding: 5px; display: block;background-color: #f6ffe2;"> <td style="text-align: center; padding: 5px; display: block;background-color: #f6ffe2;">
{{ item.score }} {{ item.score }}
</td> </td>
<td style="text-align: left; padding: 5px; display: block; background-color: #f6ffe2;"> <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 %} {% if item.score_numeric == 0 %}
<span style="color: red;">{{ item.score_percentage }}</span> <span style="color: red;">{{ item.score_percentage }}</span>
{% else %} {% else %}

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

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

@ -15,7 +15,7 @@
{% if user_is_group_admin %} {% if user_is_group_admin %}
<div id="edit_image" class="buttom-subscribed"> <div id="edit_image" class="buttom-subscribed">
<a class="btn btn--plain" href="{{ url('legacy_main', { 'name' : 'social/group_edit.php', 'id': group_id}) }}"> <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> </a>
</div> </div>
<br /> <br />
@ -23,7 +23,7 @@
</div> </div>
{% elseif show_user %} {% elseif show_user %}
<a href="{{ user_image.big }}" class="expand-image"> <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> </a>
{% endif %} {% endif %}
</div> </div>

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

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

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

@ -17,11 +17,11 @@
{% endif %} {% endif %}
{% if personal_data.officer_name %} {% if personal_data.officer_name %}
<div class="panel personal-data-responsible"> <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"> <div class="personal-data-responsible-description">
<a href="mailto:{{ personal_data.officer_email }}">{{ personal_data.officer_name }}</a> <a href="mailto:{{ personal_data.officer_email }}">{{ personal_data.officer_name }}</a>
</div> </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"> <div class="personal-data-responsible-description">
{{ personal_data.officer_role }} {{ personal_data.officer_role }}
</div> </div>

@ -21,7 +21,7 @@
<div class="spinner"></div> <div class="spinner"></div>
<div class="panel panel-preview panel-default" hidden="true"> <div class="panel panel-preview panel-default" hidden="true">
<div class="panel-heading"> <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>
<div class="panel-body"> <div class="panel-body">
<div class="url_preview"></div> <div class="url_preview"></div>
@ -38,7 +38,7 @@
<div class="panel-heading" role="tab" id="headingOne"> <div class="panel-heading" role="tab" id="headingOne">
<h4 class="panel-title"> <h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#blocklistFriends" href="#listFriends" aria-expanded="true" aria-controls="listFriends"> <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> </a>
</h4> </h4>
</div> </div>
@ -60,7 +60,7 @@
<div class="panel-heading" role="tab" id="headingOne"> <div class="panel-heading" role="tab" id="headingOne">
<h4 class="panel-title"> <h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#course-block" href="#courseList" aria-expanded="true" aria-controls="courseList"> <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> </a>
</h4> </h4>
</div> </div>
@ -81,7 +81,7 @@
<div class="panel-heading" role="tab" id="headingOne"> <div class="panel-heading" role="tab" id="headingOne">
<h4 class="panel-title"> <h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#session-block" href="#sessionList" aria-expanded="true" aria-controls="sessionList"> <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> </a>
</h4> </h4>
</div> </div>

@ -26,7 +26,7 @@ $(function () {
{#<div class="panel-heading" role="tab" id="headingOne">#} {#<div class="panel-heading" role="tab" id="headingOne">#}
{#<h4 class="panel-title">#} {#<h4 class="panel-title">#}
{#<a role="button" data-toggle="collapse" data-parent="#skill-block" href="#skillList" aria-expanded="true" aria-controls="skillList">#} {#<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>#} {#</a>#}
{#<div class="btn-group pull-right">#} {#<div class="btn-group pull-right">#}
{#<a class="btn btn-xs btn--plain dropdown-toggle" data-toggle="dropdown" href="#">#} {#<a class="btn btn-xs btn--plain dropdown-toggle" data-toggle="dropdown" href="#">#}
@ -35,14 +35,14 @@ $(function () {
{#<ul class="dropdown-menu">#} {#<ul class="dropdown-menu">#}
{#{% if show_skills_report_link %}#} {#{% if show_skills_report_link %}#}
{#<li>#} {#<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>#} {#</li>#}
{#{% endif %}#} {#{% endif %}#}
{#<li>#} {#<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>#}
{#<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>#} {#</li>#}
{#</ul>#} {#</ul>#}
{#</div>#} {#</div>#}

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

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

@ -34,13 +34,13 @@
</li> </li>
{% endif %} {% endif %}
<li> <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> </li>
</ul> </ul>
</div> </div>
</div> </div>
{% else %} {% else %}
<div class="alert alert-info"> <div class="alert alert-info">
{{ 'NoPendingSurveys'|get_lang }} {{ 'No pending surveys'|get_lang }}
</div> </div>
{% endfor %} {% endfor %}

@ -74,15 +74,15 @@
<div class="course-student-info"> <div class="course-student-info">
<div class="student-info"> <div class="student-info">
{% if (item.student_info.progress is not null) %} {% 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 %} {% endif %}
{% if (item.student_info.score is not null) %} {% 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 %} {% endif %}
{% if (item.student_info.certificate is not null) %} {% 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 %} {% endif %}
</div> </div>
</div> </div>

@ -76,15 +76,15 @@
<div class="course-student-info"> <div class="course-student-info">
<div class="student-info"> <div class="student-info">
{% if (item.student_info.progress is not null) %} {% 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 %} {% endif %}
{% if (item.student_info.score is not null) %} {% 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 %} {% endif %}
{% if (item.student_info.certificate is not null) %} {% 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 %} {% endif %}
</div> </div>
</div> </div>

@ -118,15 +118,15 @@
<div class="course-student-info"> <div class="course-student-info">
<div class="student-info"> <div class="student-info">
{% if (item.student_info.progress is not null) %} {% 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 %} {% endif %}
{% if (item.student_info.score is not null) %} {% 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 %} {% endif %}
{% if (item.student_info.certificate is not null) %} {% 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 %} {% endif %}
</div> </div>
</div> </div>

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

@ -71,15 +71,15 @@
<div class="course-student-info"> <div class="course-student-info">
<div class="student-info"> <div class="student-info">
{% if (item.student_info.progress is not null) %} {% 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 %} {% endif %}
{% if (item.student_info.score is not null) %} {% 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 %} {% endif %}
{% if (item.student_info.certificate is not null) %} {% 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> <i class="fa fa-certificate" aria-hidden="true"></i>
{{ item.student_info.certificate }} {{ item.student_info.certificate }}
</span> </span>

@ -51,7 +51,7 @@
</div> </div>
<div class="block-author"> <div class="block-author">
{% if item.teachers | length > 6 %} {% 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> <i class="fa fa-graduation-cap" aria-hidden="true"></i>
</a> </a>
<div id="popover-content-plist-{{ loop.index }}" class="hide"> <div id="popover-content-plist-{{ loop.index }}" class="hide">
@ -86,7 +86,7 @@
{{ teacher.firstname }} {{ teacher.lastname }} {{ teacher.firstname }} {{ teacher.lastname }}
</a> </a>
</h5> </h5>
<p>{{ 'Teacher' | get_lang }}</p> <p>{{ 'Trainer' | get_lang }}</p>
</div> </div>
{% elseif item.teachers | length <= 6 %} {% elseif item.teachers | length <= 6 %}
<a href="{{ teacher.url }}" class="ajax" <a href="{{ teacher.url }}" class="ajax"
@ -105,14 +105,14 @@
<div class="course-student-info"> <div class="course-student-info">
<div class="student-info"> <div class="student-info">
{% if (item.student_info.progress is not null) %} {% 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 %} {% endif %}
{% if (item.student_info.score is not null) %} {% 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 %} {% endif %}
{% if (item.student_info.certificate is not null) %} {% 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> <i class="fa fa-certificate" aria-hidden="true"></i>
{{ item.student_info.certificate }} {{ item.student_info.certificate }}
</span> </span>

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

@ -84,15 +84,15 @@
<div class="course-student-info"> <div class="course-student-info">
<div class="student-info"> <div class="student-info">
{% if (item.student_info.progress is not null) %} {% 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 %} {% endif %}
{% if (item.student_info.score is not null) %} {% 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 %} {% endif %}
{% if (item.student_info.certificate is not null) %} {% 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 %} {% endif %}
</div> </div>
</div> </div>

@ -16,7 +16,7 @@
{% if item.show_actions %} {% if item.show_actions %}
<div class="float-right"> <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 }) }}"> href="{{ url('legacy_main', { 'name' : 'session/resume_session.php', 'id_session' : row.id }) }}">
{{ 'ActionIcon::EDIT' | mdi_icon }} {{ 'ActionIcon::EDIT' | mdi_icon }}
</a> </a>
@ -71,15 +71,15 @@
<div class="card-report"> <div class="card-report">
<div class="student-info"> <div class="student-info">
{% if (item.student_info.progress is not null) %} {% 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 %} {% endif %}
{% if (item.student_info.score is not null) %} {% 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 %} {% endif %}
{% if (item.student_info.certificate is not null) %} {% 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 %} {% endif %}
</div> </div>
</div> </div>

@ -1,90 +1,131 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* 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. * Includes and declarations.
*/ */
die('Remove the "die()" statement on line '.__LINE__.' to execute this script'.PHP_EOL); die('Remove the "die()" statement on line '.__LINE__.' to execute this script'.PHP_EOL);
require_once __DIR__.'/../../public/main/inc/global.inc.php'; 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'); ini_set('memory_limit', '128M');
/** /**
* Main code. * Main code.
*/ */
$terms = []; $terms = [];
$list = SubLanguageManager::get_lang_folder_files_list($path); $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) { foreach ($list as $entry) {
$file = $path.'/'.$entry; $file = $path . '/' . $entry;
echo "Processing language file: $file\n"; // Add debug message
if (is_file($file)) { 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) { foreach ($terms as $index => $translation) {
$terms[$index] = trim(rtrim($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)); $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 // Now get all terms found in all PHP, TPL, and Twig files of Chamilo (this takes some time and memory)
// time and memory)
$usedTerms = []; $usedTerms = [];
$l = strlen(api_get_path(SYS_PATH)); $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)); $rootLength = strlen(api_get_path(SYS_PATH));
$countFiles = 0; $countFiles = 0;
$countReplaces = 0; $countReplaces = 0;
// Browse files // Browse files
foreach ($files as $file) { foreach ($files as $file) {
if ('vendor' === substr($file, $rootLength, 6) || 'web' === substr($file, $rootLength, 3)) { echo "Analyzing $file" . PHP_EOL;
continue;
}
//echo 'Analyzing '.$file.PHP_EOL;
$shortFile = substr($file, $l);
//echo 'Analyzing '.$shortFile.PHP_EOL;
$lines = file($file); $lines = file($file);
$newContent = ''; // Store new file content
$fileModified = false;
// Browse lines inside file $file // Browse lines inside file $file
foreach ($lines as $line) { foreach ($lines as $lineIndex => $line) {
$myTerms = []; $lineModified = false;
$res = preg_match_all('/get_lang\(([\'"](\\w*)[\'"])\)/m', $line, $myTerms);
// 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) { if ($res > 0) {
foreach ($myTerms[2] as $term) { echo "Match found for get_lang|format in line: $line" . PHP_EOL;
echo "Found term $term - ".print_r($myTerms, 1).PHP_EOL; foreach ($myTerms[1] as $index => $quotedTerm) {
if ('lang' == substr($term, 0, 4)) { $term = trim($quotedTerm, '\'\"');
$term = substr($term, 4); 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]; $translation = $terms[$term];
$quotedTerm = $myTerms[1][0]; echo "Replacing $quotedTerm with '$translation'" . PHP_EOL;
//echo "Would do sed -i \"s#$quotedTerm#'$translation'#g\" $file here\n"; $line = str_replace($quotedTerm, "'$translation'", $line);
system("sed -i \"s#$term#'$translation'#g\" $file"); $lineModified = true;
$countReplaces++; $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); // Regular expression for get_lang('variable') or get_lang("variable")
if ($res > 0) { $res = preg_match_all('/get_lang\(([\'"](\w+)[\'"])\)/m', $line, $myTerms);
foreach ($myTerms[2] as $term) { if ($res > 0) {
echo "Found term $term".PHP_EOL; echo "Match found for get_lang() in line: $line" . PHP_EOL;
if ('lang' == substr($term, 0, 4)) { foreach ($myTerms[2] as $index => $term) {
$term = substr($term, 4); if (isset($terms[$term])) {
} $translation = $terms[$term];
if (!empty($terms[$term])) { $quotedTerm = $myTerms[1][$index];
$translation = $terms[$term]; echo "Replacing $quotedTerm with '$translation'" . PHP_EOL;
$quotedTerm = $myTerms[1][0]; $line = str_replace($quotedTerm, "'$translation'", $line);
//echo "Would do sed -i \"s#$quotedTerm#'$translation'#g\" $file here\n"; $lineModified = true;
system("sed -i \"s#$term#'$translation'#g\" $file"); $countReplaces++;
$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++; $countFiles++;
flush();
} }
echo "Done analyzing $countFiles files, with $countReplaces replacements!\n"; echo "Done analyzing $countFiles files, with $countReplaces replacements!\n";

Loading…
Cancel
Save