Attendance - Add option to set duration in calendar - refs BT#20363

pull/4502/head
Christian 3 years ago
parent 8a0f8fdd3b
commit 4bc09b1712
  1. 4
      main/inc/lib/attendance.lib.php
  2. 4
      main/install/configuration.dist.php

@ -1964,6 +1964,10 @@ class Attendance
*/
public static function getAttendanceCalendarExtraFieldValue($variable, $calendarId)
{
if (true !== api_get_configuration_value('attendance_calendar_set_duration')) {
return false;
}
$extraFieldValues = new ExtraFieldValue('attendance_calendar');
$result = $extraFieldValues->get_values_by_handler_and_field_variable($calendarId, $variable);
if (!empty($result['value'])) {

@ -2321,6 +2321,10 @@ INSERT INTO `extra_field` (`extra_field_type`, `field_type`, `variable`, `displa
// Create a document extra field with field label "can_be_downloaded" of type "Checkbox options".
// $_configuration['documents_hide_download_icon'] = false;
// It adds option to define duration for a calendar in attendance sheet.
// Create an attendance calendar extra field with field label "duration" of type "text".
// $_configuration['attendance_calendar_set_duration'] = false;
// Enable comments in attendance sheet for users
// Require DB changes:
// ALTER TABLE c_attendance_sheet ADD comment longtext NULL;

Loading…
Cancel
Save