Tidy Filter for Moodle 1.5

Tidy Filter for Moodle 1.5

by Urs Hunkler -
Number of replies: 12
Picture of Core developers

Moodle 1.5 has a HTML "Tidy" filter. It checks if the HTML code in Moodle is XHTML compliant. I could not find any documentation how the filter works. I activated it but did not see any changes in the HTML Editor or it's output.

Text, that is edited several times with the HTML Editor becomes quite unpredictable how it will be rendered in the different browsers. It would be great if the Tidy filter can clean up the text automatically or help the writer to do so.

Can please anybody explain the filter or give me a link, how it works in Moodle?
Urs

Average of ratings: -
In reply to Urs Hunkler

Re: Tidy Filter for Moodle 1.5

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Urs,

I've tried activating the tidy filter too and not noticed anything different afterwards. thoughtful

I guess it's supposed to work as described on Clean up your Web pages with HTML TIDY.

In reply to Helen Foster

Re: Tidy Filter for Moodle 1.5

by Urs Hunkler -
Picture of Core developers

Helen, thank you for the link. I skimmed over the text. Sounds like this has the potential to solve many of the formatting problems the editor produces.

But how does it work in Moodle and how can we explain it to Moodle users using the editor?

Urs

PS. Dave Raggett mentions his XHTML presentation "tool" HTML Slidy - a Web based alternative to PowerPoint. What about making it a resource type for Moodle to present directly from Moodle? Or is presentating with HTML Slidy already possible with the HTML page resource? I didn't try it yet.

In reply to Urs Hunkler

Re: Tidy Filter for Moodle 1.5

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
To make this filter work you need to have PHP compiled to use tidy. Here are Hannes' instructions from the source code:

// Tidy is a HTML clean and
// repair utility, which is currently available for PHP 4.3.x and PHP 5 as a
// PECL extension from http://pecl.php.net/package/tidy, in PHP 5 you need only
// to compile using the --with-tidy option.
// If you don't have the tidy extension installed or don't know, you can enable
// or disable this filter, it just won't have any effect.
// If you want to know what you can set in $tidyoptions and what their default
// values are, see http://php.net/manual/en/function.tidy-get-config.php.
In reply to Martin Dougiamas

Re: Tidy Filter for Moodle 1.5

by Urs Hunkler -
Picture of Core developers

Thanks Martin,

if I understand the instructions right the server admin must compile or recompile PHP to activate Tidy in PHP? Puuuh, that's really a job for Moodle admins with their own servers.

Does any other option exist to help users write clean XHTML code with the HTML Editor?

Urs

In reply to Martin Dougiamas

Re: Tidy Filter for Moodle 1.5

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Thanks Martin, shame it requires PHP to be compiled -  I doubt I'll be able to get it done. sad
In reply to Urs Hunkler

Re: Tidy Filter for Moodle 1.5

by Matt Cromwell -
I'm also finding the HTMLarea editor more and more UNpredictable.

I'm currently looking into replacing it on our school system with a free version of XStandard

But, I am definitely not a system administrator, so I'm searching for a Moodle expert who has tinkered with replacing the HTML editor already. Any suggestions, or takers...?!
In reply to Matt Cromwell

Re: Tidy Filter for Moodle 1.5

by Vlad Alexander -

I am with the XStandard development team and I see our product name mentioned in this forum. Just wanted to let you know that we are developing a program where we make a special version of XStandard Lite (with some Pro features) available for free to open source CMS vendors. Here are the details:

http://xstandard.com/xstandard-lite-for-partner-cms/

If you are on the Moodle dev team, let me know if this is of interest.

Regards,
Vlad
http://xstandard.com

In reply to Vlad Alexander

Re: Tidy Filter for Moodle 1.5

by Matt Cromwell -
whoo hoo! I'm all for it. After my previous post, we did some tinkering, and I scanned the rest of the forums and realized that a new intergration (in 1.5.3+) would be a massive project!! But it's great to see that 1.6 is trying to implement a choice between HTMLarea and TinyMCE. But, I really like XStandard-Lite, I'm sure a few Pro features enhance it even more!

My only question is, I guess the integration would have to be more or less "official", meaning that the "powers that be" behind Moodle would have to set-up the partnership and do the implementation. So, me as a Moodle "peon" have very little say in the matter. But XStandard has my vote for sure!

any word from the "powers that be"?

~mc~
In reply to Matt Cromwell

Re: Tidy Filter for Moodle 1.5

by A. T. Wyatt -
What about this:
http://moodle.org/mod/forum/discuss.php?d=42234

We have had a lot of trouble with colored text, and this thread indicates that the tidy filter might be the problem. . .

Just asking, because this is a serious annoyance on our campus.  I haven't checked it to see if our problem might be related to the filter (next on my list) but maybe one of you knows?  Or has an alternate solution to our problem of having black text rendered on the page instead of the colored text that has been applied and is visible in the editing window?

atw
In reply to Vlad Alexander

Re: Tidy Filter for Moodle 1.5

by Bryan Williams -
XStandard seems to be a nice Windows only solution!
In reply to Bryan Williams

Re: Tidy Filter for Moodle 1.5

by Julian Ridden -
yes...doesnt work on my Mac sad Whatever we use must be system and browser independant. And that in itself is a major challenge