Now survey->name supports filterall.

This commit is contained in:
stronk7
2005-04-06 18:20:05 +00:00
parent bfe839b8ce
commit cd5d2d4b74
7 changed files with 16 additions and 16 deletions
+5 -5
View File
@@ -125,7 +125,7 @@
require_once("$CFG->libdir/excel/Workbook.php");
header("Content-type: application/vnd.ms-excel");
$downloadfilename = clean_filename("$course->shortname $survey->name");
$downloadfilename = clean_filename("$course->shortname ".strip_tags(format_string($survey->name,true)));
header("Content-Disposition: attachment; filename=$downloadfilename.xls");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
@@ -133,7 +133,7 @@
$workbook = new Workbook("-");
// Creating the first worksheet
$myxls =& $workbook->add_worksheet(substr($survey->name, 0, 31));
$myxls =& $workbook->add_worksheet(substr(strip_tags(format_string($survey->name,true)), 0, 31));
$header = array("surveyid","surveyname","userid","firstname","lastname","email","idnumber","time", "notes");
$col=0;
@@ -166,7 +166,7 @@
$notes = "No notes made";
}
$myxls->write_string($row,$col++,$survey->id);
$myxls->write_string($row,$col++,$survey->name);
$myxls->write_string($row,$col++,strip_tags(format_text($survey->name,true)));
$myxls->write_string($row,$col++,$user);
$myxls->write_string($row,$col++,$u->firstname);
$myxls->write_string($row,$col++,$u->lastname);
@@ -197,7 +197,7 @@
header("Content-Type: application/download\n");
$downloadfilename = clean_filename("$course->shortname $survey->name");
$downloadfilename = clean_filename("$course->shortname ".strip_tags(format_string($survey->name,true)));
header("Content-Disposition: attachment; filename=\"$downloadfilename.txt\"");
// Print names of all the fields
@@ -221,7 +221,7 @@
error("Error finding student # $user");
}
echo $survey->id."\t";
echo $survey->name."\t";
echo strip_tags(format_string($survey->name,true))."\t";
echo $user."\t";
echo $u->firstname."\t";
echo $u->lastname."\t";
+2 -2
View File
@@ -341,7 +341,7 @@
$graph = new graph($SURVEY_GWIDTH,$SURVEY_GHEIGHT);
$graph->parameter['title'] = "$survey->name";
$graph->parameter['title'] = strip_tags(format_string($survey->name,true));
$graph->x_data = $names;
@@ -502,7 +502,7 @@
$graph = new graph($SURVEY_GWIDTH,$SURVEY_GHEIGHT);
$graph->parameter['title'] = "$survey->name";
$graph->parameter['title'] = strip_tags(format_string($survey->name,true));
$graph->x_data = $names;
+2 -2
View File
@@ -60,10 +60,10 @@
//Calculate the href
if (!$survey->visible) {
//Show dimmed if the mod is hidden
$tt_href = "<a class=\"dimmed\" href=\"view.php?id=$survey->coursemodule\">$survey->name</a>";
$tt_href = "<a class=\"dimmed\" href=\"view.php?id=$survey->coursemodule\">".format_string($survey->name,true)."</a>";
} else {
//Show normal if the mod is visible
$tt_href = "<a href=\"view.php?id=$survey->coursemodule\">$survey->name</a>";
$tt_href = "<a href=\"view.php?id=$survey->coursemodule\">".format_string($survey->name,true)".</a>";
}
if ($course->format == "weeks" or $course->format == "topics") {
+3 -3
View File
@@ -53,13 +53,13 @@
if ($course->category) {
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->
<a href=\"index.php?id=$course->id\">$strsurveys</a> ->
<a href=\"view.php?id=$cm->id\">$survey->name</a> -> ";
<a href=\"view.php?id=$cm->id\">".format_string($survey->name,true)."</a> -> ";
} else {
$navigation = "<a href=\"index.php?id=$course->id\">$strsurveys</a> ->
<a href=\"view.php?id=$cm->id\">$survey->name</a> -> ";
<a href=\"view.php?id=$cm->id\">".format_string($survey->name,true)."</a> -> ";
}
print_header("$course->shortname: $survey->name", "$course->fullname", "$navigation $strreport",
print_header("$course->shortname: ".format_string($survey->name), "$course->fullname", "$navigation $strreport",
"", "", true,
update_module_button($cm->id, $course->id, $strsurvey), navmenu($course, $cm));
+1 -1
View File
@@ -53,7 +53,7 @@
$newid = insert_record ("survey",$survey);
//Do some output
echo "<li>".get_string("modulename","survey")." \"".$survey->name."\"</li>";
echo "<li>".get_string("modulename","survey")." \"".format_string(stripslashes($survey->name),true)."\"</li>";
backup_flush(300);
if ($newid) {
+1 -1
View File
@@ -90,7 +90,7 @@
$strsurveysaved = get_string("surveysaved", "survey");
print_header_simple("$strsurveysaved", "",
"<a href=\"index.php?id=$course->id\">$strsurveys</a> -> $survey->name -> $strsurveysaved", "");
"<a href=\"index.php?id=$course->id\">$strsurveys</a> -> ".format_string($survey->name)." -> $strsurveysaved", "");
notice(get_string("thanksforanswers","survey", $USER->firstname), "$CFG->wwwroot/course/view.php?id=$course->id");
+2 -2
View File
@@ -28,8 +28,8 @@
$strsurveys = get_string("modulenameplural", "survey");
$strsurvey = get_string("modulename", "survey");
print_header_simple("$survey->name", "",
"<a href=\"index.php?id=$course->id\">$strsurveys</a> -> $survey->name", "", "", true,
print_header_simple(format_string($survey->name), "",
"<a href=\"index.php?id=$course->id\">$strsurveys</a> -> ".format_string($survey->name), "", "", true,
update_module_button($cm->id, $course->id, $strsurvey), navmenu($course, $cm));
/// Check to see if groups are being used in this survey