Is it okay to add a 'Hacking Your Moodle' to docs.moodle.org?

Is it okay to add a 'Hacking Your Moodle' to docs.moodle.org?

by Matt Campbell -
Number of replies: 5
I've been thinking about a lot of the small hacks I've done to customize my moodle installs and some of the things I've had to figure out to make it work. It seems like some of this would be good to post somewhere for people that may want to do the same thing and are trying to figure out how - just peruse through some of the forums and you can't go far without someone giving a code snippet, or telling others where to change a hardcoded value, etc. I'm always a bit uncomfortable about posting code in the forums, but it also makes it easy to search for when you're having the same issue someone else is.

I'd like to add a topic to the Administrator documentation, probably under the 'Other' or 'See Also' portion, where Moodle administrators could go to look for or post small bits of information on customizing Moodle - this bit of code does this, you can set this variable in this file to do that, etc.

So I thought I'd run it by everyone here first - is this a good idea, and is that the right place to put it?

Thanks,
Matt
Average of ratings: -
In reply to Matt Campbell

Re: Is it okay to add a 'Hacking Your Moodle' to docs.moodle.org?

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 Matt,

You are very welcome to contribute your small hacks to the documentation, perhaps by creating the page docs.moodle.org/en/Customizing_Moodle and linking to it from the Administrator documentation page.
In reply to Helen Foster

Re: Is it okay to add a 'Hacking Your Moodle' to docs.moodle.org?

by Robert Brenstein -
I noticed that the database with modules and plugins contains now "small hack" as entry type. I think that database would be a better place and way for the things that Matt suggest. Particularly in the light of contribs becoming tagged through CVS.
In reply to Robert Brenstein

Re: Is it okay to add a 'Hacking Your Moodle' to docs.moodle.org?

by Matt Campbell -
That is one of the things I was thinking about, but the small hacks that are in the database right now are zipfiles that are meant to simply replace the current files. I'm thinking more just code snippets that an administrator could place into the code and then remember to maintain. If a file isn't attached to the entry, would it ever go into contrib?

Take a look at this database entry and this wiki entry. Which works better?
In reply to Matt Campbell

Re: Is it okay to add a 'Hacking Your Moodle' to docs.moodle.org?

by Robert Brenstein -
Well, I agree that the entry in wiki is more tempting in such a simple case since it is immediately readable and usable whereas the database entry requires a download. I wonder whether such a trivial hack could be provided within the description of the database entry without anything to download.

Searching for specific hack in wiki may yield too many results (unless a separate wiki is maintained for hacks and even then the searches are always full text). Entries in the database can be more uniformly categorized and sorted, including variations for different Moodle releases. Not mentioning that having two locations for hacks will cause confusion.

Personally, I see no problem with providing hacks in the database as instructions as an alternative to replacement files. I'd at least hope that this is acceptable.

I don't know what hack categories are defined in the database. I saw only "major patch" and "minor hack" so far. What is posted in the latter seems not as minor as your example, though. May be a middle-weight category of hack is there or can be added.
In reply to Matt Campbell

Re: Is it okay to add a 'Hacking Your Moodle' to docs.moodle.org?

by Julian Ridden -
Replacement files are well and good, but as versions are updated this cango out of date pretty quickly. Attaching a patch file is also a good idea.