]> git.mjollnir.org Git - moodle.git/commitdiff
TITLEs have all tags stripped ...
authormoodler <moodler>
Thu, 4 Sep 2003 15:52:56 +0000 (15:52 +0000)
committermoodler <moodler>
Thu, 4 Sep 2003 15:52:56 +0000 (15:52 +0000)
Downloads have a row of percentages

mod/quiz/report/simplestat/report.php

index b7fbdb366e35538734181a1172f2723caa96e7b1..be287b56eccf9893c60696ac13f9aa4cd6febeab 100644 (file)
@@ -102,14 +102,22 @@ class quiz_report extends quiz_default_report {
                 $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 @@ class quiz_report extends quiz_default_report {
                 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 @@ class quiz_report extends quiz_default_report {
         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>";