Minor cosmetic fixes

skala
Julio Montoya 13 years ago
parent 7c999dfb6a
commit 1f468b9056
  1. 1
      main/attendance/attendance_controller.php
  2. 11
      main/attendance/index.php
  3. 10
      main/inc/lib/attendance.lib.php
  4. 4
      main/inc/lib/tracking.lib.php

@ -35,7 +35,6 @@
* @param array message for showing by action['edit','add','delete'] (optional) * @param array message for showing by action['edit','add','delete'] (optional)
*/ */
public function attendance_list($history=false,$messages=array()) { public function attendance_list($history=false,$messages=array()) {
$attendance = new Attendance(); $attendance = new Attendance();
$data = array(); $data = array();

@ -40,9 +40,9 @@ $actions = array(
'attendance_delete', 'attendance_delete',
'attendance_delete_select', 'attendance_delete_select',
'attendance_restore', 'attendance_restore',
'attendance_sheet_export_to_pdf', 'attendance_sheet_export_to_pdf'
); );
$actions_calendar = array('calendar_list', 'calendar_add', 'calendar_edit', 'calendar_delete', 'calendar_all_delete'); $actions_calendar = array('calendar_list', 'calendar_add', 'calendar_edit', 'calendar_delete', 'calendar_all_delete');
$action = 'attendance_list'; $action = 'attendance_list';
@ -114,7 +114,6 @@ $(function() {
$(".row_odd td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#dcdcdc", "border-left":"1px #bbb solid", "border-right":"1px #bbb solid", "z-index":"1" }); $(".row_odd td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#dcdcdc", "border-left":"1px #bbb solid", "border-right":"1px #bbb solid", "z-index":"1" });
$(".row_even td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#eee", "border-left":"1px #bbb solid", "border-right":"1px #bbb solid", "z-index":"1" }); $(".row_even td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#eee", "border-left":"1px #bbb solid", "border-right":"1px #bbb solid", "z-index":"1" });
$(".checkboxes_col_"+calendar_id).mouseover(function() { $(".checkboxes_col_"+calendar_id).mouseover(function() {
//$(".checkbox_head_"+calendar_id).removeAttr("opacity"); //$(".checkbox_head_"+calendar_id).removeAttr("opacity");
//$("row_even td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"red", "border-left":"1px #EEEE00 solid", "border-right":"1px #EEEE00 solid" , "border-bottom":"1px #ccc solid" }); //$("row_even td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"red", "border-left":"1px #EEEE00 solid", "border-right":"1px #EEEE00 solid" , "border-bottom":"1px #ccc solid" });
@ -122,9 +121,8 @@ $(function() {
}); });
$(".checkboxes_col_"+calendar_id).mouseout(function() { $(".checkboxes_col_"+calendar_id).mouseout(function() {
// $("row_even td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#F9F9F9", "border-left":"1px #EEEE00 solid", "border-right":"1px #EEEE00 solid" , "border-bottom":"1px #ccc solid" }); // $("row_even td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#F9F9F9", "border-left":"1px #EEEE00 solid", "border-right":"1px #EEEE00 solid" , "border-bottom":"1px #ccc solid" });
// $("row_odd td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#FFF", "border-left":"1px #EEEE00 solid", "border-right":"1px #EEEE00 solid" , "border-bottom":"1px #ccc solid" }); // $("row_odd td.checkboxes_col_"+calendar_id).css({"opacity":"1","background-color":"#FFF", "border-left":"1px #EEEE00 solid", "border-right":"1px #EEEE00 solid" , "border-bottom":"1px #ccc solid" });
}); });
$(".checkboxes_col_"+calendar_id+" input:checkbox").attr("disabled",false); $(".checkboxes_col_"+calendar_id+" input:checkbox").attr("disabled",false);
@ -218,7 +216,6 @@ if ($action == 'calendar_add') {
if (isset($_POST['action']) && $_POST['action'] == 'attendance_delete_select') { if (isset($_POST['action']) && $_POST['action'] == 'attendance_delete_select') {
$attendance_controller->attendance_delete($_POST['id']); $attendance_controller->attendance_delete($_POST['id']);
} }
// distpacher actions to controller // distpacher actions to controller
switch ($action) { switch ($action) {
case 'attendance_list': case 'attendance_list':

@ -98,11 +98,17 @@ class Attendance
$column = intval($column); $column = intval($column);
$from = intval($from); $from = intval($from);
$number_of_items = intval($number_of_items); $number_of_items = intval($number_of_items);
if (!in_array($direction, array('ASC','DESC'))) {
if (!in_array($direction, array('ASC','DESC'))) {
$direction = 'ASC'; $direction = 'ASC';
} }
$active_plus = 'att.active = 1'; $active_plus = 'att.active = 1';
if (api_is_platform_admin()) { $active_plus = ' 1=1 ';}
if (api_is_platform_admin()) {
$active_plus = ' 1=1 ';
}
$sql = "SELECT $sql = "SELECT
att.id AS col0, att.id AS col0,
att.name AS col1, att.name AS col1,

@ -2117,7 +2117,7 @@ class Tracking {
* @param int user id * @param int user id
* @return string html code * @return string html code
*/ */
function show_user_progress($user_id, $session_id = 0, $extra_params = '', $show_courses = true) { static function show_user_progress($user_id, $session_id = 0, $extra_params = '', $show_courses = true) {
global $_configuration; global $_configuration;
$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE); $tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE);
$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); $tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION);
@ -2557,7 +2557,7 @@ class Tracking {
* @param int session id * @param int session id
* @return string html code * @return string html code
*/ */
function show_course_detail($user_id, $course_code, $session_id) { static function show_course_detail($user_id, $course_code, $session_id) {
$html = ''; $html = '';
if (isset($course_code)) { if (isset($course_code)) {

Loading…
Cancel
Save