Пример #1
0
} else {
    $score_all = $teststat['testinfo']['user_score'] . $passmsg;
}
echo getFormDescriptionLine($l['w_score'] . ':', $l['h_score_total'], $score_all);
$score_right_all = $teststat['qstats']['right'] . ' / ' . $teststat['qstats']['recurrence'] . ' (' . $teststat['qstats']['right_perc'] . '%)';
echo getFormDescriptionLine($l['w_answers_right'] . ':', $l['h_answers_right'], $score_right_all);
echo getFormDescriptionLine($l['w_comment'] . ':', $l['h_testcomment'], F_decode_tcecode($teststat['testinfo']['user_comment']));
if (F_getBoolean($teststat['testinfo']['test_report_to_users'])) {
    echo '<div class="rowl">' . K_NEWLINE;
    echo F_printUserTestStat($testuser_id);
    echo '</div>' . K_NEWLINE;
    // print statistics for modules and subjects
    echo '<div class="rowl">' . K_NEWLINE;
    echo '<hr />' . K_NEWLINE;
    echo '<h2>' . $l['w_stats'] . '</h2>';
    echo F_printTestStat($test_id, 0, $user_id, 0, 0, $testuser_id, $teststat, 1, true);
    echo '<hr />' . K_NEWLINE;
    echo '</div>' . K_NEWLINE;
    if (K_ENABLE_PUBLIC_PDF) {
        echo '<div class="row">' . K_NEWLINE;
        // PDF button
        echo '<a href="tce_pdf_results.php?mode=3&amp;test_id=' . $test_id . '&amp;user_id=' . $user_id . '&amp;testuser_id=' . $testuser_id . '" class="xmlbutton" title="' . $l['h_pdf'] . '">' . $l['w_pdf'] . '</a> ';
        echo '</div>' . K_NEWLINE;
    }
}
echo '</div>' . K_NEWLINE;
echo '<a href="index.php" title="' . $l['h_index'] . '">&lt; ' . $l['w_index'] . '</a>' . K_NEWLINE;
echo '<div class="pagehelp">' . $l['hp_result_user'] . '</div>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
require_once '../code/tce_page_footer.php';
//============================================================+
Пример #2
0
echo '</div>' . K_NEWLINE;
// display svg graph
if ($show_graph and isset($data['svgpoints']) and preg_match_all('/[x]/', $data['svgpoints'], $match) > 1) {
    $w = 800;
    $h = 300;
    echo '<div class="row">' . K_NEWLINE;
    echo '<hr />' . K_NEWLINE;
    // legend
    echo '<div style="font-size:90%;"><br /><span style="background-color:#ff0000;color:#ffffff;">&nbsp;' . $l['w_score'] . '&nbsp;</span> <span style="background-color:#0000ff;color:#ffffff;">&nbsp;' . $l['w_answers_right'] . '&nbsp;</span> / <span style="background-color:#dddddd;color:#000000;">&nbsp;' . $l['w_tests'] . '&nbsp;</span></div>';
    echo '<img src="../../shared/code/tce_svg_graph.php?w=' . $w . '&amp;h=' . $h . '&amp;p=' . substr($data['svgpoints'], 1) . '" width="' . $w . '" height="' . $h . '" alt="' . $l['w_result_graph'] . '" />' . K_NEWLINE;
    echo '</div>' . K_NEWLINE;
}
if ($display_mode > 1) {
    // display statistics for modules and subjects
    echo '<div class="rowl">' . K_NEWLINE;
    echo F_printTestStat($test_id, $group_id, $user_id, $startdate, $enddate, 0, $data, $display_mode, true);
    echo '<br />' . K_NEWLINE;
    echo '</div>' . K_NEWLINE;
}
if ($itemcount > 0) {
    echo '<div class="row">' . K_NEWLINE;
    // show buttons by case
    echo '<a href="tce_pdf_results.php?mode=1' . $filter . '" class="xmlbutton" title="' . $l['h_pdf'] . '">' . $l['w_pdf'] . '</a> ';
    echo '<a href="tce_pdf_results.php?mode=4' . $filter . '" class="xmlbutton" title="' . $l['h_pdf_all'] . '">' . $l['w_pdf_all'] . '</a> ';
    echo '<input type="hidden" name="order_field" id="order_field" value="' . $order_field . '" />' . K_NEWLINE;
    echo '<input type="hidden" name="orderdir" id="orderdir" value="' . $orderdir . '" />' . K_NEWLINE;
    // comma separated list of required fields
    echo '<input type="hidden" name="ff_required" id="ff_required" value="" />' . K_NEWLINE;
    echo '<input type="hidden" name="ff_required_labels" id="ff_required_labels" value="" />' . K_NEWLINE;
    echo '<input type="hidden" name="itemcount" id="itemcount" value="' . $itemcount . '>" />' . K_NEWLINE;
    echo '</div>' . K_NEWLINE;
Пример #3
0
header('Content-Transfer-Encoding: binary');
// get data
$data = F_getAllUsersTestStat($test_id, $group_id, $user_id, $startdate, $enddate, $full_order_field, false, $display_mode);
// format data as HTML table
$table = F_printTestResultStat($data, 1, $order_field, '', false, $display_mode);
$table .= F_printTestStat($test_id, $group_id, $user_id, $startdate, $enddate, 0, $data, $display_mode);
// convert HTML table to TSV
echo F_html_to_TSV($table);
if ($user_id == 0) {
    $users = array();
    foreach ($data['testuser'] as $tu) {
        $users[$tu['user_id']] = $tu['user_id'];
    }
    if (count($users) > 1) {
        echo K_NEWLINE . K_NEWLINE . K_NEWLINE . '<<< DETAILS >>>' . K_NEWLINE;
        // display detailed stats for each user
        foreach ($users as $uid) {
            echo K_NEWLINE . K_NEWLINE . '### USER' . K_TAB . $uid . K_NEWLINE . K_NEWLINE;
            // get data
            $usrdata = F_getAllUsersTestStat($test_id, $group_id, $uid, $startdate, $enddate, $full_order_field);
            // format data as HTML table
            $table = F_printTestResultStat($usrdata, 1, $order_field, '', false, $display_mode);
            $table .= F_printTestStat($test_id, $group_id, $uid, $startdate, $enddate, 0, $usrdata, $display_mode);
            // convert HTML table to TSV
            echo F_html_to_TSV($table);
        }
    }
}
//============================================================+
// END OF FILE
//============================================================+