reihungst admin edit_gebiet.php: checking that there are same negativpoints for one gebiet and one level before showing offsetpunkte suggestion for RT gebiete

This commit is contained in:
alex
2020-02-17 19:26:55 +01:00
parent 21da8dfb51
commit a063a73c41
2 changed files with 60 additions and 13 deletions
+9 -5
View File
@@ -259,12 +259,16 @@ if ($gebiet_id != '')
echo '<td>Maximale Punkteanzahl</td><td><input type="text" size="5" maxlength="5" name="maxpunkte" value="'.$gebiet->maxpunkte.'">'.$hinweis.'</td>';
echo '</tr><tr>';
// empfohlene offsetpunkte berechnen und anzeigen
$offsethinweis = '';
$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>';
if ($offsetpunkte)
{
$offsetwarnung = strlen($gebiet->errormsg) > 0 ? ' (HINWEIS: '.$gebiet->errormsg.')' : '';
if ($gebiet->offsetpunkte != $offsetpunkte)
$offsethinweis = ' <span class="error">empfohlene Offsetpunkteanzahl: '.round($offsetpunkte).(round($offsetpunkte) != $offsetpunkte ? ' ('.$offsetpunkte.' gerundet)' : '').$offsetwarnung.'</span>';
}
echo '<td>Offsetpunkte (minimale Punkteanzahl)</td><td><input type="text" size="5" maxlength="5" name="offsetpunkte" value="'.$gebiet->offsetpunkte.'">'.$offsethinweis.'</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>';