Merge pull request #1822 from aragonc/1.11.x

1.11.x
pull/2487/head
Alex Aragon Calixto 8 years ago committed by GitHub
commit f3648eea6c
  1. 55
      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

@ -1884,20 +1884,11 @@ div.admin_section h4 {
}
.question_row_score .title-score .total{
border: 1px solid #ddd;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 5px;
padding: 10px;
text-align: center;
color: #666;
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* IE10+ */
background: linear-gradient(to bottom, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
background: #FAFAFA;
}
.question-result .page-header{
margin-top: 20px;
@ -1937,14 +1928,7 @@ div.admin_section h4 {
border-radius: 3px;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
position: relative;
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* IE10+ */
background: linear-gradient(to bottom, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
background: #FAFAFA;
}
.ribbon .rib {
@ -1989,16 +1973,9 @@ div.admin_section h4 {
}
.ribbon .rib-error, .ribbon .ribbon-total-error {
background: #ff3019; /* Old browsers */
background: -moz-linear-gradient(top, #ff3019 0%, #cf0404 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ff3019), color-stop(100%,#cf0404)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ff3019 0%,#cf0404 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ff3019 0%,#cf0404 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ff3019 0%,#cf0404 100%); /* IE10+ */
background: linear-gradient(to bottom, #ff3019 0%,#cf0404 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff3019', endColorstr='#cf0404',GradientType=0 ); /* IE6-9 */
border-top: 1px solid #ff3019;
border-bottom: 1px solid #cf0404;
background: #ff3019;
border-top: none;
border-bottom: none;
float: left;
}
@ -2016,15 +1993,9 @@ div.admin_section h4 {
}
.ribbon .rib-success, .ribbon .ribbon-total-success{
background-color: #768E00;
background-image: -ms-linear-gradient(top, #9CB80A, #768E00);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#9CB80A), to(#768E00));
background-image: -webkit-linear-gradient(top, #9CB80A, #768E00);
background-image: -o-linear-gradient(top, #9CB80A, #768E00);
background-image: -moz-linear-gradient(top, #9CB80A, #768E00);
background-image: linear-gradient(top, #9CB80A, #768E00);
border-top: 1px solid #A8C31B;
border-bottom: 1px solid #617700;
background: #86B404;
border-top: none;
border-bottom: none;
float: left;
}
@ -2067,7 +2038,7 @@ div.admin_section h4 {
}
.ribbon .rib-success::before {
border-color: #66751B transparent transparent transparent;
border-color: #4B610B transparent transparent transparent;
}
.ribbon .rib-gray::before {
@ -4784,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