if ($_GET['method'] == 'ebel') { echo "<body onload=\"recountCategories();\">\n"; } else { echo "<body>\n"; } echo "<div id=\"maincontent\">\n"; require '../include/toprightmenu.inc'; if ($_GET['method'] == 'modified_angoff') { echo draw_toprightmenu(98); } elseif ($_GET['method'] == 'ebel') { echo draw_toprightmenu(99); } echo "<form method=\"post\" name=\"questions\" action=\"record_review.php?paperID={$paperID}&method=" . $_GET['method'] . "&module={$module}&folder={$folder}\">\n"; $reviews = array(); if (isset($_GET['std_setID'])) { $standard_setting = new StandardSetting($mysqli); $reviews = $standard_setting->get_ratings_by_question($_GET['std_setID']); } // Load default setting from the Questions table and save to reviews array if no existing data $result = $mysqli->prepare("SELECT question, std FROM (papers, questions) WHERE paper = ? AND papers.question = questions.q_id"); $result->bind_param('i', $_GET['paperID']); $result->execute(); $result->bind_result($questionID, $std); while ($result->fetch()) { if (!isset($_GET['std_setID'])) { $reviews[$questionID] = $std; } echo "<input type=\"hidden\" name=\"old" . $questionID . "\" value=\"{$std}\" />\n"; } $result->close(); echo "\n<div class=\"head_title\" style=\"font-size:90%\">\n";
" method="post"> <?php // Get some paper properties $paper_title = $propertyObj->get_paper_title(); $paper_type = $propertyObj->get_paper_type(); $labelcolor = $propertyObj->get_labelcolor(); $themecolor = $propertyObj->get_themecolor(); $marking = $propertyObj->get_marking(); $pass_mark = $propertyObj->get_pass_mark(); $moduleIDs = Paper_utils::get_modules($paperID, $mysqli); $exclusions = new Exclusion($paperID, $mysqli); $exclusions->load(); // Get the standards setting if ($marking[0] == '2') { $tmp_parts = explode(',', $marking); $standard_setting = new StandardSetting($mysqli); $std_set_array = $standard_setting->get_ratings_by_question($tmp_parts[1]); } // Get all the users on the module(s) the paper is on. $users_on_modules = ''; if (is_array($moduleIDs)) { $users_on_modules = ''; $moduleIDs_in = "'" . implode(',', array_keys($moduleIDs)) . "'"; $mod_query = $mysqli->prepare("SELECT idMod, userID, moduleid FROM modules_student, modules WHERE modules.id = modules_student.idMod AND idMod IN ({$moduleIDs_in})"); $mod_query->execute(); $mod_query->bind_result($idMod, $tmp_userID, $tmp_moduleid); $mod_query->store_result(); while ($mod_query->fetch()) { if (isset($_GET['repmodule']) and $_GET['repmodule'] != '' and $idMod != $_GET['repmodule']) { continue; //this user is not on the module set in repmodule so dont put them in the array
$stmt->close(); // Determine which review deadline to use. if ($userObject->has_role('External Examiner')) { $review_type = 'External'; $review_deadline = strtotime($propertyObj->get_external_review_deadline()); } else { $review_type = 'Internal'; $review_deadline = strtotime($propertyObj->get_internal_review_deadline()); } // Create a new review object. $review = new Review($paperID, $userObject->get_user_ID(), $review_type, $mysqli); // Get standards setting data if ($marking[0] == '2') { $standards_setting = array(); $tmp_parts = explode(',', $marking); $standard_setting = new StandardSetting($mysqli); $standards_setting = $standard_setting->get_ratings_by_question($tmp_parts[1]); } else { $standards_setting = array(); } /** * Get randmon question * * @param array $questions - temp array of questions * @param array $random_q_data - a question * @param int $q_no - question index in array * @param array $used_questions - previsouly used questions * @param db $mysqli */ function randomQOverwrite(&$questions, $random_q_data, $q_no, &$used_questions, $mysqli) {
/** * Calculates what the Standard Setting pass mark is. */ private function set_ss_pass() { $mark_parts = explode(',', $this->marking); $standard_setting = new StandardSetting($this->db); $percents = $standard_setting->get_pass_distinction($mark_parts[1]); $this->ss_pass = $percents['pass_score']; if (is_null($percents['distinction_score'])) { $this->ss_hon = 100; } elseif ($percents['distinction_score'] == '0.000000') { // If zero set to top 20% of cohort performance. $this->set_ss_hon(); } else { $this->ss_hon = $percents['distinction_score']; } }