mirror of
https://github.com/CAcertOrg/cats.git
synced 2024-11-09 15:44:03 +00:00
51 lines
1.5 KiB
PHP
51 lines
1.5 KiB
PHP
|
<?php
|
|||
|
// Bereich f<>r alle User zug<75>nglich
|
|||
|
if($_SESSION['profile']['loggedin']==1){
|
|||
|
|
|||
|
// Objekte erzeugen
|
|||
|
$topic=new Topic();
|
|||
|
$progress=new Progress();
|
|||
|
|
|||
|
// <20>berpr<70>fung / Wertzuweisung
|
|||
|
$action=''; if(isset($_GET['action'])) $action=strval($_GET['action']);
|
|||
|
$topic=0; if(isset($_REQUEST["t_id"]))$topic=abs(intval($_REQUEST["t_id"]));
|
|||
|
|
|||
|
// <20>bepr<70>fung auf buchstaben (keine Zahlen zugelassen)
|
|||
|
if(!ctype_alpha($action)) unset($action);
|
|||
|
|
|||
|
// als Tabelle zeigen
|
|||
|
if($action == "showTable"){
|
|||
|
$progress->setTopic($topic);
|
|||
|
$progress->getProgress();
|
|||
|
$progress->showTable();
|
|||
|
}
|
|||
|
|
|||
|
// als Liniendiagramm anzeigen
|
|||
|
if($action == "showGraph") {
|
|||
|
$progress->setTopic($topic);
|
|||
|
$progress->getProgress();
|
|||
|
$progress->showGraph();
|
|||
|
}
|
|||
|
|
|||
|
// als Balkendiagramm anzeigen
|
|||
|
if($action == "showBalken"){
|
|||
|
$progress->setTopic($topic);
|
|||
|
$progress->getProgress();
|
|||
|
$progress->showBalken();
|
|||
|
}
|
|||
|
|
|||
|
if($action == "showIncorrectAnswers"){
|
|||
|
|
|||
|
// <20>berpr<70>fung / Wertzuweisung
|
|||
|
$lp_id=0; if($_REQUEST["lp_id"])$lp_id=abs(intval($_REQUEST["lp_id"]));
|
|||
|
|
|||
|
$progress->setTopic($topic);
|
|||
|
$progress->getProgress();
|
|||
|
$progress->setLp_id($lp_id);
|
|||
|
$progress->getIncorrectAnswers();
|
|||
|
}
|
|||
|
}
|
|||
|
else echo "<h5 class='centered'>".Global_01.'</h5>';
|
|||
|
|
|||
|
?>
|