示例#1
0
            ?>
</td>
			<td><?php 
            echo get_class_avg($row["gradebook_test_id"]);
            ?>
</td>
			<td><?php 
            echo $row["due_date"];
            ?>
</td>
			<td><?php 
            echo $grade == "" ? _AT("na") : $row_tr["date_taken"];
            ?>
</td>
			<td><?php 
            echo $grade == "" ? _AT("na") : get_human_time($row_tr['diff']);
            ?>
</td>
		</tr>
<?php 
        } else {
            ?>
		<tr>
			<td><?php 
            echo $row["title"];
            ?>
</td>
			<td><?php 
            echo $grade == "" ? _AT("na") : $grade;
            ?>
</td>
示例#2
0
?>
</th>
</tr>
</thead>
<tbody>
<?php 
$sql = "SELECT T.*, R.*, (UNIX_TIMESTAMP(R.end_time) - UNIX_TIMESTAMP(R.date_taken)) AS diff FROM " . TABLE_PREFIX . "tests T, " . TABLE_PREFIX . "tests_results R, " . TABLE_PREFIX . "tests_questions_assoc Q WHERE R.status=1 AND Q.test_id=T.test_id AND R.member_id={$_SESSION['member_id']} AND R.test_id=T.test_id AND T.course_id={$_SESSION['course_id']} GROUP BY R.result_id ORDER BY R.date_taken DESC";
$result = mysql_query($sql, $db);
$num_results = mysql_num_rows($result);
if ($row = mysql_fetch_assoc($result)) {
    $this_course_id = 0;
    do {
        echo '<tr>';
        echo '<td><strong>' . AT_print($row['title'], 'tests.title') . '</strong></td>';
        echo '<td>' . AT_date($startend_date_long_format, $row['date_taken']) . '</td>';
        echo '<td>' . get_human_time($row['diff']) . '</td>';
        echo '<td>';
        if ($row['out_of'] == 0) {
            echo _AT('na');
        } elseif ($row['final_score'] == '') {
            echo _AT('unmarked');
        } elseif ($row['final_score'] != '' && $row['result_release'] == AT_RELEASE_NEVER) {
            echo _AT('unreleased');
        } else {
            if ($row['random']) {
                $out_of = get_random_outof($row['test_id'], $row['result_id']);
            } else {
                $out_of = $row['out_of'];
            }
            echo '<strong>' . $row['final_score'] . '</strong>/' . $out_of;
        }
示例#3
0
			<td><?php 
        if ($anonymous == 0 && $row['member_id']) {
            echo $row['full_name'];
        } else {
            echo $guest_text;
            // no need in AT_print(): $guest_text is a trusted _AT() output
        }
        ?>
</td>
			<td><?php 
        $startend_date_format = _AT('startend_date_format');
        echo AT_date($startend_date_format, $row['date_taken'], AT_DATE_MYSQL_DATETIME);
        ?>
</td>
			<td><?php 
        echo get_human_time($row['time_spent']);
        ?>
</td>

			<td align="center">
				<?php 
        if ($out_of) {
            if ($random) {
                $out_of = get_random_outof($tid, $row['result_id']);
            }
            if ($row['final_score'] != '') {
                echo $row['final_score'] . '/' . $out_of;
            } else {
                echo _AT('unmarked');
            }
        } else {
示例#4
0
?>
</th>
</tr>
</thead>
<tbody>
<?php 
$sql = "SELECT T.*, R.*, (UNIX_TIMESTAMP(R.end_time) - UNIX_TIMESTAMP(R.date_taken)) AS diff FROM %stests T, %stests_results R, %stests_questions_assoc Q WHERE R.status=1 AND Q.test_id=T.test_id AND R.member_id=%d AND R.test_id=T.test_id AND T.course_id=%d GROUP BY R.result_id ORDER BY R.date_taken DESC";
$rows_results = queryDB($sql, array(TABLE_PREFIX, TABLE_PREFIX, TABLE_PREFIX, $_SESSION['member_id'], $_SESSION['course_id']));
$num_results = count($rows_results);
if ($num_results > 0) {
    $this_course_id = 0;
    foreach ($rows_results as $row) {
        echo '<tr>';
        echo '<td><strong>' . AT_print($row['title'], 'tests.title') . '</strong></td>';
        echo '<td>' . AT_date($startend_date_long_format, $row['date_taken']) . '</td>';
        echo '<td class="hidecol480">' . get_human_time($row['diff']) . '</td>';
        echo '<td>';
        if ($row['out_of'] == 0) {
            echo _AT('na');
        } elseif ($row['final_score'] == '') {
            echo _AT('unmarked');
        } elseif ($row['final_score'] != '' && $row['result_release'] == AT_RELEASE_NEVER) {
            echo _AT('unreleased');
        } else {
            if ($row['random']) {
                $out_of = get_random_outof($row['test_id'], $row['result_id']);
            } else {
                $out_of = $row['out_of'];
            }
            echo '<strong>' . $row['final_score'] . '</strong>/' . $out_of;
        }