If the data is not very large and you don't really need to keep it in the database then you could use the $SESSION object. You MIGHT run into trouble if the user has two windows open at the same time and they choose different values but generally it's ok.
Another approach if you might want to keep the data between sessions is to store it as a user preference. There are easy functions called set_user_preference() and get_user_preferences() to do the job efficiently.
Martin Dougiamas
Опубликовано Martin Dougiamas
I'm going to throw in my 2c here which is to suggest a more evolutionary approach building on what we have.
The appoach of building a really good XHTML output in core code and leaving all design to CSS was the one we've been taking, but I do really understand Urs' frustration that it's very hard to make the XHTML really good this way.
Right now I'm thinking this: don't plan 100% conversion to templates and get caught up on the edge cases, but just replace the generic things (similar to what weblib provides) with more templates, and take the opportunity to clean up what we have there at the same time (for example header.html and footer.html have way too much logic in them and could be broken up). It would also be pretty easy to put weblib in a class at the same time and allow themes to override some of those functions with full PHP if they want to.
This would allow someone like Urs to easily control, say, 75% of what they are looking at by simply editing templates and CSS, while the rest of the tricky content will have to continue relying on developers to put CSS ids and classes throughout (as they do now).
And it has the benefit that themes won't be too radically different to now.
And it will allow Moodle 2.0 to come out this year
The appoach of building a really good XHTML output in core code and leaving all design to CSS was the one we've been taking, but I do really understand Urs' frustration that it's very hard to make the XHTML really good this way.
Right now I'm thinking this: don't plan 100% conversion to templates and get caught up on the edge cases, but just replace the generic things (similar to what weblib provides) with more templates, and take the opportunity to clean up what we have there at the same time (for example header.html and footer.html have way too much logic in them and could be broken up). It would also be pretty easy to put weblib in a class at the same time and allow themes to override some of those functions with full PHP if they want to.
This would allow someone like Urs to easily control, say, 75% of what they are looking at by simply editing templates and CSS, while the rest of the tricky content will have to continue relying on developers to put CSS ids and classes throughout (as they do now).
And it has the benefit that themes won't be too radically different to now.
And it will allow Moodle 2.0 to come out this year
Yep, it's used by the jabber plugin for the new messaging system.
cvs:/moodle/message/output/jabber
Development:Messaging_2.0
What are you working on exactly?
cvs:/moodle/message/output/jabber
Development:Messaging_2.0
What are you working on exactly?
Is there really a problem here?
If you want to (or need to) stick with standard packages on these distributions then do the same for Moodle as well. For Debian that is Moodle 1.8.2.
If you are comfortable downloading and installing versions of software that are not "standard" for the distro (and let's face it this is pretty easy these days!) AND you want to run the most modern Moodle 2.0 then you might need to upgrade Moodle 2.0's dependencies.
If you want to have Moodle 2.0 running on old PHP etc then we can do it, but it'll mean delaying Moodle 2.0 even longer, because it's a lot of work ... (and by then the distributions will catch up anyway!)
If you want to (or need to) stick with standard packages on these distributions then do the same for Moodle as well. For Debian that is Moodle 1.8.2.
If you are comfortable downloading and installing versions of software that are not "standard" for the distro (and let's face it this is pretty easy these days!) AND you want to run the most modern Moodle 2.0 then you might need to upgrade Moodle 2.0's dependencies.
If you want to have Moodle 2.0 running on old PHP etc then we can do it, but it'll mean delaying Moodle 2.0 even longer, because it's a lot of work ... (and by then the distributions will catch up anyway!)
We don't have a vector version yet, but we do have a very hi-res photoshop file with layers:
http://moodle.org/images/moodle-logo.psd.zip
http://moodle.org/images/moodle-logo.psd.zip