2025-01-07 03:02:25 +01:00
< ? php include ( 'includes/header.php' ); ?>
< div >
< div class = " card card-body p-4 " >
< ? = alertMessage (); ?>
< ? php
$paramResult = checkParamId ( 'id' );
if ( ! is_numeric ( $paramResult )){
echo '<div class="alert alert-danger" role="alert">' . $paramResult . '</div>' ;
return false ;
}
$category = getById ( 'tbl_categories' , checkParamId ( 'id' ));
?>
< ? php
if ( $category [ 'status' ] == 200 )
{
?>
< div class = " row " >
< div class = " col-5 " >
< h3 class = " fw-semibold mb-4 " >< ? = $category [ 'data' ][ 'name' ]; ?> </h3>
</ div >
< div class = " col-7 " >
< a href = " categories.php " class = " btn ms-2 btn-light float-end " > < i class = " ti ti-arrow-left " ></ i > Zurück zur Übersicht </ a >
< a href = " categories-registrations.php?id=<?= $category['data'] ['id']; ?> " class = " btn ms-2 btn-secondary float-end " > < i class = " ti ti-chart-candle " ></ i > Kursanmeldungen </ a >
2025-01-14 14:21:19 +01:00
< a href = " categories-reports-course.php?id=<?= $category['data'] ['id']; ?> " class = " btn btn-danger ms-2 float-end " > < i class = " ti ti-chart-area " ></ i > Statistik nach Kurs </ a >
< a href = " categories-reports-class.php?id=<?= $category['data'] ['id']; ?> " class = " btn btn-warning float-end " > < i class = " ti ti-chart-area " ></ i > Statistik nach Klasse </ a >
2025-01-07 03:02:25 +01:00
</ div >
</ div >
< form action = " code.php " method = " POST " >
< input type = " hidden " name = " id " value = " <?= $category['data'] ['id'] ;?> " required >
< div class = " row " >
< div class = " col-auto " >
< div class = " mb-3 " >
< label class = " form-label " > Name </ label >
< input type = " text " name = " name " value = " <?= $category['data'] ['name'] ;?> " required class = " form-control " >
</ div >
</ div >
< div class = " col-auto " >
< div class = " mb-3 " >
< div class = " form-group " >
< label class = " form-label " > Benötigen die Kurse eine Anmeldung ? </ label >
< a tabindex = " 0 " class = " badge rounded-pill text-bg-info ms-2 " role = " button " data - bs - toggle = " popover " data - bs - trigger = " focus " data - bs - html = " true " data - bs - content = " Wenn <b>Ja</b> ausgewählt wird, wird bei jedem Kurs in dieser Kategorie eine Anmeldung verlangt.</br> Wenn <b>Nein</b> ausgewählt wird, müssen sich Schüler:innen für keine Kurse in dieser Kategorie anmelden.</br> Wenn <b>Pro Kurs entscheiden</b> ausgewählt wird, können Sie in den Kurseigenschaften individuell festlegen, ob eine Anmeldung notwendig ist oder nicht. " > ? </ i ></ a >
</ div >
< div class = " btn-group " role = " group " >
< input type = " radio " class = " btn-check " name = " regbtnradio " id = " registrationyes " value = " registrationyes " autocomplete = " off " < ? = $category [ 'data' ][ 'registration' ] == 'yes' ? 'checked' : '' ; ?> >
< label class = " btn btn-outline-info " for = " registrationyes " > Ja </ label >
< input type = " radio " class = " btn-check " name = " regbtnradio " id = " registrationno " value = " registrationno " autocomplete = " off " < ? = $category [ 'data' ][ 'registration' ] == 'no' ? 'checked' : '' ; ?> >
< label class = " btn btn-outline-info " for = " registrationno " > Nein </ label >
< input type = " radio " class = " btn-check " name = " regbtnradio " id = " registrationcustom " value = " registrationcustom " autocomplete = " off " < ? = $category [ 'data' ][ 'registration' ] == 'custom' ? 'checked' : '' ; ?> >
< label class = " btn btn-outline-info " for = " registrationcustom " > Pro Kurs entscheiden </ label >
</ div >
</ div >
</ div >
< div class = " col-auto " id = " showcourse " >
< div class = " mb-3 " >
< div class = " form-group " >
< label class = " form-label " > Kurse anzeigen bis </ label >
</ div >
< div class = " btn-group " role = " group " >
< input type = " radio " class = " btn-check " name = " datebtnradio " id = " showdateyes " value = " showdateyes " autocomplete = " off " < ? = $category [ 'data' ][ 'showuntil_set' ] == 'yes' ? 'checked' : '' ; ?> >
< label class = " btn btn-outline-info " for = " showdateyes " > Hier festlegen </ label >
< input type = " radio " class = " btn-check " name = " datebtnradio " id = " showdatecustom " value = " showdatecustom " autocomplete = " off " < ? = $category [ 'data' ][ 'showuntil_set' ] == 'custom' ? 'checked' : '' ; ?> >
< label class = " btn btn-outline-info " for = " showdatecustom " > Pro Kurs entscheiden </ label >
</ div >
</ div >
</ div >
< div class = " col-auto " id = " showcoursedate " >
< div class = " mb-3 " >
< div class = " form-group mb-2 " >
< label class = " form-label " ></ label >
</ div >
< div class = " btn-group " role = " group " >
< input type = " date " name = " showuntil " value = " <?= $category['data'] ['showuntil'] ;?> " class = " form-control " >
</ div >
</ div >
</ div >
</ div >
< ? php
$classes = getClassesGroupedByLevel ( 'active' );
$assignedClasses = getAssignedItems ( 'tbl_assign_categories_classes' , $category [ 'data' ][ 'id' ], 'class_id' , 'category_id' );
if ( ! empty ( $classes )) {
echo " <h5 class='fw-semibold mb-4 mt-3'>Klassenzuweisung</h5> " ;
echo " <div class='row'> " ;
foreach ( $classes as $level => $levelClasses ) {
echo " <div class='col'> " ;
echo " <div class='card' style='border-radius:10px;'> " ;
echo " <div class='card-header fw-semibold bg-info-subtle'> " ;
echo " $level " ;
echo " </div> " ;
// Checkbox für "Alle Auswählen"
$idSafeLevel = str_replace ([ '.' , ' ' ], '_' , $level );
$idSafeLevel = preg_replace ( '/[^A-Za-z0-9_]/' , '' , $idSafeLevel );
echo " <div class='form-check ms-3 mt-2 mb-3'> " ;
echo " <input class='form-check-input' type='checkbox' id='select-all_ $idSafeLevel ' data-toggle='select-all' data-level=' $level '> " ;
echo " <label class='form-check-label' for='select-all_ $idSafeLevel ' style='user-select: none; -webkit-user-select: none; -ms-user-select: none;' for=''>Alle auswählen</label> " ;
echo " </div> " ;
foreach ( $levelClasses as $class ) {
$classId = $class [ 'id' ];
$className = htmlspecialchars ( $class [ 'display_name' ]);
$isChecked = in_array ( $classId , $assignedClasses ) ? 'checked' : '' ;
echo " <div class='form-check ms-3 mt-2 mb-3'> " ;
echo " <input class='form-check-input' type='checkbox' name='selected_classes[]' id='class_ $classId ' data-class-id=' $level ' value=' $classId ' $isChecked > " ;
echo " <label class='form-check-label' style='user-select: none; -webkit-user-select: none; -ms-user-select: none;' for='class_ $classId '> $className </label> " ;
echo " </div> " ;
}
echo " </div> " ;
echo " </div> " ;
}
echo " </div> " ;
} else {
echo " <h5>Keine Klassen gefunden.</h5> " ;
}
?>
< div class = " col-12 " >
< button type = " submit " name = " updatecategory " class = " btn btn-info mx-3 float-end " >< i class = " ti ti-check " ></ i > Änderungen speichern </ button >
</ div >
</ div >
</ div >
< div >
< div class = " card card-body p-4 " id = " additionalSettings " >
< div class = " row " >
< div class = " col-6 " >
< h5 class = " fw-semibold mb-4 " > Kursübergreifende Einstellungen </ h5 >
</ div >
</ div >
< div class = " row " >
< div class = " col-auto " >
< div class = " mb-3 " >
< div class = " form-group " >
< label class = " form-label " > Muss die Anmeldung bestätigt werden ? </ label >
< a tabindex = " 0 " class = " badge rounded-pill text-bg-info ms-2 " role = " button " data - bs - toggle = " popover " data - bs - trigger = " focus " data - bs - html = " true " data - bs - content = " Wenn <b>Ja</b> ausgewählt wird, haben Sie bei der Kurszuweisung die Möglichkeit, die Anmeldung anzunehmen oder abzulehnen.</br> Wenn <b>Nein</b> ausgewählt wird, ist die Anmeldung des/der Schüler:in ohne Ihre Interaktion definitiv.</br> Wenn <b>Pro Kurs entscheiden</b> ausgewählt wird, können Sie in den Kurseigenschaften individuell festlegen, ob eine vorwärtige Bestätigung notwendig ist oder nicht. " > ? </ a >
</ div >
< div class = " btn-group " role = " group " >
< input type = " radio " class = " btn-check " name = " confbtnradio " id = " confirmationyes " value = " confirmationyes " autocomplete = " off " < ? = $category [ 'data' ][ 'confirmation' ] == 'yes' ? 'checked' : '' ; ?> >
< label class = " btn btn-outline-info " for = " confirmationyes " > Ja </ label >
< input type = " radio " class = " btn-check " name = " confbtnradio " id = " confirmationno " value = " confirmationno " autocomplete = " off " < ? = $category [ 'data' ][ 'confirmation' ] == 'no' ? 'checked' : '' ; ?> >
< label class = " btn btn-outline-info " for = " confirmationno " > Nein </ label >
< input type = " radio " class = " btn-check " name = " confbtnradio " id = " confirmationcustom " value = " confirmationcustom " autocomplete = " off " < ? = $category [ 'data' ][ 'confirmation' ] == 'custom' ? 'checked' : '' ; ?> >
< label class = " btn btn-outline-info " for = " confirmationcustom " > Pro Kurs entscheiden </ label >
</ div >
</ div >
</ div >
< div class = " col-auto " >
< div class = " mb-3 " >
< div class = " form-group " >
< label class = " form-label " > Anmeldefrist </ label >
</ div >
< div class = " btn-group " role = " group " >
< input type = " radio " class = " btn-check " name = " deadlbtnradio " id = " showdeadlineyes " value = " showdeadlineyes " autocomplete = " off " < ? = $category [ 'data' ][ 'deadline_set' ] == 'yes' ? 'checked' : '' ; ?> >
< label class = " btn btn-outline-info " for = " showdeadlineyes " > Hier festlegen </ label >
< input type = " radio " class = " btn-check " name = " deadlbtnradio " id = " showdeadlinecustom " value = " showdeadlinecustom " autocomplete = " off " < ? = $category [ 'data' ][ 'deadline_set' ] == 'custom' ? 'checked' : '' ; ?> >
< label class = " btn btn-outline-info " for = " showdeadlinecustom " > Pro Kurs entscheiden </ label >
</ div >
</ div >
</ div >
< div class = " col-auto " id = " deadline " >
< div class = " mb-3 " >
< div class = " form-group mb-2 " >
< label class = " form-label " ></ label >
</ div >
< div class = " btn-group " role = " group " >
< input type = " date " name = " deadline " value = " <?= $category['data'] ['deadline'] ;?> " class = " form-control " >
</ div >
</ div >
</ div >
< div class = " col " >
< div class = " mb-3 " >
< div class = " form-group " >
< label class = " form-label " > Min . Auswahl </ label >
< a tabindex = " 0 " class = " badge rounded-pill text-bg-info ms-2 " role = " button " data - bs - toggle = " popover " data - bs - trigger = " focus " data - bs - html = " true " data - bs - content = " So viele Kurse in dieser Kategorie müssen Schüler:innen mindestens auswählen. </br><b>0</b> steht für eine beliebige Anzahl. " > ? </ a >
< input type = " text " name = " min_courses " placeholder = " Min. " onkeydown = " if(!(event.key >= '0' && event.key <= '9') && event.key !== 'Backspace' && event.key !== 'Tab') { return false;} " value = " <?= $category['data'] ['min_courses'] ;?> " class = " form-control " >
</ div >
</ div >
</ div >
< div class = " col " >
< div class = " mb-3 " >
< div class = " form-group " >
< label class = " form-label " > Max . Auswahl </ label >
< a tabindex = " 0 " class = " badge rounded-pill text-bg-info ms-2 " role = " button " data - bs - toggle = " popover " data - bs - trigger = " focus " data - bs - html = " true " data - bs - content = " So viele Kurse in dieser Kategorie dürfen Schüler:innen höchstens auswählen. </br><b>0</b> steht für eine beliebige Anzahl. " > ? </ a >
< input type = " number " name = " max_courses " placeholder = " Max. " value = " <?= $category['data'] ['max_courses'] ;?> " class = " form-control " >
</ div >
</ div >
</ div >
< div class = " col " id = " maxassign_courses " >
< div class = " mb-3 " >
< div class = " form-group " >
< label class = " form-label " > Max . Zuweisung </ label >
< a tabindex = " 0 " class = " badge rounded-pill text-bg-info ms-2 " role = " button " data - bs - toggle = " popover " data - bs - trigger = " focus " data - bs - html = " true " data - bs - content = " So viele Kurse in dieser Kategorie werden dem/der Schüler:in definitiv zugewiesen.</br> Wenn z.B. höchstens 3 Kurse ausgewählt werden können, können Sie z.B. 2 definitiv zuweisen. " > ? </ a >
< input type = " number " name = " maxassign_courses " placeholder = " Max. Zuweisung " value = " <?= $category['data'] ['maxassign_courses'] ;?> " class = " form-control " >
</ div >
</ div >
</ div >
< div class = " col-auto " id = " type " >
< div class = " mb-3 " >
< div class = " form-group " >
< label class = " form-label " > Zuweisungstyp </ label >
< a tabindex = " 0 " class = " badge rounded-pill text-bg-info ms-2 " role = " button " data - bs - toggle = " popover " data - bs - trigger = " focus " data - bs - html = " true " data - bs - content = " Wenn <b>Jahr</b> ausgewählt wird, wird bei der Kurszuweisung dem/der Schüler:in mitgeteilt, dass z.B. <b>Kurs A </b> genehmigt wurde.</br> Wenn <b>Semester</b> ausgewählt wurde, wird bei der Kurszuweisung dem/der Schüler:in mitgeteilt, dass z.B. <b> Kurs A für das 1. Semester </b> und <b> Kurs B für das 2. Semester</b> zugewiesen wurden. " > ? </ a >
</ div >
< div class = " btn-group " role = " group " >
< input type = " radio " class = " btn-check " name = " typebtnradio " value = " typeyear " id = " typeyear " autocomplete = " off " < ? = $category [ 'data' ][ 'type' ] == 'year' ? 'checked' : '' ; ?> >
< label class = " btn btn-outline-info " for = " typeyear " > Jahr </ label >
< input type = " radio " class = " btn-check " name = " typebtnradio " value = " typesemester " id = " typesemester " autocomplete = " off " < ? = $category [ 'data' ][ 'type' ] == 'semester' ? 'checked' : '' ; ?> >
< label class = " btn btn-outline-info " for = " typesemester " > Semester </ label >
</ div >
</ div >
</ div >
< div class = " col-auto " id = " prioritySection " >
< div class = " mb-3 " >
< div class = " form-group " >
< label class = " form-label " > Prioritäten zulassen ? </ label >
< a tabindex = " 0 " class = " badge rounded-pill text-bg-info ms-2 " role = " button " data - bs - toggle = " popover " data - bs - trigger = " focus " data - bs - html = " true " data - bs - content = " Wenn <b>Ja</b> ausgewählt wird, kann der/die Schüler:in bei der Anmeldung auswählen, welcher Kurs Prio1, Prio2, etc. hat. </br>Zum Beispiel: Wenn bei der <b>Höchstanzahl</b> der Kursanmeldungen <b>3</b> angegeben wurde, können die Schüler:innen höchstens drei Kurse auswählen, und jedem Kurs eine Priorität zuweisen. </br> Sie können bei der definitiven Kurszuweisung die Priorität berücksichtigen und auf den Wunsch der Schüler:innen eingehen.</br> Wenn <b>Nein</b> ausgewählt wurde, können die Schüler:innen keine Prioritäten bei der Kursanmeldung angeben, und Sie sehen bei der Kurszuweisung lediglich, dass z.B. Schüler:in X sich für die Kurse A, B und C angemeldet hat. " > ? </ a >
</ div >
< div class = " btn-group " role = " group " >
< input type = " radio " class = " btn-check " name = " priobtnradio " value = " prioyes " id = " prioyes " autocomplete = " off " < ? = $category [ 'data' ][ 'set_priority' ] == 'yes' ? 'checked' : '' ; ?> >
< label class = " btn btn-outline-info " for = " prioyes " > Ja </ label >
< input type = " radio " class = " btn-check " name = " priobtnradio " value = " priono " id = " priono " autocomplete = " off " < ? = $category [ 'data' ][ 'set_priority' ] == 'no' ? 'checked' : '' ; ?> >
< label class = " btn btn-outline-info " for = " priono " > Nein </ label >
</ div >
</ div >
</ div >
</ div >
</ div >
</ div >
< div >
< ? php
if ( $category [ 'data' ][ 'registration' ]){
?>
< div class = " card card-body p-4 " >
< div class = " row " >
< div class = " col-6 " >
< h5 class = " fw-semibold mb-4 " > Kurse </ h5 >
</ div >
< div class = " col-6 " >
< a href = " courses-create.php?cat_id=<?= $category['data'] ['id'] ;?> " class = " btn btn-info float-end " > < i class = " ti ti-plus " ></ i > Kurs hinzufügen </ a >
</ div >
</ div >
< div class = " table-responsive " >
< table class = " table table-hover " >
< tbody >
< ? php
$category_id = $category [ 'data' ][ 'id' ];
$courses = getAll ( 'id,name' , 'tbl_courses' , " WHERE category_id=' $category_id ' " );
if ( mysqli_num_rows ( $courses ) > 0 )
{
foreach ( $courses as $courseEntry )
{
?>
< tr >
< td >< ? = $courseEntry [ 'name' ]; ?> </td>
< td >
< a href = " courses-edit.php?id=<?= $courseEntry['id'] ; ?> " class = " btn btn-light btn-sm float-end mx-1 " > < i class = " ti ti-arrow-right " ></ i ></ a >
</ td >
</ tr >
< ? php
}
}
else
{
?>
< tr >
< td colspan = " 7 " > Keine Kurse vorhanden </ td >
</ tr >
< ? php
}
?>
</ tbody >
</ table >
</ div >
</ div >
</ div >
< ? php
}
?>
</ form >
</ div >
< ? php
}
else
{
echo '<div class="alert alert-danger" role="alert">' . $category [ 'message' ] . '</div>' ;
}
?>
< script >
$ ( document ) . ready ( function () {
// Überwache Änderungen an den Klassen-Checkboxen
$ ( 'input[name="selected_classes[]"]' ) . change ( function () {
updateSelectAllCheckbox ( $ ( this ) . data ( 'class-id' ));
});
// Überwache Änderungen an den "Alle auswählen"-Checkboxen
$ ( 'input[type="checkbox"][data-toggle="select-all"]' ) . change ( function () {
var level = $ ( this ) . data ( 'level' );
var isChecked = $ ( this ) . prop ( 'checked' );
$ ( 'input[name="selected_classes[]"][data-class-id="' + level + '"]' ) . prop ( 'checked' , isChecked );
});
// Initialisiere den Status der "Alle auswählen"-Checkboxen beim Laden der Seite
$ ( 'input[data-toggle="select-all"]' ) . each ( function () {
updateSelectAllCheckbox ( $ ( this ) . data ( 'level' ));
});
});
// Funktion zum Aktualisieren des Status der "Alle auswählen"-Checkboxen
function updateSelectAllCheckbox ( level ) {
var classCheckboxes = $ ( 'input[name="selected_classes[]"][data-class-id="' + level + '"]' );
var selectAllCheckbox = $ ( 'input[data-toggle="select-all"][data-level="' + level + '"]' );
var allChecked = true ;
var anyChecked = false ;
classCheckboxes . each ( function () {
if ( ! $ ( this ) . prop ( 'checked' )) {
allChecked = false ;
} else {
anyChecked = true ;
}
});
selectAllCheckbox . prop ( 'checked' , allChecked );
selectAllCheckbox . prop ( 'indeterminate' , anyChecked && ! allChecked );
}
</ script >
< script >
const popover = new bootstrap . Popover ( '.popover-dismiss' , {
trigger : 'focus'
});
</ script >
< script >
// Funktion zum Aktualisieren des Anzeigezustands
function updateDisplay () {
if ( $ ( " #registrationno " ) . is ( " :checked " )) {
$ ( " #showcourse " ) . show ();
} else {
$ ( " #showcourse " ) . hide ();
}
if ( $ ( " #showdateyes " ) . is ( " :checked " )) {
$ ( " #showcoursedate " ) . show ();
} else {
$ ( " #showcoursedate " ) . hide ();
}
if ( $ ( " #registrationyes " ) . is ( " :checked " ) || $ ( " #registrationcustom " ) . is ( " :checked " )) {
$ ( " #additionalSettings " ) . show ();
$ ( " #showcoursedate " ) . hide ();
} else {
$ ( " #additionalSettings " ) . hide ();
}
if ( $ ( " #registrationcustom " ) . is ( " :checked " )) {
$ ( " #confirmationcustom " ) . prop ( 'checked' , true );
$ ( 'input[name="confbtnradio"]' ) . prop ( 'readonly' , true );
$ ( " #showdeadlinecustom " ) . prop ( 'checked' , true );
$ ( 'input[name="deadlbtnradio"]' ) . prop ( 'readonly' , true );
} else {
$ ( 'input[name="confbtnradio"]' ) . prop ( 'readonly' , false );
}
if ( $ ( " #confirmationcustom " ) . is ( " :checked " )) {
$ ( " #typeyear " ) . prop ( 'checked' , true );
$ ( 'input[name="typebtnradio"]' ) . prop ( 'readonly' , true );
$ ( " #priono " ) . prop ( 'checked' , true );
$ ( 'input[name="priobtnradio"]' ) . prop ( 'readonly' , true );
} else {
$ ( 'input[name="typebtnradio"]' ) . prop ( 'readonly' , false );
$ ( 'input[name="priobtnradio"]' ) . prop ( 'readonly' , false );
}
if ( $ ( " #showdeadlineyes " ) . is ( " :checked " )) {
$ ( " #deadline " ) . show ();
} else {
$ ( " #deadline " ) . hide ();
}
if ( $ ( " #confirmationyes " ) . is ( " :checked " ) || $ ( " #confirmationcustom " ) . is ( " :checked " )) {
$ ( " #maxassign_courses " ) . show ();
$ ( " #type " ) . show ();
$ ( " #prioritySection " ) . show ();
} else {
$ ( " #maxassign_courses " ) . hide ();
$ ( " #type " ) . hide ();
$ ( " #prioritySection " ) . hide ();
}
}
$ ( document ) . ready ( function (){
// Setze den Anfangszustand beim Laden der Seite
updateDisplay ();
// Überwache Änderungen am Radiobutton
$ ( 'input[name="regbtnradio"]' ) . change ( function (){
updateDisplay ();
});
$ ( 'input[name="datebtnradio"]' ) . change ( function (){
updateDisplay ();
});
$ ( 'input[name="deadlbtnradio"]' ) . change ( function (){
updateDisplay ();
});
$ ( 'input[name="confbtnradio"]' ) . change ( function (){
updateDisplay ();
});
$ ( 'input[name="typebtnradio"]' ) . change ( function (){
updateDisplay ();
});
$ ( 'input[name="priobtnradio"]' ) . change ( function (){
updateDisplay ();
});
});
</ script >
< script >
// Funktion zum Überwachen von Änderungen in den Textfeldern
function checkMinMaxCourses () {
// Wert von min_courses und max_courses holen
var minCoursesValue = parseInt ( document . getElementsByName ( " min_courses " )[ 0 ] . value );
var maxCoursesValue = parseInt ( document . getElementsByName ( " max_courses " )[ 0 ] . value );
var maxAssignCoursesValue = parseInt ( document . getElementsByName ( " maxassign_courses " )[ 0 ] . value );
// Überprüfen und Anpassen der Werte
if ( ! isNaN ( minCoursesValue ) && ! isNaN ( maxCoursesValue )) {
if ( minCoursesValue > maxCoursesValue ) {
// Wenn min_courses größer ist als max_courses, setze max_courses auf den Wert von min_courses
document . getElementsByName ( " max_courses " )[ 0 ] . value = minCoursesValue ;
} else if ( maxCoursesValue < minCoursesValue ) {
// Wenn max_courses kleiner ist als min_courses, setze min_courses auf den Wert von max_courses
document . getElementsByName ( " min_courses " )[ 0 ] . value = maxCoursesValue ;
}
}
if ( ! isNaN ( maxCoursesValue ) && ! isNaN ( maxAssignCoursesValue )) {
if ( maxAssignCoursesValue > maxCoursesValue ) {
// Wenn maxassign_courses größer ist als max_courses, setze maxassign_courses auf den Wert von max_courses
document . getElementsByName ( " maxassign_courses " )[ 0 ] . value = maxCoursesValue ;
}
}
}
// Event-Listener hinzufügen
document . getElementsByName ( " min_courses " )[ 0 ] . addEventListener ( " input " , checkMinMaxCourses );
document . getElementsByName ( " max_courses " )[ 0 ] . addEventListener ( " input " , checkMinMaxCourses );
document . getElementsByName ( " maxassign_courses " )[ 0 ] . addEventListener ( " input " , checkMinMaxCourses );
</ script >
< ? php include ( 'includes/footer.php' ); ?>