mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-03 11:59:29 +00:00
Anmeldebutton wird erst ab 2 Monaten vor Prüfung angezeigt
This commit is contained in:
@@ -352,10 +352,10 @@ function writePruefungsTable(e, data, anmeldung)
|
||||
var termin = d.von.split(" ");
|
||||
var time = termin[1].substring(0,5);
|
||||
termin = termin[0].split("-");
|
||||
termin = new Date(termin[0], termin[1]-1,termin[2]);
|
||||
var minimumFrist = new Date(termin[0], termin[1]-1,termin[2]);
|
||||
minimumFrist.setMonth(minimumFrist.getMonth() - 2);
|
||||
termin = new Date(termin[0], termin[1]-1,termin[2]);
|
||||
var frist = termin;
|
||||
var minimumFrist = termin;
|
||||
minimumFrist = new Date(minimumFrist.setMonth(termin.getMonth()-2));
|
||||
termin = termin.getDate()+"."+(termin.getMonth()+1)+"."+termin.getFullYear();
|
||||
frist = frist.getTime();
|
||||
frist = frist - (<?php echo $anmeldefrist ?>*24*60*60*1000);
|
||||
@@ -376,7 +376,7 @@ function writePruefungsTable(e, data, anmeldung)
|
||||
button = "<p><a href='#' title='<?php echo $p->t('pruefung/stornierenMoeglichBis'); ?> "+frist+"'><input style='width: 140px;' type='button' value='"+termin+" "+time+"' onclick='stornoAnmeldung(\""+anmeldung_id+"\");'></a></p>";
|
||||
|
||||
}
|
||||
else
|
||||
else if(new Date() > minimumFrist)
|
||||
{
|
||||
button = "<p><a href='#' title='<?php echo $p->t('pruefung/anmeldenMoeglichBis'); ?> "+frist+"'><input style='width: 140px; background-color: green;' type='button' value='"+termin+" "+time+"' onclick='openDialog(\""+e.lehrveranstaltung[0].lehrveranstaltung_id+"\", \""+d.pruefungstermin_id+"\", \""+e.lehrveranstaltung[0].bezeichnung.replace("'", "'")+"\", \""+d.von+"\", \""+d.bis+"\");'></a></p>";
|
||||
}
|
||||
@@ -388,14 +388,17 @@ function writePruefungsTable(e, data, anmeldung)
|
||||
|
||||
row += button;
|
||||
|
||||
if(d.max === null)
|
||||
{
|
||||
teilnehmer += "<?php echo $p->t('pruefung/unbegrenzt'); ?><br />";
|
||||
}
|
||||
else
|
||||
{
|
||||
teilnehmer += "<p><span style='line-height: 24px'>"+(d.max - d.teilnehmer)+"/"+d.max+"</span></p>";
|
||||
}
|
||||
if(new Date() > minimumFrist)
|
||||
{
|
||||
if(d.max === null)
|
||||
{
|
||||
teilnehmer += "<?php echo $p->t('pruefung/unbegrenzt'); ?><br />";
|
||||
}
|
||||
else
|
||||
{
|
||||
teilnehmer += "<p><span style='line-height: 24px'>"+(d.max - d.teilnehmer)+"/"+d.max+"</span></p>";
|
||||
}
|
||||
}
|
||||
});
|
||||
row += "<td>"+teilnehmer+"</td>";
|
||||
return row;
|
||||
|
||||
Reference in New Issue
Block a user