From: gustav_delius Date: Sun, 12 Sep 2004 16:24:41 +0000 (+0000) Subject: fixed capitalization and quoting of attribute values X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=41905731b72e7c80102653d5880211fc6d25e29c;p=moodle.git fixed capitalization and quoting of attribute values --- diff --git a/mod/exercise/assessments.php b/mod/exercise/assessments.php index 4664559ed2..c831344032 100644 --- a/mod/exercise/assessments.php +++ b/mod/exercise/assessments.php @@ -1,4 +1,4 @@ -name", "", - "id>$strexercises -> - id\">$exercise->name -> $strassessments", + "id\">$strexercises -> + id\">$exercise->name -> $strassessments", "", "", true); //...get the action @@ -95,11 +95,11 @@ number_format($exercise->gradinggrade * $assessment->gradinggrade / 100, 0), ""); echo "\n"; echo ""; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; - echo ""; - echo "\n"; + echo ""; + echo "\n"; } @@ -263,10 +263,10 @@ print_heading_with_help(get_string("editingassessmentelements", "exercise"), "elements", "exercise"); ?>
- + -
-
+ id, "elementno ASC" )) { @@ -288,14 +288,14 @@ case 0: // no grading for ($i=0; $i<$exercise->nelements; $i++) { $iplus1 = $i+1; - echo "\n"; - echo " \n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "\n"; + echo " \n"; + echo "\n"; + echo " \n"; + echo "\n"; } break; @@ -307,67 +307,67 @@ for ($i=0; $i<$exercise->nelements; $i++) { $iplus1 = $i+1; - echo "\n"; - echo " \n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "\n"; + echo "\n"; + echo " \n"; + echo "\n"; - echo "\n"; + echo "\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "\n"; + echo " \n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "\n"; } break; case 2: // error banded grading for ($i=0; $i<$exercise->nelements; $i++) { $iplus1 = $i+1; - echo "\n"; - echo " \n"; - echo "\n"; + echo " \n"; if ($elements[$i]->weight == '') { // not set $elements[$i]->weight = 11; // unity } - echo "\n"; - echo "\n"; + echo "\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "\n"; + echo " \n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "\n"; } - echo "

". get_string("element","exercise")." $iplus1:

\n"; - echo "
cellheading2\"> 
cellheading2\"> 

". get_string("element","exercise")." $iplus1:

\n"; - echo "

". get_string("typeofscale", "exercise"). ":

\n"; + echo "

". get_string("typeofscale", "exercise"). ":

\n"; choose_from_menu($SCALES, "scale[]", $elements[$i]->scale, ""); if ($elements[$i]->weight == '') { // not set $elements[$i]->weight = 11; // unity } - echo "
".get_string("elementweight", "exercise"). - ":\n"; + echo "
".get_string("elementweight", "exercise"). + ":\n"; exercise_choose_from_menu($EXERCISE_EWEIGHTS, "weight[]", $elements[$i]->weight, ""); - echo "
cellheading2\"> 
cellheading2\"> 

". get_string("element","exercise")." $iplus1:

\n"; - echo "
".get_string("elementweight", "exercise"). - ":\n"; + echo "
".get_string("elementweight", "exercise"). + ":\n"; exercise_choose_from_menu($EXERCISE_EWEIGHTS, "weight[]", $elements[$i]->weight, ""); - echo "
cellheading2\"> 
cellheading2\"> 

\n"; - echo "

".get_string("gradetable","exercise")."
\n"; - echo "
". + echo "

\n"; + echo "

".get_string("gradetable","exercise")."
\n"; + echo "
\n"; + echo "\n"; for ($j = $exercise->grade; $j >= 0; $j--) { $numbers[$j] = $j; } for ($i=0; $i<=$exercise->nelements; $i++) { - echo "\n"; + echo "\n"; } break; @@ -377,19 +377,19 @@ } for ($i=0; $i<$exercise->nelements; $i++) { $iplus1 = $i+1; - echo "\n"; + echo "\n"; - echo " \n"; - echo "\n"; - echo "\n"; + echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; - echo " \n"; - echo "\n"; + echo " \n"; + echo "\n"; } break; @@ -404,31 +404,31 @@ } for ($i=0; $i<$exercise->nelements; $i++) { $iplus1 = $i+1; - echo "\n"; - echo " \n"; - echo "\n"; - echo "\n"; + echo "\n"; - echo "\n"; + echo " \n"; + echo "\n"; for ($j=0; $j<5; $j++) { $jplus1 = $j+1; if (empty($rubrics[$i][$j])) { $rubrics[$i][$j] = ""; } - echo "\n"; - echo " \n"; - echo "\n"; + echo " \n"; } - echo "\n"; - echo " \n"; - echo "\n"; + echo "\n"; + echo " \n"; + echo "\n"; } break; } @@ -437,11 +437,11 @@ ?>
". get_string("numberofnegativeresponses", "exercise"); - echo "". get_string("suggestedgrade", "exercise")."
". get_string("suggestedgrade", "exercise")."
$i"; + echo "
$i"; if (!isset($elements[$i])) { // the "last one" will be! $elements[$i]->description = ""; $elements[$i]->maxscore = 0; } choose_from_menu($numbers, "maxscore[$i]", $elements[$i]->maxscore, ""); - echo "

". get_string("criterion","exercise")." $iplus1:

\n"; - echo "
". get_string("suggestedgrade", "exercise").":\n"; + echo "
". get_string("suggestedgrade", "exercise").":\n"; choose_from_menu($numbers, "maxscore[$i]", $elements[$i]->maxscore, ""); - echo "
cellheading2\"> 
cellheading2\"> 

". get_string("element","exercise")." $iplus1:

\n"; - echo "
".get_string("elementweight", "exercise"). - ":\n"; + echo "
".get_string("elementweight", "exercise"). + ":\n"; exercise_choose_from_menu($EXERCISE_EWEIGHTS, "weight[]", $elements[$i]->weight, ""); - echo "

". get_string("grade")." $j:

\n"; - echo "
cellheading2\"> 
cellheading2\"> 

"> - "> + ">
- "; + // echo "\$key, \$maxscore, \$weight, \$totalweight, \$grade, \$rawgrade : $key, $maxscore, $weight, $totalweight, $grade, $rawgrade
"; } $grade = 100.0 * ($rawgrade / $totalweight); break; @@ -755,8 +755,8 @@ } $grade = ($elements[intval($error + 0.5)]->maxscore + $form->grade[$i]) * 100.0 / $exercise->grade; - // echo "

".get_string("weightederrorcount", "exercise", intval($error + 0.5)). - // " ".get_string("adjustment", "exercise").": ".$form->grade[$i]."\n"; + // echo "

".get_string("weightederrorcount", "exercise", intval($error + 0.5)). + // " ".get_string("adjustment", "exercise").": ".$form->grade[$i]."\n"; // check the grade for sanity! if ($grade > 100.0) { $grade = 100.0; @@ -941,7 +941,7 @@ $totalweight += $weight; } $rawgrade += ($grade / $maxscore) * $weight; - // echo "\$key, \$maxscore, \$weight, \$totalweight, \$grade, \$rawgrade : $key, $maxscore, $weight, $totalweight, $grade, $rawgrade
"; + // echo "\$key, \$maxscore, \$weight, \$totalweight, \$grade, \$rawgrade : $key, $maxscore, $weight, $totalweight, $grade, $rawgrade
"; } $grade = 100.0 * ($rawgrade / $totalweight); break; @@ -974,7 +974,7 @@ error("Could not insert exercise element!"); } $grade = ($elements[intval($error + 0.5)]->maxscore + $form->grade[$i]) * 100 / $exercise->grade; - echo "

".get_string("weightederrorcount", "exercise", intval($error + 0.5))."\n"; + echo "

".get_string("weightederrorcount", "exercise", intval($error + 0.5))."\n"; break; case 3: // criteria grading @@ -1049,7 +1049,7 @@ set_field("exercise_assessments", "gradinggrade", $gradinggrade, "id", $stassessment->id); set_field("exercise_assessments", "timegraded", $timenow, "id", $stassessment->id); set_field("exercise_assessments", "mailed", 0, "id", $stassessment->id); - echo "".get_string("savedok", "exercise")."
\n"; + echo "".get_string("savedok", "exercise")."
\n"; add_to_log($course->id, "exercise", "grade", "view.php?id=$cm->id", "$stassessment->id"); diff --git a/mod/exercise/backuplib.php b/mod/exercise/backuplib.php index 041ec50e14..d660bb2c0e 100644 --- a/mod/exercise/backuplib.php +++ b/mod/exercise/backuplib.php @@ -1,4 +1,4 @@ -head = array ($strweek, $strname, $strtitle, $strgrade, $strsubmitted, $strdeadline); } - $table->align = array ("CENTER", "LEFT", "LEFT","center","LEFT", "LEFT"); + $table->align = array ("center", "left", "left","center","left", "left"); } else if ($course->format == "topics") { if (isteacher($course->id)) { $table->head = array ($strtopic, $strname, $strtitle, $strphase, $strsubmitted, $strdeadline); } else { $table->head = array ($strtopic, $strname, $strtitle, $strgrade, $strsubmitted, $strdeadline); } - $table->align = array ("CENTER", "LEFT", "LEFT", "center", "LEFT", "LEFT"); + $table->align = array ("center", "left", "left", "center", "left", "left"); } else { $table->head = array ($strname, $strsubmitted, $strdeadline); - $table->align = array ("LEFT", "LEFT", "LEFT"); + $table->align = array ("left", "left", "left"); } foreach ($exercises as $exercise) { if ($exercise->deadline > $timenow) { $due = userdate($exercise->deadline); } else { - $due = "".userdate($exercise->deadline).""; + $due = "".userdate($exercise->deadline).""; } if ($submissions = exercise_get_user_submissions($exercise, $USER)) { foreach ($submissions as $submission) { if ($submission->late) { - $submitted = "".userdate($submission->timecreated).""; + $submitted = "".userdate($submission->timecreated).""; } else { $submitted = userdate($submission->timecreated); } - $link = "coursemodule\">$exercise->name"; + $link = "coursemodule\">$exercise->name"; $title = $submission->title; if ($course->format == "weeks" or $course->format == "topics") { if (isteacher($course->id)) { @@ -119,7 +119,7 @@ } else { $submitted = get_string("no"); $title = ''; - $link = "coursemodule\">$exercise->name"; + $link = "coursemodule\">$exercise->name"; if ($course->format == "weeks" or $course->format == "topics") { if (isteacher($course->id)) { $table->data[] = array ($exercise->section, $link, $title, $exercise->phase, @@ -132,7 +132,7 @@ } } } - echo "
"; + echo "
"; print_table($table); diff --git a/mod/exercise/lib.php b/mod/exercise/lib.php index 2068f4d586..59e44883a5 100644 --- a/mod/exercise/lib.php +++ b/mod/exercise/lib.php @@ -1,4 +1,4 @@ -\n"; + $output = " - + + - - " /> + userid)) { error("Exercise_print_assessment_form: could not find user record"); @@ -1589,7 +1589,7 @@ function exercise_print_assessment_form($exercise, $assessment = false, $allowch $formtitle = get_string("assessmentform", "exercise"); } echo "

\n"; - echo "\n"; + echo "\n"; echo " \n"; @@ -1627,15 +1627,15 @@ function exercise_print_assessment_form($exercise, $assessment = false, $allowch // now print the form for ($i=0; $i < count($elements); $i++) { $iplus1 = $i+1; - echo "\n"; - echo " \n"; - echo " \n"; - echo "\n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; + echo "\n"; + echo " \n"; + echo " "; + echo "
"; + echo ""; } - echo "
cellheading2\">
$formtitle

". get_string("element","exercise")." $iplus1:

".text_to_html($elements[$i]->description); - echo "

". get_string("feedback").":

\n"; + echo "

". get_string("element","exercise")." $iplus1:

".text_to_html($elements[$i]->description); + echo "

". get_string("feedback").":

\n"; if ($allowchanges) { - echo "
"; - echo "

\n"; + echo "
\n"; } @@ -524,31 +524,31 @@ function journal_print_feedback($course, $entry, $grades) { error("Weird journal error"); } - echo "\n
"; - echo "\n"; + echo "\n
"; + echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; - echo ""; + echo ""; + echo ""; - echo "\n
body\" WIDTH=35 VALIGN=TOP>"; + echo "\n
body\" width=\"35\" valign=\"top\">"; print_user_picture($teacher->id, $course->id, $teacher->picture); - echo "cellheading\">".fullname($teacher); - echo "  ".userdate($entry->timemarked).""; - echo "
cellheading\">".fullname($teacher); + echo "  ".userdate($entry->timemarked).""; + echo "
cellcontent\">"; + echo "\n
cellcontent\">"; - echo "

"; + echo "

"; if ($grades[$entry->rating]) { echo get_string("grade").": "; echo $grades[$entry->rating]; } else { print_string("nograde"); } - echo "

"; + echo "

"; echo format_text($entry->comment); - echo "
"; - echo "
"; + echo "
"; + echo ""; } ?> diff --git a/mod/journal/mod.html b/mod/journal/mod.html index 056e7e5bf3..3acf866d7c 100644 --- a/mod/journal/mod.html +++ b/mod/journal/mod.html @@ -18,16 +18,16 @@ ?>
- - - +

:

+ + - - + - - + + - - + +

:

- +

:

+

:

'; } else { - echo "

"; + echo "

"; helpbutton("textformat", get_string("formattexttype")); print_string("formattexttype"); echo ": "; @@ -65,16 +65,16 @@

:

:

id, "assessed", "$form->assessed"); ?>

:

:

- - - - - - - + + + + + + + " /> -" /> +" />
diff --git a/mod/journal/report.php b/mod/journal/report.php index 3b761f9cac..37fa4075a5 100644 --- a/mod/journal/report.php +++ b/mod/journal/report.php @@ -1,4 +1,4 @@ -"; - echo "id\" />"; - echo ""; + echo "id\" />"; + echo ""; echo ""; echo ""; } diff --git a/mod/journal/restorelib.php b/mod/journal/restorelib.php index 1afd3cd02b..4cc4a1d02f 100644 --- a/mod/journal/restorelib.php +++ b/mod/journal/restorelib.php @@ -1,4 +1,4 @@ -name", "", - "id>$strjournals -> $journal->name", "", "", true, + "id\">$strjournals -> $journal->name", "", "", true, update_module_button($cm->id, $course->id, $strjournal), navmenu($course, $cm)); if (isteacher($course->id)) { @@ -42,7 +42,7 @@ } $entrycount = journal_count_entries($journal, $currentgroup); - echo "

id\">". + echo "

id\">". get_string("viewallentries","journal", $entrycount)."$groupname

"; } else if (!$cm->visible) { @@ -81,42 +81,42 @@ if ($timenow < $timefinish) { $options = array ("id" => "$cm->id"); - echo "
"; + echo "
"; if (!isguest()) { print_single_button("edit.php", $options, get_string("startoredit","journal")); } - echo "
"; + echo "
"; } if ($entry = get_record("journal_entries", "userid", $USER->id, "journal", $journal->id)) { if (empty($entry->text)) { - echo "

".get_string("blankentry","journal")."

"; + echo "

".get_string("blankentry","journal")."

"; } else { echo format_text($entry->text, $entry->format); } } else { - echo "".get_string("notstarted","journal").""; + echo "".get_string("notstarted","journal").""; } print_simple_box_end(); if ($timenow < $timefinish) { if ($entry->modified) { - echo "

".get_string("lastedited").": "; + echo "

".get_string("lastedited").": "; echo userdate($entry->modified); echo " (".get_string("numwords", "", count_words($entry->text)).")"; - echo "

"; + echo "

"; } if ($journal->days) { - echo "

".get_string("editingends", "journal").": "; - echo userdate($timefinish)."

"; + echo "

".get_string("editingends", "journal").": "; + echo userdate($timefinish)."

"; } } else { - echo "

".get_string("editingended", "journal").": "; - echo userdate($timefinish)."

"; + echo "

".get_string("editingended", "journal").": "; + echo userdate($timefinish)."

"; } if ($entry->comment or $entry->rating) { @@ -127,8 +127,8 @@ } else { - echo "

".get_string("notopenuntil", "journal").": "; - echo userdate($timestart)."

"; + echo "

".get_string("notopenuntil", "journal").": "; + echo userdate($timestart)."

"; } print_footer($course); diff --git a/mod/label/backuplib.php b/mod/label/backuplib.php index d1a9f83afe..8ad40c028c 100644 --- a/mod/label/backuplib.php +++ b/mod/label/backuplib.php @@ -1,4 +1,4 @@ - + + diff --git a/mod/label/db/postgres7.php b/mod/label/db/postgres7.php index 854c2977b7..1d549cdf24 100644 --- a/mod/label/db/postgres7.php +++ b/mod/label/db/postgres7.php @@ -1,21 +1,42 @@ - + + diff --git a/mod/label/index.php b/mod/label/index.php index 0ee6428cc1..0141b614cd 100644 --- a/mod/label/index.php +++ b/mod/label/index.php @@ -1,4 +1,4 @@ -
- - -

:

+ + +

:

- - - - - - - + + + + + + + " /> diff --git a/mod/label/restorelib.php b/mod/label/restorelib.php index 25474d6242..342536189b 100644 --- a/mod/label/restorelib.php +++ b/mod/label/restorelib.php @@ -1,4 +1,4 @@ -id>$strlessons -> id\">$lesson->name-> $strimportquestions"); + "id\">$strlessons -> id\">$lesson->name-> $strimportquestions"); if ($form = data_submitted()) { /// Filename @@ -96,23 +96,23 @@ print_heading_with_help($strimportquestions, "import", "lesson"); print_simple_box_start("center", "", "$THEME->cellheading"); - echo "
"; + echo ""; echo "id\" />\n"; echo "\n"; - echo ""; + echo "
"; - echo ""; - echo ""; echo "
"; + echo "
"; print_string("fileformat", "lesson"); echo ":"; choose_from_menu($fileformatnames, "format", "gift", ""); echo "
"; + echo "
"; print_string("upload"); echo ":"; echo " "; echo "
 "; - echo " "; + echo " "; echo "
"; diff --git a/mod/lesson/index.php b/mod/lesson/index.php index c88ad3e6f9..5e8ef38fb2 100644 --- a/mod/lesson/index.php +++ b/mod/lesson/index.php @@ -1,4 +1,4 @@ -visible) { //Show dimmed if the mod is hidden - $link = "coursemodule\">$lesson->name"; + $link = "coursemodule\">$lesson->name"; } else { //Show normal if the mod is visible - $link = "coursemodule\">$lesson->name"; + $link = "coursemodule\">$lesson->name"; } if ($lesson->deadline > $timenow) { $due = userdate($lesson->deadline); } else { - $due = "".userdate($lesson->deadline).""; + $due = "".userdate($lesson->deadline).""; } $grade_value = ''; @@ -92,7 +92,7 @@ } } - echo "
"; + echo "
"; print_table($table); diff --git a/mod/lesson/lesson.php b/mod/lesson/lesson.php index cbb0545ffe..4ef5ad4913 100644 --- a/mod/lesson/lesson.php +++ b/mod/lesson/lesson.php @@ -1,4 +1,4 @@ -category) { - $navigation = "id\">$course->shortname ->"; + $navigation = "id\">$course->shortname ->"; } $strlessons = get_string("modulenameplural", "lesson"); @@ -51,8 +51,8 @@ // ... print the header and... print_header("$course->shortname: $lesson->name", "$course->fullname", - "$navigation id>$strlessons -> - id\">$lesson->name", + "$navigation id\">$strlessons -> + id\">$lesson->name", "", "", true); //...get the action @@ -91,16 +91,16 @@ print_heading_with_help(get_string("addabranchtable", "lesson"), "overview", "lesson"); ?> - + - - -
+ + +
- \n"; - echo "
:
"; echo get_string("pagecontents", "lesson").":
\n"; print_textarea($usehtmleditor, 25,70, 630, 400, "contents"); @@ -110,7 +110,7 @@ echo "
".get_string("description", "lesson")." $iplus1:
\n"; print_textarea($usehtmleditor, 20, 70, 630, 300, "answer[$i]"); echo "
".get_string("jump", "lesson")." $iplus1: \n"; + echo "
".get_string("jump", "lesson")." $iplus1: \n"; if ($i) { // answers 2, 3, 4... jumpto this page lesson_choose_from_menu($jump, "jumpto[$i]", 0, ""); @@ -129,7 +129,7 @@ " /> -
- + - -
+ +
- \n"; - echo "
:
"; echo get_string("pagecontents", "lesson").":
\n"; print_textarea($usehtmleditor, 25,70, 630, 400, "contents"); @@ -257,7 +257,7 @@ echo "
".get_string("response", "lesson")." $iplus1:
\n"; print_textarea(false, 6, 70, 630, 300, "response[$i]"); echo "
".get_string("jump", "lesson")." $iplus1: \n"; + echo "
".get_string("jump", "lesson")." $iplus1: \n"; if ($i) { // answers 2, 3, 4... jumpto this page lesson_choose_from_menu($jump, "jumpto[$i]", 0, ""); @@ -275,7 +275,7 @@ " /> -
- + - + -
+
+ - \n"; break; } - echo "\n"; @@ -968,7 +968,7 @@ " /> - \n"; + $output = "
:
-
"; echo get_string("pagecontents", "lesson").":
\n"; print_textarea($usehtmleditor, 25, 70, 630, 400, "contents", $page->contents); @@ -953,7 +953,7 @@ echo "
".get_string("jump", "lesson")." $iplus1: \n"; + echo "
".get_string("jump", "lesson")." $iplus1: \n"; lesson_choose_from_menu($jump, "jumpto[$i]", 0, ""); helpbutton("jumpto", get_string("jump", "lesson"), "lesson"); echo "
- - - - + +
+

:

- -
+ + + + - - + + - - + + - - + + - + - - + + - - + + - + - + - - + + - - + + -

:

+ +

:

:

=0; $i--) { @@ -65,8 +65,8 @@

:

:

1; $i--) { @@ -78,8 +78,8 @@

:

:

:

:

- nextpagedefault, ""); helpbutton("nextpageaction", get_string("actionaftercorrectanswer", "lesson"), "lesson"); ?>

:

:

:

:

student) ?>:

student) ?>:

- retake, ""); helpbutton("retake", get_string("canretake", "lesson", $course->student), "lesson"); @@ -142,9 +142,9 @@

:

:

- usemaxgrade, ""); helpbutton("handlingofretakes", get_string("handlingofretakes", "lesson"), "lesson"); @@ -152,8 +152,8 @@

:

:

available); echo " - "; @@ -161,8 +161,8 @@ ?>

:

:

deadline); echo " - "; @@ -170,15 +170,15 @@ ?>
+
- - - - - - - -" /> -
- + + + + + + + +" /> + + diff --git a/mod/lesson/restorelib.php b/mod/lesson/restorelib.php index bdd64b8b7f..5c8149fc4c 100644 --- a/mod/lesson/restorelib.php +++ b/mod/lesson/restorelib.php @@ -1,4 +1,4 @@ -name", "", - "id>$strlessons -> id\">$lesson->name", + "id>$strlessons -> id\">$lesson->name", "", "", true, update_module_button($cm->id, $course->id, $strlesson), navmenu($course, $cm)); @@ -421,15 +421,15 @@ // if there are no pages give teacher a blank proforma ?>
- + -
+
- \n"; echo "

:

"; echo get_string("pagecontents", "lesson").":
\n"; print_textarea($usehtmleditor, 25, 70, 630, 400, "contents"); @@ -464,7 +464,7 @@ " /> - id&pageid=0\">".get_string("importquestions", @@ -491,12 +491,12 @@ if (isteacheredit($course->id)) { if ($npages > 1) { echo "id&action=move&pageid=$page->id\">\n". - "\n"; + "\n"; } echo "id&action=editpage&pageid=$page->id\">\n". - "\n". + "\n". "id&action=confirmdelete&pageid=$page->id\">\n". - "\n"; + "\n"; } echo "
\n";