$enddate = check_var('enddate', 'GET', true, false, true); $percent = isset($_GET['percent']) ? $_GET['percent'] : 100; $ordering = isset($_GET['ordering']) ? $_GET['ordering'] : 'asc'; $absent = isset($_GET['absent']) ? $_GET['absent'] : 0; $sortby = isset($_GET['sortby']) ? $_GET['sortby'] : 'name'; $studentsonly = isset($_GET['studentsonly']) ? $_GET['studentsonly'] : 1; $repcourse = isset($_GET['repcourse']) ? $_GET['repcourse'] : '%'; $repmodule = isset($_GET['repmodule']) ? $_GET['repmodule'] : ''; // Get some paper properties $propertyObj = PaperProperties::get_paper_properties_by_id($paperID, $mysqli, $string); $paper = $propertyObj->get_paper_title(); $crypt_name = $propertyObj->get_crypt_name(); $exclusions = new Exclusion($paperID, $mysqli); $exclusions->load(); // Get any questions to exclude. $report = new ClassTotals($studentsonly, $percent, $ordering, $absent, $sortby, $userObject, $propertyObj, $startdate, $enddate, $repcourse, $repmodule, $mysqli, $string); $report->load_answers(); $paper_buffer = $report->get_paper_buffer(); $question_no = $report->get_question_no(); $user_results = load_osce_results($propertyObj, $demo, $configObject, $question_no, $mysqli); $report->set_user_results($user_results); $report->generate_stats(); $user_no = $report->get_user_no(); $q_medians = load_osce_medians($mysqli); if ($propertyObj->get_pass_mark() == 101) { $borderline_method = true; } else { $borderline_method = false; } if ($borderline_method) { $passmark = getBlinePassmk($user_results, $user_no, $propertyObj);
$enddate = check_var('enddate', 'GET', true, false, true); //get the paper properties $propertyObj = PaperProperties::get_paper_properties_by_id($paperID, $mysqli, $string); $paper = $propertyObj->get_paper_title(); $marking = $propertyObj->get_marking(); $pass_mark = $propertyObj->get_pass_mark(); $distinction_mark = $propertyObj->get_distinction_mark(); $paper_type = $propertyObj->get_paper_type(); $percent = isset($_GET['percent']) ? $_GET['percent'] : 100; $ordering = isset($_GET['ordering']) ? $_GET['ordering'] : 'asc'; $absent = isset($_GET['absent']) ? $_GET['absent'] : 0; $sortby = isset($_GET['sortby']) ? $_GET['sortby'] : 'name'; $studentsonly = isset($_GET['studentsonly']) ? $_GET['studentsonly'] : 1; $repcourse = isset($_GET['repcourse']) ? $_GET['repcourse'] : '%'; $repmodule = isset($_GET['repmodule']) ? $_GET['repmodule'] : ''; $report = new ClassTotals($studentsonly, $percent, $ordering, $absent, $sortby, $userObject, $propertyObj, $startdate, $enddate, $repcourse, $repmodule, $mysqli, $string); $report->compile_report(false); $user_results = $report->get_user_results(); $paper_buffer = $report->get_paper_buffer(); $user_no = count($user_results); $demo = is_demo($userObject); header('Pragma: public'); header('Content-type: application/octet-stream'); header("Content-Disposition: attachment; filename=new_" . str_replace(' ', '_', $paper) . "_EB.csv"); $displayDebug = false; //disable debug output in this script as it effects the output function get_correct_labels($question, $tmp_exclude) { $correct_labels = array(); $tmp_first_split = explode(';', $question['correct'][0]); $tmp_second_split = explode('$', $tmp_first_split[11]);
$enddate = check_var('enddate', 'GET', true, false, true); // Get some paper properties $propertyObj = PaperProperties::get_paper_properties_by_id($_GET['paperID'], $mysqli, $string); $paper = $propertyObj->get_paper_title(); $marking = $propertyObj->get_marking(); $pass_mark = $propertyObj->get_pass_mark(); $distinction_mark = $propertyObj->get_distinction_mark(); $paper_type = $propertyObj->get_paper_type(); $percent = isset($_GET['percent']) ? $_GET['percent'] : 100; $ordering = isset($_GET['ordering']) ? $_GET['ordering'] : 'asc'; $absent = isset($_GET['absent']) ? $_GET['absent'] : 0; $sortby = isset($_GET['sortby']) ? $_GET['sortby'] : 'name'; $studentsonly = isset($_GET['studentsonly']) ? $_GET['studentsonly'] : 1; $repcourse = isset($_GET['repcourse']) ? $_GET['repcourse'] : '%'; $repmodule = isset($_GET['repmodule']) ? $_GET['repmodule'] : ''; $report = new ClassTotals($studentsonly, $percent, $ordering, $absent, $sortby, $userObject, $propertyObj, $startdate, $enddate, $repcourse, $repmodule, $mysqli, $string); $report->compile_report(false); $user_results = $report->get_user_results(); $paper_buffer = $report->get_paper_buffer(); $cohort_size = $report->get_cohort_size(); $stats = $report->get_stats(); $ss_pass = $report->get_ss_pass(); $ss_hon = $report->get_ss_hon(); $question_no = $report->get_question_no(); $log_late = $report->get_log_late(); $user_no = count($user_results); header('Pragma: public'); header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=" . str_replace(' ', '_', $paper) . "_CT.csv"); $csv = ''; $percent_decimals = $configObject->get('percent_decimals');
$enddate = check_var('enddate', 'GET', true, false, true); // Get some paper properties $propertyObj = PaperProperties::get_paper_properties_by_id($_GET['paperID'], $mysqli, $string); $paper = $propertyObj->get_paper_title(); $marking = $propertyObj->get_marking(); $pass_mark = $propertyObj->get_pass_mark(); $distinction_mark = $propertyObj->get_distinction_mark(); $paper_type = $propertyObj->get_paper_type(); $percent = isset($_GET['percent']) ? $_GET['percent'] : 100; $ordering = isset($_GET['ordering']) ? $_GET['ordering'] : 'asc'; $absent = isset($_GET['absent']) ? $_GET['absent'] : 0; $sortby = isset($_GET['sortby']) ? $_GET['sortby'] : 'name'; $studentsonly = isset($_GET['studentsonly']) ? $_GET['studentsonly'] : 1; $repcourse = isset($_GET['repcourse']) ? $_GET['repcourse'] : '%'; $repmodule = isset($_GET['repmodule']) ? $_GET['repmodule'] : ''; $report = new ClassTotals($studentsonly, $percent, $ordering, $absent, $sortby, $userObject, $propertyObj, $startdate, $enddate, $repcourse, $repmodule, $mysqli, $string); $report->compile_report(false); $user_results = $report->get_user_results(); $paper_buffer = $report->get_paper_buffer(); $cohort_size = $report->get_cohort_size(); $stats = $report->get_stats(); $user_no = count($user_results); header('Pragma: public'); header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=" . str_replace(' ', '_', $paper) . "_CT.xml"); if ($marking == '0') { $marking_label = '%'; $marking_key = 'percent'; } else { $marking_label = 'Adjusted %'; $marking_key = 'adj_percent';
$enddate = check_var('enddate', 'GET', true, false, true); // Get some paper properties $propertyObj = PaperProperties::get_paper_properties_by_id($paperID, $mysqli, $string); $paper = $propertyObj->get_paper_title(); $marking = $propertyObj->get_marking(); $pass_mark = $propertyObj->get_pass_mark(); $distinction_mark = $propertyObj->get_distinction_mark(); $paper_type = $propertyObj->get_paper_type(); $percent = isset($_GET['percent']) ? $_GET['percent'] : 100; $ordering = isset($_GET['ordering']) ? $_GET['ordering'] : 'asc'; $absent = isset($_GET['absent']) ? $_GET['absent'] : 0; $sortby = isset($_GET['sortby']) ? $_GET['sortby'] : 'name'; $studentsonly = isset($_GET['studentsonly']) ? $_GET['studentsonly'] : 1; $repcourse = isset($_GET['repcourse']) ? $_GET['repcourse'] : '%'; $repmodule = isset($_GET['repmodule']) ? $_GET['repmodule'] : ''; $report = new ClassTotals($studentsonly, $percent, $ordering, $absent, $sortby, $userObject, $propertyObj, $startdate, $enddate, $repcourse, $repmodule, $mysqli, $string); if (isset($_GET['recache']) and $_GET['recache'] == '1') { $report->compile_report(true); // Force a re-cache } else { $report->compile_report(false); } $user_results = $report->get_user_results(); $paper_buffer = $report->get_paper_buffer(); $cohort_size = $report->get_cohort_size(); $stats = $report->get_stats(); $ss_pass = $report->get_ss_pass(); $ss_hon = $report->get_ss_hon(); $question_no = $report->get_question_no(); $log_late = $report->get_log_late(); $user_no = $report->get_user_no();
require_once '../classes/class_totals.class.php'; require_once '../classes/folderutils.class.php'; $paperID = check_var('paperID', 'GET', true, false, true); $properties = PaperProperties::get_paper_properties_by_id($paperID, $mysqli, $string); // Check if the exam could still be going on. if (time() < $properties->get_end_date()) { $notice->display_notice($string['examnotfinished'], $string['notfinishedmsg'], '../artwork/summative_scheduling.png', '#C00000', true, true); exit; } $results_cache = new ResultsCache($mysqli); $marks = array_values($results_cache->get_paper_marks_by_paper($paperID, true)); if (count($marks) == 0) { // If there are no marks, re-cache off class totals. $startdate = $properties->get_raw_start_date(); $enddate = $properties->get_raw_end_date(); $report = new ClassTotals(1, 100, 'asc', 0, 'name', $userObject, $properties, $startdate, $enddate, '%', '', $mysqli, $string); $report->compile_report(true); $marks = array_values($results_cache->get_paper_marks_by_paper($paperID, true)); } $stats = array_values($results_cache->get_paper_cache($paperID)); $marking = 0; function check_values($num, $stats) { $num = str_replace('median', $stats[5], $num); $num = str_replace('q1', $stats[4], $num); $num = str_replace('q2', $stats[5], $num); $num = str_replace('q3', $stats[6], $num); $num = str_replace('max', $stats[1], $num); $num = str_replace('min', $stats[3], $num); return $num; }