minor - cosmetic changes in thematic - partial BT#578

skala
Cristian Fasanando 15 years ago
parent 4e89f56340
commit cc9fb73624
  1. 38
      main/attendance/index.php
  2. 28
      main/attendance/thematic.php
  3. 4
      main/attendance/thematic_controller.php
  4. 12
      main/inc/introductionSection.inc.php

@ -55,6 +55,14 @@ if (isset($_POST['action']) && $_POST['action'] == 'thematic_delete_select') {
$action = 'thematic_delete_select';
}
if (isset($_GET['isStudentView']) && $_GET['isStudentView'] == 'true') {
$action = 'attendance_list';
}
if ($action == 'thematic_details' || $action == 'thematic_list') {
$_SESSION['thematic_control'] = $action;
}
// get attendance id
$attendance_id = 0;
if (isset($_GET['attendance_id'])) {
@ -256,7 +264,7 @@ if (api_is_drh() && isset($_GET['student_id'])) {
if (!empty($gradebook)) {
$interbreadcrumb[] = array ('url' => '/main/gradebook/index.php', 'name' => get_lang('ToolGradebook'));
}
$interbreadcrumb[] = array ('url' => 'index.php?action=attendance_list'.$param_gradebook.$student_param, 'name' => get_lang('ToolAttendance'));
$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action=attendance_list'.$param_gradebook.$student_param, 'name' => get_lang('ToolAttendance'));
if ($action == 'attendance_add') {
$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('CreateANewAttendance'));
}
@ -264,29 +272,23 @@ if ($action == 'thematic_list') {
$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicControl'));
}
if ($action == 'thematic_add') {
$interbreadcrumb[] = array ('url' => 'index.php?action=thematic_list', 'name' => get_lang('ThematicControl'));
$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('NewThematicSection'));
}
if ($action == 'thematic_edit') {
$interbreadcrumb[] = array ('url' => 'index.php?action=thematic_list', 'name' => get_lang('ThematicControl'));
$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('EditThematicSection'));
}
if ($action == 'thematic_details') {
//$interbreadcrumb[] = array ('url' => 'index.php?action=thematic_list', 'name' => get_lang('ThematicControl'));
$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicControl'));
}
if ($action == 'thematic_plan_list' || $action == 'thematic_plan_delete') {
if (isset($_GET['origin']) && $_GET['origin'] == 'thematic_details') {
$interbreadcrumb[] = array ('url' => 'index.php?action=thematic_details', 'name' => get_lang('ThematicControl'));
} else {
$interbreadcrumb[] = array ('url' => 'index.php?action=thematic_list', 'name' => get_lang('ThematicControl'));
}
if ($action == 'thematic_plan_list' || $action == 'thematic_plan_delete') {
$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
$interbreadcrumb[] = array ('url' => '#', 'name' => $thematic_data['title'].':'.get_lang('ThematicPlan'));
}
if ($action == 'thematic_plan_add' || $action == 'thematic_plan_edit') {
$interbreadcrumb[] = array ('url' => 'index.php?action=thematic_list', 'name' => get_lang('ThematicControl'));
$interbreadcrumb[] = array ('url' => 'index.php?action=thematic_plan_list&thematic_id='.$thematic_id, 'name' => $thematic_data['title'].':'.get_lang('ThematicPlan'));
$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic_id, 'name' => $thematic_data['title'].':'.get_lang('ThematicPlan'));
if ($description_type >= ADD_THEMATIC_PLAN) {
$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('NewBloc'));
} else {
@ -294,16 +296,12 @@ if ($action == 'thematic_plan_add' || $action == 'thematic_plan_edit') {
}
}
if ($action == 'thematic_advance_list') {
if (isset($_GET['origin']) && $_GET['origin'] == 'thematic_details') {
$interbreadcrumb[] = array ('url' => 'index.php?action=thematic_details', 'name' => get_lang('ThematicControl'));
} else {
$interbreadcrumb[] = array ('url' => 'index.php?action=thematic_list', 'name' => get_lang('ThematicControl'));
}
$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
$interbreadcrumb[] = array ('url' => '#', 'name' => $thematic_data['title'].':'.get_lang('ThematicAdvance'));
}
if ($action == 'thematic_advance_add' || $action == 'thematic_advance_edit') {
$interbreadcrumb[] = array ('url' => 'index.php?action=thematic_list', 'name' => get_lang('ThematicControl'));
$interbreadcrumb[] = array ('url' => 'index.php?action=thematic_advance_list&thematic_id='.$thematic_id, 'name' => $thematic_data['title'].':'.get_lang('ThematicAdvance'));
$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$_SESSION['thematic_control'], 'name' => get_lang('ThematicControl'));
$interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic_id, 'name' => $thematic_data['title'].':'.get_lang('ThematicAdvance'));
$interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('NewThematicAdvance'));
}
if ($action == 'attendance_edit') {

@ -45,24 +45,24 @@ if ($action == 'thematic_list') {
if (!empty($thematic_id)) {
echo '<div><strong>'.$thematic_data[$thematic_id]['title'].': '.get_lang('Details').'</strong></div><br />';
} else {
echo '<div><strong>'.get_lang('ThematicDetails').'</strong></div><br />';
}
// display information
$message = '<strong>'.get_lang('Information').'</strong><br />';
$message .= get_lang('ThematicDetailsDescription');
Display::display_normal_message($message, false);
echo '<br />';
// display progress
if (!empty($thematic_id)) {
echo '<div style="text-align:right;">'.get_lang('Progress').': <strong>'.$total_average_of_advances.'</strong>%</div><br />';
} else {
echo '<div style="text-align:right;">'.get_lang('Progress').': <strong><span id="div_result">'.$total_average_of_advances.'</span></strong>%</div><br />';
echo '<div><strong>'.get_lang('ThematicDetails').'</strong></div><br />';
// display information
$message = '<strong>'.get_lang('Information').'</strong><br />';
$message .= get_lang('ThematicDetailsDescription');
Display::display_normal_message($message, false);
echo '<br />';
}
// display thematic data
if (!empty($thematic_data)) {
// display progress
if (!empty($thematic_id)) {
echo '<div style="text-align:right;">'.get_lang('Progress').': <strong>'.$total_average_of_advances.'</strong>%</div><br />';
} else {
echo '<div style="text-align:right;">'.get_lang('Progress').': <strong><span id="div_result">'.$total_average_of_advances.'</span></strong>%</div><br />';
}
echo '<table width="100%" class="data_table">';
echo '<tr><th width="35%">'.get_lang('Thematic').'</th><th width="30%">'.get_lang('ThematicPlan').'</th><th width="25%">'.get_lang('ThematicAdvance').'</th></tr>';

@ -267,7 +267,9 @@ class ThematicController
// get last done thematic advance before move thematic list
$last_done_thematic_advance = $thematic->get_last_done_thematic_advance();
// update done advances with de current thematic list
$update_done_advances = $thematic->update_done_thematic_advances($last_done_thematic_advance);
if (!empty($last_done_thematic_advance)) {
$update_done_advances = $thematic->update_done_thematic_advances($last_done_thematic_advance);
}
}
unset($_SESSION['thematic_advance_token']);

@ -145,6 +145,7 @@ if ($intro_cmdEdit || $intro_cmdAdd) {
/* Executes the display */
// display thematic advance inside a postit
if ($intro_dispForm) {
$default['intro_content'] = $intro_content;
$form->setDefaults($default);
@ -159,17 +160,19 @@ $thematic_description_html = '';
if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) {
$thematic = new Thematic();
if (api_get_course_setting('display_info_advance_inside_homecourse')) {
if (api_get_course_setting('display_info_advance_inside_homecourse')) {
$information_title = get_lang('InfoAboutLastDoneAdvance');
$last_done_advance = $thematic->get_last_done_thematic_advance();
$thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance);
} else {
$information_title = get_lang('InfoAboutNextAdvanceNotDone');
$next_advance_not_done = $thematic->get_next_thematic_advance_not_done();
$thematic_advance_info = $thematic->get_thematic_advance_list($next_advance_not_done);
}
if (!empty($thematic_advance_info)) {
$style_introduction_section = 'style="width:65%;float:left;margin-left:10%;"';
$style_introduction_section = 'style="width:65%;float:left;margin-left:5%;"';
$thematic_advance = get_lang('ThematicAdvance').'&nbsp;'.$thematic->get_total_average_of_thematic_advances().'%';
if (api_is_allowed_to_edit(null, true)) {
$thematic_advance = '<a href="'.api_get_path(WEB_CODE_PATH).'attendance/index.php?action=thematic_details&'.api_get_cidreq().'">'.get_lang('ThematicAdvance').'&nbsp;'.$thematic->get_total_average_of_thematic_advances().'%</a>';
@ -178,8 +181,9 @@ if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) {
$thematic_description_html = '<div style="width:20%;float:left;font-size:10pt;"><div class="thematic-postit">
<div class="thematic-postit-top"><a class="thematic-postit-head" style="" href="#">'.Display::return_icon('postit_top.png').'</a></div>
<div class="thematic-postit-center">';
$thematic_description_html .= '<h3>'.$thematic_advance.'</h3>';
<div class="thematic-postit-center">';
$thematic_description_html .= '<h3>'.$thematic_advance.'</h3>';
$thematic_description_html .= '<h4>'.$information_title.'</h4>';
$thematic_description_html .= '<div><strong>'.$thematic_info['title'].'</strong></div>';
$thematic_description_html .= '<div><strong>'.api_get_local_time($thematic_advance_info['start_date']).'</strong></div>';
$thematic_description_html .= '<div>'.$thematic_advance_info['content'].'</div>';

Loading…
Cancel
Save