diff --git a/main/attendance/attendance_calendar.php b/main/attendance/attendance_calendar.php index 22fcea4977..510610271c 100755 --- a/main/attendance/attendance_calendar.php +++ b/main/attendance/attendance_calendar.php @@ -54,30 +54,30 @@ if (isset($action) && $action == 'calendar_add') { $form->addElement('datepicker', 'date_time', '', array('form_name'=>'attendance_calendar_add'), 5); $defaults['date_time'] = date('Y-m-d H:i',api_strtotime(api_get_local_time())); - $form->addElement('html','

'); + $form->addElement('html','

'); - $form->addElement('html', '
 '. get_lang('RepeatDate').''); - if ($repeat) { - $form->addElement('html', '
'); - } else { - $form->addElement('html', ''); - $form->addElement('html', '
'); - $form->addElement('html','

'); + $form->addElement('html', ''.get_lang('RepeatEnd').''); + $form->addElement('datepickerdate', 'end_date_time', '', array('form_name'=>'attendance_calendar_add')); + $defaults['end_date_time'] = date('Y-m-d 12:00:00'); + $form->addElement('html', ''); + $form->addElement('html', ''); + + + $form->addElement('html', '
'); + $form->addElement('html', ''); + $form->addElement('html','

'); $form->addElement('html','
'); $form->addElement('style_submit_button', null, get_lang('Save'), 'class="save"'); @@ -106,8 +106,8 @@ if (isset($action) && $action == 'calendar_add') { echo Display::return_icon('lp_calendar_event.png',get_lang('DateTime')).' '.$calendar['date_time'].' '; if (!$is_locked_attendance || api_is_platform_admin()) { echo ''; - echo ''.Display::return_icon('edit.gif', get_lang('Edit'), array('style'=>'vertical-align:middle')).' '; - echo ''.Display::return_icon('delete.gif', get_lang('Delete'), array('style'=>'vertical-align:middle')).''; + echo ''.Display::return_icon('edit.png', get_lang('Edit'), array('style'=>'vertical-align:middle'), 22).' '; + echo ''.Display::return_icon('delete.png', get_lang('Delete'), array('style'=>'vertical-align:middle'), 22).''; echo ''; } } diff --git a/main/attendance/attendance_list.php b/main/attendance/attendance_list.php index 28c646aa49..a0d265b370 100755 --- a/main/attendance/attendance_list.php +++ b/main/attendance/attendance_list.php @@ -30,8 +30,4 @@ if (api_is_allowed_to_edit(null, true)) { $table->set_header(4, get_lang('Actions'), false,array('style'=>'text-align:center')); $table->set_form_actions(array ('attendance_delete_select' => get_lang('DeleteAllAttendances'))); } - -$table->display(); - - -?> +$table->display(); \ No newline at end of file diff --git a/main/attendance/attendance_sheet.php b/main/attendance/attendance_sheet.php index 0f8291b373..f2a61fdd65 100755 --- a/main/attendance/attendance_sheet.php +++ b/main/attendance/attendance_sheet.php @@ -105,7 +105,7 @@ if (api_is_allowed_to_edit(null, true)) {
-
+
diff --git a/main/course_progress/thematic.php b/main/course_progress/thematic.php index 49339067cf..b9241a8736 100755 --- a/main/course_progress/thematic.php +++ b/main/course_progress/thematic.php @@ -91,7 +91,7 @@ if ($action == 'thematic_list') { echo ''; // display thematic title - echo ''; + echo ''; // display thematic plan data echo ''; // display thematic advance data @@ -135,10 +140,10 @@ if ($action == 'thematic_list') { if (api_is_allowed_to_edit(null, true) && api_get_session_id() == $thematic['session_id']) { echo '
'.Display::return_icon('lp_quiz.png',get_lang('EditThematicAdvance'),array('style'=>'vertical-align:middle')).'

'; } - echo '
'.Security::remove_XSS($thematic['title'], STUDENT).'
'.Security::remove_XSS($thematic['content'], STUDENT).'

'.Security::remove_XSS($thematic['title'], STUDENT).'

'.Security::remove_XSS($thematic['content'], STUDENT).'
'; @@ -115,19 +115,24 @@ if ($action == 'thematic_list') { $default_thematic_plan_title[$item] = $new_thematic_plan_data[$item]['title']; } } + $no_data = true; if (!empty($default_thematic_plan_title)) { foreach ($default_thematic_plan_title as $id=>$title) { //avoid others - if ($title == 'Others' && empty($thematic_plan_data[$thematic['id']][$id]['description'])) { continue;} - if(isset($thematic_plan_data[$thematic['id']][$id]['title'])) { - echo '
'.Security::remove_XSS($thematic_plan_data[$thematic['id']][$id]['title'], STUDENT).'
'.Security::remove_XSS($thematic_plan_data[$thematic['id']][$id]['description'], STUDENT).'
'; + if ($title == 'Others' && empty($thematic_plan_data[$thematic['id']][$id]['description'])) { continue; } + if (!empty($thematic_plan_data[$thematic['id']][$id]['title']) && !empty($thematic_plan_data[$thematic['id']][$id]['description'])) { + echo '

'.Security::remove_XSS($thematic_plan_data[$thematic['id']][$id]['title'], STUDENT).'

'; + echo Security::remove_XSS($thematic_plan_data[$thematic['id']][$id]['description'], STUDENT).'
'; + $no_data = false; } else { - echo '
'.$title.'

'; + //echo '

'.$title.'


'; } } - } else { - echo '
'.get_lang('StillDoNotHaveAThematicPlan').'
'; - } + } + + if ($no_data) { + echo '
'.get_lang('StillDoNotHaveAThematicPlan').'
'; + } echo '
'; + //if (api_is_allowed_to_edit(null, true) && api_get_session_id() == $thematic['session_id']) { if (!empty($thematic_advance_data[$thematic['id']])) { - + echo '
'; foreach ($thematic_advance_data[$thematic['id']] as $thematic_advance) { $thematic_advance['start_date'] = api_get_local_time($thematic_advance['start_date']); $thematic_advance['start_date'] = api_format_date($thematic_advance['start_date'], DATE_TIME_FORMAT_LONG); @@ -169,14 +174,13 @@ if ($action == 'thematic_list') { echo ''; } } - } - + } echo ''; } + echo '
-
'; } else { - echo '
'.get_lang('ThereIsNoAThematicAdvance').'
 '; - } - echo ''; + echo '
'.get_lang('ThereIsNoAThematicAdvance').'
'; + } echo ''; echo ''; } //End for diff --git a/main/course_progress/thematic_plan.php b/main/course_progress/thematic_plan.php index 35860cb0af..216a7999d5 100755 --- a/main/course_progress/thematic_plan.php +++ b/main/course_progress/thematic_plan.php @@ -26,9 +26,6 @@ foreach($thematic_simple_list as $item) { $i=1; -echo '

'.$thematic_data['title'].'

'; -echo $thematic_data['content']; - echo '
'; if ($action == 'thematic_plan_edit') { @@ -39,6 +36,10 @@ if ($action == 'thematic_plan_edit') { } echo '
'; +echo Display::tag('h2', $thematic_data['title']); +echo $thematic_data['content']; + + if ($message == 'ok') { Display::display_normal_message(get_lang('ThematicSectionHasBeenCreatedSuccessfull')); } diff --git a/main/inc/lib/attendance.lib.php b/main/inc/lib/attendance.lib.php index ef04e72a9b..67304b9e42 100755 --- a/main/inc/lib/attendance.lib.php +++ b/main/inc/lib/attendance.lib.php @@ -22,10 +22,10 @@ class Attendance private $attendance_qualify_title; private $attendance_weight; - // constants + // constants const DONE_ATTENDANCE_LOG_TYPE = 'done_attendance_sheet'; - CONST UPDATED_ATTENDANCE_LOG_TYPE = 'updated_attendance_sheet'; - const LOCKED_ATTENDANCE_LOG_TYPE = 'locked_attendance_sheet'; + const UPDATED_ATTENDANCE_LOG_TYPE = 'updated_attendance_sheet'; + const LOCKED_ATTENDANCE_LOG_TYPE = 'locked_attendance_sheet'; public function __construct() {} @@ -123,16 +123,16 @@ class Attendance $actions .= '
'; if (api_is_platform_admin()) { - $actions .= ''.Display::return_icon('edit.gif',get_lang('Edit')).' '; - $actions .= ''.Display::return_icon('delete.gif',get_lang('Delete')).''; + $actions .= ''.Display::return_icon('edit.png',get_lang('Edit'), array(), 22).' '; + $actions .= ''.Display::return_icon('delete.png',get_lang('Delete'), array(), 22).''; } else { $is_locked_attendance = self::is_locked_attendance($attendance[0]); if ($is_locked_attendance) { $actions .= Display::return_icon('edit_na.gif',get_lang('Edit')).' '; $actions .= Display::return_icon('delete_na.gif',get_lang('Delete')); } else { - $actions .= ''.Display::return_icon('edit.gif',get_lang('Edit')).' '; - $actions .= ''.Display::return_icon('delete.gif',get_lang('Delete')).''; + $actions .= ''.Display::return_icon('edit.png',get_lang('Edit'), array(), 22).' '; + $actions .= ''.Display::return_icon('delete.png',get_lang('Delete'), array(), 22).''; } } @@ -402,12 +402,12 @@ class Attendance $users_absent = array_diff($user_ids,$users_present); $affected_rows = 0; - // get last edit type - $calendar_data = $this->get_attendance_calendar_by_id($calendar_id); - $lastedit_type = self::DONE_ATTENDANCE_LOG_TYPE; - if ($calendar_data['done_attendance']) { - $lastedit_type = self::UPDATED_ATTENDANCE_LOG_TYPE; - } + // get last edit type + $calendar_data = $this->get_attendance_calendar_by_id($calendar_id); + $lastedit_type = self::DONE_ATTENDANCE_LOG_TYPE; + if ($calendar_data['done_attendance']) { + $lastedit_type = self::UPDATED_ATTENDANCE_LOG_TYPE; + } // save users present in class foreach ($users_present as $user_present) {