コード例 #1
0
ファイル: class_totals_xml.php プロジェクト: vinod-co/centa
echo '</Row>';
echo '<Row>';
echo '<Cell ss:StyleID="s23"><Data ss:Type="String">' . $string['passno'] . '</Data></Cell>';
echo '<Cell><Data ss:Type="Number">' . $stats['passes'] . '</Data></Cell>';
echo '</Row>';
echo '<Row>';
echo '<Cell ss:StyleID="s23"><Data ss:Type="String">' . $string['failureno'] . '</Data></Cell>';
echo '<Cell><Data ss:Type="Number">' . $stats['failures'] . '</Data></Cell>';
echo '</Row>';
echo '<Row>';
echo '<Cell ss:StyleID="s23"><Data ss:Type="String">' . $string['distinctionno'] . '</Data></Cell>';
echo '<Cell><Data ss:Type="Number">' . $stats['honours'] . '</Data></Cell>';
echo '</Row>';
echo '<Row>';
echo '<Cell ss:StyleID="s23"><Data ss:Type="String">' . $string['totalmarks'] . '</Data></Cell>';
echo '<Cell><Data ss:Type="Number">' . $report->get_total_marks() . '</Data></Cell>';
echo '</Row>';
echo '<Row>';
echo '<Cell ss:StyleID="s23"><Data ss:Type="String">' . $string['passmark'] . '</Data></Cell>';
echo '<Cell ss:StyleID="s26"><Data ss:Type="Number">' . $pass_mark / 100 . '</Data></Cell>';
echo '</Row>';
if ($marking == '0') {
    echo '<Row>';
    echo '<Cell ss:StyleID="s23"><Data ss:Type="String">' . $string['meanmark'] . '</Data></Cell>';
    echo '<Cell><Data ss:Type="Number">' . $stats['mean_mark'] . '</Data></Cell>';
    echo '</Row>';
} elseif ($marking == '1') {
    echo '<Row>';
    echo '<Cell ss:StyleID="s23"><Data ss:Type="String">' . $string['randommark'] . '</Data></Cell>';
    echo '<Cell><Data ss:Type="Number">' . number_format($report->get_total_random_mark(), 2, '.', ',') . '</Data></Cell>';
    echo '</Row>';
コード例 #2
0
ファイル: class_totals_csv.php プロジェクト: vinod-co/centa
     $percent_failures = round($stats['failures'] / $cohort_size * 100);
     $percent_passes = round($stats['passes'] / $cohort_size * 100);
     $percent_honours = round($stats['honours'] / $cohort_size * 100);
 } else {
     $percent_failures = 0;
     $percent_passes = 0;
     $percent_honours = 0;
 }
 $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";
コード例 #3
0
ファイル: class_totals.php プロジェクト: vinod-co/centa
 }
 echo "</tr>\n";
 if ($cohort_size > 0) {
     $percent_failures = round($stats['failures'] / $cohort_size * 100);
     $percent_passes = round($stats['passes'] / $cohort_size * 100);
     $percent_honours = round($stats['honours'] / $cohort_size * 100);
 } else {
     $percent_failures = 0;
     $percent_passes = 0;
     $percent_honours = 0;
 }
 echo "<tr><td class=\"field\">" . $string['failureno'] . "</td><td class=\"r\">" . $stats['failures'] . "</td><td>(" . $percent_failures . $string['percentofcohort'] . ")</td><td>&nbsp;</td></tr>\n";
 echo "<tr><td class=\"field\">" . $string['passno'] . "</td><td class=\"r\">" . $stats['passes'] . "</td><td>(" . $percent_passes . $string['percentofcohort'] . ")</td><td>&nbsp;</td></tr>\n";
 echo "<tr><td class=\"field\">" . $string['distinctionno'] . "</td><td class=\"r\"> " . $stats['honours'] . "</td><td>(" . $percent_honours . $string['percentofcohort'] . ")</td><td>&nbsp;</td></tr>\n";
 echo "<tr><td class=\"field\">" . $string['totalmarks'] . "</td><td class=\"r\">";
 if ($report->get_total_marks() < $report->get_orig_total_marks()) {
     echo "<span class=\"exclude\">" . $report->get_orig_total_marks() . "</span>&nbsp;&nbsp;";
 }
 echo $report->get_total_marks() . "</td><td>&nbsp;</td><td>&nbsp;</td></tr>\n";
 echo "<tr><td class=\"field\">" . $string['passmark'] . "</td><td class=\"r\">{$pass_mark}%</td><td>&nbsp;</td><td>&nbsp;</td></tr>\n";
 if ($marking == '1') {
     echo "<tr><td class=\"field\">" . $string['randommark'] . "</td><td class=\"r\">" . number_format($report->get_total_random_mark(), 2, '.', ',') . "</td><td>&nbsp;</td></tr>\n";
     if ($stats['completed_no'] > 0) {
         if ($report->get_total_marks() > 0) {
             echo "<tr><td class=\"field\">" . $string['meanmark'] . "</td><td class=\"r\">" . round($stats['mean_mark'], 1) . "</td><td>(" . MathsUtils::formatNumber($stats['mean_percent'], 1) . "%)</td><td>&nbsp;</td></tr>\n";
         } else {
             echo "<tr><td class=\"field\">" . $string['meanmark'] . "</td><td class=\"grey r\">" . $string['na'] . "</td><td>&nbsp;</td><td>&nbsp;</td></tr>\n";
         }
     } else {
         echo "<tr><td class=\"field\">" . $string['meanmark'] . "</td><td class=\"grey r\">" . $string['nocompletions'] . "</td><td>&nbsp;</td><td>&nbsp;</td></tr>\n";
     }