$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(); if ($paper_type == '2' and $propertyObj->unmarked_enhancedcalc() and !$propertyObj->is_active() or $paper_type == '1' and $report->unmarked_enhancedcalc()) { // Only mark calculation questions when the exam is not active.
//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]); $i = 0;
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; } if (isset($_POST['submit'])) {