Permalink
Browse files

First stab at XHTML conformance.

  • Loading branch information...
1 parent 8ea9ac5 commit 32dc4fe352d0c50a63949a3b19c77f5e075a9399 rkingdon committed Sep 11, 2004
Showing with 56 additions and 60 deletions.
  1. +15 −18 mod/dialogue/dialogues.php
  2. +1 −1 mod/dialogue/index.php
  3. +1 −1 mod/dialogue/lib.php
  4. +30 −29 mod/dialogue/locallib.php
  5. +9 −11 mod/dialogue/view.php
View
33 mod/dialogue/dialogues.php
@@ -42,8 +42,8 @@
// ... print the header and...
print_header_simple("$dialogue->name", "",
- "<A HREF=index.php?id=$course->id>$strdialogues</A> ->
- <A HREF=\"view.php?id=$cm->id\">$dialogue->name</A>",
+ "<a href=\"index.php?id=$course->id\">$strdialogues</a> ->
+ <a hre=\"view.php?id=$cm->id\">$dialogue->name</a>",
"", "", true);
@@ -66,7 +66,7 @@
$pane=$_GET['pane'];
add_to_log($course->id, "dialogue", "closed", "view.php?id=$cm->id", "$conversationid");
- redirect("view.php?id=$cm->id&pane=$pane", get_string("dialogueclosed", "dialogue"));
+ redirect("view.php?id=$cm->id&amp;pane=$pane", get_string("dialogueclosed", "dialogue"));
}
@@ -91,8 +91,8 @@
}
$pane = $_GET['pane'];
notice_yesno(get_string("confirmclosure", "dialogue", fullname($user)),
- "dialogues.php?action=closeconversation&id=$cm->id&cid=$conversation->id&pane=$pane",
- "view.php?id=$cm->id&pane=$pane");
+ "dialogues.php?action=closeconversation&amp;id=$cm->id&amp;cid=$conversation->id&amp;pane=$pane",
+ "view.php?id=$cm->id&amp;pane=$pane");
}
/****************** get subject ************************************/
@@ -102,18 +102,18 @@
error("Confirm Close: conversation id missing");
}
print_heading(get_string("addsubject", "dialogue"));
- echo "<form name=\"getsubjectform\" method=\"post\" action=\"dialogues.php\">\n";
- echo "<input type=\"hidden\" name=\"action\" value=\"updatesubject\">\n";
- echo "<input type=\"hidden\" name=\"id\" value=\"$_GET[id]\">\n";
- echo "<input type=\"hidden\" name=\"cid\" value=\"$_GET[cid]\">\n";
- echo "<input type=\"hidden\" name=\"pane\" value=\"$_GET[pane]\">\n";
- echo "<center><table border=\"1\" width=\"60%\">\n";
+ echo "<form name=\"getsubjectform\" method=\"post\" action=\"dialogues.php\"/>\n";
+ echo "<input type=\"hidden\" name=\"action\" value=\"updatesubject\"/>\n";
+ echo "<input type=\"hidden\" name=\"id\" value=\"$_GET[id]\"/>\n";
+ echo "<input type=\"hidden\" name=\"cid\" value=\"$_GET[cid]\"/>\n";
+ echo "<input type=\"hidden\" name=\"pane\" value=\"$_GET[pane]\"/>\n";
+ echo "<table align=\"center\"border=\"1\" width=\"60%\">\n";
echo "<tr><td align=\"right\"><b>".get_string("subject", "dialogue")."</b></td>";
echo "<td><input type=\"text\" size=\"50\" maxsize=\"100\" name=\"subject\"
value=\"\"></td></tr>\n";
echo "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"".
get_string("addsubject", "dialogue")."\"></td></tr>\n";
- echo "</table></center></form>\n";
+ echo "</table></form>\n";
}
@@ -159,14 +159,13 @@
}
}
}
- redirect("view.php?id=$cm->id&pane={$_POST['pane']}", get_string("numberofentriesadded",
+ redirect("view.php?id=$cm->id&amp;pane={$_POST['pane']}", get_string("numberofentriesadded",
"dialogue", $n));
}
/****************** list closed conversations *********************************/
elseif ($action == 'listclosed') {
- echo "<center>\n";
print_simple_box( text_to_html($dialogue->intro) , "center");
echo "<br />";
@@ -262,7 +261,6 @@
error("Print Dialogue: can not get conversation record");
}
- echo "<center>\n";
print_simple_box( text_to_html($dialogue->intro) , "center");
echo "<br />";
@@ -277,7 +275,6 @@
error("Show Dialogue: can not get conversation record");
}
- echo "<center>\n";
print_simple_box( text_to_html($dialogue->intro) , "center");
echo "<br />";
@@ -294,11 +291,11 @@
}
if (!$_POST['subject']) {
- redirect("view.php?id=$cm->id&pane=$_POST[pane]", get_string("nosubject", "dialogue"));
+ redirect("view.php?id=$cm->id&amp;pane=$_POST[pane]", get_string("nosubject", "dialogue"));
} elseif (!set_field("dialogue_conversations", "subject", $_POST['subject'], "id", $_POST['cid'])) {
error("Update subject: could not update conversation record");
}
- redirect("view.php?id=$cm->id&pane=$_POST[pane]", get_string("subjectadded", "dialogue"));
+ redirect("view.php?id=$cm->id&amp;pane=$_POST[pane]", get_string("subjectadded", "dialogue"));
}
View
2 mod/dialogue/index.php
@@ -31,7 +31,7 @@
$timenow = time();
$table->head = array ($strname, $stropendialogues, $strcloseddialogues);
- $table->align = array ("CENTER", "CENTER", "CENTER");
+ $table->align = array ("center", "center", "center");
foreach ($dialogues as $dialogue) {
View
2 mod/dialogue/lib.php
@@ -94,7 +94,7 @@ function dialogue_cron () {
"<a href=\"$CFG->wwwroot/mod/dialogue/view.php?id=$cm->id\">$dialogue->name</a></font></p>";
$posthtml .= "<hr><font face=\"sans-serif\">";
$posthtml .= "<p>".get_string("dialoguemailhtml", "dialogue", $dialogueinfo)."</p>";
- $posthtml .= "</font><hr>";
+ $posthtml .= "</font><hr />";
} else {
$posthtml = "";
}
View
59 mod/dialogue/locallib.php
@@ -305,7 +305,7 @@ function dialogue_list_conversations_closed($dialogue) {
}
natcasesort($names);
- print_simple_box_start();
+ print_simple_box_start("center");
$table->head = array (get_string("dialoguewith", "dialogue"), get_string("subject", "dialogue"),
get_string("numberofentries", "dialogue"), get_string("lastentry", "dialogue"),
get_string("status", "dialogue"));
@@ -326,7 +326,7 @@ function dialogue_list_conversations_closed($dialogue) {
} else {
$status = get_string("open", "dialogue");
}
- $table->data[] = array("<a href=\"dialogues.php?id=$cm->id&action=showdialogues&cid=$conversation->id\">".
+ $table->data[] = array("<a href=\"dialogues.php?id=$cm->id&amp;action=showdialogues&amp;cid=$conversation->id\">".
"$name</a>", $conversation->subject, $byuser." ".get_string("of", "dialogue")." ".$total,
userdate($conversation->timemodified), $status);
}
@@ -366,7 +366,7 @@ function dialogue_list_conversations_other($dialogue) {
}
natcasesort($names);
- print_simple_box_start();
+ print_simple_box_start("center");
$table->head = array (get_string("dialoguewith", "dialogue"), get_string("subject", "dialogue"),
get_string("numberofentries", "dialogue"), get_string("lastentry", "dialogue"),
get_string("status", "dialogue"));
@@ -387,7 +387,7 @@ function dialogue_list_conversations_other($dialogue) {
} else {
$status = get_string("notyetseen", "dialogue");
}
- $table->data[] = array("<a href=\"dialogues.php?id=$cm->id&action=printdialogue&cid=$conversation->id\">".
+ $table->data[] = array("<a href=\"dialogues.php?id=$cm->id&amp;action=printdialogue&amp;cid=$conversation->id\">".
"$name</a>", $conversation->subject, $byuser." ".get_string("of", "dialogue")." ".$total,
userdate($conversation->timemodified), $status);
}
@@ -416,9 +416,9 @@ function dialogue_list_conversations_self($dialogue) {
$showbutton = false;
echo "<form name=\"replies\" method=\"post\" action=\"dialogues.php\">\n";
- echo "<input type=\"hidden\" name=\"action\" value=\"insertentries\">\n";
- echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\">\n";
- echo "<input type=\"hidden\" name=\"pane\" value=\"1\">\n";
+ echo "<input type=\"hidden\" name=\"action\" value=\"insertentries\"/>\n";
+ echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\"/>\n";
+ echo "<input type=\"hidden\" name=\"pane\" value=\"1\"/>\n";
// list the conversations requiring a resonse from this user in full
if ($conversations = dialogue_get_conversations($dialogue, $USER, "lastid != $USER->id AND closed = 0")) {
@@ -431,9 +431,9 @@ function dialogue_list_conversations_self($dialogue) {
error("List conversations self: could not set seenon");
}
}
- echo "<center><table border=\"1\" cellspacing=\"0\" valign=\"top\" cellpadding=\"4\"
+ echo "<table align=\"center\" border=\"1\" cellspacing=\"0\" valign=\"top\" cellpadding=\"4\"
width=\"100%\">\n";
- echo "<tr><TD BGCOLOR=\"$THEME->cellheading2\" valign=\"top\">\n";
+ echo "<tr><td bgcolor=\"$THEME->cellheading2\" valign=\"top\">\n";
if ($conversation->userid == $USER->id) {
if (!$otheruser = get_record("user", "id", $conversation->recipientid)) {
error("User not found");
@@ -451,13 +451,13 @@ function dialogue_list_conversations_self($dialogue) {
echo "<div align=\"right\">\n";
if (!$conversation->subject) {
// conversation does not have a subject, show add subject link
- echo "<a href=\"dialogues.php?action=getsubject&id=$cm->id&cid=$conversation->id&pane=2\">".
+ echo "<a href=\"dialogues.php?action=getsubject&amp;id=$cm->id&amp;cid=$conversation->id&amp;pane=2\">".
get_string("addsubject", "dialogue")."</a>\n";
helpbutton("addsubject", get_string("addsubject", "dialogue"), "dialogue");
echo "&nbsp; | ";
}
if (dialogue_count_entries($dialogue, $conversation)) {
- echo "<a href=\"dialogues.php?action=confirmclose&id=$cm->id&cid=$conversation->id&pane=1\">".
+ echo "<a href=\"dialogues.php?action=confirmclose&amp;id=$cm->id&amp;cid=$conversation->id&amp;pane=1\">".
get_string("close", "dialogue")."</a>\n";
helpbutton("closedialogue", get_string("close", "dialogue"), "dialogue");
}
@@ -500,13 +500,14 @@ function dialogue_list_conversations_self($dialogue) {
// use a cumbersome name on the textarea is just historical :-)
print_textarea($usehtmleditor, 20, 75, 630, 300, "reply$conversation->id");
echo "</td></tr>";
- echo "</table></center><br />\n";
+ echo "</table><br />\n";
}
print_simple_box_end();
use_html_editor();
if ($showbutton) {
echo "<hr />\n";
- echo "<br /><input type=\"submit\" value=\"".get_string("addmynewentries", "dialogue")."\">\n";
+ echo "<p align=\"center\"><input type=\"submit\" value=\"".get_string("addmynewentries", "dialogue").
+ "\"/></p>\n";
}
echo "</form>\n";
}
@@ -529,13 +530,13 @@ function dialogue_print_conversation($dialogue, $conversation) {
$showbutton = false;
echo "<form name=\"replies\" method=\"post\" action=\"dialogues.php\">\n";
- echo "<input type=\"hidden\" name=\"action\" value=\"insertentries\">\n";
- echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\">\n";
- echo "<input type=\"hidden\" name=\"pane\" value=\"2\">\n";
+ echo "<input type=\"hidden\" name=\"action\" value=\"insertentries\"/>\n";
+ echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\"/>\n";
+ echo "<input type=\"hidden\" name=\"pane\" value=\"2\"/>\n";
$showbutton = true;
print_simple_box_start("center", "", $THEME->cellcontent2);
- echo "<center><table border=\"1\" cellspacing=\"0\" valign=\"top\" cellpadding=\"4\"
+ echo "<table align=\"center\" border=\"1\" cellspacing=\"0\" valign=\"top\" cellpadding=\"4\"
width=\"100%\">\n";
echo "<tr><td bgcolor=\"$THEME->cellheading2\" valign=\"top\">\n";
if ($conversation->userid == $USER->id) {
@@ -555,12 +556,12 @@ function dialogue_print_conversation($dialogue, $conversation) {
echo "<div align=\"right\">\n";
if (!$conversation->subject) {
// conversation does not have a subject, show add subject link
- echo "<a href=\"dialogues.php?action=getsubject&id=$cm->id&cid=$conversation->id&pane=2\">".
+ echo "<a href=\"dialogues.php?action=getsubject&amp;id=$cm->id&amp;cid=$conversation->id&pane=2\">".
get_string("addsubject", "dialogue")."</a>\n";
helpbutton("addsubject", get_string("addsubject", "dialogue"), "dialogue");
echo "&nbsp; | ";
}
- echo "<a href=\"dialogues.php?action=confirmclose&id=$cm->id&cid=$conversation->id&pane=2\">".
+ echo "<a href=\"dialogues.php?action=confirmclose&amp;id=$cm->id&amp;cid=$conversation->id&amp;pane=2\">".
get_string("close", "dialogue")."</a>\n";
helpbutton("closedialogue", get_string("close", "dialogue"), "dialogue");
echo "</div></td></tr>\n";
@@ -592,7 +593,7 @@ function dialogue_print_conversation($dialogue, $conversation) {
print_textarea($usehtmleditor, 20, 75, 630, 300, "reply$conversation->id");
use_html_editor();
echo "</td></tr>";
- echo "</table></center><br />\n";
+ echo "</table><br />\n";
print_simple_box_end();
if ($showbutton) {
echo "<hr />\n";
@@ -702,7 +703,7 @@ function dialogue_show_conversation($dialogue, $conversation) {
$timenow = time();
print_simple_box_start("center");
- echo "<center><TABLE BORDER=1 CELLSPACING=0 valign=top cellpadding=4 width=\"100%\">\n";
+ echo "<table border=\"1\" cellspacing=\"0\" valign=\"top\" cellpadding=\"4\" width=\"100%\">\n";
echo "<tr>";
echo "<td bgcolor=\"$THEME->cellheading2\" valign=\"top\">\n";
@@ -738,9 +739,9 @@ function dialogue_show_conversation($dialogue, $conversation) {
}
}
}
- echo "</TABLE></center><BR CLEAR=ALL>\n";
+ echo "</table><br />\n";
print_simple_box_end();
- print_continue("view.php?id=$cm->id&pane=3");
+ print_continue("view.php?id=$cm->id&amp;pane=3");
}
@@ -782,10 +783,10 @@ function dialogue_show_other_conversations($dialogue, $conversation) {
}
}
print_simple_box_start("center");
- echo "<center><TABLE BORDER=1 CELLSPACING=0 valign=top cellpadding=4 width=\"100%\">\n";
-
- echo "<TR>";
- echo "<TD BGCOLOR=\"$THEME->cellheading2\" VALIGN=TOP>\n";
+ echo "<table align=\"center\" border=\"1\" cellspacing=\"0\" valign=\"top\" cellpadding=\"4\"
+ width=\"100%\">\n";
+ echo "<tr>";
+ echo "<td bgcolor=\"$THEME->cellheading2\" valign=\"top\">\n";
// print_user_picture($otheruser->id, $course->id, $otheruser->picture);
echo "<b>".get_string("dialoguewith", "dialogue",
fullname($otheruser))."</b></td>";
@@ -809,11 +810,11 @@ function dialogue_show_other_conversations($dialogue, $conversation) {
}
}
- echo "</TABLE></center><BR CLEAR=ALL>\n";
+ echo "</table><br />\n";
print_simple_box_end();
}
}
- print_continue("view.php?id=$cm->id&pane=3");
+ print_continue("view.php?id=$cm->id&amp;pane=3");
}
}
}
View
20 mod/dialogue/view.php
@@ -108,13 +108,13 @@
$tabs->names[3] = get_string("pane3", "dialogue", $countclosed);
}
- $tabs->urls[0] = "view.php?id=$cm->id&pane=0";
- $tabs->urls[1] = "view.php?id=$cm->id&pane=1";
- $tabs->urls[2] = "view.php?id=$cm->id&pane=2";
- $tabs->urls[3] = "view.php?id=$cm->id&pane=3";
+ $tabs->urls[0] = "view.php?id=$cm->id&amp;pane=0";
+ $tabs->urls[1] = "view.php?id=$cm->id&amp;pane=1";
+ $tabs->urls[2] = "view.php?id=$cm->id&amp;pane=2";
+ $tabs->urls[3] = "view.php?id=$cm->id&amp;pane=3";
$tabs->highlight = $pane;
dialogue_print_tabbed_heading($tabs);
- echo "<br/><center>\n";
+ echo "<br />\n";
switch ($pane) {
@@ -136,11 +136,10 @@
if ($names = dialogue_get_available_users($dialogue)) {
print_simple_box_start("center");
- echo "<center>";
echo "<form name=\"startform\" method=\"post\" action=\"dialogues.php\">\n";
- echo "<input type=\"hidden\" name=\"id\"value=\"$cm->id\">\n";
- echo "<input type=\"hidden\" name=\"action\" value=\"openconversation\">\n";
- echo "<table border=\"0\"><tr>\n";
+ echo "<input type=\"hidden\" name=\"id\"value=\"$cm->id\"/>\n";
+ echo "<input type=\"hidden\" name=\"action\" value=\"openconversation\"/>\n";
+ echo "<table align=\"center\" border=\"0\"><tr>\n";
echo "<td align=\"right\"><b>".get_string("openadialoguewith", "dialogue").
" : </b></td>\n";
echo "<td>";
@@ -160,9 +159,8 @@
use_html_editor();
echo "</td></tr>";
echo "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"".
- get_string("opendialogue","dialogue")."\"></td></tr>\n";
+ get_string("opendialogue","dialogue")."\"/></td></tr>\n";
echo "</table></form>\n";
- echo "</center>";
print_simple_box_end();
} else {
print_heading(get_string("noavailablepeople", "dialogue"));

0 comments on commit 32dc4fe

Please sign in to comment.