XHTML in moodle (microformats)

XHTML in moodle (microformats)

by Joaquín Engelmo Moriche -
Number of replies: 0
Hello!

In the first place pardon by my English, I am a Spanish student and I will try to express best the possible thing. I am making my final project of studies which tries to extend moodle semantically (I use version 1.7.1) using microformats.
My objective is to modify less possible existing modules PHP and to codify the data that interest to me with code XHTML. But I have been with problems when not being sufficiently separated code PHP of presentation code HTML, since to show the data in the navigator there is a sentence PHP of “echo” with corresponding code HTML. I was thinking the cleanest and less intrusive way to introduction the blocks of code XHTML and have decided on the following solution:

- each block of code XHTML (each microformat) in I close in a block
<div class= " hide " ></div>
so that one is not by screen.
- for each information of the microformat I use you structure of data existing (user, event,…) or the functions of extraction of data of the data base and the confinement with the labels
<span class= "item to microformat" > data </span>

This way with himself to have my cleaner code and not to introduce other labels between the existing ones to show the information by screen. The problem is in which I must use structures or existing functions now but that can that in later versions is not; either I have to create functions own to process information of data base (like date) since they have a format different from which I need, therefore if it changes that format in later versions would be necessary to also change the function.
Taking this solution it could create files to me that contain the inclusion of the microformats, to create the connections adapted with the existing archives of moodle and simply to call to the function of the microformat that was wanted.
I would like to to know some opinion about my solution, if it is adapted, if another way exists to mark the data that interest to me with XHTML; if it can cause many problems to me of compatibility in future versions and if one is working in separating of one more a way clearer code PHP of the HTML to be able to start off from that point.
I hope that it is not too confused. If there is some problem it could put an example of since I have introduced hCard (www.microformats.org) in the user profile and explain it of another way.

Thanks. Greetings
Average of ratings: -