remotes/angel/1.11.x
Rafa 8 years ago
parent a1ceda3308
commit 8fbbe40f19
  1. 30
      main/inc/lib/userportal.lib.php
  2. 6
      main/install/data.sql
  3. 6
      main/lang/english/trad4all.inc.php
  4. 6
      main/template/default/user_portal/classic_courses_with_category.tpl
  5. 6
      main/template/default/user_portal/classic_courses_without_category.tpl
  6. 6
      main/template/default/user_portal/classic_session.tpl
  7. 6
      main/template/default/user_portal/grid_courses_with_category.tpl
  8. 6
      main/template/default/user_portal/grid_courses_without_category.tpl
  9. 6
      main/template/default/user_portal/grid_session.tpl

@ -1167,10 +1167,10 @@ class IndexManager
//Course option (show student progress)
//This code will add a new variables (Progress, Score, Certificate)
if(api_get_configuration_value('my_course_progress') === true && api_is_student() === true) {
//This code will add new variables (Progress, Score, Certificate)
if (api_get_configuration_value('my_course_progress') === true && api_is_student() === true) {
foreach($specialCourses as $key => $specialCourseInfo) {
foreach ($specialCourses as $key => $specialCourseInfo) {
$progress = Tracking::get_avg_student_progress(
$user_id,
$specialCourseInfo['course_code']
@ -1193,7 +1193,7 @@ class IndexManager
);
$specialCourses[$key]['student_info']['certificate'] = null;
if (isset($category[0])) {
if($category[0]->is_certificate_available($user_id)) {
if ($category[0]->is_certificate_available($user_id)) {
$specialCourses[$key]['student_info']['certificate'] = Display::label(get_lang('Yes'), 'success');
} else {
$specialCourses[$key]['student_info']['certificate'] = Display::label(get_lang('No'));
@ -1201,10 +1201,10 @@ class IndexManager
}
}
if(isset($courses['in_category']) && isset($courses['not_category'])){
foreach($courses['in_category'] as $key1 => $value) {
if(isset($courses['in_category'][$key1]['courses'])){
foreach($courses['in_category'][$key1]['courses'] as $key2 => $courseInCatInfo) {
if (isset($courses['in_category']) && isset($courses['not_category'])) {
foreach ($courses['in_category'] as $key1 => $value) {
if (isset($courses['in_category'][$key1]['courses'])) {
foreach ($courses['in_category'][$key1]['courses'] as $key2 => $courseInCatInfo) {
$progress = Tracking::get_avg_student_progress(
$user_id,
$courseInCatInfo['course_code']
@ -1227,7 +1227,7 @@ class IndexManager
);
$courses['in_category'][ $key1 ]['student_info']['certificate'] = null;
if (isset($category[0])) {
if($category[0]->is_certificate_available($user_id)) {
if ($category[0]->is_certificate_available($user_id)) {
$courses['in_category'][ $key1 ]['student_info']['certificate'] = Display::label(get_lang('Yes'), 'success');
} else {
$courses['in_category'][ $key1 ]['student_info']['certificate'] = Display::label(get_lang('No'));
@ -1237,7 +1237,7 @@ class IndexManager
}
}
}
foreach($courses['not_category'] as $key => $courseNotInCatInfo) {
foreach ($courses['not_category'] as $key => $courseNotInCatInfo) {
$progress = Tracking::get_avg_student_progress(
$user_id,
$courseNotInCatInfo['course_code']
@ -1247,7 +1247,7 @@ class IndexManager
$courseNotInCatInfo['course_code'],
array()
);
$courses['not_category'][ $key ]['student_info']['progress'] = ($progress === false)? null : $progress;
$courses['not_category'][ $key ]['student_info']['progress'] = ($progress === false)? null : $progress;
$courses['not_category'][ $key ]['student_info']['score'] = $percentage_score;
$category = Category::load(
@ -1260,7 +1260,7 @@ class IndexManager
);
$courses['not_category'][ $key ]['student_info']['certificate'] = null;
if (isset($category[0])) {
if($category[0]->is_certificate_available($user_id)) {
if ($category[0]->is_certificate_available($user_id)) {
$courses['not_category'][ $key ]['student_info']['certificate'] = Display::label(get_lang('Yes'), 'success');
} else {
$courses['not_category'][ $key ]['student_info']['certificate'] = Display::label(get_lang('No'));
@ -1393,8 +1393,8 @@ class IndexManager
$course_session['skill'] = isset($courseUserHtml['skill']) ? $courseUserHtml['skill'] : '';
//Course option (show student progress)
//This code will add a new variables (Progress, Score, Certificate)
if(api_get_configuration_value('my_course_progress') === true && api_is_student() === true) {
//This code will add new variables (Progress, Score, Certificate)
if (api_get_configuration_value('my_course_progress') === true && api_is_student() === true) {
$progress = Tracking::get_avg_student_progress(
$user_id,
$course['course_code'],
@ -1420,7 +1420,7 @@ class IndexManager
);
$course_session['student_info']['certificate'] = null;
if (isset($category[0])) {
if($category[0]->is_certificate_available($user_id)) {
if ($category[0]->is_certificate_available($user_id)) {
$course_session['student_info']['certificate'] = Display::label(get_lang('Yes'), 'success');
} else {
$course_session['student_info']['certificate'] = Display::label(get_lang('No'));

@ -1959,8 +1959,4 @@ VALUES
INSERT INTO settings_current (variable, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable)
VALUES ('allow_download_documents_by_api_key', 'radio', 'WebServices', 'false', 'AllowDownloadDocumentsByApiKeyTitle', 'AllowDownloadDocumentsByApiKeyComment', '', NULL, 1);
INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_download_documents_by_api_key', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_download_documents_by_api_key', 'false', 'No');
INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_download_documents_by_api_key', 'false', 'No');

@ -7963,9 +7963,9 @@ $OnlyUsersFromCourseSession = "Only users from one course in a session";
$ServerXForwardedForInfo = "If the server is behind a proxy or firewall (and only in those cases), it might be using the X_FORWARDED_FOR HTTP header to show the remote user IP (yours, in this case).";
$GeolocalizationCoordinates = "Geolocalization by coordinates";
$ExportUsersOfACourse = "Export users of a course";
$StudentCourseProgress = "Progress: %s%";
$StudentCourseScore = "Rating: %s%";
$StudentCourseCertificate = "Certificate: %s";
$StudentCourseProgressX = "Progress: %s%";
$StudentCourseScoreX = "Rating: %s%";
$StudentCourseCertificateX = "Certificate: %s";
$MyCourseProgressTitle = "Show course progress to student";
$MyCourseProgressTemplateComment = "By activating this option, the students will see their course progress in the page 'My Courses'.";
$PauseRecordingAudio = "Pause recording";

@ -76,15 +76,15 @@
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgress" | get_lang | format(item.student_info.progress) }}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScore" | get_lang | format(item.student_info.score) }}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificate" | get_lang | format(item.student_info.certificate) }}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>

@ -73,15 +73,15 @@
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgress" | get_lang | format(item.student_info.progress) }}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScore" | get_lang | format(item.student_info.score) }}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificate" | get_lang | format(item.student_info.certificate) }}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>

@ -81,15 +81,15 @@
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgress" | get_lang | format(item.student_info.progress) }}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScore" | get_lang | format(item.student_info.score) }}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificate" | get_lang | format(item.student_info.certificate) }}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>

@ -70,15 +70,15 @@
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgress" | get_lang | format(item.student_info.progress) }}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScore" | get_lang | format(item.student_info.score) }}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificate" | get_lang | format(item.student_info.certificate) }}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>

@ -67,15 +67,15 @@
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgress" | get_lang | format(item.student_info.progress) }}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScore" | get_lang | format(item.student_info.score) }}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificate" | get_lang | format(item.student_info.certificate) }}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>

@ -65,15 +65,15 @@
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgress" | get_lang | format(item.student_info.progress) }}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScore" | get_lang | format(item.student_info.score) }}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificate" | get_lang | format(item.student_info.certificate) }}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>

Loading…
Cancel
Save