Minor fixing subtitle in userportal course blocks

skala
Julio Montoya 14 years ago
parent bc12de9f7b
commit 9fcef0c33f
  1. 9
      main/inc/lib/course.lib.php
  2. 6
      main/inc/lib/sessionmanager.lib.php
  3. 12
      main/inc/lib/userportal.lib.php

@ -2797,14 +2797,19 @@ class CourseManager {
$html .= '</div>';
$html .= '<div class="span6">';
$html .='<h3>'.$params['title'].$params['notifications'].'</h3>';
$html .='<h3>'.$params['title'].$params['notifications'].'</h3> ';
if (!empty($params['subtitle'])) {
$html .= '<small>'.$params['subtitle'].'</small>';
}
if (!empty($params['teachers'])) {
$html .= '<h5>'.Display::return_icon('teacher.png', get_lang('Teacher'), array(), ICON_SIZE_TINY).$params['teachers'].'</h5>';
}
if (!empty($params['coaches'])) {
$html .= '<h5>'.Display::return_icon('teacher.png', get_lang('Coach'), array(), ICON_SIZE_TINY).$params['coaches'].'</h5>';
}
$html .= '</div>';
$html .= '</div>';

@ -175,7 +175,7 @@ class SessionManager {
return $result['count'] > 0;
}
function get_count_admin() {
static function get_count_admin() {
$tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
$tbl_session_category = Database::get_main_table(TABLE_MAIN_SESSION_CATEGORY);
$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
@ -218,7 +218,7 @@ class SessionManager {
* Gets the admin session list callback of the admin/session_list.php page
* @param array order and limit keys
*/
public function get_sessions_admin($options) {
public static function get_sessions_admin($options) {
$tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
$tbl_session_category = Database::get_main_table(TABLE_MAIN_SESSION_CATEGORY);
$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
@ -1780,7 +1780,7 @@ class SessionManager {
return $row[0];
}
function protect_session_edit($id) {
static function protect_session_edit($id) {
api_protect_admin_script(true);
$session_info = self::fetch($id);
if (!api_is_platform_admin() && api_get_setting('allow_session_admins_to_manage_all_sessions') != 'true') {

@ -1023,9 +1023,8 @@ class IndexManager {
}
$params['title'] .= $session_link;
$params['title'] .= '<span style="padding-left: 10px; font-size: 90%; font-weight: normal;">';
$params['title'] .= (!empty($s['coach']) ? $session_box['coach'].' | ' : '').$session_box['dates'];
$params['title'] .= '</span>';
$params['subtitle'] = (!empty($s['coach']) ? $session_box['coach'].' | ' : '').$session_box['dates'];
if (api_is_platform_admin()) {
$params['right_actions'] .= '<a href="'.api_get_path(WEB_CODE_PATH).'admin/resume_session.php?id_session='.$session['details']['id'].'">'.Display::return_icon('edit.png', get_lang('Edit'), array('align' => 'absmiddle'),22).'</a>';
@ -1040,15 +1039,16 @@ class IndexManager {
if (api_is_platform_admin()) {
$params['right_actions'] .= '<a href="'.api_get_path(WEB_CODE_PATH).'admin/session_category_edit.php?&id='.$category['details']['id'].'">'.Display::return_icon('edit.png', get_lang('Edit'), array(),22).'</a>';
}
$params['title'] .= $category['details']['name'];
}
$params['title'] .= $category['details']['name'];
if (api_is_platform_admin()) {
$params['link'] = api_get_path(WEB_CODE_PATH).'admin/session_category_edit.php?&id='.$category['details']['id'];
}
if ($category['details']['date_end'] != '0000-00-00') {
$params['title'] .= sprintf(get_lang('FromDateXToDateY'),$category['details']['date_start'], $category['details']['date_end']);
$params['subtitle'] = sprintf(get_lang('FromDateXToDateY'),$category['details']['date_start'], $category['details']['date_end']);
}
$html .= CourseManager::course_item_parent(CourseManager::course_item_html($params, true), $html_sessions);
}

Loading…
Cancel
Save