Now choice->name and choice->answerxx work under filterall.

This commit is contained in:
stronk7
2005-03-27 17:33:16 +00:00
parent f8fc9eaaf1
commit c61d50b800
4 changed files with 11 additions and 11 deletions

View File

@@ -56,7 +56,7 @@
$answer = "";
}
if (!empty($answer->answer)) {
$aa = choice_get_answer($choice, $answer->answer);
$aa = format_string(choice_get_answer($choice, $answer->answer));
} else {
$aa = "";
}
@@ -74,10 +74,10 @@
//Calculate the href
if (!$choice->visible) {
//Show dimmed if the mod is hidden
$tt_href = "<a class=\"dimmed\" href=\"view.php?id=$choice->coursemodule\">$choice->name</a>";
$tt_href = "<a class=\"dimmed\" href=\"view.php?id=$choice->coursemodule\">".format_string($choice->name,true)."</a>";
} else {
//Show normal if the mod is visible
$tt_href = "<a href=\"view.php?id=$choice->coursemodule\">$choice->name</a>";
$tt_href = "<a href=\"view.php?id=$choice->coursemodule\">".format_string($choice->name,true)."</a>";
}
if ($course->format == "weeks" || $course->format == "topics") {
$table->data[] = array ($printsection, $tt_href, $aa);

View File

@@ -29,9 +29,9 @@
add_to_log($course->id, "choice", "report", "report.php?id=$cm->id", "$choice->id");
print_header_simple("$choice->name: $strresponses", "",
print_header_simple(format_string($choice->name).": $strresponses", "",
"<a href=\"index.php?id=$course->id\">$strchoices</a> ->
<a href=\"view.php?id=$cm->id\">$choice->name</a> -> $strresponses", "");
<a href=\"view.php?id=$cm->id\">".format_string($choice->name,true)."</a> -> $strresponses", "");
/// Check to see if groups are being used in this choice
if ($groupmode = groupmode($course, $cm)) { // Groups are being used
@@ -86,7 +86,7 @@
echo "<tr>";
foreach ($useranswer as $key => $answer) {
echo "<th class=\"col$key\" width=\"$tablewidth%\">";
echo choice_get_answer($choice, $key);
echo format_string(choice_get_answer($choice, $key));
echo "</th>";
}
echo "</tr><tr>";

View File

@@ -78,7 +78,7 @@
$newid = insert_record ("choice",$choice);
//Do some output
echo "<li>".get_string("modulename","choice")." \"".$choice->name."\"</li>";
echo "<li>".get_string("modulename","choice")." \"".format_string(stripslashes($choice->name),true)."\"</li>";
backup_flush(300);
if ($newid) {

View File

@@ -63,8 +63,8 @@
add_to_log($course->id, "choice", "view", "view.php?id=$cm->id", $choice->id, $cm->id);
print_header_simple("$choice->name", "",
"<a href=\"index.php?id=$course->id\">$strchoices</a> -> $choice->name", "", "", true,
print_header_simple(format_string($choice->name), "",
"<a href=\"index.php?id=$course->id\">$strchoices</a> -> ".format_string($choice->name), "", "", true,
update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm));
/// Check to see if groups are being used in this choice
@@ -108,7 +108,7 @@
if ($answer) {
echo "<td align=\"center\">";
echo "<input type=\"radio\" name=\"answer\" value=\"$key\" ".$answerchecked[$key]." alt=\"".s(strip_tags($answer))."\" />";
echo format_text($answer);
echo format_string($answer);
echo "</td>";
}
}
@@ -193,7 +193,7 @@
} else {
continue;
}
echo choice_get_answer($choice, $key);
echo format_string(choice_get_answer($choice, $key));
echo "</th>";
}
echo "</tr><tr>";