How to use http://validator.w3.org/ without login?

How to use http://validator.w3.org/ without login?

by Joseph Rézeau -
Number of replies: 15
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Alghough I personally think W3C validation is more of a nuisance than a boon, I've been spurred on to validate the Questionnaire module. However I cannot find a way out of the following conundrum. When I log in to my test site and go to a page with a quetsionnaire on it, copy and then paste the URL of that page into the http://validator.w3.org/ validation service page, it takes me back to my site's login page and tells me that login page validates OK, which is true, but is not what I want.sad

I can't even find the settings I should use on my test site (running moodle 1.8.3) and inside the relevant course in order to "skip" the login step, if that would be the solution to the conundrum.

Any ideas?

Joseph

Average of ratings: -
In reply to Joseph Rézeau

Re: How to use http://validator.w3.org/ without login?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Get the Firefox web developer toolbar, and use the Tools -> Validate local HTML feature.
Average of ratings: Useful (1)
In reply to Tim Hunt

Re: How to use http://validator.w3.org/ without login?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Thanks Tim, just the info I needed. I've actually got the Web developer in Firefox but had never used it for HTML validation.
Joseph
In reply to Joseph Rézeau

Re: How to use http://validator.w3.org/ without login?

by Paul Holden -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
You can view the page source in your browser, and copy and paste it into the "Validate by Direct Input" section of the w3 validator.
In reply to Paul Holden

Re: How to use http://validator.w3.org/ without login?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The web developer toolbar basically does exactly that, only it does it automatically.
In reply to Joseph Rézeau

Re: How to use http://validator.w3.org/ without login?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Here's the "proper" way though I don't think it's been documented before:

1) Set your theme to "standard" or "standardwhite".

2) Add a user with the username "w3cvalidator".

3) Give that user all the roles and permissions that you want the validator to have. Easiest is just to make it an admin.

4) (optional) turn debugging up a little in Admin > Server > Debugging. This will give you handy validation links in the footer

5) Click on the links to validate that page (or paste URLs directly). They should work now, because Moodle automatically detects the validator and treats it as the w3cvalidator user.
In reply to Martin Dougiamas

Re: How to use http://validator.w3.org/ without login?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Thanks Martin,

I've just tried your "proper" way (with a w3cvalidator admin user) and I can confirm it works fine for a moodle site located on a distant server.

However, for validating moodle pages located on a local server, using FireFox's Web Developer is the only possible method.

Joseph

In reply to Joseph Rézeau

Re: How to use http://validator.w3.org/ without login?

by Paul Craven -
FireFox's web developer is not the only possible method. There are many products out there that work well. My favorite is HTMLValidator, which works well for Moodle.

I'd like to say, I was rather impressed the Moodle code base for the low number or HTML errors.
In reply to Paul Craven

Re: How to use http://validator.w3.org/ without login?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Paul > "My favorite is HTMLValidator"
Which HTMLValidator? Does it also work for a moodle site located on a local server?
Joseph
In reply to Joseph Rézeau

Re: How to use http://validator.w3.org/ without login?

by Paul Craven -
HTML Validator:
http://www.htmlvalidator.com/

It works for a local server. The only tricky part is to find the menu item for displaying the browser window. After that, you can browse from the program and validate any window you are on.
In reply to Joseph Rézeau

Re: How to use http://validator.w3.org/ without login?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi everyone,
Just ran W3C validator on moodle.org home page and got 15 errors. What does that mean? Is the validator paranoïd? Should we care or not bother?
Joseph
Attachment image00.jpg
In reply to Joseph Rézeau

Re: How to use http://validator.w3.org/ without login?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I care, but it was just a few very minor problems in the URLs for the books that had been pasted in from a non-valid site. smile Now fixed.