mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Fix for the way question texts were displayed bug 1381
This commit is contained in:
parent
f87fd4ae44
commit
35ebf5c09b
@ -27,6 +27,12 @@ class quiz_report extends quiz_default_report {
|
||||
$data = array();
|
||||
$questionorder = explode(',', $quiz->questions);
|
||||
|
||||
$count = 0;
|
||||
foreach ($questionorder as $questionid) {
|
||||
$count++;
|
||||
$question[$count] = get_record("quiz_questions", "id", $questionid);
|
||||
}
|
||||
|
||||
/// For each person in the class, get their best attempt
|
||||
/// and create a table listing results for each person
|
||||
if ($users) {
|
||||
@ -55,7 +61,6 @@ class quiz_report extends quiz_default_report {
|
||||
foreach ($questionorder as $questionid) {
|
||||
$count++;
|
||||
$data[$user->id]->grades[$count] = $results->grades[$questionid];
|
||||
$question[$count] = $questions[$questionid];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -198,12 +203,15 @@ class quiz_report extends quiz_default_report {
|
||||
|
||||
/// Otherwise, display the table as HTML
|
||||
|
||||
|
||||
echo "<table border=1 align=\"center\">";
|
||||
echo "<tr>";
|
||||
echo "<td> </td>";
|
||||
for ($i=1; $i<=$count; $i++) {
|
||||
echo "<th title=\"".strip_tags($question[$i]->questiontext)."\">$i</th>";
|
||||
$title = '';
|
||||
if (!empty($question[$i]->questiontext)) {
|
||||
$title = strip_tags($question[$i]->questiontext);
|
||||
}
|
||||
echo "<th title=\"$title\">$i</th>";
|
||||
}
|
||||
echo "</tr>";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user