style css for show student progress in My courses

pull/2487/head
Alex Aragon 9 years ago
parent 984e741b97
commit c044974673
  1. 6
      app/Resources/public/css/base.css
  2. 12
      main/inc/lib/userportal.lib.php
  3. 30
      main/template/default/user_portal/classic_courses_with_category.tpl
  4. 28
      main/template/default/user_portal/classic_courses_without_category.tpl
  5. 29
      main/template/default/user_portal/classic_session.tpl
  6. 28
      main/template/default/user_portal/grid_courses_with_category.tpl
  7. 28
      main/template/default/user_portal/grid_courses_without_category.tpl
  8. 28
      main/template/default/user_portal/grid_session.tpl

@ -4755,6 +4755,12 @@ div#chat-remote-video video {
padding-top: 10px;
border-bottom: 1px solid #ECF0F1;
}
.course-student-info{
background-color: #d9edf7;
border: 1px solid #bce8f1;
padding: 5px;
border-radius: 5px;
}
.grid-courses .items{
/* position: relative; */
vertical-align: top;

@ -1171,10 +1171,11 @@ class IndexManager
$this->load_directories_preview
);
//Course option (show student progress)
//This code will add new variables (Progress, Score, Certificate)
if ($studentInfoProgress || $studentInfoScore || $studentInfoCertificate) {
if(!empty($specialCourses)){
foreach ($specialCourses as $key => $specialCourseInfo) {
if ($studentInfoProgress) {
$progress = Tracking::get_avg_student_progress(
@ -1207,12 +1208,13 @@ class IndexManager
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'));
$specialCourses[$key]['student_info']['certificate'] = Display::label(get_lang('No'), 'danger');
}
}
}
}
}
if (isset($courses['in_category']) && isset($courses['not_category'])) {
foreach ($courses['in_category'] as $key1 => $value) {
@ -1249,7 +1251,7 @@ class IndexManager
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'));
$courses['in_category'][$key1]['student_info']['certificate'] = Display::label(get_lang('No'), 'danger');
}
}
}
@ -1289,7 +1291,7 @@ class IndexManager
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'));
$courses['not_category'][$key]['student_info']['certificate'] = Display::label(get_lang('No'), 'danger');
}
}
}
@ -1298,7 +1300,7 @@ class IndexManager
}
}
if ($viewGridCourses) {
$coursesWithoutCategoryTemplate = '/user_portal/grid_courses_without_category.tpl';
$coursesWithCategoryTemplate = '/user_portal/grid_courses_with_category.tpl';

@ -70,25 +70,25 @@
{% endfor %}
{% endif %}
</div>
{% if item.student_info %}
<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) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.progress is not null) and (item.student_info.score is not null) %}
<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) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>
</div>
</div>
{% endif %}
{% endif %}
</div>

@ -69,23 +69,25 @@
</div>
{% if item.student_info %}
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) and (item.student_info.score is not null) %}
<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) }}
{% endif %}
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}
</div>
</div>

@ -80,25 +80,26 @@
</div>
{% if item.student_info %}
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) and (item.student_info.score is not null) %}
<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) }}
{% endif %}
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}
</div>
</div>
{% endfor %}

@ -66,23 +66,25 @@
<div class="notifications">{{ item.notifications }}</div>
{% if item.student_info %}
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) and (item.student_info.score is not null) %}
<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) }}
{% endif %}
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}
</div>

@ -63,23 +63,25 @@
<div class="notifications">{{ item.notifications }}</div>
{% if item.student_info %}
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) and (item.student_info.score is not null) %}
<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) }}
{% endif %}
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}
</div>

@ -30,23 +30,25 @@
{% endfor %}
</div>
{% if item.student_info %}
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) and (item.student_info.score is not null) %}
<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) }}
{% endif %}
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}
</div>

Loading…
Cancel
Save