diff --git a/main/attendance/attendance_controller.php b/main/attendance/attendance_controller.php index 5a5e8a26af..707f3ada08 100755 --- a/main/attendance/attendance_controller.php +++ b/main/attendance/attendance_controller.php @@ -389,11 +389,11 @@ /** * It's used to print attendance sheet - * @param string action - * @param int attendance id + * @param string $action + * @param int $attendance_id */ - public function attendance_sheet_export_to_pdf($action, $attendance_id, $student_id = 0, $course_id = '') { - + public function attendance_sheet_export_to_pdf($action, $attendance_id, $student_id = 0, $course_id = '') + { $attendance = new Attendance(); $courseInfo = CourseManager::get_course_information($course_id); @@ -429,12 +429,9 @@ $data_array['user_id'] = $user_id; } - - $data_array['next_attendance_calendar_id'] = $attendance->get_next_attendance_calendar_id($attendance_id); - //Set headers pdf - + // Set headers pdf. $courseCategory = CourseManager::get_course_category($courseInfo['category_code']); $teacherInfo = CourseManager::get_teacher_list_from_course_code($courseInfo['code']); $teacherName = null; @@ -444,21 +441,17 @@ $teacherName.= $dados['firstname']." ".$dados['lastname']; } - // Get data table - Marco - ordenacao fixa - just fullname + // Get data table $data_table = array(); $head_table = array('#', get_lang('Name')); foreach ($data_array['attendant_calendar'] as $class_day) { - //$head_table[] = api_format_date($class_day['date_time'], DATE_FORMAT_SHORT).'
'.api_format_date($class_day['date_time'], TIME_NO_SEC_FORMAT); $head_table[] = api_format_date($class_day['date_time'], DATE_FORMAT_NUMBER_NO_YEAR); } $data_table[] = $head_table; - $dataClass = array(); - $max_dates_per_page = 10; - $data_attendant_calendar = $data_array['attendant_calendar']; $data_users_presence = $data_array['users_presence']; $count = 1; diff --git a/main/attendance/index.php b/main/attendance/index.php index adac6ee56b..bf434fef38 100755 --- a/main/attendance/index.php +++ b/main/attendance/index.php @@ -1,5 +1,4 @@ params['course_code'] = isset($params['course_code']) ? $params['course_code'] : api_get_course_id(); $this->params['add_signatures'] = isset($params['add_signatures']) ? $params['add_signatures'] : false; - $this->pdf = new mPDF('UTF-8', $page_format, '', '', $params['left'], $params['right'], $params['top'], $params['bottom'], 8, 8, $orientation); + $this->pdf = new mPDF( + 'UTF-8', + $page_format, + '', + '', + $params['left'], + $params['right'], + $params['top'], + $params['bottom'], + 8, + 8, + $orientation + ); } /** * Export the given HTML to PDF, using a global template - * @param string the HTML content + * @param string $content the HTML content * @uses export/table_pdf.tpl */ public function html_to_pdf_with_template($content)