fix classical view session - refs BT#11017

remotes/angel/1.11.x
Alex Aragon 9 years ago
parent b176233e42
commit 32f350914e
  1. 51
      app/Resources/public/css/base.css
  2. 2
      main/auth/courses.php
  3. 37
      main/inc/lib/course.lib.php
  4. 30
      main/template/default/user_portal/grid_session.tpl
  5. 110
      main/template/default/user_portal/session.tpl

@ -4705,7 +4705,21 @@ div#chat-remote-video video {
display: inline-block; display: inline-block;
} }
/* list my course user*/ /* list my course user*/
.session .info-session{
margin-bottom: 10px;
font-size: 12px;
}
.session .info-session span{
margin-right: 10px;
}
.session .teachers{
font-size: 12px;
}
.session .sessions-items .courses{
padding-bottom: 10px;
padding-top: 10px;
border-bottom: 1px solid #ECF0F1;
}
.grid-courses .items{ .grid-courses .items{
/* position: relative; */ /* position: relative; */
vertical-align: top; vertical-align: top;
@ -4842,40 +4856,7 @@ div#chat-remote-video video {
color: #fff; color: #fff;
} }
/* Catalog session */ /* Catalog session */
.column-session{
column-count: 3;
-moz-column-count: 3;
-webkit-column-count: 3;
}
.column-session .items{
width: 100%;
display: inline-block;
margin-bottom: 1em;
border-radius: 5px;
border: 1px solid #dddddc;
overflow: hidden;
}
.column-session .items .items-header{
background-color: #ECF0F1;
}
.column-session .items .items-header .title{
font-size: 15px;
font-weight: bold;
margin-bottom: 5px;
}
.column-session .items .items-header .info,
.column-session .items .items-header .date{
font-size: 12px;
}
.column-session .items .items-header .info span{
margin-right: 5px;
}
.column-session .items .card-course .list-group .list-group-item{
border: none;
}
.column-session .items .card-course .list-group .list-group-item:first-child{
border-radius: 0;
}
.search-session{ .search-session{
margin-bottom: 30px; margin-bottom: 30px;
margin-top: 25px; margin-top: 25px;

@ -18,7 +18,7 @@ require_once '../inc/global.inc.php';
$ctok = Security::get_existing_token(); $ctok = Security::get_existing_token();
// Get Limit data // Get Limit data
$limit = CourseCategory::getLimitArray(); $limit = CourseCategory::getLimitFilterFromArray();
// Section for the tabs. // Section for the tabs.
$this_section = SECTION_CATALOG; $this_section = SECTION_CATALOG;

@ -3936,9 +3936,11 @@ class CourseManager
$params = array(); $params = array();
$params['icon'] = Display::return_icon( $params['icon'] = Display::return_icon(
'blackboard_blue.png', 'blackboard_blue.png',
api_htmlentities($course_info['name']), null,
array(), array(),
ICON_SIZE_LARGE ICON_SIZE_LARGE,
null,
true
); );
// Display the "what's new" icons // Display the "what's new" icons
@ -3986,24 +3988,24 @@ class CourseManager
$params['link'] = $session_url; $params['link'] = $session_url;
$params['title'] = $session_title; $params['title'] = $session_title;
$params['right_actions'] = ''; $params['edit_actions'] = '';
$params['document'] = '';
if ($course_visibility != COURSE_VISIBILITY_CLOSED && if ($course_visibility != COURSE_VISIBILITY_CLOSED &&
$course_visibility != COURSE_VISIBILITY_HIDDEN $course_visibility != COURSE_VISIBILITY_HIDDEN
) { ) {
if (api_is_platform_admin()) {
$params['edit_actions'] .= api_get_path(WEB_CODE_PATH) . 'course_info/infocours.php?cidReq=' . $course_info['code'];
if ($load_dirs) { if ($load_dirs) {
$params['right_actions'] .= '<a id="document_preview_' . $course_info['real_id'] . '_' . $course_info['id_session'] . '" class="document_preview" href="javascript:void(0);">' . $params['document'] .= '<a id="document_preview_' . $course_info['real_id'] . '_' . $course_info['id_session'] . '" class="document_preview btn btn-default btn-sm" href="javascript:void(0);">' .
Display::return_icon('folder.png', Display::returnFontAwesomeIcon('folder-open') . '</a>';
get_lang('Documents'), $params['document'] .= Display::div('', array(
array('align' => 'absmiddle'),
ICON_SIZE_SMALL
) . '</a>';
$params['right_actions'] .= Display::div('', array(
'id' => 'document_result_' . $course_info['real_id'] . '_' . $course_info['id_session'], 'id' => 'document_result_' . $course_info['real_id'] . '_' . $course_info['id_session'],
'class' => 'document_preview_container' 'class' => 'document_preview_container'
)); ));
} }
} }
}
if (api_get_setting('display_coursecode_in_courselist') == 'true') { if (api_get_setting('display_coursecode_in_courselist') == 'true') {
$session_title .= ' (' . $course_info['visual_code'] . ') '; $session_title .= ' (' . $course_info['visual_code'] . ') ';
@ -4011,23 +4013,24 @@ class CourseManager
if (api_get_setting('display_teacher_in_courselist') === 'true') { if (api_get_setting('display_teacher_in_courselist') === 'true') {
$teacher_list = CourseManager::get_teacher_list_from_course_code_to_string( $teacher_list = CourseManager::getTeachersFromCourseByCode(
$course_info['code'], $course_info['code']
self::USER_SEPARATOR,
true
); );
$course_coachs = self::get_coachs_from_course( $course_coachs = self::get_coachs_from_course(
$course_info['id_session'], $course_info['id_session'],
$course_info['real_id'] $course_info['real_id']
); );
if ($course_info['status'] == COURSEMANAGER || /* if ($course_info['status'] == COURSEMANAGER ||
($course_info['status'] == STUDENT && empty($course_info['id_session'])) || ($course_info['status'] == STUDENT && empty($course_info['id_session'])) ||
empty($course_info['status']) empty($course_info['status'])
) { ) {
$params['teachers'] = $teacher_list; $params['teachers'] = $teacher_list;
} }
*/
$params['teachers'] = $teacher_list;
if (($course_info['status'] == STUDENT && !empty($course_info['id_session'])) || if (($course_info['status'] == STUDENT && !empty($course_info['id_session'])) ||
($is_coach && $course_info['status'] != COURSEMANAGER) ($is_coach && $course_info['status'] != COURSEMANAGER)
) { ) {

@ -1,7 +1,8 @@
{% for row in session %} {% for row in session %}
<div id="session-{{ item.id }}" class="panel panel-default"> <div id="session-{{ item.id }}" class="session panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<img id="session_img_{{ row.id }}" src="{{ "window_list.png"|icon(32) }}" width="32" height="32" alt="{{ row.title }}" title="{{ row.title }}" /> {{ row.title }} <img id="session_img_{{ row.id }}" src="{{ "window_list.png"|icon(32) }}" width="32" height="32" alt="{{ row.title }}" title="{{ row.title }}" /> {{ row.title }}
{% if row.edit_actions != '' %} {% if row.edit_actions != '' %}
<div class="pull-right"> <div class="pull-right">
<a class="btn btn-default btn-sm" href="{{ row.edit_actions }}"> <a class="btn btn-default btn-sm" href="{{ row.edit_actions }}">
@ -11,6 +12,17 @@
{% endif %} {% endif %}
</div> </div>
<div class="panel-body"> <div class="panel-body">
{% if row.description != '' %}
{{ row.description }}
{% endif %}
<div class="info-session">
<span><i class="fa fa-user" aria-hidden="true"></i>
{{ row.coach_name }}
</span>
<span><i class="fa fa-calendar" aria-hidden="true"></i>
{{ row.date }}
</span>
</div>
<div class="grid-courses"> <div class="grid-courses">
<div class="row"> <div class="row">
{% for item in row.courses %} {% for item in row.courses %}
@ -41,6 +53,22 @@
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
{% if item.edit_actions != '' %}
<div class="admin-actions">
{% if item.document == '' %}
<a class="btn btn-default btn-sm" href="{{ item.edit_actions }}">
<i class="fa fa-pencil" aria-hidden="true"></i>
</a>
{% else %}
<div class="btn-group" role="group">
<a class="btn btn-default btn-sm" href="{{ item.edit_actions }}">
<i class="fa fa-pencil" aria-hidden="true"></i>
</a>
{{ item.document }}
</div>
{% endif %}
</div>
{% endif %}
</div> </div>
<div class="description"> <div class="description">
<h4 class="title"> <h4 class="title">

@ -1,30 +1,30 @@
{% for row in session %}
<div class="panel panel-default"> <div class="panel panel-default">
{% if not session.show_simple_session_info %} {% if not row.show_simple_session_info %}
{% set collapsable = '' %} {% set collapsable = '' %}
<div class="panel-heading"> <div class="panel-heading">
{% if session.course_list_session_style == 1 %} {% if row.course_list_session_style == 1 %}
{# Classic #} {# Classic #}
<a href="{{ _p.web_main ~ 'session/index.php?session_id=' ~ session.id }}"> <a href="{{ _p.web_main ~ 'session/index.php?session_id=' ~ row.id }}">
<img id="session_img_{{ session.id }}" src="{{ "window_list.png"|icon(32) }}" width="32" height="32" alt="{{ session.title }}" title="{{ session.title }}" /> <img id="session_img_{{ row.id }}" src="{{ "window_list.png"|icon(32) }}" width="32" height="32" alt="{{ row.title }}" title="{{ row.title }}" />
{{ session.title }} {{ row.title }}
</a> </a>
{% elseif session.course_list_session_style == 2 %} {% elseif row.course_list_session_style == 2 %}
{# No link #} {# No link #}
<img id="session_img_{{ session.id }}" src="{{ "window_list.png"|icon(32) }}" width="32" height="32" alt="{{ session.title }}" title="{{ session.title }}" /> <img id="session_img_{{ row.id }}" src="{{ "window_list.png"|icon(32) }}" width="32" height="32" alt="{{ row.title }}" title="{{ row.title }}" />
{{ session.title }} {{ row.title }}
{% elseif session.course_list_session_style == 3 %} {% elseif row.course_list_session_style == 3 %}
{# Foldable #} {# Foldable #}
<a role="button" data-toggle="collapse" data-parent="#page-content" href="#collapse_{{ session.id }}" aria-expanded="false" > <a role="button" data-toggle="collapse" data-parent="#page-content" href="#collapse_{{ row.id }}" aria-expanded="false" >
<img id="session_img_{{ session.id }}" src="{{ "window_list.png"|icon(32) }}" width="32" height="32" alt="{{ session.title }}" title="{{ session.title }}" /> <img id="session_img_{{ row.id }}" src="{{ "window_list.png"|icon(32) }}" width="32" height="32" alt="{{ row.title }}" title="{{ row.title }}" />
{{ session.title }} {{ row.title }}
</a> </a>
{% set collapsable = 'collapse' %} {% set collapsable = 'collapse' %}
{% endif %} {% endif %}
{% if session.show_actions %} {% if row.show_actions %}
<div class="pull-right"> <div class="pull-right">
<a href="{{ _p.web_main ~ "session/resume_session.php?id_session=" ~ session.id }}"> <a href="{{ _p.web_main ~ "session/resume_session.php?id_session=" ~ row.id }}">
<img src="{{ "edit.png"|icon(22) }}" width="22" height="22" alt="{{ "Edit"|get_lang }}" title="{{ "Edit"|get_lang }}" /> <img src="{{ "edit.png"|icon(22) }}" width="22" height="22" alt="{{ "Edit"|get_lang }}" title="{{ "Edit"|get_lang }}" />
</a> </a>
</div> </div>
@ -32,35 +32,30 @@
</div> </div>
{% endif %} {% endif %}
<div class="sessions panel-body {{ collapsable }}" id="collapse_{{ session.id }}"> <div class="session panel-body {{ collapsable }}" id="collapse_{{ row.id }}">
{% if session.show_simple_session_info %} {% if row.show_simple_session_info %}
<div class="row"> <div class="row">
<div class="col-md-7"> <div class="col-md-7">
<h3> {% if row.description != '' %}
{{ session.title ~ session.notifications }} {{ row.description }}
</h3>
{% if session.show_description %}
<div>
{{ session.description }}
</div>
{% endif %}
{% if session.subtitle %}
<small>{{ session.subtitle }}</small>
{% endif %}
{% if session.teachers %}
<h5 class="teacher-name">{{ "teacher.png"|icon(16) ~ session.teachers }}</h5>
{% endif %} {% endif %}
<div class="info-session">
<span><i class="fa fa-user" aria-hidden="true"></i>
{{ row.coach_name }}
</span>
<span><i class="fa fa-calendar" aria-hidden="true"></i>
{{ row.date }}
</span>
</div>
{% if session.coaches %} {% if row.coaches %}
<h5 class="teacher-name">{{ "teacher.png"|icon(16) ~ session.coaches }}</h5> <h5 class="teacher-name">{{ "teacher.png"|icon(16) ~ row.coaches }}</h5>
{% endif %} {% endif %}
</div> </div>
{% if session.show_actions %} {% if row.show_actions %}
<div class="col-md-5 text-right"> <div class="col-md-5 text-right">
<a href="{{ _p.web_main ~ "session/resume_session.php?id_session=" ~ session.id }}"> <a href="{{ _p.web_main ~ "session/resume_session.php?id_session=" ~ row.id }}">
<img src="{{ "edit.png"|icon(22) }}" width="22" height="22" alt="{{ "Edit"|get_lang }}" title="{{ "Edit"|get_lang }}"> <img src="{{ "edit.png"|icon(22) }}" width="22" height="22" alt="{{ "Edit"|get_lang }}" title="{{ "Edit"|get_lang }}">
</a> </a>
</div> </div>
@ -69,39 +64,47 @@
{% else %} {% else %}
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
{% if session.subtitle %} {% if row.description != '' %}
<div class="subtitle-session"> {{ row.description }}
<em class="fa fa-clock-o"></em> {{ session.subtitle }}
</div>
{% endif %}
{% if session.show_description %}
<div class="description-session">
{{ session.description }}
</div>
{% endif %} {% endif %}
<div class="sessions-items"> <div class="info-session">
{% for item in session.courses %} <span><i class="fa fa-user" aria-hidden="true"></i>
{{ row.coach_name }}
</span>
<span><i class="fa fa-calendar" aria-hidden="true"></i>
{{ row.date }}
</span>
</div>
<div class="sessions-items">
{% for item in row.courses %}
<div class="courses">
<div class="row"> <div class="row">
<div class="col-md-2"> <div class="col-md-2">
{% if item.link %} {% if item.link %}
<a href="{{ item.link }}" class="thumbnail">{{ item.icon }}</a> <a href="{{ item.link }}" class="thumbnail">
<img class="img-responsive" src="{{ item.icon }}">
</a>
{% else %} {% else %}
{{ item.icon }} {{ 'blackboard.png' | img(48, item.title ) }}
{% endif %} {% endif %}
</div> </div>
<div class="col-md-10"> <div class="col-md-10">
{{ item.title }} <h4>{{ item.title }}</h4>
{% if item.coaches|length > 0 %} <div class="teachers">
{% if item.teachers|length > 0 %}
<img src="{{ 'teacher.png'|icon(16) }}" width="16" height="16"> <img src="{{ 'teacher.png'|icon(16) }}" width="16" height="16">
{% for coach in item.coaches %} {% for coach in item.teachers %}
{{ loop.index > 1 ? ' | ' }} {{ loop.index > 1 ? ' | ' }}
<a href="{{ _p.web_ajax ~ 'user_manager.ajax.php?' ~ {'a': 'get_user_popup', 'user_id': coach.user_id}|url_encode() }}" data-title="{{ coach.full_name }}" class="ajax"> <a href="{{ _p.web_ajax ~ 'user_manager.ajax.php?' ~ {'a': 'get_user_popup', 'user_id': coach.user_id}|url_encode() }}" data-title="{{ coach.full_name }}" class="ajax">
{{ coach.full_name }} {{ coach.firstname }},
{{ coach.lastname }}
</a> </a>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</div>
</div> </div>
</div> </div>
</div>
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
@ -109,3 +112,4 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
{% endfor %}
Loading…
Cancel
Save