Merge branch 'master' into feature-6141/Testtool_Sprache_Fallback

This commit is contained in:
Manfred Kindl
2020-02-23 21:30:06 +01:00
105 changed files with 12436 additions and 10064 deletions
+13
View File
@@ -186,6 +186,7 @@ if (isset($_POST['speichern']))
$gebiet->zufallvorschlag = isset($_POST['zufallvorschlag']);
$gebiet->levelgleichverteilung = isset($_POST['levelgleichverteilung']);
$gebiet->maxpunkte = $_POST['maxpunkte'];
$gebiet->offsetpunkte = $_POST['offsetpunkte'];
$gebiet->maxfragen = $_POST['maxfragen'];
$gebiet->level_start = $_POST['level_start'];
$gebiet->level_sprung_auf = $_POST['level_sprung_auf'];
@@ -257,6 +258,18 @@ 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>';
// empfohlene offsetpunkte berechnen und anzeigen
$offsethinweis = '';
$offsetpunkte = $gebiet->berechneOffsetpunkte($gebiet_id);
if ($offsetpunkte)
{
$offsetwarnung = strlen($gebiet->errormsg) > 0 ? ' (HINWEIS: '.$gebiet->errormsg.')' : '';
$offsethinweis = ' <span class="error">empfohlene Offsetpunkteanzahl: '.round($offsetpunkte).(round($offsetpunkte) != $offsetpunkte ? ' ('.$offsetpunkte.' gerundet)' : '').'</span>';
$offsethinweis .= '<span class="error">'.$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>';
echo '<td>Antworten pro Zeile</td><td><input type="text" size="5" maxlength="2" name="antwortenprozeile" value="'.$gebiet->antwortenprozeile.'" required></td>';
+30 -5
View File
@@ -35,7 +35,7 @@ if (!$db = new basis_db())
<title>Testool Fragen Übersicht</title>
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
</head>
<body>
<body style="padding: 10px">
<?php
$user = get_uid();
$rechte = new benutzerberechtigung();
@@ -47,7 +47,8 @@ if(!$rechte->isBerechtigt('basis/testtool', null, 's'))
$gebiet = new gebiet();
$gebiet->getAll();
$sprache = (isset($_REQUEST['Sprache'])?$_REQUEST['Sprache']:'German');
$Auswahlgebiet = (isset($_REQUEST['AuswahlGebiet'])?$_REQUEST['AuswahlGebiet']:'');
$Auswahlgebiet = (isset($_REQUEST['AuswahlGebiet'])?$_REQUEST['AuswahlGebiet']:'');
$loesungen = (isset($_REQUEST['loesungen']) && $_REQUEST['loesungen'] != '' ? true:false);
echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post" name="TesttoolUebersicht">
<table>
@@ -76,6 +77,13 @@ else
echo'</select>
</td>
</tr>
<tr>
<td>
Mit Lösungen
</td>
<td><input type="checkbox" name="loesungen" '.($loesungen ? 'checked':'').'></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Anzeigen"></td></tr>
</table><br>';
@@ -208,8 +216,17 @@ if(isset($_REQUEST['AuswahlGebiet']))
$vorschlag = new vorschlag();
$vorschlag->loadVorschlagSprache($vor->vorschlag_id, $sprache);
if($vorschlag->bild =='')
echo '<tr><td align="right"><b>'.$vor->punkte.'</b></td><td style="border-left:1px solid;">&nbsp;'.$vorschlag->text.'</td></tr>';
if($vorschlag->bild == '')
{
if ($loesungen)
{
echo '<tr><td style="border-right:1px solid;">'.$vor->nummer.'</td></td><td align="right"><b>'.$vor->punkte.'</b></td><td style="border-left:1px solid;">&nbsp;'.$vorschlag->text.'</td></tr>';
}
else
{
echo '<tr><td style="border-right:1px solid;">'.$vor->nummer.'</td><td>&nbsp;'.$vorschlag->text.'</td></tr>';
}
}
if($vorschlag->bild!='')
{
// zeilenumbruch nach 4 bilder
@@ -217,7 +234,15 @@ if(isset($_REQUEST['AuswahlGebiet']))
echo "</tr>";
echo "<td>";
echo "<img class='testtoolvorschlag' src='../bild.php?src=vorschlag&amp;vorschlag_id=$vor->vorschlag_id&amp;sprache=".$sprache."' /><br/>";
echo "<br>".$vor->punkte."</td>";
if ($loesungen)
{
echo "<br>".$vor->punkte."</td>";
}
else
{
echo "</td>";
}
$anzahlBild++;
}
if($vorschlag->audio!='')