mirror of
https://github.com/moodle/moodle.git
synced 2025-07-26 00:31:35 +02:00
Now choice->name and choice->answerxx work under filterall.
This commit is contained in:
@@ -56,7 +56,7 @@
|
|||||||
$answer = "";
|
$answer = "";
|
||||||
}
|
}
|
||||||
if (!empty($answer->answer)) {
|
if (!empty($answer->answer)) {
|
||||||
$aa = choice_get_answer($choice, $answer->answer);
|
$aa = format_string(choice_get_answer($choice, $answer->answer));
|
||||||
} else {
|
} else {
|
||||||
$aa = "";
|
$aa = "";
|
||||||
}
|
}
|
||||||
@@ -74,10 +74,10 @@
|
|||||||
//Calculate the href
|
//Calculate the href
|
||||||
if (!$choice->visible) {
|
if (!$choice->visible) {
|
||||||
//Show dimmed if the mod is hidden
|
//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 {
|
} else {
|
||||||
//Show normal if the mod is visible
|
//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") {
|
if ($course->format == "weeks" || $course->format == "topics") {
|
||||||
$table->data[] = array ($printsection, $tt_href, $aa);
|
$table->data[] = array ($printsection, $tt_href, $aa);
|
||||||
|
@@ -29,9 +29,9 @@
|
|||||||
|
|
||||||
add_to_log($course->id, "choice", "report", "report.php?id=$cm->id", "$choice->id");
|
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=\"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
|
/// Check to see if groups are being used in this choice
|
||||||
if ($groupmode = groupmode($course, $cm)) { // Groups are being used
|
if ($groupmode = groupmode($course, $cm)) { // Groups are being used
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
foreach ($useranswer as $key => $answer) {
|
foreach ($useranswer as $key => $answer) {
|
||||||
echo "<th class=\"col$key\" width=\"$tablewidth%\">";
|
echo "<th class=\"col$key\" width=\"$tablewidth%\">";
|
||||||
echo choice_get_answer($choice, $key);
|
echo format_string(choice_get_answer($choice, $key));
|
||||||
echo "</th>";
|
echo "</th>";
|
||||||
}
|
}
|
||||||
echo "</tr><tr>";
|
echo "</tr><tr>";
|
||||||
|
@@ -78,7 +78,7 @@
|
|||||||
$newid = insert_record ("choice",$choice);
|
$newid = insert_record ("choice",$choice);
|
||||||
|
|
||||||
//Do some output
|
//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);
|
backup_flush(300);
|
||||||
|
|
||||||
if ($newid) {
|
if ($newid) {
|
||||||
|
@@ -63,8 +63,8 @@
|
|||||||
|
|
||||||
add_to_log($course->id, "choice", "view", "view.php?id=$cm->id", $choice->id, $cm->id);
|
add_to_log($course->id, "choice", "view", "view.php?id=$cm->id", $choice->id, $cm->id);
|
||||||
|
|
||||||
print_header_simple("$choice->name", "",
|
print_header_simple(format_string($choice->name), "",
|
||||||
"<a href=\"index.php?id=$course->id\">$strchoices</a> -> $choice->name", "", "", true,
|
"<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));
|
update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm));
|
||||||
|
|
||||||
/// Check to see if groups are being used in this choice
|
/// Check to see if groups are being used in this choice
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
if ($answer) {
|
if ($answer) {
|
||||||
echo "<td align=\"center\">";
|
echo "<td align=\"center\">";
|
||||||
echo "<input type=\"radio\" name=\"answer\" value=\"$key\" ".$answerchecked[$key]." alt=\"".s(strip_tags($answer))."\" />";
|
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>";
|
echo "</td>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -193,7 +193,7 @@
|
|||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
echo choice_get_answer($choice, $key);
|
echo format_string(choice_get_answer($choice, $key));
|
||||||
echo "</th>";
|
echo "</th>";
|
||||||
}
|
}
|
||||||
echo "</tr><tr>";
|
echo "</tr><tr>";
|
||||||
|
Reference in New Issue
Block a user