Merge branch '1.10.x' of https://github.com/chamilo/chamilo-lms into 1.10.x

1.10.x
Angel Fernando Quiroz Campos 9 years ago
commit f69c75edfd
  1. 2
      index.php
  2. 11
      main/attendance/attendance_add.php
  3. 28
      main/attendance/attendance_calendar.php
  4. 6
      main/attendance/attendance_controller.php
  5. 2
      main/attendance/calendar_logins.php
  6. 14
      main/attendance/index.php
  7. 7
      main/course_progress/thematic_plan.php
  8. 33
      main/inc/lib/attendance.lib.php
  9. 2
      main/inc/lib/database.lib.php
  10. 36
      main/inc/lib/thematic.lib.php
  11. 9
      plugin/dashboard/block_daily/block_daily.class.php
  12. 2
      src/Chamilo/CoreBundle/Entity/AnnouncementRelGroup.php
  13. 3
      user_portal.php

@ -71,7 +71,7 @@ if (isset($_GET['submitAuth']) && $_GET['submitAuth'] == 1) {
// Delete session neccesary for legal terms
if (api_get_setting('allow_terms_conditions') == 'true') {
unset($_SESSION['term_and_condition']);
Session::erase('term_and_condition');
}
//If we are not logged in and customapages activated
if (!api_get_user_id() && CustomPages::enabled()) {

@ -15,16 +15,15 @@ if (isset($error)) {
Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false);
}
$param_gradebook = '';
if (isset($_SESSION['gradebook'])) {
$param_gradebook = '&gradebook='.Security::remove_XSS($_SESSION['gradebook']);
}
if (!isset($error)) {
$token = Security::get_token();
}
// display form
$form = new FormValidator('attendance_add','POST','index.php?action=attendance_add&'.api_get_cidreq().$param_gradebook);
$form = new FormValidator(
'attendance_add',
'POST',
'index.php?action=attendance_add&'.api_get_cidreq()
);
$form->addElement('header', '', get_lang('CreateANewAttendance'));
$form->addElement('hidden', 'sec_token', $token);

@ -10,19 +10,18 @@
// protect a course script
api_protect_course_script(true);
$param_gradebook = '';
if (isset($_SESSION['gradebook'])) {
$param_gradebook = '&gradebook='.Security::remove_XSS($_SESSION['gradebook']);
}
if (!$is_locked_attendance || api_is_platform_admin()) {
echo '<div class="actions">';
if ($action == 'calendar_add') {
echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_list&attendance_id='.$attendance_id.$param_gradebook.'">'.Display::return_icon('back.png',get_lang('AttendanceCalendar'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_list&attendance_id='.$attendance_id.'">'.
Display::return_icon('back.png',get_lang('AttendanceCalendar'),'',ICON_SIZE_MEDIUM).'</a>';
} else {
echo '<a href="index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance_id.$param_gradebook.'">'.Display::return_icon('back.png',get_lang('AttendanceSheet'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a href="index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance_id.'">'.
Display::return_icon('back.png',get_lang('AttendanceSheet'),'',ICON_SIZE_MEDIUM).'</a>';
if (api_is_allowed_to_edit()) {
echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_add&attendance_id='.$attendance_id.$param_gradebook.'">'.Display::return_icon('add.png',get_lang('AddDateAndTime'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDeleteAllDates').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=calendar_all_delete&attendance_id='.$attendance_id.$param_gradebook.'">'.
echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_add&attendance_id='.$attendance_id.'">'.
Display::return_icon('add.png',get_lang('AddDateAndTime'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDeleteAllDates').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=calendar_all_delete&attendance_id='.$attendance_id.'">'.
Display::return_icon('clean.png',get_lang('CleanCalendar'),'',ICON_SIZE_MEDIUM).'</a>';
}
}
@ -59,18 +58,18 @@ if (isset($action) && $action == 'calendar_add') {
$form = new FormValidator(
'attendance_calendar_add',
'POST',
'index.php?action=calendar_add&attendance_id=' . $attendance_id . $param_gradebook . '&' . api_get_cidreq(),
'index.php?action=calendar_add&attendance_id='.$attendance_id.'&' . api_get_cidreq(),
''
);
$form->addElement('header', get_lang('AddADateTime'));
//$form->addElement('date_time_picker', 'date_time');
$form->addDateTimePicker(
'date_time',
array(get_lang('StartDate')),
array('id' => 'date_time')
);
$defaults['date_time'] = date('Y-m-d H:i', api_strtotime(api_get_local_time()));
$form->addElement(
@ -132,11 +131,10 @@ if (isset($action) && $action == 'calendar_add') {
$form = new FormValidator(
'attendance_calendar_edit',
'POST',
'index.php?action=calendar_edit&attendance_id=' . $attendance_id . '&calendar_id=' . $calendar_id . '&' . api_get_cidreq() . $param_gradebook,
'index.php?action=calendar_edit&attendance_id=' . $attendance_id . '&calendar_id=' . $calendar_id . '&' . api_get_cidreq(),
''
);
$form->addDateTimePicker('date_time', array(get_lang('Date')), array('form_name'=>'attendance_calendar_edit'), 5);
//$form->addElement('date_time_picker', 'date_time', '', array('form_name'=>'attendance_calendar_edit'), 5);
$defaults['date_time'] = $calendar['date_time'];
$form->addButtonSave(get_lang('Save'));
$form->addButtonCancel(get_lang('Cancel'), 'cancel');
@ -160,9 +158,9 @@ if (isset($action) && $action == 'calendar_add') {
if (!$is_locked_attendance || api_is_platform_admin()) {
if (api_is_allowed_to_edit()) {
echo '<div class="pull-right">';
echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_edit&calendar_id='.intval($calendar['id']).'&attendance_id='.$attendance_id.$param_gradebook.'">'.
echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_edit&calendar_id='.intval($calendar['id']).'&attendance_id='.$attendance_id.'">'.
Display::return_icon('edit.png', get_lang('Edit'), array('style'=>'vertical-align:middle'), ICON_SIZE_SMALL).'</a>&nbsp;';
echo '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().$param_gradebook.'&action=calendar_delete&calendar_id='.intval($calendar['id']).'&attendance_id='.$attendance_id.'">'.
echo '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=calendar_delete&calendar_id='.intval($calendar['id']).'&attendance_id='.$attendance_id.'">'.
Display::return_icon('delete.png', get_lang('Delete'), array('style'=>'vertical-align:middle'), ICON_SIZE_SMALL).'</a>';
echo '</div>';
}

@ -67,11 +67,7 @@ class AttendanceController
$last_id = $attendance->attendance_add($link_to_gradebook);
Security::clear_token();
}
$param_gradebook = '';
if (isset($_SESSION['gradebook'])) {
$param_gradebook = '&gradebook='.Security::remove_XSS($_SESSION['gradebook']);
}
header('location:index.php?action=calendar_add&attendance_id='.$last_id.'&'.api_get_cidreq().$param_gradebook);
header('location:index.php?action=calendar_add&attendance_id='.$last_id.'&'.api_get_cidreq());
exit;
} else {
$data['error'] = true;

@ -3,7 +3,7 @@
// See AttendanceController::calendarLogins function
echo '<div class="actions">';
echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_list='.$param_gradebook.'">'.
echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_list">'.
Display::return_icon('back.png',get_lang('AttendanceCalendar'),'',ICON_SIZE_MEDIUM).'</a>';
echo '</div>';

@ -167,16 +167,6 @@ $(function() {
});
</script>';
// interbreadcrumbs
if (!empty($_GET['gradebook']) && $_GET['gradebook'] == 'view') {
$_SESSION['gradebook'] = Security::remove_XSS($_GET['gradebook']);
$gradebook = $_SESSION['gradebook'];
} elseif (empty($_GET['gradebook'])) {
unset($_SESSION['gradebook']);
$gradebook = '';
}
$student_param = '';
$student_id = null;
if (api_is_drh() && isset($_GET['student_id'])) {
@ -188,8 +178,8 @@ if (api_is_drh() && isset($_GET['student_id'])) {
'name' => $student_info['complete_name']
);
}
if (!empty($gradebook)) {
$interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'gradebook/index.php', 'name' => get_lang('ToolGradebook'));
if (api_is_in_gradebook()) {
$interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'gradebook/index.php?'.api_get_cidreq(), 'name' => get_lang('ToolGradebook'));
}
$interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action=attendance_list&'.$student_param, 'name' => get_lang('ToolAttendance'));
if ($action == 'attendance_add') {

@ -32,12 +32,12 @@ echo $thematic_data['content'];
if (isset($message) && $message == 'ok') {
Display::display_normal_message(get_lang('ThematicSectionHasBeenCreatedSuccessfull'));
}
$param_gradebook = null;
if ($action == 'thematic_plan_list') {
$form = new FormValidator(
'thematic_plan_add',
'POST',
'index.php?action=thematic_plan_list&thematic_id='.$thematic_id.'&'.api_get_cidreq().$param_gradebook
'index.php?action=thematic_plan_list&thematic_id='.$thematic_id.'&'.api_get_cidreq()
);
$form->addElement('hidden', 'action', 'thematic_plan_add');
//$form->addElement('hidden', 'thematic_plan_token', $token);
@ -88,8 +88,7 @@ if ($action == 'thematic_plan_list') {
$form = new FormValidator(
'thematic_plan_add',
'POST',
'index.php?action=thematic_plan_edit&thematic_id='.$thematic_id.'&'.api_get_cidreq(
).$param_gradebook,
'index.php?action=thematic_plan_edit&thematic_id='.$thematic_id.'&'.api_get_cidreq(),
'',
'style="width: 100%;"'
);

@ -136,11 +136,6 @@ class Attendance
$res = Database::query($sql);
$attendances = array ();
$param_gradebook = '';
if (isset($_SESSION['gradebook'])) {
$param_gradebook = '&gradebook='.$_SESSION['gradebook'];
}
$user_info = api_get_user_info();
$allowDelete = api_get_setting('allow_delete_attendance');
@ -165,14 +160,14 @@ class Attendance
if (api_is_allowed_to_edit(null, true) || $isDrhOfCourse) {
// Link to edit
$attendance[1] = '<a href="index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance[0].$param_gradebook.$student_param.'">'.$attendance[1].'</a>'.$session_star;
$attendance[1] = '<a href="index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance[0].$student_param.'">'.$attendance[1].'</a>'.$session_star;
} else {
// Link to view
$attendance[1] = '<a href="index.php?'.api_get_cidreq().'&action=attendance_sheet_list_no_edit&attendance_id='.$attendance[0].$param_gradebook.$student_param.'">'.$attendance[1].'</a>'.$session_star;
$attendance[1] = '<a href="index.php?'.api_get_cidreq().'&action=attendance_sheet_list_no_edit&attendance_id='.$attendance[0].$student_param.'">'.$attendance[1].'</a>'.$session_star;
}
} else {
$attendance[1] = '<a class="muted" href="index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance[0].$param_gradebook.$student_param.'">'.$attendance[1].'</a>'.$session_star;
$attendance[1] = '<a class="muted" href="index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance[0].$student_param.'">'.$attendance[1].'</a>'.$session_star;
}
if ($attendance[5] == 1) {
@ -187,19 +182,19 @@ class Attendance
$actions .= '<center>';
if (api_is_platform_admin()) {
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=attendance_edit&attendance_id='.$attendance[0].$param_gradebook.'">'.
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=attendance_edit&attendance_id='.$attendance[0].'">'.
Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>&nbsp;';
// Visible
if ($attendance[5] == 1) {
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=attendance_set_invisible&attendance_id='.$attendance[0].$param_gradebook.'">'.
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=attendance_set_invisible&attendance_id='.$attendance[0].'">'.
Display::return_icon('visible.png', get_lang('Hide'), array(), ICON_SIZE_SMALL).'</a>';
} else {
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=attendance_set_visible&attendance_id='.$attendance[0].$param_gradebook.'">'.
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=attendance_set_visible&attendance_id='.$attendance[0].'">'.
Display::return_icon('invisible.png', get_lang('Show'), array(), ICON_SIZE_SMALL).'</a>';
$attendance[2] = '<span class="muted">'.$attendance[2].'</span>';
}
if ($allowDelete === 'true') {
$actions .= '<a href="index.php?' . api_get_cidreq() . '&action=attendance_delete&attendance_id=' . $attendance[0] . $param_gradebook . '">' .
$actions .= '<a href="index.php?' . api_get_cidreq() . '&action=attendance_delete&attendance_id=' . $attendance[0]. '">' .
Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL) . '</a>';
}
} else {
@ -208,19 +203,19 @@ class Attendance
$actions .= Display::return_icon('edit_na.png', get_lang('Edit')).'&nbsp;';
$actions .= Display::return_icon('visible.png', get_lang('Hide'));
} else {
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=attendance_edit&attendance_id='.$attendance[0].$param_gradebook.'">'.
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=attendance_edit&attendance_id='.$attendance[0].'">'.
Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>&nbsp;';
if ($attendance[5] == 1) {
$actions .= ' <a href="index.php?'.api_get_cidreq().'&action=attendance_set_invisible&attendance_id='.$attendance[0].$param_gradebook.'">'.
$actions .= ' <a href="index.php?'.api_get_cidreq().'&action=attendance_set_invisible&attendance_id='.$attendance[0].'">'.
Display::return_icon('visible.png', get_lang('Hide'), array(), ICON_SIZE_SMALL).'</a>';
} else {
$actions .= ' <a href="index.php?'.api_get_cidreq().'&action=attendance_set_visible&attendance_id='.$attendance[0].$param_gradebook.'">'.
$actions .= ' <a href="index.php?'.api_get_cidreq().'&action=attendance_set_visible&attendance_id='.$attendance[0].'">'.
Display::return_icon('invisible.png', get_lang('Show'), array(), ICON_SIZE_SMALL).'</a>';
$attendance[2] = '<span class="muted">'.$attendance[2].'</span>';
}
if ($allowDelete === 'true') {
$actions .= ' <a href="index.php?' . api_get_cidreq() . '&action=attendance_delete&attendance_id=' . $attendance[0] . $param_gradebook . '">' .
$actions .= ' <a href="index.php?' . api_get_cidreq() . '&action=attendance_delete&attendance_id=' . $attendance[0].'">' .
Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL) . '</a>';
}
}
@ -237,10 +232,12 @@ class Attendance
} else {
$message_alert = get_lang('UnlockMessageInformation');
}
$actions .= '&nbsp;<a onclick="javascript:if(!confirm(\''.$message_alert.'\')) return false;" href="index.php?'.api_get_cidreq().'&action=lock_attendance&attendance_id='.$attendance[0].$param_gradebook.'">'.Display::return_icon('unlock.png', get_lang('LockAttendance')).'</a>';
$actions .= '&nbsp;<a onclick="javascript:if(!confirm(\''.$message_alert.'\')) return false;" href="index.php?'.api_get_cidreq().'&action=lock_attendance&attendance_id='.$attendance[0].'">'.
Display::return_icon('unlock.png', get_lang('LockAttendance')).'</a>';
} else {
if (api_is_platform_admin()) {
$actions .= '&nbsp;<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToUnlockTheAttendance').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=unlock_attendance&attendance_id='.$attendance[0].$param_gradebook.'">'.Display::return_icon('locked.png', get_lang('UnlockAttendance')).'</a>';
$actions .= '&nbsp;<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToUnlockTheAttendance').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=unlock_attendance&attendance_id='.$attendance[0].'">'.
Display::return_icon('locked.png', get_lang('UnlockAttendance')).'</a>';
} else {
$actions .= '&nbsp;'.Display::return_icon('locked_na.png', get_lang('LockedAttendance'));
}

@ -329,8 +329,8 @@ class Database
try {
$result = $connection->executeQuery($query);
} catch (Exception $e) {
// error_log($e->getMessage());
api_not_allowed(false, get_lang('GeneralError'));
//error_log($e->getMessage());
exit;
}
}

@ -87,62 +87,60 @@ class Thematic
LIMIT $from,$number_of_items ";
$res = Database::query($sql);
$thematics = array ();
$param_gradebook = '';
if (isset($_SESSION['gradebook'])) {
$param_gradebook = '&gradebook='.$_SESSION['gradebook'];
}
$thematics = array();
$user_info = api_get_user_info(api_get_user_id());
while ($thematic = Database::fetch_row($res)) {
$session_star = '';
if (api_get_session_id() == $thematic[3]) {
$session_star = api_get_session_image(api_get_session_id(), $user_info['status']);
}
$thematic[1] = '<a href="index.php?'.api_get_cidreq().'&action=thematic_details&thematic_id='.$thematic[0].$param_gradebook.'">'.Security::remove_XSS($thematic[1], STUDENT).$session_star.'</a>';
$thematic[1] = '<a href="index.php?'.api_get_cidreq().'&action=thematic_details&thematic_id='.$thematic[0].'">'.
Security::remove_XSS($thematic[1], STUDENT).$session_star.'</a>';
if (api_is_allowed_to_edit(null, true)) {
$actions = '';
if (api_get_session_id()) {
if (api_get_session_id() == $thematic[3]) {
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic[0].$param_gradebook.'">'.
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic[0].'">'.
Display::return_icon('lesson_plan.png',get_lang('ThematicPlan'),'',ICON_SIZE_SMALL).'</a>&nbsp;';
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic[0].$param_gradebook.'">'.
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic[0].'">'.
Display::return_icon('lesson_plan_calendar.png',get_lang('ThematicAdvance'),'',ICON_SIZE_SMALL).'</a>&nbsp;';
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_edit&thematic_id='.$thematic[0].$param_gradebook.'">'.
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_edit&thematic_id='.$thematic[0].'">'.
Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>';
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='.$thematic[0].$param_gradebook.'">'.
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='.$thematic[0].'">'.
Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>';
} else {
$actions .= Display::return_icon('lesson_plan_na.png',get_lang('ThematicPlan'),'',ICON_SIZE_SMALL).'&nbsp;';
$actions .= Display::return_icon('lesson_plan_calendar_na.png',get_lang('ThematicAdvance'),'',ICON_SIZE_SMALL).'&nbsp;';
$actions .= Display::return_icon('edit_na.png',get_lang('Edit'),'',ICON_SIZE_SMALL);
$actions .= Display::return_icon('delete_na.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'&nbsp;';
$actions .= Display::url(Display::return_icon('cd.gif', get_lang('Copy')), 'index.php?'.api_get_cidreq().'&action=thematic_copy&thematic_id='.$thematic[0].$param_gradebook);
$actions .= Display::url(
Display::return_icon('cd.gif', get_lang('Copy')),
'index.php?'.api_get_cidreq().'&action=thematic_copy&thematic_id='.$thematic[0]
);
}
} else {
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic[0].$param_gradebook.'">'.
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic[0].'">'.
Display::return_icon('lesson_plan.png',get_lang('ThematicPlan'),'',ICON_SIZE_SMALL).'</a>&nbsp;';
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic[0].$param_gradebook.'">'.
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic[0].'">'.
Display::return_icon('lesson_plan_calendar.png',get_lang('ThematicAdvance'),'',ICON_SIZE_SMALL).'</a>&nbsp;';
if ($thematic[2] > 1) {
$actions .= '<a href="'.api_get_self().'?action=moveup&'.api_get_cidreq().'&thematic_id='.$thematic[0].$param_gradebook.'">'.
$actions .= '<a href="'.api_get_self().'?action=moveup&'.api_get_cidreq().'&thematic_id='.$thematic[0].'">'.
Display::return_icon('up.png', get_lang('Up'),'',ICON_SIZE_SMALL).'</a>';
} else {
$actions .= Display::return_icon('up_na.png','&nbsp;','',ICON_SIZE_SMALL);
}
if ($thematic[2] < self::get_max_thematic_item()) {
$actions .= '<a href="'.api_get_self().'?action=movedown&a'.api_get_cidreq().'&thematic_id='.$thematic[0].$param_gradebook.'">'.
$actions .= '<a href="'.api_get_self().'?action=movedown&a'.api_get_cidreq().'&thematic_id='.$thematic[0].'">'.
Display::return_icon('down.png',get_lang('Down'),'',ICON_SIZE_SMALL).'</a>';
} else {
$actions .= Display::return_icon('down_na.png','&nbsp;','',ICON_SIZE_SMALL);
}
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_edit&thematic_id='.$thematic[0].$param_gradebook.'">'.
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_edit&thematic_id='.$thematic[0].'">'.
Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>';
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='.$thematic[0].$param_gradebook.'">'.
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='.$thematic[0].'">'.
Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>';
}
$thematics[] = array($thematic[0], $thematic[1], $actions);

@ -181,11 +181,6 @@ class BlockDaily extends Block
$attendance = array();
$attendances = array();
$param_gradebook = '';
if (isset($_SESSION['gradebook'])) {
$param_gradebook = '&gradebook=' . $_SESSION['gradebook'];
}
while ($row = Database::fetch_array($rs, 'ASSOC')) {
$attendance['done'] = $row['attendance_qualify_max'];
$attendance['id'] = $row['id'];
@ -193,7 +188,7 @@ class BlockDaily extends Block
$attendance['course_code'] = $course_info['code'];
if ($attendance['done'] != '0') {
$attendances[] = '<a href="' . api_get_path(WEB_PATH).'main/attendance/index.php?cidReq=' . $attendance['course_code'] . '&action=attendance_sheet_print&attendance_id=' . $attendance['id'] . $param_gradebook . '">' . Display::return_icon('printmgr.gif', get_lang('Print')).'</a>';
$attendances[] = '<a href="' . api_get_path(WEB_PATH).'main/attendance/index.php?cidReq=' . $attendance['course_code'] . '&action=attendance_sheet_print&attendance_id=' . $attendance['id']. '">' . Display::return_icon('printmgr.gif', get_lang('Print')).'</a>';
} else {
$attendances[] = get_lang("NotAvailable");
}
@ -243,7 +238,7 @@ class BlockDaily extends Block
if (count($eval) > 0) {
$i = 0;
foreach ($eval as $item) {
$score .= '<a href="' . api_get_path(WEB_PATH).'main/gradebook/gradebook_view_result.php?export=pdf&cat_code=' . $cat[0]->get_id() . '&official_code=' . $cat[0]->get_course_code() . '&selecteval=' . $item->get_id().$param_gradebook . '">' . $item->get_name() . '</a>';
$score .= '<a href="' . api_get_path(WEB_PATH).'main/gradebook/gradebook_view_result.php?export=pdf&cat_code=' . $cat[0]->get_id() . '&official_code=' . $cat[0]->get_course_code() . '&selecteval=' . $item->get_id(). '">' . $item->get_name() . '</a>';
if (count($eval) - 1 != $i) {
$score .= ', ';
}

@ -30,8 +30,6 @@ class AnnouncementRelGroup
*/
private $announcementId;
/**
* Set groupId
*

@ -21,8 +21,7 @@ use ChamiloSession as Session;
$cidReset = true;
// For HTML editor repository.
if (isset($_SESSION['this_section']))
unset($_SESSION['this_section']);
Session::erase('this_section');
/* Included libraries */
require_once './main/inc/global.inc.php';

Loading…
Cancel
Save