$total_mark = $user_data['total']; $recordID = $user_data['userID']; $checked = ''; if ($prev_remark) { if (isset($remark_array[$recordID])) { $checked = ' checked'; } } else { if (round($total_mark / $paper_total * 100) < $pass_mark) { $checked = ' checked'; } } if (round($total_mark / $paper_total * 100) < $pass_mark) { echo "<tr style=\"color:#C00000\"><td class=\"pad\"><input type=\"checkbox\" class=\"check\" name=\"student{$student_no}\" value=\"{$recordID}\"{$checked} /></td><td>{$username}</td><td>{$student_id}</td><td style=\"text-align:right\">{$total_mark}</td><td class=\"pad\">" . MathsUtils::formatNumber($total_mark / $paper_total * 100, $percent_decimals) . "%</td><td> </td></tr>\n"; } else { echo "<tr><td class=\"pad\"><input type=\"checkbox\" class=\"check\" name=\"student{$student_no}\" value=\"{$recordID}\"{$checked} /></td><td>{$username}</td><td>{$student_id}</td><td style=\"text-align:right\">{$total_mark}</td><td class=\"pad\">" . MathsUtils::formatNumber($total_mark / $paper_total * 100, $percent_decimals) . "%</td><td> </td></tr>\n"; } } ?> </table> <?php if ($student_no == 0) { $msg = sprintf($string['noattempts'], textbox_marking_utils::nicedate($startdate), textbox_marking_utils::nicedate($enddate)); echo $notice->info_strip($msg, 100); } else { ?> <br /> <input type="hidden" name="student_no" value="<?php echo $student_no; ?>
echo '<Row>'; echo '<Cell ss:StyleID="s23"><Data ss:Type="String">' . $string['maxmark'] . '</Data></Cell>'; echo '<Cell><Data ss:Type="Number">' . $stats['max_mark'] . '</Data></Cell>'; echo '</Row>'; echo '<Row>'; echo '<Cell ss:StyleID="s23"><Data ss:Type="String">' . $string['minmark'] . '</Data></Cell>'; echo '<Cell><Data ss:Type="Number">' . $stats['min_mark'] . '</Data></Cell>'; echo '</Row>'; echo '<Row>'; echo '<Cell ss:StyleID="s23"><Data ss:Type="String">' . $string['range'] . '</Data></Cell>'; echo '<Cell><Data ss:Type="Number">' . $stats['range'] . '</Data></Cell>'; echo '</Row>'; for ($i = 1; $i < 10; $i++) { echo '<Row>'; echo '<Cell ss:StyleID="s23"><Data ss:Type="String">Decile ' . $i . '</Data></Cell>'; echo '<Cell ss:StyleID="s69"><Data ss:Type="Number">' . MathsUtils::formatNumber($stats["decile{$i}"] / 100, $percent_decimals) . '</Data></Cell>'; echo '</Row>'; } echo '<Row>'; echo '<Cell ss:StyleID="s23"><Data ss:Type="String">' . $string['averagetime'] . '</Data></Cell>'; if ($stats['completed_no'] == 0) { echo '<Cell><Data ss:Type="String">' . $report->formatsec(0) . '</Data></Cell>'; } else { echo '<Cell><Data ss:Type="String">' . $report->formatsec(round($stats['total_time'] / $stats['completed_no'], 0)) . '</Data></Cell>'; } echo '</Row>'; echo '<Row>'; echo '<Cell ss:StyleID="s23"><Data ss:Type="String">' . $string['excludedquestions'] . '</Data></Cell>'; echo '<Cell><Data ss:Type="String">' . $report->get_display_excluded() . '</Data></Cell>'; echo '</Row>'; echo '<Row>';
} $size_msg = $cohort_size < $user_no ? $cohort_size . $string['of'] . $user_no : $user_no; $csv .= $string['cohortsize'] . ",{$size_msg},,,,,,,,,,\n"; $csv .= $string['failureno'] . "," . $stats['failures'] . ",(" . round($percent_failures) . "% of cohort),,,,,,,,,\n"; $csv .= $string['passno'] . "," . $stats['passes'] . ",(" . round($percent_passes) . $string['percentofcohort'] . "),,,,,,,,,\n"; if (isset($ss_hon)) { $csv .= $string['distinctionno'] . "," . $stats['honours'] . ",(" . round($percent_honours) . "% of cohort),,,,,,,,,\n"; } $csv .= $string['totalmarks'] . "," . $report->get_total_marks() . ",,,,,,,,,,\n"; $csv .= $string['passmark'] . ",{$pass_mark}%,,,,,,,,,,\n"; if ($marking == '1') { $csv .= $string['randommark'] . "," . number_format($report->get_total_random_mark(), 2, '.', ',') . ",,,,,,,,,,\n"; } elseif (substr($marking, 0, 1) == '2') { $csv .= $string['ss'] . "," . round($report->get_ss_pass(), 2) . ",,,,,,,,,,\n"; $csv .= $string['ssdistinction'] . "," . round($report->get_ss_hon(), 2) . ",,,,,,,,,,\n"; } $csv .= $string['meanmark'] . "," . round($stats['mean_mark'], 1) . "," . MathsUtils::formatNumber($stats['mean_percent'], 1) . "%,,,,,,,,,\n"; $csv .= $string['medianmark'] . "," . round($stats['median_mark'], 1) . "," . MathsUtils::formatNumber($stats['median_percent'], 1) . "%,,,,,,,,,\n"; $csv .= $string['stdevmark'] . "," . number_format($stats['stddev_mark'], 2, '.', ',') . "," . MathsUtils::formatNumber($stats['stddev_percent'], 2) . "%,,,,,,,,,\n"; $csv .= $string['maxmark'] . "," . $stats['max_mark'] . "," . number_format($stats['max_percent']) . "%,,,,,,,,,\n"; $csv .= $string['maxmark'] . "," . $stats['min_mark'] . "," . number_format($stats['min_percent']) . "%,,,,,,,,,\n"; $csv .= $string['range'] . "," . $stats['range'] . "," . $stats['range_percent'] . "%,,,,,,,,,\n"; $avg_time = $stats['completed_no'] > 0 ? $report->formatsec(round($stats['total_time'] / $stats['completed_no'], 0)) : 'n/a'; $csv .= $string['averagetime'] . "," . $avg_time . ",,,,,,,,,,\n"; $csv .= $string['excludedquestions'] . "," . $report->get_display_excluded() . ",,,,,,,,,,\n"; $csv .= $string['skippedquestions'] . "," . $report->get_display_experimental() . ",,,,,,,,,,\n"; } else { $csv .= strip_tags(sprintf($string['noattempts'], $report->nicedate($startdate), $report->nicedate($enddate))); } echo mb_convert_encoding($csv, "UTF-16LE", "UTF-8"); $mysqli->close();
echo "<td></td>"; // Deciles $suffix = array('', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th'); echo "<td colspan=\"2\" style=\"width:33%; vertical-align:top\"><table border=\"0\" style=\"font-size:110%\">\n"; for ($i = 1; $i < 10; $i++) { echo "<tr><td style=\"width:40px\">" . $i; echo $language == 'en' ? $suffix[$i] : '.'; echo "</td><td>" . MathsUtils::formatNumber($stats["decile{$i}"], 1) . "%</td></tr>\n"; } echo "</table></td>\n"; echo "<td></td>"; // Quartiles echo "<td colspan=\"2\" style=\"width:33%; vertical-align:top\"><table border=\"0\" style=\"font-size:110%\">\n"; echo "<tr><td style=\"width:40px\">Q1</td><td>" . MathsUtils::formatNumber($stats['q1'], 1) . "%</td></tr>\n"; echo "<tr><td style=\"width:40px\">Q2</td><td>" . MathsUtils::formatNumber($stats['q2'], 1) . "%</td></tr>\n"; echo "<tr><td style=\"width:40px\">Q3</td><td>" . MathsUtils::formatNumber($stats['q3'], 1) . "%</td></tr>\n"; echo "</table></td>\n"; echo "</tr></table>\n<br />"; // Email Class ----------------------------------------------------------------------------------------- if ($paper_type < 2 and isset($_POST['emailclass']) and $_POST['emailclass'] == 'yes') { // Save the latest template to disk. $file = fopen("../email_templates/" . $userObject->get_user_ID() . ".txt", "w"); fwrite($file, $userObject->get_email() . "\n"); fwrite($file, $_POST['ccaddress'] . "\n"); fwrite($file, $_POST['bccaddress'] . "\n"); fwrite($file, $_POST['subject'] . "\n"); fwrite($file, $_POST['emailtemplate'] . "\n"); fclose($file); for ($i = 0; $i < $user_no; $i++) { switch ($i) { case 25: