]> git.mjollnir.org Git - moodle.git/commitdiff
First stab at XHTML conformance.
authorrkingdon <rkingdon>
Sat, 11 Sep 2004 19:47:29 +0000 (19:47 +0000)
committerrkingdon <rkingdon>
Sat, 11 Sep 2004 19:47:29 +0000 (19:47 +0000)
mod/dialogue/dialogues.php
mod/dialogue/index.php
mod/dialogue/lib.php
mod/dialogue/locallib.php
mod/dialogue/view.php

index 7611826281573e0f4433429738e4bd58f13b14f0..05e0e96d2d241de619762a9db221bad0739a1828 100644 (file)
@@ -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 ************************************/
             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";
     }
     
         
                 }
             }
         }
-        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 />";
         
             error("Print Dialogue: can not get conversation record");
         }
             
-        echo "<center>\n";
         print_simple_box( text_to_html($dialogue->intro) , "center");
         echo "<br />";
         
             error("Show Dialogue: can not get conversation record");
         }
             
-        echo "<center>\n";
         print_simple_box( text_to_html($dialogue->intro) , "center");
         echo "<br />";
         
         }
             
         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"));
     }
     
 
index a7606af8fdaafeb553259fce59b09bfb208a1b38..d995ad8af60cf58f9357696a939752b1307b6faf 100644 (file)
@@ -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) {
 
index 2057bac50e9e22c037f2c4bdf1536940e88841b4..688426f5f0075cba4cd383a8678bea7ecfe6d252 100644 (file)
@@ -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 = "";
             }
index c20294794e6c7b2c8773e006800ff8d1e9d6131a..1c900212027fb9299972cd39021ea52214d76a0b 100644 (file)
@@ -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");
         }
     }
 }
index 5aa57187355783db6ad271bd6ca6aade7ff57464..4e63e67b8a1ffd8a64c775ee8743a66526cd8047 100644 (file)
             $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) {
 
                 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>";
                     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"));