예제 #1
0
</div>
  <div style="padding-left:42px"><input type="checkbox" name="selectall" id="selectall" /> <strong><?php 
    echo $string['selectall'];
    ?>
</strong></div>
  </div>
  
  <table>
  <?php 
    if ($paper_type == '2') {
        $time_int = 2;
    } else {
        $time_int = 0;
    }
    // Get any previous remark settings.
    $remark_array = textbox_marking_utils::get_remark_users($paperID, $mysqli);
    if (count($remark_array) > 0) {
        $prev_remark = true;
    } else {
        $prev_remark = false;
    }
    // Get back total marks for the paper excluding all textboxes.
    $marks_array = array();
    if ($paper_type == '0') {
        $sql = <<<SQL
\t\t\tSELECT SUM(adjmark) AS adjmark_total, userID, username
\t\t\t\tFROM log0, log_metadata, questions, users
\t\t\t\tWHERE log0.metadataID = log_metadata.id
\t\t\t\tAND paperID = ?
\t\t\t\tAND log0.q_id = questions.q_id
\t\t\t\tAND q_type NOT IN ('textbox','info')
예제 #2
0
$candidate_no = 0;
if ($paper_type == '0' or $paper_type == '1' or $paper_type == '2') {
    // Get how many students took the paper.
    $result = $mysqli->prepare("SELECT DISTINCT lm.userID FROM log_metadata lm INNER JOIN users u ON lm.userID = u.id WHERE lm.paperID = ? AND DATE_ADD(lm.started, INTERVAL 2 MINUTE) >= ? AND lm.started <= ? AND (u.roles LIKE '%Student%' OR u.roles = 'graduate')");
    $result->bind_param('iss', $paperID, $startdate, $enddate);
    $result->execute();
    $result->bind_result($tmp_userID);
    while ($result->fetch()) {
        $candidate_no++;
    }
    $result->close();
}
$second_mark = array();
if (isset($_GET['phase']) and $_GET['phase'] == 2) {
    // Get the usernames of papers to second mark.
    $second_mark = textbox_marking_utils::get_remark_users($paperID, $mysqli);
}
$phase_description = '';
if (!isset($_GET['phase'])) {
    $phase_description .= $string['finalisemarks'];
    $tmp_phase = '';
} elseif ($_GET['phase'] == 1) {
    $phase_description .= $string['primarymarking'];
    $tmp_phase = '&phase=1';
} elseif ($_GET['phase'] == 2) {
    $phase_description .= $string['secondmarking'];
    $tmp_phase = '&phase=2';
}
$out_of = (isset($_GET['phase']) and $_GET['phase'] == 2) ? count($second_mark) : $candidate_no;
if ($candidate_no > 0) {
    $phase_description .= ": " . number_format($out_of) . " " . $string['candidates'];