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); $tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION);
echo Tracking::show_user_progress(api_get_user_id()); $user_progress = Tracking::show_user_progress(api_get_user_id());
echo '<br /><br />'; if (!empty($user_progress)) {
echo Tracking::show_course_detail(api_get_user_id(), $_GET['course'], $_GET['session_id']); $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(); Display :: display_footer();

@ -503,12 +503,12 @@ function display_monthcalendar($month, $year, $agenda_items) {
//Setting a personal event to green //Setting a personal event to green
$dayheader.= '<div class="rounded_div_agenda" style="background-color:'.$bg_color.';">'; $dayheader.= '<div class="rounded_div_agenda" style="background-color:'.$bg_color.';">';
//Link to buble //Link to bubble
$url = Display::url($value['title'], '#', array('id'=>$value['calendar_type'].'_'.$value['id'],'class'=>'opener')); $url = Display::url(cut($value['title'], 40), '#', array('id'=>$value['calendar_type'].'_'.$value['id'],'class'=>'opener'));
$dayheader .= $time.' '.$icon.' '.Display::div($url); $dayheader .= $time.' '.$icon.' '.Display::div($url);
//Hidden content //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 //Main div
$dayheader .= Display::div($content, array('id'=>'main_'.$value['calendar_type'].'_'.$value['id'], 'class' => 'dialog', 'style' => 'display:none')); $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 //Setting a personal event to green
$result = '<div class="rounded_div_agenda" style="background-color:'.$bg_color.';">'; $result = '<div class="rounded_div_agenda" style="background-color:'.$bg_color.';">';
//Link to buble //Link to bubble
$url = Display::url($value['title'], '#', array('id'=>$value['calendar_type'].'_'.$value['id'],'class'=>'opener')); $url = Display::url(cut($value['title'], 40), '#', array('id'=>$value['calendar_type'].'_'.$value['id'],'class'=>'opener'));
$result .= $time.' '.$icon.' '.Display::div($url); $result .= $time.' '.$icon.' '.Display::div($url);
//Main div //Main div
@ -250,7 +250,7 @@ function display_mymonthcalendar($agendaitems, $month, $year, $weekdaynames=arra
echo $result; echo $result;
//Hidden content //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')); 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) { if ($code == $category_code) {
$category_link = '<strong>'.$category_name.' ('.$count_courses_lv1.')</strong>'; $category_link = '<strong>'.$category_name.' ('.$count_courses_lv1.')</strong>';
} else { } 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>'; echo '<div>'.$category_link.'</div>';

Loading…
Cancel
Save