71 lines
1.8 KiB
PHP
71 lines
1.8 KiB
PHP
<?php
|
|
|
|
$false = 0;
|
|
$true = 0;
|
|
|
|
|
|
$sql = "SELECT `value`,`id` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path` = '$userid/lang/$list/'";
|
|
$result_articles = $conn->query($sql);
|
|
if(mysqli_num_rows($result_articles))
|
|
{
|
|
|
|
while ($articleDb = mysqli_fetch_object($result_articles))
|
|
{
|
|
|
|
|
|
$voc = json_decode($articleDb->value, true);
|
|
$id = $articleDb->id;
|
|
|
|
if($voc[0]['activeLearn'] == 'true') {
|
|
$number_main++;
|
|
}
|
|
|
|
if($voc[0]['learnStatus'] == 'true' || $voc[0]['learnStatus'] == 'false') {
|
|
$number_completed++;
|
|
}
|
|
|
|
if($voc[0]['learnStatus'] == 'true') {
|
|
$true++;
|
|
}
|
|
|
|
if($voc[0]['learnStatus'] == 'false') {
|
|
$false++;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$width_true = ($true / $number_main) * 100;
|
|
$width_false = ($false / $number_main) * 100;
|
|
|
|
?>
|
|
<div class="fixed-title">
|
|
<h2>Zusammenfassung</h2>
|
|
</div>
|
|
<div class="fixed-title-spacer">
|
|
<div class="folder-view-wrapper">
|
|
<div class="settings-section">
|
|
<div class="summary-relation">
|
|
<div style="width: <?php echo $width_false; ?>%"></div>
|
|
<div style="width: <?php echo $width_true; ?>%"></div>
|
|
</div>
|
|
<br>
|
|
<table width="100%">
|
|
<tr>
|
|
<td width="50%" align="left"><?php echo $false; ?> Falsch</td>
|
|
<td width="50%" align="right"><?php echo $true; ?> Richtig</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<br>
|
|
<div class="form">
|
|
<button onclick="getContent('list','','scrollLeft')" class="default-button">Fertig</button>
|
|
</div>
|
|
<div class="form">
|
|
<button onclick="getContent('action:train','start')" class="default-button">Trainieren</button>
|
|
</div>
|
|
<h6>Unter "Trainieren" können alle falsch beantworteten Vorkabeln noch einmal durchgegeangen werden</h6>
|
|
</div>
|
|
</div>
|