Skip to content

Commit

Permalink
TITLEs have all tags stripped ...
Browse files Browse the repository at this point in the history
Downloads have a row of percentages
  • Loading branch information
moodler committed Sep 4, 2003
1 parent ffda998 commit a4634d8
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions mod/quiz/report/simplestat/report.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand All @@ -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>";

Expand Down

0 comments on commit a4634d8

Please sign in to comment.