Permalink
Browse files

TITLEs have all tags stripped ...

Downloads have a row of percentages
  • Loading branch information...
moodler
moodler committed Sep 4, 2003
1 parent ffda998 commit a4634d830d82eb00dafdc03680ee29f6e6e2cefc
Showing with 19 additions and 3 deletions.
  1. +19 −3 mod/quiz/report/simplestat/report.php
@@ -102,14 +102,22 @@ function display($quiz, $cm, $course) { /// This function just displays the
$row++;
}
- $myxls->ChangePos($row,0);
-
/// Print all the averages
+ $myxls->ChangePos($row,0);
$myxls->InsertText("");
for ($i=1; $i<=$count; $i++) {
$myxls->InsertNumber($average[$i]);
}
+ /// Print all the averages as percentages
+ $row++;
+ $myxls->ChangePos($row,0);
+ $myxls->InsertText("%");
+ for ($i=1; $i<=$count; $i++) {
+ $percent = format_float($average[$i] * 100);
+ $myxls->InsertText("$percent%");
+ }
+
$myxls->SendFileName("$course->shortname $quiz->name");
exit;
@@ -150,6 +158,14 @@ function display($quiz, $cm, $course) { /// This function just displays the
echo "\t".$average[$i];
}
echo "\n";
+
+ /// Print all the averages as percentages
+ echo "\t%";
+ for ($i=1; $i<=$count; $i++) {
+ $percent = format_float($average[$i] * 100);
+ echo "\t$percent";
+ }
+ echo "\n";
exit;
}
@@ -164,7 +180,7 @@ function display($quiz, $cm, $course) { /// This function just displays the
echo "<tr>";
echo "<td>&nbsp;</td>";
for ($i=1; $i<=$count; $i++) {
- echo "<th title=\"".$question[$i]->questiontext."\">$i</th>";
+ echo "<th title=\"".strip_tags($question[$i]->questiontext)."\">$i</th>";
}
echo "</tr>";

0 comments on commit a4634d8

Please sign in to comment.