Merge pull request #1814 from aragonc/grill

New course catalogue grid style
pull/2487/head
Yannick Warnier 9 years ago committed by GitHub
commit c8ec70089b
  1. 152
      app/Resources/public/css/base.css
  2. 2
      app/Resources/public/css/themes/chamilo/default.css
  3. 118
      main/auth/courses_categories.php
  4. 38
      main/inc/lib/course.lib.php
  5. 56
      main/template/default/layout/hot_course_item.tpl
  6. 2
      main/template/default/layout/hot_courses.tpl
  7. 5
      main/template/default/user_portal/grid_courses_with_category.tpl
  8. 78
      main/template/default/user_portal/grid_courses_without_category.tpl

@ -4753,7 +4753,7 @@ div#chat-remote-video video {
padding-top: 10px;
border-bottom: 1px solid #ECF0F1;
}
.course-student-info{
.grid-courses .items .course-student-info{
background-color: #d9edf7;
border: 1px solid #bce8f1;
padding: 5px;
@ -4772,23 +4772,67 @@ div#chat-remote-video video {
/* position: relative; */
vertical-align: top;
white-space: normal;
margin: 0px 5px 15px 0px;
margin: auto;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
text-align: left;
background-color: #fff;
min-height: 244px;
border: 1px solid #DFDFDF;
border-radius: 5px;
margin-bottom: 20px;
}
.grid-courses .items.my-courses{
min-height: 340px;
box-shadow: 2px 4px 15px 0 rgba(46,61,73,.1);
transition: box-shadow .3s ease , border .3s ease;
}
.grid-courses .items.my-courses .course-student-info{
font-size: 10px;
text-align: center;
background: none;
border:none;
padding: 0;
}
.grid-courses .items.my-courses .title{
font-size: 14px;
}
.grid-courses .items.my-courses .block-title{
margin: 10px;
}
.grid-courses .items.items-courses{
min-height: 425px;
width: 310px;
box-shadow: 2px 4px 15px 0 rgba(46,61,73,.1);
transition: box-shadow .3s ease , border .3s ease;
}
.grid-courses .items.items-courses:hover,
.grid-courses .items.my-courses:hover,
.grid-courses .items.items-hotcourse:hover{
box-shadow: 4px 5px 20px 0 rgba(46,61,73,.15);
transition: box-shadow .3s ease , border .3s ease;
}
.grid-courses .items.items-hotcourse{
min-height: 400px;
box-shadow: 2px 4px 15px 0 rgba(46,61,73,.1);
transition: box-shadow .3s ease , border .3s ease;
}
.grid-courses .items .block-title{
margin: 15px 10px 10px 10px;
}
.grid-courses .items .title{
line-height: 1.4;
padding: 0px;
margin: 5px;
font-size: 17px;
font-weight: bold;
height: 42px;
margin: 0;
}
.hot-courses .grid-courses .items .title{
line-height: 1.4;
padding: 0px;
font-size: 14px;
font-weight: bold;
min-height: 40px;
height: 42px;
margin: 0;
}
.grid-courses .items .toolbar{
text-align: right;
@ -4814,33 +4858,19 @@ div#chat-remote-video video {
}
.grid-courses .items .ranking{
font-size: 10px;
}
.grid-courses .items .image .black-shadow{
top: 0px;
left: 0px;
width: 100%;
height: 100%;
padding-top: 40px;
opacity: 0;
box-sizing: border-box;
position: absolute;
background: rgba(0, 0, 0, 0.7) none repeat scroll 0% 0%;
padding: 10px;
}
.grid-courses .items .image .hovered-course{
opacity: 1;
transition: all 0.3s ease 0s;
margin: 10px;
}
.grid-courses .items .notifications{
padding-top: 5px;
text-align: center;
}
.grid-courses .items .admin-actions, .grid-courses .items .user-actions{
.grid-courses .items .admin-actions,
.grid-courses .items .user-actions{
position: absolute;
bottom: 0px;
left: 0px;
}
.grid-courses .items .admin-actions .btn-sm,.grid-courses .items .user-actions .btn-sm{
.grid-courses .items .admin-actions .btn-sm,
.grid-courses .items .user-actions .btn-sm{
border-radius: 0;
border: none;
}
@ -4852,17 +4882,20 @@ div#chat-remote-video video {
position: absolute;
bottom: 0px;
right: -10px;
background-color: #FD6600;
background-color: #09F;
color: #fff;
padding: 5px 10px;
font-size: 11px;
text-transform: uppercase;
z-index: 2;
font-weight: bold;
height: 32px;
line-height: 20px;
}
.grid-courses .items .cribbon{
width: 0;
height: 0;
border-top: 10px solid #FD3414;
border-top: 10px solid #337AB7;
border-right: 10px solid transparent;
position: absolute;
bottom: -10px;
@ -4897,6 +4930,58 @@ div#chat-remote-video video {
.grid-courses .items .author-card .teachers-details h5 a{
color: #fff;
}
/*---- */
.grid-courses .items .block-author{
display: flex;
margin-top: 5px;
margin-left: 5px;
}
.grid-courses .items .block-author img{
border: 2px solid #fff;
}
.grid-courses .items .block-author .teachers-details{
display: flex;
flex-direction: column;
justify-content: center;
}
.grid-courses .items .block-author .teachers-details p{
font-size: 10px;
margin: 0 10px 0 10px;
padding: 0;
}
.grid-courses .items .block-author .teachers-details h5{
font-size: 10px;
font-weight: bold;
margin: 0px;
margin-left: 10px;
margin-right: 10px;
}
.grid-courses .items .block-author .teachers-details h5 a{
color: #666;
}
.grid-courses{
margin-top: 15px;
margin-bottom: 15px;
}
/* new grid catalog */
.section-course-wrapper{
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
margin: auto;
align-items: center;
}
.section-course-wrapper.show-section{
/* display: -webkit-box !important; */
/* display: -ms-flexbox !important; */
display: flex !important;
}
/* Catalog session */
.search-session{
@ -6237,6 +6322,9 @@ ul#toolnavbox-two li a.btn{
.navbar-nav{
margin: -2.5px -15px;
}
.grid-courses .items.my-courses{
width: 310px;
}
}
@media (min-width:320px) and (max-width: 479px){
footer {
@ -6302,6 +6390,16 @@ ul#toolnavbox-two li a.btn{
color: #666666;
line-height: 20px;
}
.grid-courses .items.items-courses{
width: auto;
}
.grid-courses .items .title{
font-size: 14px;
}
.grid-courses{
margin-top: 10px;
padding-top: 10px;
}
}

@ -35,7 +35,7 @@ body {
}
a {
color: #07578A;
color: #0099FF;
text-decoration: none;
}
a:hover,

@ -158,9 +158,10 @@ if ($showCourses && $action != 'display_sessions') {
continue;
}
$user_registerd_in_course = CourseManager::is_user_subscribed_in_course($user_id, $course['code']);
$user_registerd_in_course_as_teacher = CourseManager::is_course_teacher($user_id, $course['code']);
$user_registerd_in_course_as_student = ($user_registerd_in_course && !$user_registerd_in_course_as_teacher);
$userRegisterdInCourse = CourseManager::is_user_subscribed_in_course($user_id, $course['code']);
$userRegisterdInCourseAsTeacher = CourseManager::is_course_teacher($user_id, $course['code']);
$userRegisterd = ($userRegisterdInCourse && $userRegisterdInCourseAsTeacher);
$course_public = ($course['visibility'] == COURSE_VISIBILITY_OPEN_WORLD);
$course_open = ($course['visibility'] == COURSE_VISIBILITY_OPEN_PLATFORM);
$course_private = ($course['visibility'] == COURSE_VISIBILITY_REGISTERED);
@ -173,7 +174,7 @@ if ($showCourses && $action != 'display_sessions') {
$html = null;
// display the course bloc
$html .= '<div class="col-xs-6 col-sm-6 col-md-3"><div class="items items-courses">';
$html .= '<div class="col-xs-12 col-sm-6 col-md-4"><div class="items items-courses">';
$course['category_title'] = '';
if (isset($course['category'])) {
@ -181,7 +182,7 @@ if ($showCourses && $action != 'display_sessions') {
}
// display thumbnail
$html .= returnThumbnail($course);
$html .= returnThumbnail($course, $userRegisterd);
$separator = '<div class="separator">&nbsp;</div>';
$subscribeButton = return_register_button($course, $stok, $code, $search_term);
@ -209,7 +210,8 @@ if ($showCourses && $action != 'display_sessions') {
// display course title and button bloc
$html .= '<div class="description">';
$html .= return_title($course);
$html .= return_title($course, $userRegisterd);
$html .= return_teacher($course);
// display button line
$html .= '<div class="toolbar">';
@ -219,7 +221,7 @@ if ($showCourses && $action != 'display_sessions') {
$html .= '<div class="right">';
$html .= '<div class="btn-group">';
// if user registered as student
if ($user_registerd_in_course_as_student) {
if ($userRegisterdInCourse) {
$html .= return_already_registered_label('student');
if (!$course_closed) {
@ -227,12 +229,12 @@ if ($showCourses && $action != 'display_sessions') {
$html .= return_unregister_button($course, $stok, $search_term, $code);
}
}
} elseif ($user_registerd_in_course_as_teacher) {
} elseif ($userRegisterdInCourseAsTeacher) {
// if user registered as teacher
if ($course_unsubscribe_allowed) {
$html .= return_unregister_button($course, $stok, $search_term, $code);
}
$html .= return_already_registered_label('teacher');
//$html .= return_already_registered_label('teacher');
} else {
// if user not registered in the course
@ -275,10 +277,12 @@ echo $cataloguePagination;
*
* @return string HTML string
*/
function returnThumbnail($course)
function returnThumbnail($course, $registeredUser)
{
$html = '';
$title = cut($course['title'], 70);
$linkCourse = api_get_course_url($course['code']);
// course path
$course_path = api_get_path(SYS_COURSE_PATH).$course['directory'];
@ -290,34 +294,54 @@ function returnThumbnail($course)
}
$html .= '<div class="image">';
$html .= '<img class="img-responsive" src="'.$course_medium_image.'" alt="'.api_htmlentities($title).'"/>';
if (!$registeredUser) {
$html .= '<img class="img-responsive"'
.' src="'.$course_medium_image.'" '
.' alt="'.api_htmlentities($title).'"/>';
} else {
$html .= '<a href="'.$linkCourse.'" title="'.$course['title'].'">'
.'<img class="img-responsive" src="'.$course_medium_image.'" '
.'alt="'.api_htmlentities($title).'"/></a>';
}
$categoryTitle = isset($course['category_title']) ? $course['category_title'] : '';
if (!empty($categoryTitle)) {
$html .= '<span class="category">'. $categoryTitle.'</span>';
$html .= '<span class="category">'.$categoryTitle.'</span>';
$html .= '<div class="cribbon"></div>';
}
$html .= '<div class="user-actions">';
$html .= return_description_button($course);
$html .= '</div></div>';
return $html;
}
function return_teacher($course)
{
//Info course
$courseInfo = api_get_course_info($course['code']);
$teachers = CourseManager::getTeachersFromCourse($courseInfo['real_id']);
$html .= '<div class="black-shadow">';
$html .= '<div class="author-card">';
$count = 0;
//$count = 0;
$html = null;
$html .= '<div class="block-author">';
$length = count($teachers);
foreach ($teachers as $value) {
if ($count > 2) {
break;
}
$name = $value['firstname'].' ' . $value['lastname'];
$html .= '<a href="'.$value['url'].'" class="ajax" data-title="'.$name.'">
<img src="'.$value['avatar'].'"/></a>';
$html .= '<div class="teachers-details"><h5>
<a href="'.$value['url'].'" class="ajax" data-title="'.$name.'">'
. $name . '</a></h5></div>';
$count ++;
if ($length > 2) {
$html .= '<a href="'.$value['url'].'" class="ajax" data-title="'.$name.'">
<img src="'.$value['avatar'].'"/></a>';
} else {
$html .= '<a href="'.$value['url'].'" class="ajax" data-title="'.$name.'">
<img src="'.$value['avatar'].'"/></a>';
$html .= '<div class="teachers-details"><h5>
<a href="'.$value['url'].'" class="ajax" data-title="'.$name.'">'
. $name . '</a></h5><p>'. get_lang('Teacher').'</p></div>';
}
//$count ++;
}
$html .= '</div></div>';
$html .= '<div class="user-actions">';
$html .= return_description_button($course);
$html .= '</div></div>';
$html .= '</div>';
return $html;
}
@ -326,21 +350,27 @@ function returnThumbnail($course)
* @param $course
* @return string HTML string
*/
function return_title($course)
function return_title($course, $registeredUser)
{
$html = '';
$linkCourse = api_get_course_url($course['code']);
$title = cut($course['title'], 70);
$html .= '<h4 class="title"><a href="'.$linkCourse.'">'.cut($title, 60).'</a></h4>';
if (api_get_configuration_value('hide_course_rating') === false) {
$ajax_url = api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=add_course_vote';
$rating = Display::return_rating_system(
'star_'.$course['real_id'],
$ajax_url.'&course_id='.$course['real_id'],
$course['point_info']
$title = cut($course['title'], 45);
$ajax_url = api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=add_course_vote';
$rating = Display::return_rating_system(
'star_'.$course['real_id'],
$ajax_url.'&course_id='.$course['real_id'],
$course['point_info']
);
$html .= '<div class="ranking">'.$rating.'</div>';
$html .= '<div class="block-title"><h4 class="title">';
if (!$registeredUser) {
$html .= $title;
} else {
$html .= '<a title="'.$title.'" href="' . $linkCourse . '">' . $title . '</a>';
}
$html .= '</h4></div>';
$html .= '<div class="ranking">'. $rating . '</div>';
return $html;
}
@ -383,16 +413,16 @@ function return_goto_button($course)
*/
function return_already_registered_label($in_status)
{
$icon = '<em class="fa fa-suitcase"></em>';
$icon = '<em class="fa fa-check"></em>';
$title = get_lang("YouAreATeacherOfThisCourse");
if ($in_status == 'student') {
$icon = '<em class="fa fa-graduation-cap"></em>';
$title = get_lang("AlreadyRegisteredToCourse");
$icon = '<em class="fa fa-check"></em>';
$title = get_lang("AlreadySubscribed");
}
$html = Display::tag(
'button',
$icon,
$icon . ' ' . $title,
array('id' => 'register', 'class' => 'btn btn-default btn-sm', 'title' => $title)
);
@ -411,7 +441,7 @@ function return_already_registered_label($in_status)
function return_register_button($course, $stok, $code, $search_term)
{
$html = ' <a class="btn btn-success btn-sm" title="' . get_lang('Subscribe') . '" href="'.api_get_self().'?action=subscribe_course&sec_token='.$stok.'&subscribe_course='.$course['code'].'&search_term='.$search_term.'&category_code='.$code.'">' .
Display::returnFontAwesomeIcon('sign-in') . '</a>';
get_lang('Subscribe') .' '. Display::returnFontAwesomeIcon('sign-in') . '</a>';
return $html;
}

@ -3601,6 +3601,7 @@ class CourseManager
}
$params['title'] = $course_info['title'];
$params['title_cut'] = cut($course_info['title'], 45);
$params['link'] = $course_info['course_public_url'].'?id_session=0&autoreg=1';
if (api_get_setting('display_teacher_in_courselist') === 'true') {
$params['teachers'] = self::getTeachersFromCourse($courseId, true);
@ -3671,7 +3672,7 @@ class CourseManager
if ($coursesNotCategory) {
$listItems['not_category'] = $coursesNotCategory;
}
return $listItems;
}
@ -3816,6 +3817,7 @@ class CourseManager
$params['thumbnails'] = $thumbnails;
$params['image'] = $image;
$params['title'] = $course_info['title'];
$params['title_cut'] = cut($course_info['title'], 45);
$params['category'] = $course_info['categoryName'];
$params['teachers'] = $teachers;
@ -4835,13 +4837,16 @@ class CourseManager
$course_info,
$my_course_code_list
);
$user_registerd_in_course = self::is_user_subscribed_in_course($user_id, $courseCode);
$user_registerd_in_course_as_teacher = self::is_course_teacher($user_id, $courseCode);
$user_registerd_in_course_as_student = ($user_registerd_in_course && !$user_registerd_in_course_as_teacher);
$userRegisterdInCourse = self::is_user_subscribed_in_course($user_id, $course_info['code']);
$userRegisterdInCourseAsTeacher = self::is_course_teacher($user_id, $course_info['code']);
$userRegisterd = ($userRegisterdInCourse && $userRegisterdInCourseAsTeacher);
$my_course['is_registerd'] = $userRegisterd;
$my_course['title_cut'] = cut($course_info['title'], 45);
// if user registered as student
if ($user_registerd_in_course_as_student) {
/* if ($userRegisterdInCourse) {
$icon = '<em class="fa fa-graduation-cap"></em>';
$title = get_lang("AlreadyRegisteredToCourse");
$my_course['already_register_as'] = Display::tag(
@ -4849,7 +4854,7 @@ class CourseManager
$icon,
array('id' => 'register', 'class' => 'btn btn-default btn-sm', 'title' => $title)
);
} elseif ($user_registerd_in_course_as_teacher) {
} elseif ($userRegisterdInCourseAsTeacher) {
// if user registered as teacher
$icon = '<em class="fa fa-suitcase"></em>';
$title = get_lang("YouAreATeacherOfThisCourse");
@ -4858,30 +4863,36 @@ class CourseManager
$icon,
array('id' => 'register', 'class' => 'btn btn-default btn-sm', 'title' => $title)
);
}
} */
//Course visibility
if ($access_link && in_array('register', $access_link)) {
$my_course['register_button'] = Display::url(
get_lang('Subscribe') . ' ' .
Display::returnFontAwesomeIcon('sign-in'),
api_get_path(WEB_COURSE_PATH) . $course_info['path'] . '/index.php?action=subscribe&sec_token=' . $stok,
array('class' => 'btn btn-success btn-sm', 'title' => get_lang('Subscribe')));
array('class' => 'btn btn-success btn-sm', 'title' => get_lang('Subscribe'))
);
}
if ($access_link && in_array('enter',
$access_link) || $course_info['visibility'] == COURSE_VISIBILITY_OPEN_WORLD
) {
$my_course['go_to_course_button'] = Display::url(
get_lang('GoToCourse'). ' ' .
Display::returnFontAwesomeIcon('share'),
api_get_path(WEB_COURSE_PATH) . $course_info['path'] . '/index.php',
array('class' => 'btn btn-default btn-sm', 'title' => get_lang('GoToCourse')));
array('class' => 'btn btn-default btn-sm', 'title' => get_lang('GoToCourse'))
);
}
if ($access_link && in_array('unsubscribe', $access_link)) {
$my_course['unsubscribe_button'] = Display::url(
get_lang('Unreg') . ' ' .
Display::returnFontAwesomeIcon('sign-out'),
api_get_path(WEB_CODE_PATH) . 'auth/courses.php?action=unsubscribe&unsubscribe=' . $courseCode . '&sec_token=' . $stok . '&category_code=' . $categoryCode,
array('class' => 'btn btn-danger btn-sm', 'title' => get_lang('Unreg')));
array('class' => 'btn btn-danger btn-sm', 'title' => get_lang('Unreg'))
);
}
// start buycourse validation
@ -4917,7 +4928,7 @@ class CourseManager
);
//}
/* get_lang('Description') */
$my_course['teachers'] = self::getTeachersFromCourse($course_info['real_id'], false);
$my_course['teachers'] = self::getTeachersFromCourse($course_info['real_id'], true);
$point_info = self::get_course_ranking($course_info['real_id'], 0);
$my_course['rating_html'] = '';
@ -4930,7 +4941,6 @@ class CourseManager
}
$hotCourses[] = $my_course;
}
return $hotCourses;
}

@ -2,36 +2,57 @@
{% if item.title %}
<div class="col-xs-12 col-sm-6 col-md-4">
<div class="items items-hotcourse">
<div class="image">
<img src="{{ item.course_image_large }}" class="img-responsive" alt="{{ item.title }}">
{% if item.is_registerd %}
<a title="{{ item.title}}" href="{{ item.course_public_url }}">
<img src="{{ item.course_image_large }}" class="img-responsive" alt="{{ item.title }}">
</a>
{% else %}
<img src="{{ item.course_image_large }}" class="img-responsive" alt="{{ item.title }}">
{% endif %}
{% if item.categoryName != '' %}
<span class="category">{{ item.categoryName }}</span>
<div class="cribbon"></div>
{% endif %}
<div class="black-shadow">
<div class="author-card">
<div class="user-actions">{{ item.description_button }}</div>
</div>
<div class="description">
<div class="block-title">
{% if item.is_registerd %}
<h4 class="title">
<a alt="{{ item.title }}" title="{{ item.title }}" href="{{ item.course_public_url }}">{{ item.title_cut}}</a>
</h4>
{% else %}
<h4 class="title" title="{{ item.title }}">
{{ item.title_cut}}
</h4>
{% endif %}
</div>
<div class="ranking">
{{ item.rating_html }}
</div>
<div class="block-author">
{% for teacher in item.teachers %}
{% set counter = counter + 1 %}
{% if counter <= 3 %}
{% if item.teachers | length > 2 %}
<a href="{{ teacher.url }}" class="ajax" data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
<img src="{{ teacher.avatar }}" />
</a>
{% else %}
<a href="{{ teacher.url }}" class="ajax" data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
<img src="{{ teacher.avatar }}" />
</a>
<div class="teachers-details">
<h5>
<h5>
<a href="{{ teacher.url }}" class="ajax" data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
{{ teacher.firstname }} {{ teacher.lastname }}
</a>
</h5>
</h5>
<p>{{ 'Teacher' | get_lang }}</p>
</div>
{% endif %}
{% endfor %}
</div>
</div>
<div class="user-actions">{{ item.description_button }}</div>
</div>
<div class="description">
<h4 class="title">
<a title="{{ item.title}}" href="{{ item.course_public_url }}">{{ item.title}}</a>
</h4>
<div class="ranking">
{{ item.rating_html }}
</div>
<div class="toolbar">
<div class="left">
@ -43,7 +64,6 @@
<div class="btn-group" role="group">
{{ item.register_button }}
{{ item.unsubscribe_button }}
{{ item.already_register_as }}
</div>
</div>
</div>

@ -33,7 +33,7 @@ $(document).ready( function() {
{% endif %}
</h4>
</div>
<div class="grid-courses">
<div id="list-hot-courses" class="grid-courses">
<div class="row">
{% include template ~ '/layout/hot_course_item.tpl' %}
</div>

@ -79,7 +79,10 @@
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
<span title="{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}">
<i class="fa fa-certificate" aria-hidden="true"></i>
{{ item.student_info.certificate }}
</span>
{% endif %}
</div>

@ -3,38 +3,23 @@
<div class="row">
{% for item in courses %}
<div class="col-xs-12 col-sm-6 col-md-4">
<div class="items">
<div class="items my-courses">
<div class="image">
{% if item.is_special_course %}
<div class="pin">{{ item.icon }}</div>
{% endif %}
<img src="{{ item.image }}" class="img-responsive">
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %}
<img src="{{ item.image }}" class="img-responsive">
{% else %}
<a title="{{ item.title }}" href="{{ item.link }}">
<img src="{{ item.image }}" alt="{{ item.title }}" class="img-responsive">
</a>
{% endif %}
{% if item.category != '' %}
<span class="category">{{ item.category }}</span>
<div class="cribbon"></div>
{% endif %}
<div class="black-shadow">
<div class="author-card">
{% for teacher in item.teachers %}
{% set counter = counter + 1 %}
{% if counter <= 3 %}
<a href="{{ teacher.url }}" class="ajax"
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
<img src="{{ teacher.avatar }}"/>
</a>
<div class="teachers-details">
<h5>
<a href="{{ teacher.url }}" class="ajax"
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
{{ teacher.firstname }} {{ teacher.lastname }}
</a>
</h5>
</div>
{% endif %}
{% endfor %}
</div>
</div>
{% if item.edit_actions != '' %}
<div class="admin-actions">
{% if item.document == '' %}
@ -53,13 +38,39 @@
{% endif %}
</div>
<div class="description">
<h4 class="title">
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %}
{{ item.title }} {{ item.code_course }}
{% else %}
<a href="{{ item.link }}">{{ item.title }} {{ item.code_course }}</a>
{% endif %}
</h4>
<div class="block-title">
<h4 class="title" title="{{ item.title }}">
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %}
{{ item.title_cut }} {{ item.code_course }}
{% else %}
<a title="{{ item.title }}" href="{{ item.link }}">{{ item.title_cut }} {{ item.code_course }}</a>
{% endif %}
</h4>
</div>
<div class="block-author">
{% for teacher in item.teachers %}
{% if item.teachers | length > 2 %}
<a href="{{ teacher.url }}" class="ajax"
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
<img src="{{ teacher.avatar }}"/>
</a>
{% else %}
<a href="{{ teacher.url }}" class="ajax"
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
<img src="{{ teacher.avatar }}"/>
</a>
<div class="teachers-details">
<h5>
<a href="{{ teacher.url }}" class="ajax"
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
{{ teacher.firstname }} {{ teacher.lastname }}
</a>
</h5>
<p>{{ 'Teacher' | get_lang }}</p>
</div>
{% endif %}
{% endfor %}
</div>
<div class="notifications">{{ item.notifications }}</div>
{% if item.student_info %}
@ -76,7 +87,10 @@
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
<span title="{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}">
<i class="fa fa-certificate" aria-hidden="true"></i>
{{ item.student_info.certificate }}
</span>
{% endif %}
</div>

Loading…
Cancel
Save