예제 #1
0
<?php

require_once 'includes/QBCoref.class.php';
$qbc = new QBCoref();
if (!$qbc->isUser()) {
    header("Location: login.php");
    exit;
}
$qid = $qbc->getLastQuestion();
if (!empty($_GET['qid']) && is_numeric($_GET['qid'])) {
    $qid = $_GET['qid'];
}
// Save last qid accessed for user
$qbc->updateLastQuestion($qid);
$question = $qbc->getQuestion($qid);
$answer = $qbc->getAnswer($qid);
$corefs = $qbc->getCorefsAsJSON($qid, $_SESSION['username']);
$show_accuracy = $qbc->isQuestionGoldStandard($qid);
$total_corefs = 0;
if ($show_accuracy) {
    $total_corefs = $qbc->getCountGoldStandardCorefs($qid);
}
$prevqid = $qbc->getPrevQuestion($qid);
$nextqid = $qbc->getNextQuestion($qid);
// Redirect if first login
if ($qbc->first_login == true) {
    header("Location: tutorial.php?first=1");
    exit;
}
// Check for old version of IE
if ($qbc->isUsingOldIEBrowser()) {