Exemplo n.º 1
0
include 'header.php';
//process a report
if ($_POST['report']) {
    $quests = new Questions();
    $quests->report_question($_POST['Qid'], $_POST['reportText'], $user->data['user_id']);
    echo '<a href="index.php">Report Fixed, return to the home page</a>';
    die;
}
$event = 0;
if (is_numeric($_GET['event'])) {
    $event = $_GET['event'];
}
$question = new Questions();
$name = $question->get_event($event);
$number = $question->get_number($event);
$questionTotal = $question->get_number($event);
$status = '3';
$incorrect = '';
$number_attempts = 0;
if ($_POST['giveUp']) {
    $status = 3;
    if ($_POST['type'] == 1 || $_POST['type'] == 3) {
        $incorrect = $question->get_answer_mc($_POST['idval']);
    } else {
        if ($_POST['type'] == 2 || $_POST['type'] == 4) {
            $incorrect = $question->get_answer_short($_POST['idval']);
        }
    }
    $number_attempts = $_POST['attempts'];
    $questionArray = $question->get_question($event, $_POST['idval']);