fixed capitalization and quoting of attribute values

This commit is contained in:
gustav_delius 2004-09-12 17:34:35 +00:00
parent 41905731b7
commit d1290cec39
121 changed files with 1401 additions and 1401 deletions

View file

@ -1,4 +1,4 @@
<?PHP //$Id$
<?php //$Id$
//This php script contains all the stuff to backup/restore
//survey mods

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
function survey_upgrade($oldversion) {
// This function does anything necessary to upgrade

View file

@ -1,4 +1,4 @@
<?PHP
<?php
function survey_upgrade($oldversion) {
// This function does anything necessary to upgrade
// older versions to match current functionality

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
function survey_upgrade($oldversion) {
// This function does anything necessary to upgrade

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
require_once("../../config.php");
@ -27,13 +27,13 @@
print_simple_box_start("center", "", "$THEME->cellheading");
?>
<form name=form method=post action="<?php p($form->destination)?>">
<table cellpadding=5 align=center>
<tr><td align=right nowrap><p><b><?php print_string("name") ?>:</b></p></td>
<form name="form" method="post" action="<?php p($form->destination)?>">
<table cellpadding="5" align="center">
<tr><td align="right" nowrap="nowrap"><p><b><?php print_string("name") ?>:</b></p></td>
<td><p><?php p($form->name) ?></p></a></td></tr>
<tr valign=top>
<td align=right nowrap>
<tr valign="top">
<td align="right" nowrap="nowrap">
<p><b><?php print_string("introtext", "survey") ?>:</b></p><br />
<font size="1">
<?php helpbutton("writing", get_string("helpwriting"), "moodle", true, true) ?> <br />
@ -42,7 +42,7 @@
</font>
</td>
<td>
<textarea name="intro" rows=20 cols=50 wrap="virtual"><?php
<textarea name="intro" rows="20" cols="50" wrap="virtual"><?php
if ($form->intro) {
p($form->intro);
} else {
@ -54,16 +54,16 @@
</td>
</tr>
</table>
<input type="hidden" name=name value="<?php p($form->name) ?>" />
<input type="hidden" name=template value="<?php p($form->template) ?>" />
<input type="hidden" name="name" value="<?php p($form->name) ?>" />
<input type="hidden" name="template" value="<?php p($form->template) ?>" />
<input type="hidden" name=course value="<?php p($form->course) ?>" />
<input type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>" />
<input type="hidden" name=section value="<?php p($form->section) ?>" />
<input type="hidden" name=module value="<?php p($form->module) ?>" />
<input type="hidden" name=modulename value="<?php p($form->modulename) ?>" />
<input type="hidden" name=instance value="<?php p($form->instance) ?>" />
<input type="hidden" name=mode value="<?php p($form->mode) ?>" />
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
<input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>" />
<input type="hidden" name="section" value="<?php p($form->section) ?>" />
<input type="hidden" name="module" value="<?php p($form->module) ?>" />
<input type="hidden" name="modulename" value="<?php p($form->modulename) ?>" />
<input type="hidden" name="instance" value="<?php p($form->instance) ?>" />
<input type="hidden" name="mode" value="<?php p($form->mode) ?>" />
<center>
<input type="submit" value="<?php print_string("savechanges") ?>" />
</center>

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
require ("../../config.php");

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
require_once("../../config.php");
require_once("$CFG->libdir/graphlib.php");

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
require_once("../../config.php");
require_once("lib.php");
@ -60,20 +60,20 @@
//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\">$survey->name</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\">$survey->name</a>";
}
if ($course->format == "weeks" or $course->format == "topics") {
$table->data[] = array ($printsection, $tt_href, "<A HREF=\"view.php?id=$survey->coursemodule\">$ss</A>");
$table->data[] = array ($printsection, $tt_href, "<a href=\"view.php?id=$survey->coursemodule\">$ss</a>");
} else {
$table->data[] = array ($tt_href, "<A HREF=\"view.php?id=$survey->coursemodule\">$ss</A>");
$table->data[] = array ($tt_href, "<a href=\"view.php?id=$survey->coursemodule\">$ss</a>");
}
}
echo "<BR>";
echo "<br />";
print_table($table);
print_footer($course);

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
// Graph size
$SURVEY_GHEIGHT = 500;
@ -166,7 +166,7 @@ function survey_print_recent_activity($course, $isteacher, $timestart) {
print_headline(get_string("newsurveyresponses", "survey").":");
foreach ($surveys as $survey) {
$date = userdate($survey->time, $strftimerecent);
echo "<p><font size=1>$date - ".fullname($survey)."<br />";
echo "<p><font size=\"1\">$date - ".fullname($survey)."<br />";
echo "\"<a href=\"$CFG->wwwroot/mod/survey/$survey->url\">";
echo "$survey->name";
echo "</a>\"</font></p>";
@ -358,10 +358,10 @@ function survey_print_multi($question) {
$stripreferthat = get_string("ipreferthat", "survey");
$strifoundthat = get_string("ifoundthat", "survey");
echo "<P>&nbsp</P>\n";
echo "<P><FONT SIZE=4><B>$question->text</B></FONT></P>";
echo "<p>&nbsp</p>\n";
echo "<p><font size=\"4\"><b>$question->text</b></font></p>";
echo "<TABLE ALIGN=CENTER WIDTH=90% CELLPADDING=4 CELLSPACING=1 BORDER=0>";
echo "<table align=\"center\" width=\"90%\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\">";
$options = explode( ",", $question->options);
$numoptions = count($options);
@ -374,15 +374,15 @@ function survey_print_multi($question) {
}
if ($oneanswer) {
echo "<TR WIDTH=100% ><TD COLSPAN=2><P>$question->intro</P></TD>";
echo "<tr width=\"100%\" ><td colspan=\"2\"><p>$question->intro</p></td>";
} else {
echo "<TR WIDTH=100% ><TD COLSPAN=3><P>$question->intro</P></TD>";
echo "<tr width=\"100%\" ><td colspan=\"3\"><p>$question->intro</p></td>";
}
while (list ($key, $val) = each ($options)) {
echo "<TD width=10% ALIGN=CENTER><FONT SIZE=1><P>$val</P></FONT></TD>\n";
echo "<td width=\"10%\" align=\"center\"><font size=\"1\"><p>$val</p></font></td>\n";
}
echo "<TD ALIGN=CENTER BGCOLOR=\"$THEME->body\">&nbsp</TD></TR>\n";
echo "<td align=\"center\" bgcolor=\"$THEME->body\">&nbsp</td></tr>\n";
$subquestions = get_records_list("survey_questions", "id", $question->multi);
@ -394,38 +394,38 @@ function survey_print_multi($question) {
$q->text = get_string($q->text, "survey");
}
echo "<TR BGCOLOR=$bgcolor>";
echo "<tr bgcolor=$bgcolor>";
if ($oneanswer) {
echo "<TD WIDTH=10 VALIGN=top><P><B>$qnum</B></P></TD>";
echo "<TD VALIGN=top><P>$q->text</P></TD>";
echo "<td width=\"10\" valign=\"top\"><p><b>$qnum</b></p></td>";
echo "<td valign=\"top\"><p>$q->text</p></td>";
for ($i=1;$i<=$numoptions;$i++) {
echo "<TD WIDTH=10% ALIGN=CENTER><INPUT TYPE=radio NAME=q$P$q->id VALUE=$i /></TD>";
echo "<td width=\"10%\" align=\"center\"><input type=\"radio\" name=\"q$P$q->id\" value=\"$i\" /></td>";
}
echo "<TD BGCOLOR=white><INPUT TYPE=radio NAME=q$P$q->id VALUE=0 checked=\"checked\" /></TD>";
echo "<td bgcolor=\"white\"><input type=\"radio\" name=\"q$P$q->id\" value=\"0\" checked=\"checked\" /></td>";
$checklist["q$P$q->id"] = $numoptions;
} else {
echo "<TD WIDTH=10 VALIGN=middle rowspan=2><P><B>$qnum</B></P></TD>";
echo "<TD WIDTH=10% NOWRAP><P><FONT SIZE=1>$stripreferthat&nbsp;</FONT></P></TD>";
echo "<TD WIDTH=40% VALIGN=middle rowspan=2><P>$q->text</P></TD>";
echo "<td width=\"10\" valign=\"middle\" rowspan=\"2\"><p><b>$qnum</b></p></td>";
echo "<td width=\"10%\" nowrap=\"nowrap\"><p><font size=\"1\">$stripreferthat&nbsp;</font></p></td>";
echo "<td width=\"40%\" valign=\"middle\" rowspan=\"2\"><p>$q->text</p></td>";
for ($i=1;$i<=$numoptions;$i++) {
echo "<TD WIDTH=10% ALIGN=CENTER><INPUT TYPE=radio NAME=qP$q->id VALUE=$i /></TD>";
echo "<td width=\"10%\" align=\"center\"><input type=\"radio\" name=\"qP$q->id\" value=\"$i\" /></td>";
}
echo "<TD BGCOLOR=\"$THEME->body\"><INPUT TYPE=radio NAME=qP$q->id VALUE=0 checked=\"checked\" /></TD>";
echo "</TR>";
echo "<td bgcolor=\"$THEME->body\"><input type=\"radio\" name=\"qP$q->id\" value=\"0\" checked=\"checked\" /></td>";
echo "</tr>";
echo "<TR BGCOLOR=$bgcolor>";
echo "<TD WIDTH=10% NOWRAP><P><FONT SIZE=1>$strifoundthat&nbsp;</P></TD>";
echo "<tr bgcolor=$bgcolor>";
echo "<td width=\"10%\" nowrap=\"nowrap\"><p><font size=\"1\">$strifoundthat&nbsp;</p></td>";
for ($i=1;$i<=$numoptions;$i++) {
echo "<TD WIDTH=10% ALIGN=CENTER><INPUT TYPE=radio NAME=q$q->id VALUE=$i /></TD>";
echo "<td width=\"10%\" align=\"center\"><input type=\"radio\" name=\"q$q->id\" value=\"$i\" /></td>";
}
echo "<TD WIDTH=5% BGCOLOR=\"$THEME->body\"><INPUT TYPE=radio NAME=q$q->id VALUE=0 checked=\"checked\" /></TD>";
echo "<td width=\"5%\" bgcolor=\"$THEME->body\"><input type=\"radio\" name=\"q$q->id\" value=\"0\" checked=\"checked\" /></td>";
$checklist["qP$q->id"] = $numoptions;
$checklist["q$q->id"] = $numoptions;
}
echo "</TR>\n";
echo "</tr>\n";
}
echo "</TABLE>";
echo "</table>";
}
@ -437,34 +437,34 @@ function survey_print_single($question) {
$qnum++;
echo "<P>&nbsp</P>\n";
echo "<TABLE ALIGN=CENTER WIDTH=90% CELLPADDING=4 CELLSPACING=0>\n";
echo "<TR BGCOLOR=$bgcolor>";
echo "<TD VALIGN=top><B>$qnum</B></TD>";
echo "<TD WIDTH=50% VALIGN=top><P>$question->text</P></TD>\n";
echo "<TD WIDTH=50% VALIGN=top><P><FONT SIZE=+1>\n";
echo "<p>&nbsp</p>\n";
echo "<table align=\"center\" width=\"90%\" cellpadding=\"4\" cellspacing=\"0\">\n";
echo "<tr bgcolor=$bgcolor>";
echo "<td valign=\"top\"><b>$qnum</b></td>";
echo "<td width=\"50%\" valign=\"top\"><p>$question->text</p></td>\n";
echo "<td width=\"50%\" valign=\"top\"><p><font size=+1>\n";
if ($question->type == 0) { // Plain text field
echo "<TEXTAREA ROWS=3 COLS=30 WRAP=virtual NAME=\"$question->id\">$question->options</TEXTAREA>";
echo "<textarea rows=\"3\" cols=\"30\" wrap=\"virtual\" name=\"$question->id\">$question->options</textarea>";
} else if ($question->type > 0) { // Choose one of a number
$strchoose = get_string("choose");
echo "<SELECT NAME=$question->id>";
echo "<OPTION VALUE=0 SELECTED>$strchoose...</OPTION>";
echo "<select name=$question->id>";
echo "<option value=\"0\" SELECTED>$strchoose...</option>";
$options = explode( ",", $question->options);
foreach ($options as $key => $val) {
$key++;
echo "<OPTION VALUE=\"$key\">$val</OPTION>";
echo "<option value=\"$key\">$val</option>";
}
echo "</SELECT>";
echo "</select>";
} else if ($question->type < 0) { // Choose several of a number
$options = explode( ",", $question->options);
notify("This question type not supported yet");
}
echo "</FONT></TD></TR></TABLE>";
echo "</font></td></tr></table>";
}

View file

@ -12,15 +12,15 @@
?>
<form name="form" method="post" action="../mod/survey/details.php">
<table cellpadding=5>
<tr valign=top>
<td align=right><P><B><?php print_string("surveyname", "survey") ?>:</B></P></TD>
<table cellpadding="5">
<tr valign="top">
<td align="right"><p><b><?php print_string("surveyname", "survey") ?>:</b></p></td>
<td>
<input type="text" name="name" size=30 value="<?php p($form->name) ?>" />
<input type="text" name="name" size="30" value="<?php p($form->name) ?>" />
</td>
</tr>
<tr>
<td align=right><P><B><?php print_string("surveytype", "survey") ?>:</B></P></TD>
<td align="right"><p><b><?php print_string("surveytype", "survey") ?>:</b></p></td>
<td>
<?php
if ($options = get_records_menu("survey", "template", 0, "name", "id, name")) {
@ -36,18 +36,18 @@
</td>
</tr>
</table>
<CENTER>
<input type="hidden" name=intro value="<?php p($form->intro) ?>" />
<input type="hidden" name=destination value="<?php echo "$CFG->wwwroot/course/mod.php" ?>" />
<center>
<input type="hidden" name="intro" value="<?php p($form->intro) ?>" />
<input type="hidden" name="destination" value="<?php echo "$CFG->wwwroot/course/mod.php" ?>" />
<input type="hidden" name=course value="<?php p($form->course) ?>" />
<input type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>" />
<input type="hidden" name=section value="<?php p($form->section) ?>" />
<input type="hidden" name=module value="<?php p($form->module) ?>" />
<input type="hidden" name=modulename value="<?php p($form->modulename) ?>" />
<input type="hidden" name=instance value="<?php p($form->instance) ?>" />
<input type="hidden" name=mode value="<?php p($form->mode) ?>" />
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
<input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>" />
<input type="hidden" name="section" value="<?php p($form->section) ?>" />
<input type="hidden" name="module" value="<?php p($form->module) ?>" />
<input type="hidden" name="modulename" value="<?php p($form->modulename) ?>" />
<input type="hidden" name="instance" value="<?php p($form->instance) ?>" />
<input type="hidden" name="mode" value="<?php p($form->mode) ?>" />
<input type="submit" value="<?php print_string("savechanges") ?>" />
<input type="submit" name=cancel value="<?php print_string("cancel") ?>" />
</CENTER>
</FORM>
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
</center>
</form>

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
require_once("../../config.php");
require_once("lib.php");
@ -109,7 +109,7 @@
print_heading($strsummary);
if (survey_count_responses($survey->id, $currentgroup)) {
echo "<p align=center><a href=\"report.php?action=scales&id=$id\">";
echo "<p align=\"center\"><a href=\"report.php?action=scales&id=$id\">";
survey_print_graph("id=$id&group=$currentgroup&type=overall.png");
echo "</a>";
} else {
@ -142,7 +142,7 @@
if ($virtualscales && $question->type > 0) { // Don't show non-virtual scales if virtual
continue;
}
echo "<p align=center><a title=\"$strseemoredetail\" href=report.php?action=questions&id=$id&qid=$question->multi>";
echo "<p align=\"center\"><a title=\"$strseemoredetail\" href=\"report.php?action=questions&id=$id&qid=$question->multi\">";
survey_print_graph("id=$id&qid=$question->id&group=$currentgroup&type=multiquestion.png");
echo "</a></p><br />";
}
@ -200,14 +200,14 @@
foreach ($subquestionorder as $key => $val) {
$subquestion = $subquestions[$val];
if ($subquestion->type > 0) {
echo "<p align=center>";
echo "<p align=\"center\">";
echo "<a title=\"$strseemoredetail\" href=\"report.php?action=question&id=$id&qid=$subquestion->id\">";
survey_print_graph("id=$id&qid=$subquestion->id&group=$currentgroup&type=question.png");
echo "</a></p>";
}
}
} else if ($question->type > 0 ) {
echo "<p align=center>";
echo "<p align=\"center\">";
echo "<a title=\"$strseemoredetail\" href=\"report.php?action=question&id=$id&qid=$question->id\">";
survey_print_graph("id=$id&qid=$question->id&group=$currentgroup&type=question.png");
echo "</a></p>";
@ -322,7 +322,7 @@
}
}
echo "<p align=center>";
echo "<p align=\"center\">";
print_user_picture($user->id, $course->id, $user->picture, true);
echo "</p>";
@ -331,7 +331,7 @@
if ($showscales) {
// Print overall summary
echo "<p align=center>";
echo "<p align=\"center\">";
survey_print_graph("id=$id&sid=$student&type=student.png");
echo "</p>";
@ -351,8 +351,8 @@
if ($virtualscales && $question->type > 0) { // Don't show non-virtual scales if virtual
continue;
}
echo "<p align=center>";
echo "<a title=\"$strseemoredetail\" href=report.php?action=questions&id=$id&qid=$question->multi>";
echo "<p align=\"center\">";
echo "<a title=\"$strseemoredetail\" href=\"report.php?action=questions&id=$id&qid=$question->multi\">";
survey_print_graph("id=$id&qid=$question->id&sid=$student&type=studentmultiquestion.png");
echo "</a></p><br />";
}
@ -380,18 +380,18 @@
} else {
$notes = "";
}
echo "<hr noshade size=1>";
echo "<hr noshade=\"noshade\" size=\"1\" />";
echo "<center>";
echo "<form action=report.php method=post name=form>";
echo "<form action=\"report.php\" method=\"post\" name=\"form\">";
echo "<h3>$strnotes:</h3>";
echo "<blockquote>";
echo "<textarea name=notes rows=10 cols=60>";
echo "<textarea name=\"notes\" rows=\"10\" cols=\"60\">";
p($notes);
echo "</textarea><br />";
echo "<input type=hidden name=action value=student />";
echo "<input type=hidden name=student value=\"$student\" />";
echo "<input type=hidden name=id value=\"$cm->id\" />";
echo "<input type=submit value=\"".get_string("savechanges")."\" />";
echo "<input type=\"hidden\" name=\"action\" value=\"student\" />";
echo "<input type=\"hidden\" name=\"student\" value=\"$student\" />";
echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />";
echo "<input type=\"submit\" value=\"".get_string("savechanges")."\" />";
echo "</blockquote>";
echo "</form>";
echo "</center>";

View file

@ -1,4 +1,4 @@
<?PHP //$Id$
<?php //$Id$
//This php script contains all the stuff to backup/restore
//survey mods

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
require_once('../../config.php');
require_once('lib.php');

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
////////////////////////////////////////////////////////////////////////////////
// Code fragment to define the module version etc.

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
require_once("../../config.php");
require_once("lib.php");
@ -29,7 +29,7 @@
$strsurvey = get_string("modulename", "survey");
print_header_simple("$survey->name", "",
"<A HREF=index.php?id=$course->id>$strsurveys</A> -> $survey->name", "", "", true,
"<a href=\"index.php?id=$course->id\">$strsurveys</a> -> $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
@ -45,8 +45,8 @@
if (isteacher($course->id)) {
$numusers = survey_count_responses($survey->id, $currentgroup);
echo "<p align=right><a href=\"report.php?id=$cm->id\">".
get_string("viewsurveyresponses", "survey", $numusers)."</A></P>";
echo "<p align=\"right\"><a href=\"report.php?id=$cm->id\">".
get_string("viewsurveyresponses", "survey", $numusers)."</a></p>";
} else if (!$cm->visible) {
notice(get_string("activityiscurrentlyhidden"));
}
@ -99,8 +99,8 @@
// Start the survey form
add_to_log($course->id, "survey", "view form", "view.php?id=$cm->id", $survey->id, $cm->id);
echo "<form name=form method=post action=save.php>";
echo "<input type=hidden name=id value=\"$id\" />";
echo "<form name=\"form\" method=\"post\" action=\"save.php\">";
echo "<input type=\"hidden\" name=\"id\" value=\"$id\" />";
print_simple_box(format_text($survey->intro), "center", "80%");
@ -176,10 +176,10 @@ function checkform() {
}
}
<?php echo "document.write('<INPUT TYPE=button VALUE=\"".get_string("clicktocontinuecheck", "survey")."\" onClick=\"checkform()\" />');"; ?>
<?php echo "document.write('<input type=\"button\" value=\"".get_string("clicktocontinuecheck", "survey")."\" onClick=\"checkform()\" />');"; ?>
// END -->
</SCRIPT>
</script>
<noscript>
<!-- Without Javascript, no checking is done -->