mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-17 03:59:28 +00:00
Create and implement "ClassScheduleCalendarSelector" in "ClassScheduleOverview" component
This commit is contained in:
@@ -49,7 +49,8 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
|
||||
// Loads phrases system
|
||||
$this->loadPhrases([
|
||||
'global'
|
||||
'global',
|
||||
'ui',
|
||||
]);
|
||||
|
||||
}
|
||||
@@ -60,6 +61,7 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
public function getAllClassTimeValidityPeriods()
|
||||
{
|
||||
$this->ClassTimeSlotValidityPeriodModel->addJoin('lehre.tbl_studienplan', 'lehre.tbl_studienplan.studienplan_id=lehre.tbl_unterrichtszeiten_gueltigkeit.studienplan_id', 'LEFT');
|
||||
$this->ClassTimeSlotValidityPeriodModel->addJoin('public.tbl_organisationseinheit', 'public.tbl_organisationseinheit.oe_kurzbz=lehre.tbl_unterrichtszeiten_gueltigkeit.oe_kurzbz', 'LEFT');
|
||||
$this->ClassTimeSlotValidityPeriodModel->addOrder('gueltig_von', 'DESC');
|
||||
$class_time_slot_validity_period_res = $this->ClassTimeSlotValidityPeriodModel->load();
|
||||
$class_time_slot_validity_period_res = $this->getDataOrTerminateWithError($class_time_slot_validity_period_res);
|
||||
@@ -68,6 +70,8 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
|
||||
public function getClassTimeValidityPeriod($classTimeSlotValidityPeriodId)
|
||||
{
|
||||
$this->ClassTimeSlotValidityPeriodModel->addSelect('lehre.tbl_unterrichtszeiten_gueltigkeit.*, public.tbl_organisationseinheit.oe_kurzbz as oe_kurzbz, lehre.tbl_studienplan.studienplan_id, lehre.tbl_studienplan.bezeichnung as studienplan_bezeichnung');
|
||||
$this->ClassTimeSlotValidityPeriodModel->addJoin('public.tbl_organisationseinheit', 'public.tbl_organisationseinheit.oe_kurzbz=lehre.tbl_unterrichtszeiten_gueltigkeit.oe_kurzbz', 'LEFT');
|
||||
$this->ClassTimeSlotValidityPeriodModel->addJoin('lehre.tbl_studienplan', 'lehre.tbl_studienplan.studienplan_id=lehre.tbl_unterrichtszeiten_gueltigkeit.studienplan_id', 'LEFT');
|
||||
$class_time_slot_validity_period_res = $this->ClassTimeSlotValidityPeriodModel->load($classTimeSlotValidityPeriodId);
|
||||
$class_time_slot_validity_period_res = $this->getDataOrTerminateWithError($class_time_slot_validity_period_res);
|
||||
@@ -76,10 +80,20 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
|
||||
public function createClassTimeSlotValidityPeriod()
|
||||
{
|
||||
$this->form_validation->set_rules('validityPeriodFrom', 'Validity Period From', 'required|is_valid_date[Y-m-d]');
|
||||
$this->form_validation->set_rules('validityPeriodFrom', 'Validity Period From', 'required|is_valid_date[Y-m-d]', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('ui', 'field_validityPeriodFrom')]),
|
||||
'is_valid_date' => $this->p->t('ui', 'error_fieldInvalidDate', ['field' => $this->p->t('ui', 'field_validityPeriodFrom')])
|
||||
]);
|
||||
$this->form_validation->set_rules('validityPeriodTo', 'Validity Period To', 'required|is_valid_date[Y-m-d]|callback_date_greater_equal[validityPeriodFrom]');
|
||||
$this->form_validation->set_rules('degreeProgramShortcode', 'Degree Program Shortcode', 'required|max_length[32]');
|
||||
$this->form_validation->set_rules('semester', 'Semester', 'required|is_natural_no_zero|less_than_equal_to[8]');
|
||||
$this->form_validation->set_rules('organizationalUnitShortCode', 'Organizational Unit Shortcode', 'required|max_length[32]', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('ui', 'field_organizationalUnit')]),
|
||||
'max_length' => $this->p->t('ui', 'error_fieldMaxLength', ['field' => $this->p->t('ui', 'field_organizationalUnit'), 'max' => 32])
|
||||
]);
|
||||
$this->form_validation->set_rules('semester', 'Semester', 'required|is_natural_no_zero|less_than_equal_to[8]', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('ui', 'field_semester')]),
|
||||
'is_natural_no_zero' => $this->p->t('ui', 'error_fieldInvalid', ['field' => $this->p->t('ui', 'field_semester')]),
|
||||
'less_than_equal_to' => $this->p->t('ui', 'error_fieldMaxValue', ['field' => $this->p->t('ui', 'field_semester'), 'max' => 8])
|
||||
]);
|
||||
$this->form_validation->set_rules('classTimeSlotTypeShortcode', 'Class Time Slot Type Shortcode', 'max_length[32]');
|
||||
$this->form_validation->set_rules('studyPlanId', 'Study Plan ID', 'is_natural_no_zero');
|
||||
|
||||
@@ -90,10 +104,10 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
$result = $this->ClassTimeSlotValidityPeriodModel->insert([
|
||||
'gueltig_von' => $this->input->post('validityPeriodFrom'),
|
||||
'gueltig_bis' => $this->input->post('validityPeriodTo'),
|
||||
'oe_kurzbz' => $this->input->post('degreeProgramShortcode'),
|
||||
'oe_kurzbz' => $this->input->post('organizationalUnitShortCode'),
|
||||
'ausbildungssemester' => $this->input->post('semester'),
|
||||
'anmerkung' => $this->input->post('description'),
|
||||
'unterrichtszeitentyp_kurzbz' => $this->input->post('classTimeSlotTypeShortcode') ?? '',
|
||||
'unterrichtszeitentyp_kurzbz' => $this->input->post('classTimeSlotTypeShortcode') ?? null,
|
||||
'studienplan_id' => $this->input->post('studyPlanId'),
|
||||
'insertamum' => date('c'),
|
||||
'insertvon' => getAuthUid(),
|
||||
@@ -106,33 +120,45 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
$this->db->trans_complete();
|
||||
|
||||
$this->terminateWithSuccess(true);
|
||||
|
||||
$this->terminateWithSuccess($this->input->post());
|
||||
}
|
||||
|
||||
public function updateClassTimeSlotValidityPeriod($classTimeSlotValidityPeriodId)
|
||||
{
|
||||
$this->form_validation->set_rules('validityPeriodFrom', 'Validity Period From', 'required|is_valid_date[Y-m-d]');
|
||||
$this->form_validation->set_rules('validityPeriodFrom', 'Validity Period From', 'required|is_valid_date[Y-m-d]', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('ui', 'field_validityPeriodFrom')]),
|
||||
'is_valid_date' => $this->p->t('ui', 'error_fieldInvalidDate', ['field' => $this->p->t('ui', 'field_validityPeriodFrom')])
|
||||
]);
|
||||
$this->form_validation->set_rules('validityPeriodTo', 'Validity Period To', 'required|is_valid_date[Y-m-d]|callback_date_greater_equal[validityPeriodFrom]');
|
||||
$this->form_validation->set_rules('degreeProgramShortcode', 'Degree Program Shortcode', 'required|max_length[32]');
|
||||
$this->form_validation->set_rules('semester', 'Semester', 'required|is_natural_no_zero|less_than_equal_to[8]');
|
||||
$this->form_validation->set_rules('organizationalUnitShortCode', 'Organizational Unit Shortcode', 'required|max_length[32]', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('ui', 'field_organizationalUnit')]),
|
||||
'max_length' => $this->p->t('ui', 'error_fieldMaxLength', ['field' => $this->p->t('ui', 'field_organizationalUnit'), 'max' => 32])
|
||||
]);
|
||||
$this->form_validation->set_rules('semester', 'Semester', 'required|is_natural_no_zero|less_than_equal_to[8]', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('ui', 'field_semester')]),
|
||||
'is_natural_no_zero' => $this->p->t('ui', 'error_fieldInvalid', ['field' => $this->p->t('ui', 'field_semester')]),
|
||||
'less_than_equal_to' => $this->p->t('ui', 'error_fieldMaxValue', ['field' => $this->p->t('ui', 'field_semester'), 'max' => 8])
|
||||
]);
|
||||
$this->form_validation->set_rules('classTimeSlotTypeShortcode', 'Class Time Slot Type Shortcode', 'max_length[32]');
|
||||
$this->form_validation->set_rules('studyPlanId', 'Study Plan ID', 'is_natural_no_zero');
|
||||
|
||||
if($this->form_validation->run() == FALSE) $this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$this->db->trans_start();
|
||||
|
||||
$result = $this->ClassTimeSlotValidityPeriodModel->update($classTimeSlotValidityPeriodId, [
|
||||
'gueltig_von' => $this->input->post('validityPeriodFrom'),
|
||||
'gueltig_bis' => $this->input->post('validityPeriodTo'),
|
||||
'oe_kurzbz' => $this->input->post('degreeProgramShortcode'),
|
||||
'oe_kurzbz' => $this->input->post('organizationalUnitShortCode'),
|
||||
'ausbildungssemester' => $this->input->post('semester'),
|
||||
'anmerkung' => $this->input->post('description'),
|
||||
'unterrichtszeitentyp_kurzbz' => $this->input->post('classTimeSlotTypeShortcode'),
|
||||
'unterrichtszeitentyp_kurzbz' => $this->input->post('classTimeSlotTypeShortcode') ?? null,
|
||||
'studienplan_id' => $this->input->post('studyPlanId'),
|
||||
'updateamum' => date('c'),
|
||||
'updatevon' => getAuthUid(),
|
||||
]);
|
||||
|
||||
$this->db->trans_complete();
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess(true);
|
||||
@@ -140,15 +166,19 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
|
||||
public function deleteClassTimeSlotValidityPeriod($classTimeSlotValidityPeriodId)
|
||||
{
|
||||
$this->db->trans_start();
|
||||
|
||||
$result = $this->ClassTimeSlotModel->delete(['unterrichtszeitengueltigkeit_id'=> $classTimeSlotValidityPeriodId]);
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$result = $this->ClassTimeSlotValidityPeriodModel->delete($classTimeSlotValidityPeriodId);
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$result = $this->ClassTimeSlotModel->delete(['unterrichtszeitengueltigkeit_id'=> $classTimeSlotValidityPeriodId]);
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$this->db->trans_complete();
|
||||
|
||||
$this->terminateWithSuccess(true);
|
||||
}
|
||||
@@ -163,14 +193,14 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
|
||||
public function createClassTimeSlotsForValidityPeriod($classTimeSlotValidityPeriodId)
|
||||
{
|
||||
$this->form_validation->set_rules('classTimeSlots', 'Validity Period From', 'callback_validate_items_in_class_time_slots');
|
||||
$this->form_validation->set_rules('unterrichtszeiten', 'Class Time Slots', 'callback_validate_items_in_class_time_slots');
|
||||
if($this->form_validation->run() == FALSE) $this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$this->db->trans_start();
|
||||
|
||||
$timeSlotGroupIdentifier = uniqid();
|
||||
|
||||
foreach ($this->input->post('classTimeSlots') as $timeSlot) {
|
||||
foreach ($this->input->post('unterrichtszeiten') as $timeSlot) {
|
||||
$result = $this->ClassTimeSlotModel->insert([
|
||||
'unterrichtszeit_gruppe_identifikator' => $timeSlotGroupIdentifier,
|
||||
'wochentag' => $timeSlot['wochentag'],
|
||||
@@ -193,14 +223,14 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
|
||||
public function editClassTimeSlotsForValidityPeriod($classTimeSlotValidityPeriodId)
|
||||
{
|
||||
$this->form_validation->set_rules('classTimeSlots', 'Validity Period From', 'callback_validate_items_in_class_time_slots');
|
||||
$this->form_validation->set_rules('unterrichtszeiten', 'Class Time Slots', 'callback_validate_items_in_class_time_slots');
|
||||
if($this->form_validation->run() == FALSE) $this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$this->db->trans_start();
|
||||
|
||||
$timeSlotGroupIdentifier = uniqid();
|
||||
|
||||
foreach ($this->input->post('classTimeSlots') as $timeSlot) {
|
||||
foreach ($this->input->post('unterrichtszeiten') as $timeSlot) {
|
||||
$data = [
|
||||
'unterrichtszeit_gruppe_identifikator' => $timeSlotGroupIdentifier,
|
||||
'wochentag' => $timeSlot['wochentag'],
|
||||
@@ -229,11 +259,15 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
}
|
||||
public function deleteClassTimeSlotsForValidityPeriodPerGroup($classTimeSlotValidityPeriodId, $groupIdentifikator)
|
||||
{
|
||||
$this->db->trans_start();
|
||||
|
||||
$result = $this->ClassTimeSlotModel->delete(['unterrichtszeitengueltigkeit_id'=> $classTimeSlotValidityPeriodId, 'unterrichtszeit_gruppe_identifikator' => $groupIdentifikator]);
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$this->db->trans_complete();
|
||||
|
||||
$this->terminateWithSuccess(true);
|
||||
}
|
||||
|
||||
@@ -255,8 +289,15 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
|
||||
public function createClassTimeSlotType()
|
||||
{
|
||||
$this->form_validation->set_rules('shortCode', 'Short Code', 'required|max_length[32]');
|
||||
$this->form_validation->set_rules('shortCode', 'Short Code', 'required|max_length[32]', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('ui', 'field_classTimeSlotTypeShortCode')]),
|
||||
'max_length' => $this->p->t('ui', 'error_fieldMaxLength', ['field' => $this->p->t('ui', 'field_classTimeSlotTypeShortCode'), 'max' => 32])
|
||||
]);
|
||||
$this->form_validation->set_rules('descriptions', 'Descriptions', 'callback_validate_descriptions_array');
|
||||
$this->form_validation->set_rules('backgroundColor', 'Background Color', 'required|regex_match[/^#([0-9a-fA-F]{3}){1,2}$/]', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('ui', 'field_backgroundColor')]),
|
||||
'regex_match' => $this->p->t('ui', 'error_fieldInvalid', ['field' => $this->p->t('ui', 'field_backgroundColor')]),
|
||||
]);
|
||||
|
||||
if($this->form_validation->run() == FALSE) $this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
@@ -268,14 +309,16 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
$query = 'INSERT INTO lehre.tbl_unterrichtszeiten_typ (
|
||||
unterrichtszeitentyp_kurzbz,
|
||||
bezeichnung_mehrsprachig,
|
||||
hintergrundfarbe,
|
||||
aktiv,
|
||||
insertamum,
|
||||
insertvon,
|
||||
updateamum,
|
||||
updatevon) VALUES (?, ?, ?, ?, ?, ?, ?)';
|
||||
updatevon) VALUES (?, ?, ?, ?, ?, ?, ?, ?)';
|
||||
$result = $this->db->query($query, [
|
||||
$this->input->post('shortCode'),
|
||||
$pgArray,
|
||||
$this->input->post('backgroundColor'),
|
||||
$this->input->post('isActive'),
|
||||
date('c'),
|
||||
getAuthUid(),
|
||||
@@ -298,9 +341,10 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
$descriptions = $this->input->post('descriptions');
|
||||
$pgArray = $this->arrayToPgArray($descriptions);
|
||||
|
||||
$query = 'UPDATE lehre.tbl_unterrichtszeiten_typ SET bezeichnung_mehrsprachig = ?, aktiv = ?, updateamum = ?, updatevon = ? WHERE unterrichtszeitentyp_kurzbz = ?';
|
||||
$query = 'UPDATE lehre.tbl_unterrichtszeiten_typ SET bezeichnung_mehrsprachig = ?, hintergrundfarbe = ?, aktiv = ?, updateamum = ?, updatevon = ? WHERE unterrichtszeitentyp_kurzbz = ?';
|
||||
$result = $this->db->query($query, [
|
||||
$pgArray,
|
||||
$this->input->post('backgroundColor'),
|
||||
$this->input->post('isActive'),
|
||||
date('c'),
|
||||
getAuthUid(),
|
||||
@@ -313,11 +357,15 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
|
||||
public function deleteClassTimeSlotType($classTimeSlotTypeId)
|
||||
{
|
||||
$this->db->trans_start();
|
||||
|
||||
$result = $this->ClassTimeSlotTypeModel->delete(['unterrichtszeitentyp_kurzbz' => $classTimeSlotTypeId]);
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
|
||||
$this->db->trans_complete();
|
||||
|
||||
$this->terminateWithSuccess(true);
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
@@ -339,29 +387,26 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
{
|
||||
$fromDate = $this->input->post($fromField);
|
||||
|
||||
// Check if "from" exists
|
||||
if (!$fromDate) {
|
||||
$this->form_validation->set_message(
|
||||
'date_greater_equal',
|
||||
'Validity Period From is required.'
|
||||
$this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('ui', 'field_validityPeriodTo')])
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Validate both dates
|
||||
if (!strtotime($toDate) || !strtotime($fromDate)) {
|
||||
$this->form_validation->set_message(
|
||||
'date_greater_equal',
|
||||
'Both dates must be valid.'
|
||||
$this->p->t('ui', 'error_fieldInvalidDate', ['field' => $this->p->t('ui', 'field_validityPeriodTo')])
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Compare dates
|
||||
if (strtotime($toDate) < strtotime($fromDate)) {
|
||||
$this->form_validation->set_message(
|
||||
'date_greater_equal',
|
||||
'The {field} must be greater than or equal to Validity Period From.'
|
||||
$this->p->t('ui', 'error_fieldDateGreaterEqual', ['field' => $this->p->t('ui', 'field_validityPeriodTo'), 'otherField' => $this->p->t('ui', 'field_validityPeriodFrom')])
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@@ -369,41 +414,38 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
return true;
|
||||
}
|
||||
|
||||
public function validate_items_in_class_time_slots($classTimeSlots)
|
||||
public function validate_items_in_class_time_slots($unterrichtszeiten)
|
||||
{
|
||||
// see if $classTimeSlots is an array and has at least one item
|
||||
|
||||
if (!is_array($this->input->post('classTimeSlots')) || count($this->input->post('classTimeSlots')) === 0) {
|
||||
if (!is_array($this->input->post('unterrichtszeiten')) || count($this->input->post('unterrichtszeiten')) === 0) {
|
||||
$this->form_validation->set_message(
|
||||
'validate_items_in_class_time_slots',
|
||||
'At least one class time slot is required.'
|
||||
$this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('ui', 'field_classTimeSlot')])
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($this->input->post('classTimeSlots') as $index => $timeSlot) {
|
||||
foreach ($this->input->post('unterrichtszeiten') as $index => $timeSlot) {
|
||||
if (!isset($timeSlot['wochentag'], $timeSlot['startTime'], $timeSlot['endTime'], $timeSlot['classTimeSlotTypeShortcode'])) {
|
||||
$this->form_validation->set_message(
|
||||
'validate_items_in_class_time_slots',
|
||||
'Each class time slot must have a weekday, start time, end time and class time slot type shortcode.'
|
||||
$this->p->t('ui', 'error_fieldClassTimeSlotContentInvalid', ['field' => $this->p->t('ui', 'field_classTimeSlot')])
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!in_array($timeSlot['wochentag'], [1, 2, 3, 4, 5])) {
|
||||
if (!in_array($timeSlot['wochentag'], [1, 2, 3, 4, 5, 6, 7])) {
|
||||
$this->form_validation->set_message(
|
||||
'validate_items_in_class_time_slots',
|
||||
'Weekday must be an integer between 1 (Monday) and 5 (Friday).'
|
||||
$this->p->t('ui', 'error_fieldWeekdayInvalid', ['field' => $this->p->t('ui', 'field_classTimeSlot')])
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
log_message('error', 'Validating class time slots: ' . print_r($timeSlot['startTime'], true));
|
||||
if (!strtotime($timeSlot['startTime']) || !strtotime($timeSlot['endTime'])) {
|
||||
$this->form_validation->set_message(
|
||||
'validate_items_in_class_time_slots',
|
||||
'Start time and end time must be valid time strings.'
|
||||
$this->p->t('ui', 'error_fieldClassTimeSlotTimeInvalid', ['field' => $this->p->t('ui', 'field_classTimeSlot')])
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@@ -411,14 +453,14 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
if (strtotime($timeSlot['endTime']) <= strtotime($timeSlot['startTime'])) {
|
||||
$this->form_validation->set_message(
|
||||
'validate_items_in_class_time_slots',
|
||||
'End time must be greater than start time.'
|
||||
$this->p->t('ui', 'error_fieldDateGreaterEqual', ['field' => $this->p->t('ui', 'field_classTimeSlotEndTime'), 'otherField' => $this->p->t('ui', 'field_classTimeSlotStartTime')])
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$slotsByDay = [];
|
||||
foreach ($this->input->post('classTimeSlots') as $timeSlot) {
|
||||
foreach ($this->input->post('unterrichtszeiten') as $timeSlot) {
|
||||
$slotsByDay[$timeSlot['wochentag']][] = $timeSlot;
|
||||
}
|
||||
|
||||
@@ -431,7 +473,7 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
if (strtotime($slots[$i]['startTime']) < strtotime($slots[$i - 1]['endTime'])) {
|
||||
$this->form_validation->set_message(
|
||||
'validate_items_in_class_time_slots',
|
||||
'Class time slots for each day must not overlap.'
|
||||
$this->p->t('ui', 'error_fieldClassTimeSlotOverlap', ['field' => $this->p->t('ui', 'field_classTimeSlot')])
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@@ -448,7 +490,7 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
if (!is_array($descriptions) || count($descriptions) === 0) {
|
||||
$this->form_validation->set_message(
|
||||
'validate_descriptions_array',
|
||||
'Descriptions must be a non-empty array.'
|
||||
$this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('ui', 'field_descriptions')])
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@@ -457,7 +499,7 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
if (!isset($description['lang'], $description['value'])) {
|
||||
$this->form_validation->set_message(
|
||||
'validate_descriptions_array',
|
||||
'Each description must have a language and a value.'
|
||||
$this->p->t('ui', 'error_fieldDescriptionContentInvalid')
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@@ -465,7 +507,7 @@ class ClassScheduleApi extends FHCAPI_Controller
|
||||
if (empty($description['lang']) || empty($description['value'])) {
|
||||
$this->form_validation->set_message(
|
||||
'validate_descriptions_array',
|
||||
'Language and value in each description must not be empty.'
|
||||
$this->p->t('ui', 'error_fieldDescriptionContentInvalid')
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
class OrganizationalUnitApi extends FHCAPI_Controller
|
||||
{
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getAllOrganizationalUnits'=> array('basis/organisationseinheit:r'),
|
||||
]);
|
||||
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->load->model('education/ClassTimeSlotValidityPeriod_model', "ClassTimeSlotValidityPeriodModel");
|
||||
|
||||
// Loads phrases system
|
||||
$this->loadPhrases([
|
||||
'global'
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
public function getAllOrganizationalUnits()
|
||||
{
|
||||
$this->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel');
|
||||
$result = $this->OrganisationseinheitModel->load();
|
||||
$organization_units_result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($organization_units_result);
|
||||
}
|
||||
}
|
||||
@@ -9,18 +9,19 @@ $includesArray = array(
|
||||
'primevue3' => true,
|
||||
'navigationcomponent' => true,
|
||||
'filtercomponent' => true,
|
||||
'vuedatepicker11' => true,
|
||||
'customJSs' => array(
|
||||
'vendor/vuejs/vuedatepicker_js/vue-datepicker.iife.js',
|
||||
'vendor/moment/luxonjs/luxon.min.js'
|
||||
),
|
||||
'customJSModules' => array(
|
||||
'public/js/apps/lehre/ClassScheduleApp.js'
|
||||
),
|
||||
'customCSSs' => array(
|
||||
'public/css/components/vue-datepicker.css',
|
||||
'public/css/components/primevue.css',
|
||||
'public/css/components/verticalsplit.css',
|
||||
'public/extensions/FHC-Core-Developer/css/FhcMain.css'
|
||||
'public/extensions/FHC-Core-Developer/css/FhcMain.css',
|
||||
'public/css/components/calendar.css',
|
||||
'public/css/components/classSchedule.css'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
.fhc-pointer-events-none {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.fhc-pointer-events-all {
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
.fhc-cursor-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.fhc-resize-vertical {
|
||||
cursor: ns-resize;
|
||||
}
|
||||
|
||||
.fhc-drag-handle:hover {
|
||||
cursor: grab;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.fhc-w-fit {
|
||||
width: fit-content;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
export default {
|
||||
getAllOrganizationalUnits() {
|
||||
return {
|
||||
method: "get",
|
||||
url: "api/frontend/v1/organisation/organizationalUnitApi/getAllOrganizationalUnits",
|
||||
};
|
||||
},
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -232,7 +232,7 @@ export default {
|
||||
this.phrasesLoaded = true;
|
||||
});
|
||||
},
|
||||
template: `
|
||||
template: /* html */`
|
||||
<div class="container mt-4">
|
||||
<h1 class='mb-5'>{{ $p.t("ui", "classScheduleOverviewHeading") }}</h1>
|
||||
<div class="row mb-3">
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { CoreFilterCmpt } from "../filter/Filter.js";
|
||||
import ApiClassSchedule from "../../../js/api/factory/classSchedule.js";
|
||||
|
||||
import BsModal from "../Bootstrap/Modal.js";
|
||||
@@ -6,7 +5,7 @@ import CoreForm from "../Form/Form.js";
|
||||
import FormInput from "../Form/Input.js";
|
||||
|
||||
export default {
|
||||
name: "ClassScheduleValidityPeriodForm",
|
||||
name: "ClassScheduleTypeModal",
|
||||
components: {
|
||||
BsModal,
|
||||
CoreForm,
|
||||
@@ -43,6 +42,7 @@ export default {
|
||||
{ lang: "de", value: "" },
|
||||
{ lang: "en", value: "" },
|
||||
],
|
||||
backgroundColor: "#ffffff",
|
||||
},
|
||||
classScheduleTypes: [],
|
||||
};
|
||||
@@ -80,6 +80,7 @@ export default {
|
||||
isActive: this.classTimeSlotTypeFormData.isActive,
|
||||
shortCode: this.classTimeSlotTypeFormData.shortCode,
|
||||
descriptions: this.classTimeSlotTypeFormData.descriptions,
|
||||
backgroundColor: this.classTimeSlotTypeFormData.backgroundColor,
|
||||
}),
|
||||
)
|
||||
.then((response) => {
|
||||
@@ -102,6 +103,7 @@ export default {
|
||||
value: desc.value,
|
||||
}),
|
||||
),
|
||||
backgroundColor: classScheduleType.hintergrundfarbe || "#ffffff",
|
||||
};
|
||||
},
|
||||
updateClassTimeSlotType() {
|
||||
@@ -112,6 +114,7 @@ export default {
|
||||
{
|
||||
isActive: this.classTimeSlotTypeFormData.isActive,
|
||||
descriptions: this.classTimeSlotTypeFormData.descriptions,
|
||||
backgroundColor: this.classTimeSlotTypeFormData.backgroundColor,
|
||||
},
|
||||
),
|
||||
)
|
||||
@@ -163,13 +166,14 @@ export default {
|
||||
{ lang: "de", value: "" },
|
||||
{ lang: "en", value: "" },
|
||||
],
|
||||
backgroundColor: "#ffffff",
|
||||
};
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getAllClassScheduleTypes();
|
||||
},
|
||||
template: `
|
||||
template: /* html */`
|
||||
<bs-modal ref="classScheduleTypeModal" size="md" @hideBsModal="() => { $emit('hideBsModal'); resetClassTimeSlotTypeForm(); }">
|
||||
<template #title>
|
||||
<p v-if="hasLehreUnterrichtszeitenTypWPermission" class="fw-bold mt-3">{{$p.t('ui', 'editClassTimeSlotTypeModalTitle')}}</p>
|
||||
@@ -193,18 +197,27 @@ export default {
|
||||
<div v-else class="row mb-3">
|
||||
<p class="mb-0"><span class="fw-bold">{{$p.t('ui/shortName')}}:</span> {{editedClassScheduleType.unterrichtszeitentyp_kurzbz}}</p>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="row">
|
||||
<form-input
|
||||
v-for="description in classTimeSlotTypeFormData.descriptions"
|
||||
:key="description.lang"
|
||||
type="textarea"
|
||||
v-model="description.value"
|
||||
:name="description.lang"
|
||||
:label="$p.t('ui/description') + ' (' + description.lang + ')'"
|
||||
v-model="description.value"
|
||||
type="textarea"
|
||||
class="mb-3"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<form-input
|
||||
type="text"
|
||||
name="backgroundColor"
|
||||
:label="$p.t('ui/backgroundColor')"
|
||||
v-model="classTimeSlotTypeFormData.backgroundColor"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col d-flex align-items-center justify-content-end">
|
||||
<form-input
|
||||
@@ -217,8 +230,8 @@ export default {
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-flex justify-content-end gap-2">
|
||||
<button type="button" class="btn btn-primary" @click="isEditInProgress ? updateClassTimeSlotType() : createClassTimeSlotType()">{{$p.t('ui', 'speichern')}}</button>
|
||||
<button type="button" class="btn btn-secondary" @click="hideClassTimeSlotTypeForm">{{$p.t('ui', 'abbrechen')}}</button>
|
||||
<button type="button" class="btn btn-primary" @click="isEditInProgress ? updateClassTimeSlotType() : createClassTimeSlotType()">{{$p.t('ui', 'speichern')}}</button>
|
||||
</div>
|
||||
</core-form>
|
||||
<div class="row mb-3">
|
||||
@@ -233,7 +246,9 @@ export default {
|
||||
class=" shadow-sm p-2 mb-2 bg-body rounded"
|
||||
>
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<span class="badge bg-secondary me-2">
|
||||
<span
|
||||
:style="{ backgroundColor: classScheduleType.hintergrundfarbe }"
|
||||
class="badge me-2 text-black">
|
||||
{{classScheduleType.unterrichtszeitentyp_kurzbz}}
|
||||
</span>
|
||||
<div v-if="hasLehreUnterrichtszeitenTypWPermission" class="d-flex justify-content-between align-items-center gap-2">
|
||||
|
||||
@@ -1,19 +1,11 @@
|
||||
import { CoreFilterCmpt } from "../filter/Filter.js";
|
||||
import ApiClassSchedule from "../../../js/api/factory/classSchedule.js";
|
||||
|
||||
import BsModal from "../Bootstrap/Modal.js";
|
||||
import CoreForm from "../Form/Form.js";
|
||||
import FormInput from "../Form/Input.js";
|
||||
import ClassScheduleValidityPeriodFormTimeSlot from "./ClassScheduleValidityPeriodFormTimeSlot.js";
|
||||
import ClassScheduleCalendarSelector from "./ClassScheduleCalendarSelector.js";
|
||||
|
||||
export default {
|
||||
name: "ClassScheduleValidityPeriodForm",
|
||||
components: {
|
||||
BsModal,
|
||||
CoreForm,
|
||||
FormInput,
|
||||
CoreFilterCmpt,
|
||||
ClassScheduleValidityPeriodFormTimeSlot,
|
||||
ClassScheduleCalendarSelector,
|
||||
},
|
||||
props: {
|
||||
classTimeSlotValidityPeriod: {
|
||||
@@ -30,18 +22,23 @@ export default {
|
||||
watch: {
|
||||
editedClassTimeSlots: {
|
||||
handler(newVal) {
|
||||
console.log("editedClassTimeSlots changed:", newVal);
|
||||
this.classTimeSlots = JSON.parse(JSON.stringify(newVal));
|
||||
console.log(
|
||||
"classTimeSlots updated from editedClassTimeSlots:",
|
||||
this.classTimeSlots,
|
||||
);
|
||||
this.editedOverlays = newVal.map((slot) => {
|
||||
return {
|
||||
databaseId: slot.id,
|
||||
id: slot.identifier,
|
||||
weekday: slot.wochentag,
|
||||
type: slot.unterrichtszeitentyp_kurzbz,
|
||||
startTime: slot.startTime,
|
||||
endTime: slot.endTime,
|
||||
};
|
||||
});
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
data: () => {
|
||||
return {
|
||||
editedOverlays: [],
|
||||
classTimeSlots: [],
|
||||
classTimeSlotTypes: [],
|
||||
};
|
||||
@@ -74,55 +71,48 @@ export default {
|
||||
),
|
||||
);
|
||||
},
|
||||
createClassTimeSlots() {
|
||||
return this.$refs.classTimeSlotData
|
||||
.call(
|
||||
ApiClassSchedule.createClassTimeSlotsForValidityPeriod(
|
||||
this.id,
|
||||
this.$props.classTimeSlotValidityPeriod
|
||||
.unterrichtszeitengueltigkeit_id,
|
||||
{
|
||||
classTimeSlots: this.classTimeSlots,
|
||||
},
|
||||
),
|
||||
)
|
||||
.then((response) => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t("ui", "successSave"));
|
||||
this.classTimeSlots = [];
|
||||
this.$emit("classTimeSlotsCreated");
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(
|
||||
"Error creating class time slot validity period:",
|
||||
error,
|
||||
);
|
||||
this.$fhcAlert.handleSystemError(error);
|
||||
});
|
||||
async createClassTimeSlots() {
|
||||
let response = await this.$api.call(
|
||||
ApiClassSchedule.createClassTimeSlotsForValidityPeriod(
|
||||
this.id,
|
||||
this.$props.classTimeSlotValidityPeriod
|
||||
.unterrichtszeitengueltigkeit_id,
|
||||
{
|
||||
unterrichtszeiten: this.classTimeSlots,
|
||||
},
|
||||
),
|
||||
);
|
||||
if (response.meta.status === "success") {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t("ui", "successSave"));
|
||||
this.classTimeSlots = [];
|
||||
this.$emit("classTimeSlotsCreated");
|
||||
} else {
|
||||
console.error("Error creating class time slot validity period:", error);
|
||||
this.$fhcAlert.handleSystemError(error);
|
||||
}
|
||||
},
|
||||
editClassTimeSlots() {
|
||||
return this.$refs.classTimeSlotData
|
||||
.call(
|
||||
ApiClassSchedule.editClassTimeSlotsForValidityPeriod(
|
||||
this.id,
|
||||
this.$props.classTimeSlotValidityPeriod
|
||||
.unterrichtszeitengueltigkeit_id,
|
||||
{
|
||||
classTimeSlots: this.classTimeSlots,
|
||||
},
|
||||
),
|
||||
)
|
||||
.then((response) => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t("ui", "successSave"));
|
||||
this.classTimeSlots = [];
|
||||
this.$emit("classTimeSlotsEdited");
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(
|
||||
"Error editing class time slot validity period:",
|
||||
error,
|
||||
);
|
||||
this.$fhcAlert.handleSystemError(error);
|
||||
});
|
||||
async editClassTimeSlots() {
|
||||
let response = await this.$api.call(
|
||||
ApiClassSchedule.editClassTimeSlotsForValidityPeriod(
|
||||
this.id,
|
||||
this.$props.classTimeSlotValidityPeriod
|
||||
.unterrichtszeitengueltigkeit_id,
|
||||
{
|
||||
unterrichtszeiten: this.classTimeSlots,
|
||||
},
|
||||
),
|
||||
);
|
||||
if (response.meta.status === "success") {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t("ui", "successSave"));
|
||||
this.classTimeSlots = [];
|
||||
this.$emit("classTimeSlotsEdited");
|
||||
} else {
|
||||
console.error(
|
||||
"Error editing class time slot validity period:",
|
||||
response.meta.message,
|
||||
);
|
||||
this.$fhcAlert.handleSystemError(response.meta.message);
|
||||
}
|
||||
},
|
||||
getWeekdayNumberFromDay(day) {
|
||||
const days = {
|
||||
@@ -136,6 +126,18 @@ export default {
|
||||
};
|
||||
return days[day.toLowerCase()] || null;
|
||||
},
|
||||
handleOverlaysChanged(newOverlays) {
|
||||
this.classTimeSlots = newOverlays.map((overlay) => {
|
||||
return {
|
||||
id: overlay.databaseId || null,
|
||||
identifier: overlay.id,
|
||||
wochentag: overlay.weekday,
|
||||
startTime: overlay.startingTimeSlot.split("-")[0],
|
||||
endTime: overlay.endingTimeSlot.split("-")[1],
|
||||
classTimeSlotTypeShortcode: overlay.type,
|
||||
};
|
||||
});
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
let getAllClassTimeSlotTypesResponse = await this.$api.call(
|
||||
@@ -163,79 +165,19 @@ export default {
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<core-form ref="classTimeSlotData" class="shadow rounded p-2 row g-3">
|
||||
<div class="d-flex gap-2">
|
||||
<div class="col">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<h3>Monday</h3>
|
||||
<a class="ml-auto" @click="addClassTimeSlotPerDay('monday')"><i class="fa fa-plus-circle fs-4"></i></a>
|
||||
</div>
|
||||
<class-schedule-validity-period-form-time-slot
|
||||
v-for="(timeSlot, index) in classTimeSlots.filter(slot => slot.wochentag === 1)"
|
||||
:key="index"
|
||||
:class-time-slot-types="classTimeSlotTypes"
|
||||
@removeClassTimeSlot="removeClassTimeSlotPerDay('monday', timeSlot.identifier)"
|
||||
v-model="timeSlot"
|
||||
/>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<h3>Tuesday</h3>
|
||||
<a class="ml-auto" @click="addClassTimeSlotPerDay('tuesday')"><i class="fa fa-plus-circle fs-4"></i></a>
|
||||
</div>
|
||||
<class-schedule-validity-period-form-time-slot
|
||||
v-for="(timeSlot, index) in classTimeSlots.filter(slot => slot.wochentag === 2)"
|
||||
:key="index"
|
||||
:class-time-slot-types="classTimeSlotTypes"
|
||||
@removeClassTimeSlot="removeClassTimeSlotPerDay('tuesday', timeSlot.identifier)"
|
||||
v-model="timeSlot"
|
||||
/>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<h3>Wednesday</h3>
|
||||
<a class="ml-auto" @click="addClassTimeSlotPerDay('wednesday')"><i class="fa fa-plus-circle fs-4"></i></a>
|
||||
</div>
|
||||
<class-schedule-validity-period-form-time-slot
|
||||
v-for="(timeSlot, index) in classTimeSlots.filter(slot => slot.wochentag === 3)"
|
||||
:key="index"
|
||||
:class-time-slot-types="classTimeSlotTypes"
|
||||
@removeClassTimeSlot="removeClassTimeSlotPerDay('wednesday', timeSlot.identifier)"
|
||||
v-model="timeSlot"
|
||||
/>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<h3>Thursday</h3>
|
||||
<a class="ml-auto" @click="addClassTimeSlotPerDay('thursday')"><i class="fa fa-plus-circle fs-4"></i></a>
|
||||
</div>
|
||||
<class-schedule-validity-period-form-time-slot
|
||||
v-for="(timeSlot, index) in classTimeSlots.filter(slot => slot.wochentag === 4)"
|
||||
:key="index"
|
||||
:class-time-slot-types="classTimeSlotTypes"
|
||||
@removeClassTimeSlot="removeClassTimeSlotPerDay('thursday', timeSlot.identifier)"
|
||||
v-model="timeSlot"
|
||||
/>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<h3>Friday</h3>
|
||||
<a class="ml-auto" @click="addClassTimeSlotPerDay('friday')"><i class="fa fa-plus-circle fs-4"></i></a>
|
||||
</div>
|
||||
<class-schedule-validity-period-form-time-slot
|
||||
v-for="(timeSlot, index) in classTimeSlots.filter(slot => slot.wochentag === 5)"
|
||||
:key="index"
|
||||
:class-time-slot-types="classTimeSlotTypes"
|
||||
@removeClassTimeSlot="removeClassTimeSlotPerDay('friday', timeSlot.identifier)"
|
||||
v-model="timeSlot"
|
||||
/>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class='col-12'>
|
||||
<class-schedule-calendar-selector
|
||||
:class-time-slot-types="this.classTimeSlotTypes"
|
||||
:edited-overlays="this.editedOverlays"
|
||||
@overlaysChanged="handleOverlaysChanged"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 d-flex justify-content-end gap-2">
|
||||
<button type="button" class="btn btn-secondary" @click="hideForm">{{$p.t('ui', 'abbrechen')}}</button>
|
||||
<button v-if="!areClassTimeSlotsEdited" type="button" class="btn btn-primary" @click="createClassTimeSlots">{{$p.t('ui', 'speichern')}}</button>
|
||||
<button v-else type="button" class="btn btn-primary" @click="editClassTimeSlots">{{$p.t('ui', 'btnAktualisieren')}}</button>
|
||||
</div>
|
||||
</core-form>
|
||||
</div>
|
||||
`,
|
||||
};
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
import { CoreFilterCmpt } from "../filter/Filter.js";
|
||||
import ApiClassSchedule from "../../../js/api/factory/classSchedule.js";
|
||||
|
||||
import BsModal from "../Bootstrap/Modal.js";
|
||||
import CoreForm from "../Form/Form.js";
|
||||
import FormInput from "../Form/Input.js";
|
||||
|
||||
export default {
|
||||
name: "ClassScheduleValidityPeriodForm",
|
||||
components: {
|
||||
BsModal,
|
||||
CoreForm,
|
||||
FormInput,
|
||||
CoreFilterCmpt,
|
||||
},
|
||||
props: {
|
||||
modelValue: Object,
|
||||
classTimeSlotTypes: Array,
|
||||
},
|
||||
emits: ["update:modelValue", "removeClassTimeSlot"],
|
||||
data: () => {
|
||||
return {
|
||||
classTimeSlots: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
selectedClassTimeSlotType() {
|
||||
return this.classTimeSlotTypes.find(
|
||||
(type) =>
|
||||
type.unterrichtszeitentyp_kurzbz ===
|
||||
this.classTimeSlot.classTimeSlotTypeShortcode,
|
||||
);
|
||||
},
|
||||
classTimeSlot: {
|
||||
get() {
|
||||
return this.modelValue;
|
||||
},
|
||||
set(value) {
|
||||
this.$emit("update:modelValue", value);
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {},
|
||||
template: `
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<div
|
||||
:style='[
|
||||
{backgroundColor: selectedClassTimeSlotType ? selectedClassTimeSlotType.hintergrundfarbe : "#fff"}
|
||||
]'
|
||||
class="p-2 shadow d-flex flex-column gap-2 position-relative">
|
||||
<a class="text-classTimeSlot position-absolute top-0 end-0 p-2 z-3" @click="$emit('removeClassTimeSlot', 'monday', classTimeSlot.identifier)"><i class="fa fa-trash text-danger"></i></a>
|
||||
<form-input
|
||||
type="select"
|
||||
name="classTimeSlotType"
|
||||
:label="$p.t('ui/classTimeSlotType')"
|
||||
v-model="classTimeSlot.classTimeSlotTypeShortcode"
|
||||
>
|
||||
<option
|
||||
v-for="classTimeSlotType in $props.classTimeSlotTypes"
|
||||
:key="classTimeSlotType.unterrichtszeitentyp_kurzbz"
|
||||
:value="classTimeSlotType.unterrichtszeitentyp_kurzbz"
|
||||
>
|
||||
{{classTimeSlotType.unterrichtszeitentyp_kurzbz}} - {{classTimeSlotType.bezeichnung_mehrsprachig[0].value}} / ({{classTimeSlotType.bezeichnung_mehrsprachig[1].value}})
|
||||
</option>
|
||||
</form-input>
|
||||
<div class="d-flex rounded align-items-center justify-content-between gap-1">
|
||||
<form-input
|
||||
type="time"
|
||||
name="classTimeSlotValidityPeriodFrom"
|
||||
v-model="classTimeSlot.startTime"
|
||||
|
||||
/>
|
||||
<div > - </div>
|
||||
<form-input
|
||||
type="time"
|
||||
name="classTimeSlotValidityPeriodTo"
|
||||
v-model="classTimeSlot.endTime"
|
||||
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
};
|
||||
@@ -1,11 +1,11 @@
|
||||
import ApiClassSchedule from "../../../js/api/factory/classSchedule.js";
|
||||
import ApiStudiengang from "../../../js/api/factory/studiengang.js";
|
||||
import ApiStudienPlan from "../../../js/api/factory/studienplan.js";
|
||||
import ApiOrganizationalUnit from "../../../js/api/factory/organizationalUnit.js";
|
||||
|
||||
import BsModal from "../Bootstrap/Modal.js";
|
||||
import CoreForm from "../Form/Form.js";
|
||||
import FormInput from "../Form/Input.js";
|
||||
import FormValidation from "../Form/Validation.js";
|
||||
import ApiStudienPlan from "../../../js/api/factory/studienplan.js";
|
||||
|
||||
export default {
|
||||
name: "ClassScheduleValidityPeriodModal",
|
||||
@@ -47,7 +47,7 @@ export default {
|
||||
let validityPeriodData = response.data[0];
|
||||
this.classTimeSlotValidityPeriodFormData = {
|
||||
id: validityPeriodData.unterrichtszeitengueltigkeit_id,
|
||||
degreeProgramShortcode: validityPeriodData.oe_kurzbz,
|
||||
organizationalUnitShortCode: validityPeriodData.oe_kurzbz,
|
||||
studyPlanId: validityPeriodData.studienplan_id,
|
||||
classTimeSlotTypeShortcode:
|
||||
validityPeriodData.unterrichtszeitentyp_kurzbz,
|
||||
@@ -71,12 +71,12 @@ export default {
|
||||
return {
|
||||
isFormVisible: false,
|
||||
isEditInProgress: false,
|
||||
degreePrograms: [],
|
||||
organizationalUnits: [],
|
||||
studyPlans: [],
|
||||
classTimeSlotTypes: [],
|
||||
classTimeSlotValidityPeriodFormData: {
|
||||
id: null,
|
||||
degreeProgramShortcode: null,
|
||||
organizationalUnitShortCode: null,
|
||||
studyPlanId: null,
|
||||
classTimeSlotTypeShortcode: null,
|
||||
validityPeriodFrom: null,
|
||||
@@ -138,7 +138,7 @@ export default {
|
||||
this.$refs.classTimeSlotValidityPeriodData?.clearValidation();
|
||||
this.classTimeSlotValidityPeriodFormData = {
|
||||
id: null,
|
||||
degreeProgramShortcode: null,
|
||||
organizationalUnitShortCode: null,
|
||||
studyPlanId: null,
|
||||
classTimeSlotTypeShortcode: null,
|
||||
validityPeriodFrom: null,
|
||||
@@ -149,15 +149,15 @@ export default {
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
let getAllDegreeProgramsResponse = await this.$api.call(
|
||||
ApiStudiengang.getAllDegreePrograms(),
|
||||
let getAllOrganizationalUnitsResponse = await this.$api.call(
|
||||
ApiOrganizationalUnit.getAllOrganizationalUnits(),
|
||||
);
|
||||
if (getAllDegreeProgramsResponse.meta.status === "success") {
|
||||
this.degreePrograms = getAllDegreeProgramsResponse.data;
|
||||
if (getAllOrganizationalUnitsResponse.meta.status === "success") {
|
||||
this.organizationalUnits = getAllOrganizationalUnitsResponse.data;
|
||||
} else {
|
||||
console.error(
|
||||
"Error fetching degree programs:",
|
||||
getAllDegreeProgramsResponse.meta.message,
|
||||
"Error fetching organizational units:",
|
||||
getAllOrganizationalUnitsResponse.meta.message,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -208,16 +208,16 @@ export default {
|
||||
<div class="row mb-3">
|
||||
<form-input
|
||||
type="select"
|
||||
name="degreeProgramShortcode"
|
||||
:label="$p.t('lehre/studiengang') + ' *'"
|
||||
v-model="classTimeSlotValidityPeriodFormData.degreeProgramShortcode"
|
||||
name="organizationalUnitShortCode"
|
||||
:label="$p.t('lehre/organisationseinheit') + ' *'"
|
||||
v-model="classTimeSlotValidityPeriodFormData.organizationalUnitShortCode"
|
||||
>
|
||||
<option
|
||||
v-for="degreeProgram in degreePrograms"
|
||||
:key="degreeProgram.studiengang_kz"
|
||||
:value="degreeProgram.studiengang_kz"
|
||||
v-for="organizationalUnit in organizationalUnits"
|
||||
:key="organizationalUnit.oe_kurzbz"
|
||||
:value="organizationalUnit.oe_kurzbz"
|
||||
>
|
||||
{{degreeProgram.kurzbzlang}} - {{degreeProgram.bezeichnung}})
|
||||
{{organizationalUnit.bezeichnung}}
|
||||
</option>
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
import { CoreFilterCmpt } from "../filter/Filter.js";
|
||||
import ApiClassSchedule from "../../../js/api/factory/classSchedule.js";
|
||||
|
||||
import BsModal from "../Bootstrap/Modal.js";
|
||||
import CoreForm from "../Form/Form.js";
|
||||
import FormInput from "../Form/Input.js";
|
||||
import ClassScheduleValidityPeriodForm from "./ClassScheduleValidityPeriodForm.js";
|
||||
import ClassScheduleValidityPeriodModal from "./ClassScheduleValidityPeriodModal.js";
|
||||
import ClassScheduleCalendarSelector from "./ClassScheduleCalendarSelector.js";
|
||||
|
||||
export default {
|
||||
name: "ClassScheduleValidityPeriodOverview",
|
||||
components: {
|
||||
BsModal,
|
||||
CoreForm,
|
||||
FormInput,
|
||||
CoreFilterCmpt,
|
||||
ClassScheduleValidityPeriodForm,
|
||||
ClassScheduleValidityPeriodModal,
|
||||
ClassScheduleCalendarSelector,
|
||||
},
|
||||
data: () => {
|
||||
return {
|
||||
@@ -106,13 +102,8 @@ export default {
|
||||
this.isClassTimeSlotFormVisible = true;
|
||||
},
|
||||
async editClassTimeSlotsForValidityPeriodPerGroup(groupIdentifikator) {
|
||||
console.log("Editing class time slots for group:", groupIdentifikator);
|
||||
await this.fetchClassTimeSlots();
|
||||
console.log(
|
||||
this.classTimeSlots.filter(
|
||||
(group) => group.groupIdentifikator === groupIdentifikator,
|
||||
),
|
||||
);
|
||||
|
||||
this.editedClassTimeSlots =
|
||||
this.classTimeSlots
|
||||
.filter(
|
||||
@@ -127,8 +118,8 @@ export default {
|
||||
classTimeSlotTypeShortcode: slot.unterrichtszeitentyp_kurzbz,
|
||||
};
|
||||
}) || [];
|
||||
console.log(this.editedClassTimeSlots);
|
||||
this.showClassTimeSlotForm();
|
||||
|
||||
this.showClassTimeSlotForm();
|
||||
},
|
||||
deleteClassTimeSlotsForValidityPeriodPerGroup(groupIdentifikator) {
|
||||
let isDeletionConfirmed = confirm(
|
||||
@@ -238,7 +229,7 @@ export default {
|
||||
|
||||
this.fetchClassTimeSlots();
|
||||
},
|
||||
template: `
|
||||
template: /* html */`
|
||||
<div class="container mt-4">
|
||||
<div class='mb-5'>
|
||||
<div class="d-flex align-items-center justify-content-between mb-2">
|
||||
@@ -276,96 +267,26 @@ export default {
|
||||
<h4>{{ $p.t("ui", "classScheduleValidityPeriodTimeSlots") }}</h4>
|
||||
</div>
|
||||
<div v-if="classTimeSlots && Object.keys(classTimeSlots).length > 0">
|
||||
<div v-for="(classTimeSlotsPerWeek, index) in classTimeSlots" :key="index" class="row border-top rounded p-2 mt-4 mb-2">
|
||||
<div class="col-12 d-flex align-items-center justify-content-end gap-2">
|
||||
<a class="ml-auto" @click="editClassTimeSlotsForValidityPeriodPerGroup(classTimeSlotsPerWeek.groupIdentifikator)"><i class="fa fa-edit fs-5"></i></a>
|
||||
<a class="ml-auto" @click="deleteClassTimeSlotsForValidityPeriodPerGroup(classTimeSlotsPerWeek.groupIdentifikator)"><i class="fa fa-trash text-danger fs-5"></i></a>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3>Monday</h3>
|
||||
<div v-for="(classTimeSlot, innerIndex) in classTimeSlotsPerWeek.slots.filter(slot => slot.wochentag === 1)" :key="innerIndex" class="d-flex align-items-center mb-2">
|
||||
<p
|
||||
class='p-2 m-0 rounded'
|
||||
:style="{backgroundColor: getClassTimeSlotBackgroundColor(classTimeSlot)}"
|
||||
:title="getClassTimeSlotType(classTimeSlot) ? getClassTimeSlotType(classTimeSlot).bezeichnung_mehrsprachig.find(desc => desc.lang === 'de').value : ''"
|
||||
>
|
||||
{{ classTimeSlot.uhrzeit_von }} - {{ classTimeSlot.uhrzeit_bis }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3>Tuesday</h3>
|
||||
<div v-for="(classTimeSlot, innerIndex) in classTimeSlotsPerWeek.slots.filter(slot => slot.wochentag === 2)" :key="innerIndex" class="d-flex align-items-center mb-2">
|
||||
<p
|
||||
class='p-2 m-0 rounded'
|
||||
:style="{backgroundColor: getClassTimeSlotBackgroundColor(classTimeSlot)}"
|
||||
:title="getClassTimeSlotType(classTimeSlot) ? getClassTimeSlotType(classTimeSlot).bezeichnung_mehrsprachig.find(desc => desc.lang === 'de').value : ''"
|
||||
>
|
||||
{{ classTimeSlot.uhrzeit_von }} - {{ classTimeSlot.uhrzeit_bis }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3>Wednesday</h3>
|
||||
<div v-for="(classTimeSlot, innerIndex) in classTimeSlotsPerWeek.slots.filter(slot => slot.wochentag === 3)" :key="innerIndex" class="d-flex align-items-center mb-2">
|
||||
<p
|
||||
class='p-2 m-0 rounded'
|
||||
:style="{backgroundColor: getClassTimeSlotBackgroundColor(classTimeSlot)}"
|
||||
:title="getClassTimeSlotType(classTimeSlot) ? getClassTimeSlotType(classTimeSlot).bezeichnung_mehrsprachig.find(desc => desc.lang === 'de').value : ''"
|
||||
>
|
||||
{{ classTimeSlot.uhrzeit_von }} - {{ classTimeSlot.uhrzeit_bis }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3>Thursday</h3>
|
||||
<div v-for="(classTimeSlot, innerIndex) in classTimeSlotsPerWeek.slots.filter(slot => slot.wochentag === 4)" :key="innerIndex" class="d-flex align-items-center mb-2">
|
||||
<p
|
||||
class='p-2 m-0 rounded'
|
||||
:style="{backgroundColor: getClassTimeSlotBackgroundColor(classTimeSlot)}"
|
||||
:title="getClassTimeSlotType(classTimeSlot) ? getClassTimeSlotType(classTimeSlot).bezeichnung_mehrsprachig.find(desc => desc.lang === 'de').value : ''"
|
||||
>
|
||||
{{ classTimeSlot.uhrzeit_von }} - {{ classTimeSlot.uhrzeit_bis }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3>Friday</h3>
|
||||
<div v-for="(classTimeSlot, innerIndex) in classTimeSlotsPerWeek.slots.filter(slot => slot.wochentag === 5)" :key="innerIndex" class="d-flex align-items-center mb-2">
|
||||
<p
|
||||
class='p-2 m-0 rounded'
|
||||
:style="{backgroundColor: getClassTimeSlotBackgroundColor(classTimeSlot)}"
|
||||
:title="getClassTimeSlotType(classTimeSlot) ? getClassTimeSlotType(classTimeSlot).bezeichnung_mehrsprachig.find(desc => desc.lang === 'de').value : ''"
|
||||
>
|
||||
{{ classTimeSlot.uhrzeit_von }} - {{ classTimeSlot.uhrzeit_bis }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3>Saturday</h3>
|
||||
<div v-for="(classTimeSlot, innerIndex) in classTimeSlotsPerWeek.slots.filter(slot => slot.wochentag === 6)" :key="innerIndex" class="d-flex align-items-center mb-2">
|
||||
<p
|
||||
class='p-2 m-0 rounded'
|
||||
:style="{backgroundColor: getClassTimeSlotBackgroundColor(classTimeSlot)}"
|
||||
:title="getClassTimeSlotType(classTimeSlot) ? getClassTimeSlotType(classTimeSlot).bezeichnung_mehrsprachig.find(desc => desc.lang === 'de').value : ''"
|
||||
>
|
||||
{{ classTimeSlot.uhrzeit_von }} - {{ classTimeSlot.uhrzeit_bis }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3>Sunday</h3>
|
||||
<div v-for="(classTimeSlot, innerIndex) in classTimeSlotsPerWeek.slots.filter(slot => slot.wochentag === 7)" :key="innerIndex" class="d-flex align-items-center mb-2">
|
||||
<p
|
||||
class='p-2 m-0 rounded'
|
||||
:style="{backgroundColor: getClassTimeSlotBackgroundColor(classTimeSlot)}"
|
||||
:title="getClassTimeSlotType(classTimeSlot) ? getClassTimeSlotType(classTimeSlot).bezeichnung_mehrsprachig.find(desc => desc.lang === 'de').value : ''"
|
||||
>
|
||||
{{ classTimeSlot.uhrzeit_von }} - {{ classTimeSlot.uhrzeit_bis }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="(classTimeSlotsPerWeek, index) in classTimeSlots" :key="index" class="row border-top rounded p-2 mt-4 mb-2 pt-1 pb-5">
|
||||
<div class="col-12 d-flex align-items-center justify-content-end gap-2">
|
||||
<a class="ml-auto" @click="editClassTimeSlotsForValidityPeriodPerGroup(classTimeSlotsPerWeek.groupIdentifikator)"><i class="fa fa-edit fs-5"></i></a>
|
||||
<a class="ml-auto" @click="deleteClassTimeSlotsForValidityPeriodPerGroup(classTimeSlotsPerWeek.groupIdentifikator)"><i class="fa fa-trash text-danger fs-5"></i></a>
|
||||
</div>
|
||||
<class-schedule-calendar-selector
|
||||
:class-time-slot-types="this.classTimeSlotTypes"
|
||||
:edited-overlays="classTimeSlotsPerWeek.slots.map((slot) => {
|
||||
return {
|
||||
databaseId: slot.id,
|
||||
id: slot.identifier,
|
||||
weekday: slot.wochentag,
|
||||
type: slot.unterrichtszeitentyp_kurzbz,
|
||||
startTime: slot.uhrzeit_von,
|
||||
endTime: slot.uhrzeit_bis,
|
||||
};
|
||||
})"
|
||||
:isPreviewMode="true"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="d-flex align-items-center justify-content-center border rounded p-4 mt-4">
|
||||
<p>{{ $p.t("ui", "noClassScheduleValidityPeriodTimeSlotsFound") }}</p>
|
||||
|
||||
@@ -30,7 +30,8 @@ export default {
|
||||
function onStart(evt) {
|
||||
const value = el.dataset.fhcDraggableValue;
|
||||
if (value) {
|
||||
setTransferData(evt, JSON.parse(value), true);
|
||||
let disableImage = binding.modifiers?.noimage === true;
|
||||
setTransferData(evt, JSON.parse(value), !disableImage);
|
||||
if (el.dataset.fhcEffectAllowed)
|
||||
evt.dataTransfer.effectAllowed = el.dataset.fhcEffectAllowed;
|
||||
|
||||
|
||||
@@ -30,6 +30,10 @@ const TYPE_DEFINITION = {
|
||||
prestudent: {
|
||||
id: "prestudent_id",
|
||||
dragIcon: "fa-solid fa-user-graduate text-muted"
|
||||
},
|
||||
calendar_selector_overlay: {
|
||||
id: "calendar_selector_overlay_id",
|
||||
dragIcon: "fa-solid fa-calendar-plus"
|
||||
}
|
||||
// TODO: IMPLEMENT OTHER TYPES
|
||||
};
|
||||
|
||||
@@ -63,18 +63,20 @@ if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_unterrichtszeiten LIMIT 1"
|
||||
|
||||
$db->db_query("ALTER TABLE lehre.tbl_unterrichtszeiten ALTER COLUMN unterrichtszeit_id SET DEFAULT nextval('lehre.seq_tbl_unterrichtszeiten_unterrichtszeit_id');");
|
||||
|
||||
$qry = 'GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE lehre.tbl_unterrichtszeiten TO admin;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>admin</strong> on lehre.tbl_unterrichtszeiten';
|
||||
|
||||
$qry = 'GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE lehre.tbl_unterrichtszeiten TO web;';
|
||||
|
||||
$qry = 'GRANT SELECT ON TABLE lehre.tbl_unterrichtszeiten TO web;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>web</strong> on lehre.tbl_unterrichtszeiten';
|
||||
|
||||
$qry = 'GRANT USAGE ON lehre.seq_tbl_unterrichtszeiten_unterrichtszeit_id TO web;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>web</strong> on lehre.tbl_unterrichtszeiten';
|
||||
|
||||
|
||||
$qry = 'GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE lehre.tbl_unterrichtszeiten TO vilesci;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten: '.$db->db_last_error().'</strong><br>';
|
||||
@@ -92,31 +94,6 @@ if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_unterrichtszeiten LIMIT 1"
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>vilesci</strong> on lehre.tbl_unterrichtszeiten';
|
||||
|
||||
$qry = 'GRANT USAGE, INSERT ON lehre.seq_tbl_unterrichtszeiten_unterrichtszeit_id TO web;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>web</strong> on lehre.tbl_unterrichtszeiten';
|
||||
|
||||
$qry = 'GRANT USAGE, UPDATE ON lehre.seq_tbl_unterrichtszeiten_unterrichtszeit_id TO web;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>web</strong> on lehre.tbl_unterrichtszeiten';
|
||||
|
||||
|
||||
$qry = 'GRANT USAGE, INSERT ON lehre.seq_tbl_unterrichtszeiten_unterrichtszeit_id TO admin;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>admin</strong> on lehre.tbl_unterrichtszeiten';
|
||||
|
||||
$qry = 'GRANT USAGE, UPDATE ON lehre.seq_tbl_unterrichtszeiten_unterrichtszeit_id TO admin;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>admin</strong> on lehre.tbl_unterrichtszeiten';
|
||||
}
|
||||
|
||||
if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_unterrichtszeiten_typ LIMIT 1"))
|
||||
@@ -138,69 +115,45 @@ if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_unterrichtszeiten_typ LIMI
|
||||
else
|
||||
echo '<br>lehre.tbl_unterrichtszeiten_typ table created';
|
||||
|
||||
$db->db_query('CREATE SEQUENCE IF NOT EXISTS lehre.seq_tbl_tbl_unterrichtszeiten_typ_unterrichtszeitentyp_kurzbz
|
||||
$db->db_query('CREATE SEQUENCE IF NOT EXISTS lehre.seq_tbl_unterrichtszeiten_typ_unterrichtszeitentyp_kurzbz
|
||||
INCREMENT BY 1
|
||||
NO MAXVALUE
|
||||
NO MINVALUE
|
||||
CACHE 1;');
|
||||
|
||||
$db->db_query("ALTER TABLE lehre.tbl_unterrichtszeiten_typ ALTER COLUMN unterrichtszeitentyp_kurzbz SET DEFAULT nextval('lehre.seq_tbl_tbl_unterrichtszeiten_typ_unterrichtszeitentyp_kurzbz');");
|
||||
$db->db_query("ALTER TABLE lehre.tbl_unterrichtszeiten_typ ALTER COLUMN unterrichtszeitentyp_kurzbz SET DEFAULT nextval('lehre.seq_tbl_unterrichtszeiten_typ_unterrichtszeitentyp_kurzbz');");
|
||||
|
||||
$qry = 'GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE lehre.tbl_unterrichtszeiten_typ TO admin;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_typ: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>admin</strong> on lehre.tbl_unterrichtszeiten_typ';
|
||||
|
||||
$qry = 'GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE lehre.tbl_unterrichtszeiten_typ TO web;';
|
||||
$qry = 'GRANT SELECT ON TABLE lehre.tbl_unterrichtszeiten_typ TO web;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_typ: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>web</strong> on lehre.tbl_unterrichtszeiten_typ';
|
||||
|
||||
$qry = 'GRANT USAGE ON lehre.seq_tbl_unterrichtszeiten_typ_unterrichtszeitentyp_kurzbz TO web;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_typ: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>web</strong> on lehre.tbl_unterrichtszeiten_typ';
|
||||
|
||||
|
||||
$qry = 'GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE lehre.tbl_unterrichtszeiten_typ TO vilesci;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_typ: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>vilesci</strong> on lehre.tbl_unterrichtszeiten_typ';
|
||||
|
||||
$qry = 'GRANT USAGE, INSERT ON lehre.seq_tbl_tbl_unterrichtszeiten_typ_unterrichtszeitentyp_kurzbz TO vilesci;';
|
||||
$qry = 'GRANT USAGE, INSERT ON lehre.seq_tbl_unterrichtszeiten_typ_unterrichtszeitentyp_kurzbz TO vilesci;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_typ: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>vilesci</strong> on lehre.tbl_unterrichtszeiten_typ';
|
||||
|
||||
$qry = 'GRANT USAGE, UPDATE ON lehre.seq_tbl_tbl_unterrichtszeiten_typ_unterrichtszeitentyp_kurzbz TO vilesci;';
|
||||
$qry = 'GRANT USAGE, UPDATE ON lehre.seq_tbl_unterrichtszeiten_typ_unterrichtszeitentyp_kurzbz TO vilesci;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_typ: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>vilesci</strong> on lehre.tbl_unterrichtszeiten_typ';
|
||||
|
||||
$qry = 'GRANT USAGE, INSERT ON lehre.seq_tbl_tbl_unterrichtszeiten_typ_unterrichtszeitentyp_kurzbz TO web;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_typ: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>web</strong> on lehre.tbl_unterrichtszeiten_typ';
|
||||
|
||||
$qry = 'GRANT USAGE, UPDATE ON lehre.seq_tbl_tbl_unterrichtszeiten_typ_unterrichtszeitentyp_kurzbz TO web;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_typ: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>web</strong> on lehre.tbl_unterrichtszeiten_typ';
|
||||
|
||||
|
||||
$qry = 'GRANT USAGE, INSERT ON lehre.seq_tbl_tbl_unterrichtszeiten_typ_unterrichtszeitentyp_kurzbz TO admin;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_typ: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>admin</strong> on lehre.tbl_unterrichtszeiten_typ';
|
||||
|
||||
$qry = 'GRANT USAGE, UPDATE ON lehre.seq_tbl_tbl_unterrichtszeiten_typ_unterrichtszeitentyp_kurzbz TO admin;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_typ: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>admin</strong> on lehre.tbl_unterrichtszeiten_typ';
|
||||
|
||||
|
||||
$qry = "
|
||||
INSERT INTO lehre.tbl_unterrichtszeiten_typ (unterrichtszeitentyp_kurzbz, bezeichnung_mehrsprachig, aktiv, hintergrundfarbe) VALUES
|
||||
@@ -225,10 +178,10 @@ if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_unterrichtszeiten_gueltigk
|
||||
"unterrichtszeitengueltigkeit_id" BIGINT NOT NULL,
|
||||
"gueltig_von" DATE NOT NULL,
|
||||
"gueltig_bis" DATE NOT NULL,
|
||||
"oe_kurzbz" INTEGER NOT NULL,
|
||||
"oe_kurzbz" VARCHAR(32) NOT NULL,
|
||||
"ausbildungssemester" SMALLINT,
|
||||
"anmerkung" TEXT,
|
||||
"unterrichtszeitentyp_kurzbz" VARCHAR(32) NOT NULL,
|
||||
"unterrichtszeitentyp_kurzbz" VARCHAR(32),
|
||||
"studienplan_id" INTEGER,
|
||||
"insertamum" TIMESTAMP WITH TIME ZONE DEFAULT now(),
|
||||
"insertvon" VARCHAR(32),
|
||||
@@ -241,68 +194,44 @@ if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_unterrichtszeiten_gueltigk
|
||||
else
|
||||
echo '<br>lehre.tbl_unterrichtszeiten_gueltigkeit table created';
|
||||
|
||||
$db->db_query('CREATE SEQUENCE IF NOT EXISTS lehre.seq
|
||||
$db->db_query('CREATE SEQUENCE IF NOT EXISTS lehre.seq_tbl_unterrichtszeiten_gueltigkeit_unterrichtszeitengueltigkeit_id
|
||||
INCREMENT BY 1
|
||||
NO MAXVALUE
|
||||
NO MINVALUE
|
||||
CACHE 1;');
|
||||
|
||||
$db->db_query("ALTER TABLE lehre.tbl_unterrichtszeiten_gueltigkeit ALTER COLUMN unterrichtszeitengueltigkeit_id SET DEFAULT nextval('lehre.seq');");
|
||||
$db->db_query("ALTER TABLE lehre.tbl_unterrichtszeiten_gueltigkeit ALTER COLUMN unterrichtszeitengueltigkeit_id SET DEFAULT nextval('lehre.seq_tbl_unterrichtszeiten_gueltigkeit_unterrichtszeitengueltigkeit_id');");
|
||||
|
||||
$qry = 'GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE lehre.tbl_unterrichtszeiten_gueltigkeit TO admin;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_gueltigkeit: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>admin</strong> on lehre.tbl_unterrichtszeiten_gueltigkeit';
|
||||
|
||||
$qry = 'GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE lehre.tbl_unterrichtszeiten_gueltigkeit TO web;';
|
||||
$qry = 'GRANT SELECT ON TABLE lehre.tbl_unterrichtszeiten_gueltigkeit TO web;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_gueltigkeit: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>web</strong> on lehre.tbl_unterrichtszeiten_gueltigkeit';
|
||||
|
||||
$qry = 'GRANT USAGE ON lehre.seq_tbl_unterrichtszeiten_gueltigkeit_unterrichtszeitengueltigkeit_id TO web;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_gueltigkeit: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>web</strong> on lehre.tbl_unterrichtszeiten_gueltigkeit';
|
||||
|
||||
|
||||
$qry = 'GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE lehre.tbl_unterrichtszeiten_gueltigkeit TO vilesci;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_gueltigkeit: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>vilesci</strong> on lehre.tbl_unterrichtszeiten_gueltigkeit';
|
||||
|
||||
$qry = 'GRANT USAGE, INSERT ON lehre.seq TO vilesci;';
|
||||
$qry = 'GRANT USAGE, INSERT ON lehre.seq_tbl_unterrichtszeiten_gueltigkeit_unterrichtszeitengueltigkeit_id TO vilesci;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_gueltigkeit: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>vilesci</strong> on lehre.tbl_unterrichtszeiten_gueltigkeit';
|
||||
|
||||
$qry = 'GRANT USAGE, UPDATE ON lehre.seq TO vilesci;';
|
||||
$qry = 'GRANT USAGE, UPDATE ON lehre.seq_tbl_unterrichtszeiten_gueltigkeit_unterrichtszeitengueltigkeit_id TO vilesci;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_gueltigkeit: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>vilesci</strong> on lehre.tbl_unterrichtszeiten_gueltigkeit';
|
||||
|
||||
$qry = 'GRANT USAGE, INSERT ON lehre.seq TO web;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_gueltigkeit: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>web</strong> on lehre.tbl_unterrichtszeiten_gueltigkeit';
|
||||
|
||||
$qry = 'GRANT USAGE, UPDATE ON lehre.seq TO web;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_gueltigkeit: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>web</strong> on lehre.tbl_unterrichtszeiten_gueltigkeit';
|
||||
|
||||
|
||||
$qry = 'GRANT USAGE, INSERT ON lehre.seq TO admin;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_gueltigkeit: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>admin</strong> on lehre.tbl_unterrichtszeiten_gueltigkeit';
|
||||
|
||||
$qry = 'GRANT USAGE, UPDATE ON lehre.seq TO admin;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_gueltigkeit: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>admin</strong> on lehre.tbl_unterrichtszeiten_gueltigkeit';
|
||||
}
|
||||
|
||||
|
||||
@@ -355,7 +284,7 @@ $result = $db->db_query("SELECT constraint_name FROM information_schema.table_co
|
||||
WHERE table_name='tbl_unterrichtszeiten_gueltigkeit' AND constraint_type='FOREIGN KEY' AND constraint_name='fk_oe_kurzbz'");
|
||||
if($db->db_num_rows($result)==0)
|
||||
{
|
||||
$qry = "ALTER TABLE lehre.tbl_unterrichtszeiten_gueltigkeit ADD CONSTRAINT fk_oe_kurzbz FOREIGN KEY(oe_kurzbz) REFERENCES public.tbl_studiengang(studiengang_kz);";
|
||||
$qry = "ALTER TABLE lehre.tbl_unterrichtszeiten_gueltigkeit ADD CONSTRAINT fk_oe_kurzbz FOREIGN KEY(oe_kurzbz) REFERENCES public.tbl_organisationseinheit(oe_kurzbz);";
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_unterrichtszeiten_gueltigkeit: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
|
||||
@@ -57856,6 +57856,486 @@ I have been informed that I am under no obligation to consent to the transmissio
|
||||
),
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'classTimeSlotLoadingErrorMessage',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Fehler beim Laden der Unterrichtszeit',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Error loading class time slot',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'classTimeSlotMultipleWeeksSelectedErrorMessage',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Mehrere Wochen ausgewählt. Bitte wählen Sie nur eine Woche für diese Aktion aus.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Multiple weeks selected. Please select only one week for this action.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'classTimeSlotMinimumSizeErrorMessage',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Unterrichtszeit zu kurz.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Class time slot too short.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'classTimeSlotResizeErrorMessage',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Beim Ändern der Größe der Unterrichtszeit ist ein Fehler aufgetreten.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Something went wrong while resizing the class time slot.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'classTimeSlotResizeOutOfScopeErrorMessage',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Der Zeitrahmen der Unterrichtszeit darf nicht größer sein als der verfügbare Zeitrahmen.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Time slot cannot be bigger than the available time scope.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'classTimeSlotOverlapErrorMessage',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Es sind keine überlappenden Unterrichtszeiten erlaubt!',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'No overlap of time slots is allowed!',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'classTimeSlotDeletionConfirmationMessage',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Sind Sie sicher, dass Sie diese Unterrichtszeit löschen möchten?',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Are you sure you want to delete this class time slot?',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'field_organizationalUnit',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Organisatorische Einheit',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Organisational Unit',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'field_validityPeriodFrom',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Gültig von',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Validity Period From',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'field_validityPeriodTo',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Gültig bis',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Validity Period To',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'field_semester',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Semester',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Semester',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'field_classTimeSlot',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Unterrichtszeit',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Class Time Slot',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'error_fieldInvalidDate',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Das Eingabefeld {field} enthält kein gültiges Datum',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'The Input Field {field} does not contain a valid date',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'error_fieldDateGreaterEqual',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Das Eingabefeld {field} muss größer oder gleich dem Eingabefeld {otherField} sein',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'The Input Field {field} must be greater or equal than the Input Field {otherField}',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'error_fieldClassTimeSlotContentInvalid',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Das Eingabefeld {field} muss einen Wochentag, eine Startzeit, eine Endzeit und einen Unterrichtszeittyp Shortcode enthalten.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'The Input Field {field} must have a weekday, start time, end time and class time slot type shortcode.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'error_fieldWeekdayInvalid',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Das Eingabefeld {field} enthält keinen gültigen Wochentag',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'The Input Field {field} does not contain a valid weekday',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'error_fieldClassTimeSlotTimeInvalid',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Das Eingabefeld {field} enthält keine gültige Start oder Endzeit',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'The Input Field {field} does not contain a valid start or end time',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'error_fieldClassTimeSlotOverlap',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Das Eingabefeld {field} enthält überlappende Unterrichtszeiten',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'The Input Field {field} contains overlapping class time slots',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'field_classTimeSlotTypeShortCode',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Unterrichtszeittyp Shortcode',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Class Time Slot Type Shortcode',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'field_classTimeSlotTypeDescription',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Unterrichtszeittyp Beschreibung',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Class Time Slot Type Description',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'error_fieldDescriptionContentInvalid',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Unterrichtszeittyp Beschreibung muss eine nicht-leere Sprache und einen Wert enthalten',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Class Time Slot Type Description item must have non-empty language and a value',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'backgroundColor',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Hintergrundfarbe',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Background Color',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'field_backgroundColor',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Hintergrundfarbe',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Background Color',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'error_fieldInvalid',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => '{field} enthält einen ungültigen Wert',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => '{field} contains an invalid value',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
// ### Phrases Dashboard Admin END
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user