mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 18:02:18 +00:00
- Added offsetpunkte Berechnung for Suggestions on admin/edit_gebiet page
- offsetpunkte are validated before saving
This commit is contained in:
@@ -258,7 +258,13 @@ if ($gebiet_id != '')
|
||||
$hinweis = '';
|
||||
echo '<td>Maximale Punkteanzahl</td><td><input type="text" size="5" maxlength="5" name="maxpunkte" value="'.$gebiet->maxpunkte.'">'.$hinweis.'</td>';
|
||||
echo '</tr><tr>';
|
||||
echo '<td>Offsetpunkte (minimale Punkteanzahl)</td><td><input type="text" size="5" maxlength="5" name="offsetpunkte" value="'.$gebiet->offsetpunkte.'"></td>';
|
||||
// empfohlene offsetpunkte berechnen und anzeigen
|
||||
$offsetpunkte = $gebiet->berechneOffsetpunkte($gebiet_id);
|
||||
if ($gebiet->offsetpunkte != $offsetpunkte)
|
||||
$hinweis = ' <span class="error">empfohlene Offsetpunkteanzahl: '.round($offsetpunkte).(round($offsetpunkte) != $offsetpunkte?' ('.$offsetpunkte.' gerundet)':'').'</span>';
|
||||
else
|
||||
$hinweis = '';
|
||||
echo '<td>Offsetpunkte (minimale Punkteanzahl)</td><td><input type="text" size="5" maxlength="5" name="offsetpunkte" value="'.$gebiet->offsetpunkte.'">'.$hinweis.'</td>';
|
||||
echo '</tr><tr>';
|
||||
echo '<td>Maximale Fragenanzahl</td><td><input type="text" size="5" maxlength="5" name="maxfragen" value="'.$gebiet->maxfragen.'"></td>';
|
||||
echo '</tr><tr>';
|
||||
|
||||
Reference in New Issue
Block a user