Example #1
0
    $direction = 'asc';
}
$paperID = $propertyObj->get_property_id();
$paper_title = $propertyObj->get_paper_title();
$paper_type = $propertyObj->get_paper_type();
$session = $propertyObj->get_calendar_year();
$pass_mark = $propertyObj->get_pass_mark();
$random_mark = $propertyObj->get_random_mark();
$total_mark = $propertyObj->get_total_mark();
$marking = $propertyObj->get_marking();
$exam_duration = $propertyObj->get_exam_duration();
$start_date = $propertyObj->get_start_date();
$end_date = $propertyObj->get_end_date();
if ($userObject->has_role('Student')) {
    $logger->record_access($userObject->get_user_ID(), 'Objectives-based feedback report', $paperID);
    // Students write in the paperID
} else {
    $logger->record_access($userObject->get_user_ID(), 'Objectives-based feedback report', '/mapping/user_feedback.php?' . $_SERVER['QUERY_STRING']);
    // Staff write in the URL details
}
$moduleID = Paper_utils::get_modules($paperID, $mysqli);
// Check the user sat the paper!
$bound = false;
if ($paper_type == '0' or $paper_type == '1') {
    $result = $mysqli->prepare("SELECT DATE_FORMAT(started,'%H:%i:%s') AS started, DATE_FORMAT(updated,'%H:%i:%s') AS updated FROM log0, log_metadata WHERE log0.metadataID = log_metadata.id AND paperID = ? AND userID = ? UNION SELECT DATE_FORMAT(started,'%H:%i:%s') AS started, DATE_FORMAT(updated,'%H:%i:%s') AS updated FROM log1, log_metadata WHERE log1.metadataID = log_metadata.id AND paperID = ? AND userID = ? LIMIT 1");
    $result->bind_param('iiii', $paperID, $userID, $paperID, $userID);
    $bound = true;
} elseif ($paper_type == '4') {
    $result = $mysqli->prepare("SELECT DATE_FORMAT(started,'%H:%i:%s') AS started, NULL AS updated FROM log4_overall WHERE q_paper = ? AND userID = ? LIMIT 1");
} elseif ($paper_type == '5') {
    $result = $mysqli->prepare("SELECT DATE_FORMAT(started,'%H:%i:%s') AS started, NULL AS updated FROM log5, log_metadata WHERE log{$paper_type}.metadataID = log_metadata.id AND paperID = ? AND userID = ? LIMIT 1");
} else {
Example #2
0
    foreach ($tab_array as $individual_tab) {
        $button_id = 'button-' . str_replace('/', '-', $individual_tab);
        if ($individual_tab == $current_tab) {
            $html .= "<td id=\"{$button_id}\" class=\"tabon\" onclick=\"switchYear('{$individual_tab}'); return false;\">{$individual_tab}</td>";
        } else {
            $html .= "<td id=\"{$button_id}\" class=\"taboff\" onclick=\"switchYear('{$individual_tab}'); return false;\">{$individual_tab}</td>";
        }
    }
    $html .= "</tr></table>\n";
    return $html;
}
$sessions_with_papers = array();
$performance_summary_years = array();
if ($userObject->has_role('Student')) {
    $logger = new Logger($mysqli);
    $logger->record_access($userObject->get_user_ID(), 'Student homepage', '/students/');
    $current_address = NetworkUtils::get_client_address();
    // Check if our student is in a lab
    $lab_info = $mysqli->prepare("SELECT lab FROM client_identifiers WHERE address = ? LIMIT 1");
    $lab_info->bind_param('s', $current_address);
    $lab_info->execute();
    $lab_info->bind_result($lab);
    $lab_info->store_result();
    $lab_info->fetch();
    if ($lab_info->num_rows == 0 or empty($lab)) {
        $lab = -1;
    }
    $lab_info->close();
    // Get modules
    $modules = array();
    $i = 0;
Example #3
0
    check_paper_password($propertyObj->get_password(), $string, $mysqli, true);
    $display_correct_answer = 1;
    $display_question_mark = 1;
    $display_students_response = 1;
    $display_feedback = 1;
} else {
    $display_correct_answer = $propertyObj->get_display_correct_answer();
    $display_question_mark = $propertyObj->get_display_question_mark();
    $display_students_response = $propertyObj->get_display_students_response();
    $display_feedback = $propertyObj->get_display_feedback();
}
$pass_mark = $propertyObj->get_pass_mark();
$logger = new Logger($mysqli);
if ($userObject->has_role('Student')) {
    $logger->record_access($userObject->get_user_ID(), 'Question-based feedback report', $paperID);
    // Students write in the paperID
} else {
    $logger->record_access($userObject->get_user_ID(), 'Question-based feedback report', '/students/question_feedback.php?' . $_SERVER['QUERY_STRING']);
    // Staff write in the URL details
}
require '../config/finish.inc';
?>
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo $configObject->get('cfg_page_charset');
?>
" />
  <meta http-equiv="imagetoolbar" content="no">
  <meta http-equiv="imagetoolbar" content="false">
Example #4
0
        $html = ', <span class="labs">';
        $first = true;
        foreach ($labs as $lab) {
            if ($first) {
                $first = false;
            } else {
                $html .= ', ';
            }
            $html .= $lab == $computer_lab ? '<span class="current">' . $lab . '</span>' : $lab;
        }
        $html .= '</span>';
    }
    return $html;
}
$logger = new Logger($mysqli);
$logger->record_access($userObject->get_user_ID(), 'Summative homepage', '/paper/');
$paper_utils = Paper_utils::get_instance();
$paper_display = array();
$paper_no = $paper_utils->get_active_papers($paper_display, array('1', '2'), $userObject, $mysqli);
// Get active Progress Tests and Summative Exams.
if ($paper_no == 1 and $paper_display[0]['password'] == '') {
    header("location: user_index.php?id=" . $paper_display[0]['crypt_name']);
    exit;
} elseif ($paper_no == 0) {
    echo "<html>\n<head>\n<meta http-equiv=\"content-type\" content=\"text/html;charset={$configObject->get('cfg_page_charset')}\" />\n<title>{$string['exams']}</title>\n";
    ?>
<html>
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  <meta http-equiv="content-type" content="text/html;charset=<?php 
    echo $configObject->get('cfg_page_charset');
Example #5
0
$result->bind_param('ii', $temp_userID, $paperID);
$result->execute();
$result->store_result();
$result->bind_result($o_q_id, $o_title, $o_surname, $o_date_marked, $o_new_mark_type, $o_adjmark);
while ($result->fetch()) {
    $overrides[$o_q_id] = array('q_id' => $o_q_id, 'title' => $o_title, 'surname' => $o_surname, 'date_marked' => $o_date_marked, 'new_mark_type' => $o_new_mark_type, 'adjmark' => $o_adjmark);
}
$result->close();
$status_array = QuestionStatus::get_all_statuses($mysqli, $string, true);
if ($show_feedback) {
    display_feedback($propertyObj, $temp_userID, $log_type, $userObject, $log_metadata, $mysqli, $status_array, $overrides, $preview_q_id);
    // Record the fact that the script has been viewed.
    $logger = new Logger($mysqli);
    if ($userObject->has_role(array('SysAdmin', 'Admin', 'Staff', 'External Examiner'))) {
        $logger->record_access($userObject->get_user_ID(), 'Assessment script', '/paper/finish.php?' . $_SERVER['QUERY_STRING']);
        // Staff write in the URL details
    } else {
        $logger->record_access($userObject->get_user_ID(), 'Assessment script', $paperID);
        // Students write in the paperID
    }
} else {
    echo '<blockquote>';
    echo '<div class="thankyou">' . $string['thankyou'] . '</div>';
    echo '<p>' . sprintf($string['msg1'], $paper_title) . '</p><br />';
    if ($paper_postscript != '') {
        echo "<p>{$paper_postscript}</p>\n";
    }
    echo '</blockquote>';
    if ($paper_type == '2') {
        echo '<br /><div class="key" style="text-align:center">' . $leaving_rules . '<br /><br /><input type="button" name="close" id="close" value="' . $string['closewindow'] . '" class="ok" /></div>';
    } else {
        echo '<br /><div align="center"><input type="button" name="close" id="close" value="' . $string['closewindow'] . '" class="ok" /></div>';