Update get_lang calls using full string

pull/3016/head
Julio Montoya 6 years ago
parent 823e18aa53
commit f537d60625
  1. 68
      main/announcements/announcements.php
  2. 10
      main/attendance/attendance_add.php
  3. 41
      main/attendance/attendance_calendar.php
  4. 10
      main/attendance/attendance_controller.php
  5. 10
      main/attendance/attendance_edit.php
  6. 10
      main/attendance/attendance_list.php
  7. 50
      main/attendance/attendance_sheet.php
  8. 2
      main/attendance/calendar_logins.php
  9. 18
      main/attendance/index.php

@ -29,7 +29,7 @@ $_course = api_get_course_info_by_id($courseId);
$group_id = api_get_group_id(); $group_id = api_get_group_id();
$current_course_tool = TOOL_ANNOUNCEMENT; $current_course_tool = TOOL_ANNOUNCEMENT;
$this_section = SECTION_COURSES; $this_section = SECTION_COURSES;
$nameTools = get_lang('ToolAnnouncement'); $nameTools = get_lang('Announcements');
$allowToEdit = ( $allowToEdit = (
api_is_allowed_to_edit(false, true) || api_is_allowed_to_edit(false, true) ||
@ -56,7 +56,7 @@ if (!empty($group_id)) {
]; ];
$interbreadcrumb[] = [ $interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(), 'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace').' '.$groupProperties['name'], 'name' => get_lang('Group area').' '.$groupProperties['name'],
]; ];
if ($allowToEdit === false) { if ($allowToEdit === false) {
@ -144,7 +144,7 @@ switch ($action) {
$thisAnnouncementOrderFound = true; $thisAnnouncementOrderFound = true;
} }
} }
Display::addFlash(Display::return_message(get_lang('AnnouncementMoved'))); Display::addFlash(Display::return_message(get_lang('The announcement has been moved')));
header('Location: '.$homeUrl); header('Location: '.$homeUrl);
exit; exit;
} }
@ -200,8 +200,8 @@ switch ($action) {
$columns = [ $columns = [
get_lang('Title'), get_lang('Title'),
get_lang('By'), get_lang('By'),
get_lang('LastUpdateDate'), get_lang('Latest update'),
get_lang('Actions'), get_lang('Detail'),
]; ];
// Column config // Column config
@ -288,14 +288,14 @@ switch ($action) {
$html .= Display::return_icon('valves.png', '', [], 64); $html .= Display::return_icon('valves.png', '', [], 64);
$html .= '<div class="controls">'; $html .= '<div class="controls">';
$html .= Display::url( $html .= Display::url(
get_lang('AddAnnouncement'), get_lang('Add an announcement'),
api_get_self()."?".api_get_cidreq()."&action=add", api_get_self()."?".api_get_cidreq()."&action=add",
['class' => 'btn btn-primary'] ['class' => 'btn btn-primary']
); );
$html .= '</div>'; $html .= '</div>';
$html .= '</div>'; $html .= '</div>';
} else { } else {
$html = Display::return_message(get_lang('NoAnnouncements'), 'warning'); $html = Display::return_message(get_lang('There are no announcements.'), 'warning');
} }
$content = $html; $content = $html;
} else { } else {
@ -319,7 +319,7 @@ switch ($action) {
if ($delete) { if ($delete) {
AnnouncementManager::delete_announcement($_course, $id); AnnouncementManager::delete_announcement($_course, $id);
Display::addFlash(Display::return_message(get_lang('AnnouncementDeleted'))); Display::addFlash(Display::return_message(get_lang('Announcement has been deleted')));
} }
header('Location: '.$homeUrl); header('Location: '.$homeUrl);
exit; exit;
@ -329,7 +329,7 @@ switch ($action) {
$allow = api_get_configuration_value('disable_delete_all_announcements'); $allow = api_get_configuration_value('disable_delete_all_announcements');
if ($allow === false) { if ($allow === false) {
AnnouncementManager::delete_all_announcements($_course); AnnouncementManager::delete_all_announcements($_course);
Display::addFlash(Display::return_message(get_lang('AnnouncementDeletedAll'))); Display::addFlash(Display::return_message(get_lang('Announcement has been deletedAll')));
} }
header('Location: '.$homeUrl); header('Location: '.$homeUrl);
exit; exit;
@ -365,7 +365,7 @@ switch ($action) {
$_course, $_course,
$_GET['id'] $_GET['id']
); );
Display::addFlash(Display::return_message(get_lang('VisibilityChanged'))); Display::addFlash(Display::return_message(get_lang('The visibility has been changed.')));
header('Location: '.$homeUrl); header('Location: '.$homeUrl);
exit; exit;
} }
@ -398,9 +398,9 @@ switch ($action) {
['enctype' => 'multipart/form-data'] ['enctype' => 'multipart/form-data']
); );
$form_name = get_lang('ModifyAnnouncement'); $form_name = get_lang('Edit announcement');
if (empty($id)) { if (empty($id)) {
$form_name = get_lang('AddAnnouncement'); $form_name = get_lang('Add an announcement');
} }
$interbreadcrumb[] = [ $interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'announcements/announcements.php?'.api_get_cidreq(), 'url' => api_get_path(WEB_CODE_PATH).'announcements/announcements.php?'.api_get_cidreq(),
@ -411,7 +411,7 @@ switch ($action) {
$form->addHeader($form_name); $form->addHeader($form_name);
$form->addButtonAdvancedSettings( $form->addButtonAdvancedSettings(
'choose_recipients', 'choose_recipients',
[get_lang('ChooseRecipients')] [get_lang('Choose recipients')]
); );
$form->addHtml('<div id="choose_recipients_options" style="display:none;">'); $form->addHtml('<div id="choose_recipients_options" style="display:none;">');
@ -420,12 +420,12 @@ switch ($action) {
if (isset($_GET['remind_inactive'])) { if (isset($_GET['remind_inactive'])) {
$email_ann = '1'; $email_ann = '1';
$content_to_modify = sprintf( $content_to_modify = sprintf(
get_lang('RemindInactiveLearnersMailContent'), get_lang('Dear user,<br /><br /> you are not active on %s since more than %s days.'),
api_get_setting('siteName'), api_get_setting('siteName'),
7 7
); );
$title_to_modify = sprintf( $title_to_modify = sprintf(
get_lang('RemindInactiveLearnersMailSubject'), get_lang('Inactivity on %s'),
api_get_setting('siteName') api_get_setting('siteName')
); );
} elseif (isset($_GET['remindallinactives']) && $_GET['remindallinactives'] === 'true') { } elseif (isset($_GET['remindallinactives']) && $_GET['remindallinactives'] === 'true') {
@ -455,12 +455,12 @@ switch ($action) {
$email_ann = '1'; $email_ann = '1';
// setting the variables for the form elements: the title of the email // setting the variables for the form elements: the title of the email
$title_to_modify = sprintf( $title_to_modify = sprintf(
get_lang('RemindInactiveLearnersMailSubject'), get_lang('Inactivity on %s'),
api_get_setting('siteName') api_get_setting('siteName')
); );
// setting the variables for the form elements: the message of the email // setting the variables for the form elements: the message of the email
$content_to_modify = sprintf( $content_to_modify = sprintf(
get_lang('RemindInactiveLearnersMailContent'), get_lang('Dear user,<br /><br /> you are not active on %s since more than %s days.'),
api_get_setting('siteName'), api_get_setting('siteName'),
$since $since
); );
@ -468,7 +468,7 @@ switch ($action) {
// then we have a different subject and content for the announcement // then we have a different subject and content for the announcement
if ($_GET['since'] === 'never') { if ($_GET['since'] === 'never') {
$title_to_modify = sprintf( $title_to_modify = sprintf(
get_lang('RemindInactiveLearnersMailSubject'), get_lang('Inactivity on %s'),
api_get_setting('siteName') api_get_setting('siteName')
); );
$content_to_modify = get_lang( $content_to_modify = get_lang(
@ -482,7 +482,7 @@ switch ($action) {
} }
$form->addHtml('</div>'); $form->addHtml('</div>');
$form->addCheckBox('email_ann', '', get_lang('EmailOption')); $form->addCheckBox('email_ann', '', get_lang('Send this announcement by email to selected groups/users'));
if (!isset($announcement_to_modify)) { if (!isset($announcement_to_modify)) {
$announcement_to_modify = ''; $announcement_to_modify = '';
@ -501,7 +501,7 @@ switch ($action) {
$separated = CourseManager::separateUsersGroups($to); $separated = CourseManager::separateUsersGroups($to);
if (isset($separated['groups']) && count($separated['groups']) > 1) { if (isset($separated['groups']) && count($separated['groups']) > 1) {
$form->freeze(); $form->freeze();
Display::addFlash(Display::return_message(get_lang('LockByTeacher'))); Display::addFlash(Display::return_message(get_lang('Disabled by trainer')));
$showSubmitButton = false; $showSubmitButton = false;
} }
} }
@ -546,7 +546,7 @@ switch ($action) {
resultToString += '&nbsp;' + value; resultToString += '&nbsp;' + value;
}); });
$('#announcement_preview_result').html('' + $('#announcement_preview_result').html('' +
'".addslashes(get_lang('AnnouncementWillBeSentTo'))."<br/>' + resultToString '".addslashes(get_lang('Announcement will be sent to'))."<br/>' + resultToString
); );
$('#announcement_preview_result').show(); $('#announcement_preview_result').show();
$('#send_button').show(); $('#send_button').show();
@ -579,10 +579,10 @@ switch ($action) {
$form->addElement( $form->addElement(
'text', 'text',
'title', 'title',
get_lang('EmailTitle'), get_lang('Subject'),
['onkeypress' => 'return event.keyCode != 13;'] ['onkeypress' => 'return event.keyCode != 13;']
); );
$form->addRule('title', get_lang('ThisFieldIsRequired'), 'required'); $form->addRule('title', get_lang('Required field'), 'required');
$form->addElement('hidden', 'id'); $form->addElement('hidden', 'id');
$htmlTags = ''; $htmlTags = '';
$tags = AnnouncementManager::getTags(); $tags = AnnouncementManager::getTags();
@ -600,12 +600,12 @@ switch ($action) {
false, false,
['ToolbarSet' => 'Announcements'] ['ToolbarSet' => 'Announcements']
); );
$form->addElement('file', 'user_upload', get_lang('AddAnAttachment')); $form->addElement('file', 'user_upload', get_lang('Add attachment'));
$form->addElement('textarea', 'file_comment', get_lang('FileComment')); $form->addElement('textarea', 'file_comment', get_lang('File comment'));
$form->addHidden('sec_token', $token); $form->addHidden('sec_token', $token);
if (empty($sessionId)) { if (empty($sessionId)) {
$form->addCheckBox('send_to_users_in_session', null, get_lang('SendToUsersInSessions')); $form->addCheckBox('send_to_users_in_session', null, get_lang('Send to users in all sessions of this course'));
} }
$config = api_get_configuration_value('announcement.hide_send_to_hrm_users'); $config = api_get_configuration_value('announcement.hide_send_to_hrm_users');
@ -614,12 +614,12 @@ switch ($action) {
$form->addCheckBox( $form->addCheckBox(
'send_to_hrm_users', 'send_to_hrm_users',
null, null,
get_lang('SendAnnouncementCopyToDRH'), get_lang('Send a copy to HR managers of selected students'),
['id' => 'send_to_hrm_users'] ['id' => 'send_to_hrm_users']
); );
} }
$form->addCheckBox('send_me_a_copy_by_email', null, get_lang('SendAnnouncementCopyToMyself')); $form->addCheckBox('send_me_a_copy_by_email', null, get_lang('Send a copy by email to myself.'));
$defaults['send_me_a_copy_by_email'] = true; $defaults['send_me_a_copy_by_email'] = true;
if ($showSubmitButton) { if ($showSubmitButton) {
@ -631,7 +631,7 @@ switch ($action) {
).'<div id="announcement_preview_result" style="display:none"></div>' ).'<div id="announcement_preview_result" style="display:none"></div>'
); );
$form->addHtml('<div id="send_button" style="display:none">'); $form->addHtml('<div id="send_button" style="display:none">');
$form->addButtonSave(get_lang('ButtonPublishAnnouncement')); $form->addButtonSave(get_lang('Send announcement'));
$form->addHtml('</div>'); $form->addHtml('</div>');
} }
$form->setDefaults($defaults); $form->setDefaults($defaults);
@ -677,7 +677,7 @@ switch ($action) {
Display::addFlash( Display::addFlash(
Display::return_message( Display::return_message(
get_lang('AnnouncementModified'), get_lang('Announcement has been modified'),
'success' 'success'
) )
); );
@ -718,7 +718,7 @@ switch ($action) {
if ($insert_id) { if ($insert_id) {
Display::addFlash( Display::addFlash(
Display::return_message( Display::return_message(
get_lang('AnnouncementAdded'), get_lang('Announcement has been added'),
'success' 'success'
) )
); );
@ -775,7 +775,7 @@ if (($allowToEdit || $allowStudentInGroupToSend) && (empty($_GET['origin']) || $
"</a>"; "</a>";
} else { } else {
$actionsLeft .= "<a href='".api_get_self()."?".api_get_cidreq()."&action=add'>". $actionsLeft .= "<a href='".api_get_self()."?".api_get_cidreq()."&action=add'>".
Display::return_icon('new_announce.png', get_lang('AddAnnouncement'), '', ICON_SIZE_MEDIUM). Display::return_icon('new_announce.png', get_lang('Add an announcement'), '', ICON_SIZE_MEDIUM).
"</a>"; "</a>";
} }
$show_actions = true; $show_actions = true;
@ -792,10 +792,10 @@ if ($allowToEdit && api_get_group_id() == 0) {
if (!isset($_GET['action']) || if (!isset($_GET['action']) ||
isset($_GET['action']) && $_GET['action'] == 'list' isset($_GET['action']) && $_GET['action'] == 'list'
) { ) {
$actionsLeft .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&action=delete_all\" onclick=\"javascript:if(!confirm('".get_lang("ConfirmYourChoice")."')) return false;\">". $actionsLeft .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&action=delete_all\" onclick=\"javascript:if(!confirm('".get_lang("Please confirm your choice")."')) return false;\">".
Display::return_icon( Display::return_icon(
'delete_announce.png', 'delete_announce.png',
get_lang('AnnouncementDeleteAll'), get_lang('Clear list of announcements'),
'', '',
ICON_SIZE_MEDIUM ICON_SIZE_MEDIUM
)."</a>"; )."</a>";

@ -14,7 +14,7 @@ api_protect_course_script(true);
// error messages // error messages
if (isset($error)) { if (isset($error)) {
echo Display::return_message(get_lang('FormHasErrorsPleaseComplete'), 'error', false); echo Display::return_message(get_lang('The form contains incorrect or incomplete data. Please check your input.'), 'error', false);
} }
if (!isset($error)) { if (!isset($error)) {
@ -26,7 +26,7 @@ $form = new FormValidator(
'POST', 'POST',
'index.php?action=attendance_add&'.api_get_cidreq() 'index.php?action=attendance_add&'.api_get_cidreq()
); );
$form->addElement('header', '', get_lang('CreateANewAttendance')); $form->addElement('header', '', get_lang('Create a new attendance list'));
$form->addElement('hidden', 'sec_token', $token); $form->addElement('hidden', 'sec_token', $token);
$form->addText('title', get_lang('Title'), true); $form->addText('title', get_lang('Title'), true);
@ -50,19 +50,19 @@ if ((api_get_session_id() != 0 && Gradebook::is_active()) || api_get_session_id(
'checkbox', 'checkbox',
'attendance_qualify_gradebook', 'attendance_qualify_gradebook',
'', '',
get_lang('QualifyAttendanceGradebook'), get_lang('Grade the attendance list in the assessment tool'),
'onclick="javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"' 'onclick="javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"'
); );
$form->addElement('html', '<div id="options_field" style="display:none">'); $form->addElement('html', '<div id="options_field" style="display:none">');
GradebookUtils::load_gradebook_select_in_tool($form); GradebookUtils::load_gradebook_select_in_tool($form);
$form->addElement('text', 'attendance_qualify_title', get_lang('TitleColumnGradebook')); $form->addElement('text', 'attendance_qualify_title', get_lang('Column header in Competences Report'));
$form->applyFilter('attendance_qualify_title', 'html_filter'); $form->applyFilter('attendance_qualify_title', 'html_filter');
$form->addElement( $form->addElement(
'text', 'text',
'attendance_weight', 'attendance_weight',
get_lang('QualifyWeight'), get_lang('Weight in Report'),
'value="0.00" Style="width:40px" onfocus="javascript: this.select();"' 'value="0.00" Style="width:40px" onfocus="javascript: this.select();"'
); );
$form->applyFilter('attendance_weight', 'html_filter'); $form->applyFilter('attendance_weight', 'html_filter');

@ -6,7 +6,6 @@
* *
* @author Christian Fasanando <christian1827@gmail.com> * @author Christian Fasanando <christian1827@gmail.com>
* *
* @package chamilo.attendance
*/ */
// protect a course script // protect a course script
@ -16,21 +15,21 @@ if (!$is_locked_attendance || api_is_platform_admin()) {
echo '<div class="actions">'; echo '<div class="actions">';
if ($action == 'calendar_add') { if ($action == 'calendar_add') {
echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_list&attendance_id='.$attendance_id.'">'. 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>'; Display::return_icon('back.png', get_lang('Attendance calendar'), '', ICON_SIZE_MEDIUM).'</a>';
} else { } else {
echo '<a href="index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance_id.'">'. 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>'; Display::return_icon('back.png', get_lang('Attendance sheet'), '', ICON_SIZE_MEDIUM).'</a>';
if (api_is_allowed_to_edit()) { if (api_is_allowed_to_edit()) {
echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_add&attendance_id='.$attendance_id.'">'. 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>'; Display::return_icon('add.png', get_lang('Add a date and time'), '', 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.'">'. echo '<a onclick="javascript:if(!confirm(\''.get_lang('Are you sure you want to delete all dates?').'\')) 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>'; Display::return_icon('clean.png', get_lang('Clean the calendar of all lists'), '', ICON_SIZE_MEDIUM).'</a>';
} }
} }
echo '</div>'; echo '</div>';
} }
$message_information = get_lang('AttendanceCalendarDescription'); $message_information = get_lang('Attendance calendarDescription');
if (!empty($message_information)) { if (!empty($message_information)) {
$message = '<strong>'.get_lang('Information').'</strong><br />'; $message = '<strong>'.get_lang('Information').'</strong><br />';
$message .= $message_information; $message .= $message_information;
@ -38,12 +37,12 @@ if (!empty($message_information)) {
} }
if (isset($error_repeat_date) && $error_repeat_date) { if (isset($error_repeat_date) && $error_repeat_date) {
$message = get_lang('EndDateMustBeMoreThanStartDate'); $message = get_lang('End date must be more than the start date');
echo Display::return_message($message, 'error', false); echo Display::return_message($message, 'error', false);
} }
if (isset($error_checkdate) && $error_checkdate) { if (isset($error_checkdate) && $error_checkdate) {
$message = get_lang('InvalidDate'); $message = get_lang('Invalid date');
echo Display::return_message($message, 'error', false); echo Display::return_message($message, 'error', false);
} }
@ -61,10 +60,10 @@ if (isset($action) && $action == 'calendar_add') {
'index.php?action=calendar_add&attendance_id='.$attendance_id.'&'.api_get_cidreq(), 'index.php?action=calendar_add&attendance_id='.$attendance_id.'&'.api_get_cidreq(),
'' ''
); );
$form->addElement('header', get_lang('AddADateTime')); $form->addElement('header', get_lang('Add a date time'));
$form->addDateTimePicker( $form->addDateTimePicker(
'date_time', 'date_time',
[get_lang('StartDate')], [get_lang('Start Date')],
['id' => 'date_time'] ['id' => 'date_time']
); );
@ -74,7 +73,7 @@ if (isset($action) && $action == 'calendar_add') {
'checkbox', 'checkbox',
'repeat', 'repeat',
null, null,
get_lang('RepeatDate'), get_lang('Repeat date'),
[ [
'onclick' => "javascript: if(this.checked){document.getElementById('repeat-date-attendance').style.display='block';}else{document.getElementById('repeat-date-attendance').style.display='none';}", 'onclick' => "javascript: if(this.checked){document.getElementById('repeat-date-attendance').style.display='block';}else{document.getElementById('repeat-date-attendance').style.display='none';}",
] ]
@ -89,16 +88,16 @@ if (isset($action) && $action == 'calendar_add') {
} }
$a_repeat_type = [ $a_repeat_type = [
'daily' => get_lang('RepeatDaily'), 'daily' => get_lang('Daily'),
'weekly' => get_lang('RepeatWeekly'), 'weekly' => get_lang('Weekly'),
'monthlyByDate' => get_lang('RepeatMonthlyByDate'), 'monthlyByDate' => get_lang('Monthly, by date'),
]; ];
$form->addElement('select', 'repeat_type', get_lang('RepeatType'), $a_repeat_type); $form->addElement('select', 'repeat_type', get_lang('Repeat type'), $a_repeat_type);
$form->addElement( $form->addElement(
'date_picker', 'date_picker',
'end_date_time', 'end_date_time',
get_lang('RepeatEnd'), get_lang('Repeat end date'),
['form_name' => 'attendance_calendar_add'] ['form_name' => 'attendance_calendar_add']
); );
$defaults['end_date_time'] = date('Y-m-d'); $defaults['end_date_time'] = date('Y-m-d');
@ -120,7 +119,7 @@ if (isset($action) && $action == 'calendar_add') {
$groupIdList[$group['id']] = $group['name']; $groupIdList[$group['id']] = $group['name'];
} }
echo Display::page_subheader(get_lang('CalendarList')); echo Display::page_subheader(get_lang('Calendar list of attendances'));
echo '<ul class="list-group">'; echo '<ul class="list-group">';
if (!empty($attendance_calendar)) { if (!empty($attendance_calendar)) {
foreach ($attendance_calendar as $calendar) { foreach ($attendance_calendar as $calendar) {
@ -151,7 +150,7 @@ if (isset($action) && $action == 'calendar_add') {
} else { } else {
echo Display::return_icon( echo Display::return_icon(
'lp_calendar_event.png', 'lp_calendar_event.png',
get_lang('DateTime'), get_lang('Date DateTime time'),
null, null,
ICON_SIZE_MEDIUM ICON_SIZE_MEDIUM
).' '. ).' '.
@ -173,7 +172,7 @@ if (isset($action) && $action == 'calendar_add') {
echo '<div class="pull-right">'; 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.'">'. 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'), ['style' => 'vertical-align:middle'], ICON_SIZE_SMALL).'</a>&nbsp;'; Display::return_icon('edit.png', get_lang('Edit'), ['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().'&action=calendar_delete&calendar_id='.intval($calendar['id']).'&attendance_id='.$attendance_id.'">'. echo '<a onclick="javascript:if(!confirm(\''.get_lang('Are you sure you want to delete').'\')) 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'), ['style' => 'vertical-align:middle'], ICON_SIZE_SMALL).'</a>'; Display::return_icon('delete.png', get_lang('Delete'), ['style' => 'vertical-align:middle'], ICON_SIZE_SMALL).'</a>';
echo '</div>'; echo '</div>';
} }
@ -182,7 +181,7 @@ if (isset($action) && $action == 'calendar_add') {
echo '</li>'; echo '</li>';
} }
} else { } else {
echo Display::return_message(get_lang('ThereAreNoRegisteredDatetimeYet'), 'warning'); echo Display::return_message(get_lang('There is no date/time registered yet'), 'warning');
} }
echo '</ul>'; echo '</ul>';
} }

@ -127,7 +127,7 @@ class AttendanceController
$form = new FormValidator('attendance_edit'); $form = new FormValidator('attendance_edit');
Skill::saveSkills($form, ITEM_TYPE_ATTENDANCE, $attendance_id); Skill::saveSkills($form, ITEM_TYPE_ATTENDANCE, $attendance_id);
Display::addFlash(Display::return_message(get_lang('Updated'))); Display::addFlash(Display::return_message(get_lang('Update successful')));
Security::clear_token(); Security::clear_token();
header('Location:index.php?action=attendance_list&'.api_get_cidreq()); header('Location:index.php?action=attendance_list&'.api_get_cidreq());
@ -597,9 +597,9 @@ class AttendanceController
foreach ($data_array['attendant_calendar'] as $class_day) { foreach ($data_array['attendant_calendar'] as $class_day) {
if ($class_day['done_attendance'] == 1) { if ($class_day['done_attendance'] == 1) {
if ($data_users_presence[$user['user_id']][$class_day['id']]['presence'] == 1) { if ($data_users_presence[$user['user_id']][$class_day['id']]['presence'] == 1) {
$result[$class_day['id']] = get_lang('UserAttendedSymbol'); $result[$class_day['id']] = get_lang('P');
} else { } else {
$result[$class_day['id']] = '<span style="color:red">'.get_lang('UserNotAttendedSymbol').'</span>'; $result[$class_day['id']] = '<span style="color:red">'.get_lang('NP').'</span>';
} }
} else { } else {
$result[$class_day['id']] = ' '; $result[$class_day['id']] = ' ';
@ -693,7 +693,7 @@ class AttendanceController
'post', 'post',
api_get_self().'?'.api_get_cidreq().'&action=calendar_logins' api_get_self().'?'.api_get_cidreq().'&action=calendar_logins'
); );
$form->addDateRangePicker('range', get_lang('DateRange')); $form->addDateRangePicker('range', get_lang('Date range'));
$form->addButton('submit', get_lang('Submit')); $form->addButton('submit', get_lang('Submit'));
if ($form->validate()) { if ($form->validate()) {
@ -715,7 +715,7 @@ class AttendanceController
if ($exportToPdf) { if ($exportToPdf) {
$result = $attendance->exportAttendanceLogin($startDate, $endDate); $result = $attendance->exportAttendanceLogin($startDate, $endDate);
if (empty($result)) { if (empty($result)) {
api_not_allowed(true, get_lang('NoDataAvailable')); api_not_allowed(true, get_lang('No data available'));
} }
} }
$table = $attendance->getAttendanceLoginTable($startDate, $endDate); $table = $attendance->getAttendanceLoginTable($startDate, $endDate);

@ -14,7 +14,7 @@ api_protect_course_script(true);
// error messages // error messages
if (isset($error)) { if (isset($error)) {
echo Display::return_message(get_lang('FormHasErrorsPleaseComplete'), 'error', false); echo Display::return_message(get_lang('The form contains incorrect or incomplete data. Please check your input.'), 'error', false);
} }
if (!isset($error)) { if (!isset($error)) {
@ -56,7 +56,7 @@ if (Gradebook::is_active()) {
'checkbox', 'checkbox',
'attendance_qualify_gradebook', 'attendance_qualify_gradebook',
'', '',
get_lang('QualifyAttendanceGradebook'), get_lang('Grade the attendance list in the assessment tool'),
[ [
'checked' => 'true', 'checked' => 'true',
'onclick' => 'javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}', 'onclick' => 'javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}',
@ -70,18 +70,18 @@ if (Gradebook::is_active()) {
'checkbox', 'checkbox',
'attendance_qualify_gradebook', 'attendance_qualify_gradebook',
'', '',
get_lang('QualifyAttendanceGradebook'), get_lang('Grade the attendance list in the assessment tool'),
'onclick="javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"' 'onclick="javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"'
); );
$form->addElement('html', '<div id="options_field" style="display:none">'); $form->addElement('html', '<div id="options_field" style="display:none">');
} }
GradebookUtils::load_gradebook_select_in_tool($form); GradebookUtils::load_gradebook_select_in_tool($form);
$form->addElement('text', 'attendance_qualify_title', get_lang('TitleColumnGradebook')); $form->addElement('text', 'attendance_qualify_title', get_lang('Column header in Competences Report'));
$form->applyFilter('attendance_qualify_title', 'html_filter'); $form->applyFilter('attendance_qualify_title', 'html_filter');
$form->addElement( $form->addElement(
'text', 'text',
'attendance_weight', 'attendance_weight',
get_lang('QualifyWeight'), get_lang('Weight in Report'),
'value="0.00" Style="width:40px" onfocus="javascript: this.select();"' 'value="0.00" Style="width:40px" onfocus="javascript: this.select();"'
); );
$form->applyFilter('attendance_weight', 'html_filter'); $form->applyFilter('attendance_weight', 'html_filter');

@ -15,7 +15,7 @@ api_protect_course_script(true);
if (api_is_allowed_to_edit(null, true)) { if (api_is_allowed_to_edit(null, true)) {
echo '<div class="actions">'; echo '<div class="actions">';
echo '<a href="index.php?'.api_get_cidreq().'&action=attendance_add">'. echo '<a href="index.php?'.api_get_cidreq().'&action=attendance_add">'.
Display::return_icon('new_attendance_list.png', get_lang('CreateANewAttendance'), '', ICON_SIZE_MEDIUM).'</a>'; Display::return_icon('new_attendance_list.png', get_lang('Create a new attendance list'), '', ICON_SIZE_MEDIUM).'</a>';
echo '</div>'; echo '</div>';
} }
$attendance = new Attendance(); $attendance = new Attendance();
@ -39,15 +39,15 @@ $table->set_header(2, get_lang('Description'), true);
$table->set_header(3, get_lang('CountDoneAttendance'), true, ['style' => 'width:90px;']); $table->set_header(3, get_lang('CountDoneAttendance'), true, ['style' => 'width:90px;']);
if (api_is_allowed_to_edit(null, true)) { if (api_is_allowed_to_edit(null, true)) {
$table->set_header(4, get_lang('Actions'), false, ['style' => 'text-align:center']); $table->set_header(4, get_lang('Detail'), false, ['style' => 'text-align:center']);
$actions = [ $actions = [
'attendance_set_invisible_select' => get_lang('SetInvisible'), 'attendance_set_invisible_select' => get_lang('Set invisible'),
'attendance_set_visible_select' => get_lang('SetVisible'), 'attendance_set_visible_select' => get_lang('Set visible'),
]; ];
$allow = api_get_setting('allow_delete_attendance'); $allow = api_get_setting('allow_delete_attendance');
if ($allow === 'true') { if ($allow === 'true') {
$actions['attendance_delete_select'] = get_lang('DeleteAllSelectedAttendances'); $actions['attendance_delete_select'] = get_lang('Delete all selected attendances');
} }
$table->set_form_actions($actions); $table->set_form_actions($actions);
} }

@ -35,8 +35,8 @@ if (api_is_allowed_to_edit(null, true) ||
$values = [ $values = [
'all' => get_lang('All'), 'all' => get_lang('All'),
'today' => get_lang('Today'), 'today' => get_lang('Today'),
'all_done' => get_lang('AllDone'), 'all_done' => get_lang('All done'),
'all_not_done' => get_lang('AllNotDone'), 'all_not_done' => get_lang('All not done'),
]; ];
$today = api_convert_and_format_date(null, DATE_FORMAT_SHORT); $today = api_convert_and_format_date(null, DATE_FORMAT_SHORT);
$exists_attendance_today = false; $exists_attendance_today = false;
@ -67,7 +67,7 @@ if (api_is_allowed_to_edit(null, true) ||
if (!$exists_attendance_today) { if (!$exists_attendance_today) {
echo Display::return_message( echo Display::return_message(
get_lang('ThereIsNoClassScheduledTodayTryPickingAnotherDay'), get_lang('There is no class scheduled today, try picking another day or add your attendance entry yourself using the action icons.'),
'warning' 'warning'
); );
} }
@ -109,16 +109,16 @@ if (api_is_allowed_to_edit(null, true) ||
if (!$is_locked_attendance || api_is_platform_admin()) { if (!$is_locked_attendance || api_is_platform_admin()) {
$actionsLeft = '<a style="float:left;" href="index.php?'.api_get_cidreq().'&action=calendar_list&attendance_id='.$attendance_id.'">'. $actionsLeft = '<a style="float:left;" href="index.php?'.api_get_cidreq().'&action=calendar_list&attendance_id='.$attendance_id.'">'.
Display::return_icon('attendance_calendar.png', get_lang('AttendanceCalendar'), '', ICON_SIZE_MEDIUM).'</a>'; Display::return_icon('attendance_calendar.png', get_lang('Attendance calendar'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a id="pdf_export" style="float:left;" href="index.php?'.api_get_cidreq().'&action=attendance_sheet_export_to_pdf&attendance_id='.$attendance_id.'&filter='.$default_filter.'&group_id='.$groupId.'">'. $actionsLeft .= '<a id="pdf_export" style="float:left;" href="index.php?'.api_get_cidreq().'&action=attendance_sheet_export_to_pdf&attendance_id='.$attendance_id.'&filter='.$default_filter.'&group_id='.$groupId.'">'.
Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM).'</a>'; Display::return_icon('pdf.png', get_lang('Export to PDF'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsRight = $form->returnForm(); $actionsRight = $form->returnForm();
$toolbar = Display::toolbarAction('toolbar-attendance', [$actionsLeft, $actionsRight]); $toolbar = Display::toolbarAction('toolbar-attendance', [$actionsLeft, $actionsRight]);
echo $toolbar; echo $toolbar;
} }
$message_information = get_lang('AttendanceSheetDescription'); $message_information = get_lang('The attendance sheets allow you to specify a list of dates in which you will report attendance to your courses');
if (!empty($message_information)) { if (!empty($message_information)) {
$message = '<strong>'.get_lang('Information').'</strong><br />'; $message = '<strong>'.get_lang('Information').'</strong><br />';
$message .= $message_information; $message .= $message_information;
@ -126,7 +126,7 @@ if (api_is_allowed_to_edit(null, true) ||
} }
if ($is_locked_attendance) { if ($is_locked_attendance) {
echo Display::return_message(get_lang('TheAttendanceSheetIsLocked'), 'warning', false); echo Display::return_message(get_lang('The attendance sheet is locked.'), 'warning', false);
} }
$param_filter = '&filter='.Security::remove_XSS($default_filter).'&group_id='.$groupId; $param_filter = '&filter='.Security::remove_XSS($default_filter).'&group_id='.$groupId;
@ -213,16 +213,16 @@ if (api_is_allowed_to_edit(null, true) ||
<tr class="tableFloatingHeader" style="position: absolute; top: 0px; left: 0px; visibility: hidden; margin:0px;padding:0px" > <tr class="tableFloatingHeader" style="position: absolute; top: 0px; left: 0px; visibility: hidden; margin:0px;padding:0px" >
<th width="10px"><?php echo '#'; ?></th> <th width="10px"><?php echo '#'; ?></th>
<th width="10px"><?php echo get_lang('Photo'); ?></th> <th width="10px"><?php echo get_lang('Photo'); ?></th>
<th width="100px"><?php echo get_lang('LastName'); ?></th> <th width="100px"><?php echo get_lang('Last name'); ?></th>
<th width="100px"><?php echo get_lang('FirstName'); ?></th> <th width="100px"><?php echo get_lang('First name'); ?></th>
<th width="100px"><?php echo get_lang('AttendancesFaults'); ?></th> <th width="100px"><?php echo get_lang('Not attended'); ?></th>
</tr> </tr>
<tr class="tableFloatingHeaderOriginal" > <tr class="tableFloatingHeaderOriginal" >
<th width="10px"><?php echo '#'; ?></th> <th width="10px"><?php echo '#'; ?></th>
<th width="10px"><?php echo get_lang('Photo'); ?></th> <th width="10px"><?php echo get_lang('Photo'); ?></th>
<th width="150px"><?php echo get_lang('LastName'); ?></th> <th width="150px"><?php echo get_lang('Last name'); ?></th>
<th width="140px"><?php echo get_lang('FirstName'); ?></th> <th width="140px"><?php echo get_lang('First name'); ?></th>
<th width="100px"><?php echo get_lang('AttendancesFaults'); ?></th> <th width="100px"><?php echo get_lang('Not attended'); ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -237,7 +237,7 @@ if (api_is_allowed_to_edit(null, true) ||
$class = 'row_even'; $class = 'row_even';
} }
$username = api_htmlentities( $username = api_htmlentities(
sprintf(get_lang('LoginX'), $data['username']), sprintf(get_lang('Login: %s'), $data['username']),
ENT_QUOTES ENT_QUOTES
); ?> ); ?>
<tr class="<?php echo $class; ?>"> <tr class="<?php echo $class; ?>">
@ -271,7 +271,7 @@ if (api_is_allowed_to_edit(null, true) ||
$img_lock = Display::return_icon( $img_lock = Display::return_icon(
'lock-closed.png', 'lock-closed.png',
get_lang('DateUnLock'), get_lang('Unlock date'),
['class' => 'img_lock', 'id' => 'datetime_column_'.$calendar['id']] ['class' => 'img_lock', 'id' => 'datetime_column_'.$calendar['id']]
); );
@ -283,7 +283,7 @@ if (api_is_allowed_to_edit(null, true) ||
if ($next_attendance_calendar_id == $calendar['id']) { if ($next_attendance_calendar_id == $calendar['id']) {
$input_hidden = '<input type="hidden" id="hidden_input_'.$calendar['id'].'" name="hidden_input[]" value="'.$calendar['id'].'" />'; $input_hidden = '<input type="hidden" id="hidden_input_'.$calendar['id'].'" name="hidden_input[]" value="'.$calendar['id'].'" />';
$disabled_check = ''; $disabled_check = '';
$img_lock = Display::return_icon('lock-closed.png', get_lang('DateLock'), ['class' => 'img_unlock', 'id' => 'datetime_column_'.$calendar['id']]); $img_lock = Display::return_icon('lock-closed.png', get_lang('Lock date'), ['class' => 'img_unlock', 'id' => 'datetime_column_'.$calendar['id']]);
} }
$result .= '<th>'; $result .= '<th>';
@ -300,7 +300,7 @@ if (api_is_allowed_to_edit(null, true) ||
} }
} else { } else {
$result = '<th width="2000px"><span><a href="index.php?'.api_get_cidreq().'&action=calendar_list&attendance_id='.$attendance_id.'">'; $result = '<th width="2000px"><span><a href="index.php?'.api_get_cidreq().'&action=calendar_list&attendance_id='.$attendance_id.'">';
$result .= Display::return_icon('attendance_calendar.png', get_lang('AttendanceCalendar'), '', ICON_SIZE_MEDIUM).' '.get_lang('GoToAttendanceCalendar').'</a></span></th>'; $result .= Display::return_icon('attendance_calendar.png', get_lang('Attendance calendar'), '', ICON_SIZE_MEDIUM).' '.get_lang('GoTo attendance calendar').'</a></span></th>';
} }
echo '<tr class="tableFloatingHeader row_odd" style="position: absolute; top: 0px; left: 0px; visibility: hidden; margin:0px;padding:0px">'; echo '<tr class="tableFloatingHeader row_odd" style="position: absolute; top: 0px; left: 0px; visibility: hidden; margin:0px;padding:0px">';
@ -361,7 +361,7 @@ if (api_is_allowed_to_edit(null, true) ||
echo '<input type="checkbox" name="check_presence['.$calendar['id'].'][]" value="'.$user['user_id'].'" '.$disabled.' '.$checked.' />'; echo '<input type="checkbox" name="check_presence['.$calendar['id'].'][]" value="'.$user['user_id'].'" '.$disabled.' '.$checked.' />';
echo '<span class="anchor_'.$calendar['id'].'"></span>'; echo '<span class="anchor_'.$calendar['id'].'"></span>';
} else { } else {
echo $presence ? Display::return_icon('checkbox_on.png', get_lang('Presence'), null, ICON_SIZE_TINY) : Display::return_icon('checkbox_off.png', get_lang('Presence'), null, ICON_SIZE_TINY); echo $presence ? Display::return_icon('checkbox_on.png', get_lang('Assistance'), null, ICON_SIZE_TINY) : Display::return_icon('checkbox_off.png', get_lang('Assistance'), null, ICON_SIZE_TINY);
} }
} else { } else {
switch ($presence) { switch ($presence) {
@ -369,10 +369,10 @@ if (api_is_allowed_to_edit(null, true) ||
echo Display::return_icon('accept.png', get_lang('Attended')); echo Display::return_icon('accept.png', get_lang('Attended'));
break; break;
case 0: case 0:
echo Display::return_icon('exclamation.png', get_lang('NotAttended')); echo Display::return_icon('exclamation.png', get_lang('Not attended'));
break; break;
case -1: case -1:
//echo Display::return_icon('warning.png',get_lang('NotAttended')); //echo Display::return_icon('warning.png',get_lang('Not attended'));
break; break;
} }
} }
@ -413,20 +413,20 @@ if (api_is_allowed_to_edit(null, true) ||
} else { } else {
echo Display::return_message( echo Display::return_message(
'<a href="'.api_get_path(WEB_CODE_PATH).'user/user.php?'.api_get_cidreq().'">'. '<a href="'.api_get_path(WEB_CODE_PATH).'user/user.php?'.api_get_cidreq().'">'.
get_lang('ThereAreNoRegisteredLearnersInsidetheCourse').'</a>', get_lang('There are no registered learners inside the course').'</a>',
'warning', 'warning',
false false
); );
} }
} else { } else {
echo Display::page_header(get_lang('AttendanceSheetReport')); echo Display::page_header(get_lang('Report of attendance sheets'));
// View for students?> // View for students?>
<?php if (!empty($users_presence)) { <?php if (!empty($users_presence)) {
?> ?>
<div> <div>
<table width="250px;"> <table width="250px;">
<tr> <tr>
<td><?php echo get_lang('ToAttend').': '; ?></td> <td><?php echo get_lang('To attend').': '; ?></td>
<td> <td>
<center><div class="attendance-faults-bar" style="background-color:<?php echo !empty($faults['color_bar']) ? $faults['color_bar'] : 'none'; ?>"> <center><div class="attendance-faults-bar" style="background-color:<?php echo !empty($faults['color_bar']) ? $faults['color_bar'] : 'none'; ?>">
<?php echo $faults['faults'].'/'.$faults['total'].' ('.$faults['faults_porcent'].'%)'; ?></div></center> <?php echo $faults['faults'].'/'.$faults['total'].' ('.$faults['faults_porcent'].'%)'; ?></div></center>
@ -453,7 +453,7 @@ if (api_is_allowed_to_edit(null, true) ||
} ?> } ?>
<tr class="<?php echo $class; ?>"> <tr class="<?php echo $class; ?>">
<td> <td>
<?php echo $presence['presence'] ? Display::return_icon('checkbox_on.png', get_lang('Presence'), null, ICON_SIZE_TINY) : Display::return_icon('checkbox_off.png', get_lang('Presence'), null, ICON_SIZE_TINY); ?> <?php echo $presence['presence'] ? Display::return_icon('checkbox_on.png', get_lang('Assistance'), null, ICON_SIZE_TINY) : Display::return_icon('checkbox_off.png', get_lang('Assistance'), null, ICON_SIZE_TINY); ?>
<?php echo "&nbsp; ".$presence['date_time']; ?> <?php echo "&nbsp; ".$presence['date_time']; ?>
</td> </td>
</tr> </tr>
@ -462,7 +462,7 @@ if (api_is_allowed_to_edit(null, true) ||
} else { } else {
?> ?>
<tr><td> <tr><td>
<center><?php echo get_lang('YouDoNotHaveDoneAttendances'); ?></center></td> <center><?php echo get_lang('You do not have attendances'); ?></center></td>
</tr> </tr>
<?php <?php
} ?> } ?>

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

@ -112,8 +112,8 @@ $(function() {
}); });
$(".checkboxes_col_"+calendar_id+" input:checkbox").attr("disabled",true); $(".checkboxes_col_"+calendar_id+" input:checkbox").attr("disabled",true);
$(this).attr("src","'.Display::returnIconPath('lock-closed.png').'"); $(this).attr("src","'.Display::returnIconPath('lock-closed.png').'");
$(this).attr("title","'.get_lang('DateUnLock').'"); $(this).attr("title","'.get_lang('Unlock date').'");
$(this).attr("alt","'.get_lang('DateUnLock').'"); $(this).attr("alt","'.get_lang('Unlock date').'");
$(this).attr("class","img_lock"); $(this).attr("class","img_lock");
$("#hidden_input_"+calendar_id).attr("value",""); $("#hidden_input_"+calendar_id).attr("value","");
$("#hidden_input_"+calendar_id).attr("disabled",true); $("#hidden_input_"+calendar_id).attr("disabled",true);
@ -151,8 +151,8 @@ $(function() {
$(".checkboxes_col_"+calendar_id+" input:checkbox").attr("disabled",false); $(".checkboxes_col_"+calendar_id+" input:checkbox").attr("disabled",false);
$(this).attr("src","'.Display::returnIconPath('lock-open.png').'"); $(this).attr("src","'.Display::returnIconPath('lock-open.png').'");
$(this).attr("title","'.get_lang('DateLock').'"); $(this).attr("title","'.get_lang('Lock date').'");
$(this).attr("alt","'.get_lang('DateLock').'"); $(this).attr("alt","'.get_lang('Lock date').'");
$(this).attr("class","img_unlock"); $(this).attr("class","img_unlock");
$("#hidden_input_"+calendar_id).attr("disabled",false); $("#hidden_input_"+calendar_id).attr("disabled",false);
$("#hidden_input_"+calendar_id).attr("value",calendar_id); $("#hidden_input_"+calendar_id).attr("value",calendar_id);
@ -200,15 +200,15 @@ if (api_is_drh() && isset($_GET['student_id'])) {
if (api_is_in_gradebook()) { if (api_is_in_gradebook()) {
$interbreadcrumb[] = [ $interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'gradebook/index.php?'.api_get_cidreq(), 'url' => api_get_path(WEB_CODE_PATH).'gradebook/index.php?'.api_get_cidreq(),
'name' => get_lang('ToolGradebook'), 'name' => get_lang('Assessments'),
]; ];
} }
$interbreadcrumb[] = [ $interbreadcrumb[] = [
'url' => 'index.php?'.api_get_cidreq().'&action=attendance_list&'.$student_param, 'url' => 'index.php?'.api_get_cidreq().'&action=attendance_list&'.$student_param,
'name' => get_lang('ToolAttendance'), 'name' => get_lang('Attendances'),
]; ];
if ($action == 'attendance_add') { if ($action == 'attendance_add') {
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('CreateANewAttendance')]; $interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Create a new attendance list')];
} }
if ($action == 'attendance_edit') { if ($action == 'attendance_edit') {
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Edit')]; $interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Edit')];
@ -223,14 +223,14 @@ if ($action == 'calendar_list' || $action == 'calendar_edit' || $action == 'cale
'url' => 'index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance_id, 'url' => 'index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance_id,
'name' => $attendance_data['name'], 'name' => $attendance_data['name'],
]; ];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('AttendanceCalendar')]; $interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Attendance calendar')];
} }
if ($action == 'calendar_add') { if ($action == 'calendar_add') {
$interbreadcrumb[] = [ $interbreadcrumb[] = [
'url' => 'index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance_id, 'url' => 'index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance_id,
'name' => $attendance_data['name'], 'name' => $attendance_data['name'],
]; ];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('AddDateAndTime')]; $interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Add a date and time')];
} }
$allowToEdit = api_is_allowed_to_edit(null, true); $allowToEdit = api_is_allowed_to_edit(null, true);

Loading…
Cancel
Save