]> git.mjollnir.org Git - moodle.git/commitdiff
Allow Validator from http://validator.w3.org/ and the Cynthia 508 checker.
authormoodler <moodler>
Tue, 7 Sep 2004 07:38:44 +0000 (07:38 +0000)
committermoodler <moodler>
Tue, 7 Sep 2004 07:38:44 +0000 (07:38 +0000)
It only works when you are using the new standardxhtml theme.

This is temporary while we do testing and validation.

I highly advise using Mozilla/Firefox and the Web Developer extension

   http://www.chrispederick.com/work/firefox/webdeveloper/

lib/setup.php

index 86678ddc86e0279d0f4c9755bab230ba606225af..f846ecbd6958c10b88d26dcedb1595479c763218 100644 (file)
         }
     }
 
+    if ($CFG->theme == 'standardxhtml') {    // Temporary measure to help with XHTML validation
+        if (empty($_SESSION['USER'])) {      // Allow W3CValidator in as user called w3cvalidator (or guest)
+            if ((strpos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') !== false) or 
+                (strpos($_SERVER['HTTP_USER_AGENT'], 'Cynthia') !== false ) {
+                if (!$USER = get_user_info_from_db("username", "w3cvalidator")) {
+                    $USER = guest_user();
+                }
+            }
+        }
+    }
+
 ?>