$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; $excluded_no = 0;