Permalink
Browse files

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

  • Loading branch information...
1 parent f8fc9ea commit c61d50b800a20e24d0155378004607f4a1f0b83c stronk7 committed Mar 27, 2005
Showing with 11 additions and 11 deletions.
  1. +3 −3 mod/choice/index.php
  2. +3 −3 mod/choice/report.php
  3. +1 −1 mod/choice/restorelib.php
  4. +4 −4 mod/choice/view.php
View
6 mod/choice/index.php
@@ -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
6 mod/choice/report.php
@@ -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
2 mod/choice/restorelib.php
@@ -78,7 +78,7 @@ function choice_restore_mods($mod,$restore) {
$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
8 mod/choice/view.php
@@ -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>";

0 comments on commit c61d50b

Please sign in to comment.