mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Studierendenverwaltung Projektbetreuer: added phrases, added check for existing Projektbetreuer when saving
This commit is contained in:
@@ -123,24 +123,31 @@ class Projektbetreuer extends FHCAPI_Controller
|
||||
if (!$this->ProjektarbeitModel->hasBerechtigungForProjektarbeit($projektarbeit_id))
|
||||
return $this->_outputAuthError([$this->router->method => ['admin:rw', 'assistenz:rw']]);
|
||||
|
||||
if (isset($projektbetreuer['stunden']) && !isEmptyString($projektbetreuer['stunden']) && !is_numeric($projektbetreuer['stunden']))
|
||||
{
|
||||
return $this->terminateWithError(
|
||||
$this->p->t('ui', 'error_fieldNotNumeric', ['field'=> 'Stunden', 'Field'=> 'Stunden']), self::ERROR_TYPE_GENERAL
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($projektbetreuer['stundensatz']) && !isEmptyString($projektbetreuer['stundensatz']) && !is_numeric($projektbetreuer['stundensatz']))
|
||||
{
|
||||
return $this->terminateWithError(
|
||||
$this->p->t('ui', 'error_fieldNotNumeric', ['field'=> 'Stundensatz', 'Field'=> 'Stundensatz']), self::ERROR_TYPE_GENERAL
|
||||
);
|
||||
}
|
||||
|
||||
$projektbetreuer = $this->input->post('projektbetreuer');
|
||||
|
||||
if ($this->_validate($projektbetreuer) == false) $this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
// check if assessor has already been assigned
|
||||
if (
|
||||
isset($projektbetreuer['person_id'])
|
||||
&& isset($projektbetreuer['person_id_old'])
|
||||
&& $projektbetreuer['person_id'] != $projektbetreuer['person_id_old']
|
||||
) {
|
||||
$this->ProjektbetreuerModel->addSelect('1');
|
||||
$betreuerRes = $this->ProjektbetreuerModel->loadWhere(
|
||||
[
|
||||
'person_id' => $projektbetreuer['person_id'],
|
||||
'projektarbeit_id' => $projektbetreuer['projektarbeit_id'],
|
||||
'betreuerart_kurzbz' => $projektbetreuer['betreuerart_kurzbz']
|
||||
]
|
||||
);
|
||||
|
||||
if (hasData($betreuerRes))
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('projektarbeit', 'betreuerZugewiesen'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
}
|
||||
|
||||
$result = null;
|
||||
|
||||
$stunden = isset($projektbetreuer['stunden']) && !isEmptyString($projektbetreuer['stunden']) ? $projektbetreuer['stunden'] : null;
|
||||
|
||||
@@ -52,7 +52,7 @@ export default {
|
||||
let cm = this.$refs.table.tabulator.columnManager;
|
||||
|
||||
cm.getColumnByField('projekttyp_kurzbz').component.updateDefinition({
|
||||
title: this.$p.t('projektarbeit', 'typKurzbezeichnung')
|
||||
title: this.$p.t('projektarbeit', 'typ_kurzbz')
|
||||
});
|
||||
cm.getColumnByField('bezeichnung').component.updateDefinition({
|
||||
title: this.$p.t('projektarbeit', 'typ')
|
||||
@@ -199,7 +199,7 @@ export default {
|
||||
{title: "Anmerkung", field: "anmerkung", visible: false},
|
||||
{title: "Lehreinheit ID", field: "lehreinheit_id", visible: false},
|
||||
{title: "Student UID", field: "student_uid", visible: false},
|
||||
{title: "Projektbetreuer", field: "projektbetreuer", visible: false},
|
||||
{title: "Projektbetreuer", field: "projektbetreuer"},
|
||||
{
|
||||
title:"Final",
|
||||
field:"final",
|
||||
|
||||
@@ -51785,6 +51785,46 @@ I have been informed that I am under no obligation to consent to the transmissio
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'projektarbeit',
|
||||
'phrase' => 'typ_kurzbz',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Typ Kurzbezeichnung',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'type short name',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'projektarbeit',
|
||||
'phrase' => 'betreuerZugewiesen',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Betreuer*In ist bereits zugewiesen',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'This project assessor is already assigned',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
// FHC-4 Projektarbeiten & Vertraege ENDE
|
||||
// ### DOKUMENTE ERSTELLEN PHRASEN START ###
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user