Adding more validations in order to improve usability, course catalog, agenda pop up, course progress

skala
Julio Montoya 14 years ago
parent 614f43209e
commit 1e86b4c57c
  1. 13
      main/auth/my_progress.php
  2. 6
      main/calendar/agenda.inc.php
  3. 6
      main/calendar/myagenda.inc.php
  4. 6
      main/template/default/auth/courses_categories.php

@ -49,8 +49,15 @@ $tbl_user = Database :: get_main_table(TABLE_MAIN_USER);
$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION);
echo Tracking::show_user_progress(api_get_user_id());
echo '<br /><br />';
echo Tracking::show_course_detail(api_get_user_id(), $_GET['course'], $_GET['session_id']);
$user_progress = Tracking::show_user_progress(api_get_user_id());
if (!empty($user_progress)) {
$user_progress .= '<br /><br />';
}
$user_progress .= Tracking::show_course_detail(api_get_user_id(), $_GET['course'], $_GET['session_id']);
if (!empty($user_progress)) {
echo $user_progress;
} else {
Display::display_warning_message(get_lang('NoDataAvailable'));
}
Display :: display_footer();

@ -503,12 +503,12 @@ function display_monthcalendar($month, $year, $agenda_items) {
//Setting a personal event to green
$dayheader.= '<div class="rounded_div_agenda" style="background-color:'.$bg_color.';">';
//Link to buble
$url = Display::url($value['title'], '#', array('id'=>$value['calendar_type'].'_'.$value['id'],'class'=>'opener'));
//Link to bubble
$url = Display::url(cut($value['title'], 40), '#', array('id'=>$value['calendar_type'].'_'.$value['id'],'class'=>'opener'));
$dayheader .= $time.' '.$icon.' '.Display::div($url);
//Hidden content
$content = Display::div($icon.Display::tag('h2', $value['title']).$complete_time.$value['content']);
$content = Display::div($icon.Display::tag('h1', $value['title']).$complete_time.$value['content']);
//Main div
$dayheader .= Display::div($content, array('id'=>'main_'.$value['calendar_type'].'_'.$value['id'], 'class' => 'dialog', 'style' => 'display:none'));

@ -241,8 +241,8 @@ function display_mymonthcalendar($agendaitems, $month, $year, $weekdaynames=arra
//Setting a personal event to green
$result = '<div class="rounded_div_agenda" style="background-color:'.$bg_color.';">';
//Link to buble
$url = Display::url($value['title'], '#', array('id'=>$value['calendar_type'].'_'.$value['id'],'class'=>'opener'));
//Link to bubble
$url = Display::url(cut($value['title'], 40), '#', array('id'=>$value['calendar_type'].'_'.$value['id'],'class'=>'opener'));
$result .= $time.' '.$icon.' '.Display::div($url);
//Main div
@ -250,7 +250,7 @@ function display_mymonthcalendar($agendaitems, $month, $year, $weekdaynames=arra
echo $result;
//Hidden content
$content = Display::div($icon.Display::tag('h2', $value['title']).$complete_time.Security::remove_XSS($value['content']));
$content = Display::div($icon.Display::tag('h1', $value['title']).$complete_time.Security::remove_XSS($value['content']));
echo Display::div($content, array('id'=>'main_'.$value['calendar_type'].'_'.$value['id'], 'class' => 'dialog'));
}
}

@ -59,7 +59,11 @@ $stok = Security::get_token();
if ($code == $category_code) {
$category_link = '<strong>'.$category_name.' ('.$count_courses_lv1.')</strong>';
} else {
$category_link = '<a href="'. api_get_self().'?action=display_courses&amp;category_code='.$category_code.'&amp;hidden_links='.$hidden_links.'">'.$category_name.'</a> ('.$count_courses_lv1.')';
if (!empty($count_courses_lv1)) {
$category_link = '<a href="'. api_get_self().'?action=display_courses&amp;category_code='.$category_code.'&amp;hidden_links='.$hidden_links.'">'.$category_name.'</a> ('.$count_courses_lv1.')';
} else {
$category_link = '<strong>'.$category_name.' ('.$count_courses_lv1.')</strong>';
}
}
echo '<div>'.$category_link.'</div>';

Loading…
Cancel
Save