mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-26 00:19:28 +00:00
Fixed: Now application can only be done for actual study semester
Before student could apply for past study semester, which should not be possible. Fixed now. Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
@@ -141,6 +141,13 @@ class requestAnrechnung extends Auth_Controller
|
||||
{
|
||||
show_error('Der Antrag wurde bereits gestellt');
|
||||
}
|
||||
|
||||
// Exit, if application is not for actual studysemester
|
||||
if (!self::_applicationIsForActualSS($studiensemester_kurzbz))
|
||||
{
|
||||
show_error ($this->p->t('anrechnung', 'antragNurImAktSS'));
|
||||
|
||||
}
|
||||
|
||||
// Start DB transaction
|
||||
$this->db->trans_start(false);
|
||||
@@ -317,4 +324,18 @@ class requestAnrechnung extends Auth_Controller
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check, if applications' study semester is actual study semester
|
||||
* @param $studiensemester_kurzbz
|
||||
* @return bool
|
||||
*/
|
||||
private function _applicationIsForActualSS($studiensemester_kurzbz)
|
||||
{
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
$result = $this->StudiensemesterModel->getNearest();
|
||||
$actual_ss = getData($result)[0]->studiensemester_kurzbz;
|
||||
|
||||
return $studiensemester_kurzbz == $actual_ss;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10330,6 +10330,26 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'anrechnung',
|
||||
'phrase' => 'antragNurImAktSS',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Der Antrag kann nur für das aktuelle Semester gestellt werden",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "You only can apply for the actual study semester",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user