mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
compare DateTime with DateTime instead of String
This commit is contained in:
@@ -319,12 +319,13 @@ class Pruefung extends FHCAPI_Controller
|
||||
$note = current($zeugnisnoten);
|
||||
$uebernahmedatum = new DateTime($note->uebernahmedatum);
|
||||
$benotungsdatum = new DateTime($note->benotungsdatum);
|
||||
$pruefungsdatum = new DateTime($this->input->post('datum'));
|
||||
|
||||
$checkDate = $uebernahmedatum === '' || $benotungsdatum > $uebernahmedatum
|
||||
? $benotungsdatum
|
||||
: $uebernahmedatum;
|
||||
|
||||
if ($checkDate >= $this->input->post('datum') && $this->input->post('note') !== $note->note)
|
||||
if ($checkDate >= $pruefungsdatum) && $this->input->post('note') !== $note->note)
|
||||
{
|
||||
$this->PruefungModel->db->trans_complete();
|
||||
$this->terminateWithSuccess($this->p->t('exam', 'hinweis_changeAfterExamDate'));
|
||||
|
||||
Reference in New Issue
Block a user