Talk:NEWMODULE Documentation

Jump to: navigation, search

Old stuff moved out of the way

Daniele, did you know about Modules, which is linked to from Developer_documentation#Make_a_new_plugin? You may be better off editing that, rather than starting a new page. However don't let me discourage you. That documentation is very limited, and badly needs to be expanded, so it is absolutely brilliant that you want to work on it.--Tim Hunt 12:03, 28 March 2008 (CDT)

Good point Tim! Anyway... I think we can use this as temporary root for Daniele's work and then, simply, move things to their final place. Let's see how this evolves. -- Eloy Lafuente (stronk7) 12:33, 28 March 2008 (CDT)

My powerpoint about creating moodle modules is a bit old (1.8) and maybe not that comprehensible but I use it when I'm trying to explain things to people. It includes a list of all the things you need to have in a module, except the ones I forgot (backuplib iirc is missing). sam marshall 12:52, 28 March 2008 (CDT)

That's really great, Sam. For sure that presentation will help.Thanks! -- Eloy Lafuente (stronk7) 13:08, 28 March 2008 (CDT)


Dear Tim, Sam and Eloy, I wrote what was my learning path on these issues. I wrote whatever I found in your powerpoint guide (thanks again, Sam) and whatever I got mainly from Tim, Eloy and Petr. A lot of issues are still obscure to me like: grades, groups, groupings, backup and so forth. Please let me know your opinion to make all together a plan to carry on in the best way. Thanks. -- Daniele Cordella 11:55, 10 September 2009 (UTC)

Just moved the old discussion stuff here. --Frank Ralf 07:55, 29 September 2009 (UTC)

Formatting tips

Hi Daniele, Thanks for starting this documentation.

You might consider using more sub-headings instead of bullet points as those will show up in the contents section and make for easier navigation.

And when you use <code php> you will get syntax highlighting for your code.

There were also suggestions to incorporate Unit 7 of http://dev.moodle.org/course/view.php?id=2 into Moodle Docs (http://dev.moodle.org/mod/forum/discuss.php?d=360). --Frank Ralf 08:05, 29 September 2009 (UTC)

Grades

Thanks for the great work Daniele! This is such an improvement :)

I can't find any reference to pushing grades into Moodle's grade book in the NEWMODULE docs. I think this is a core function of the majority of activity modules and would like to see it documented or at least referenced here. Will this be included in the not too distant future?

version.php comments

in the NEWMODULE download, Can I suggest the comment for the line $module->cron = 0; // Period for cron to check this module (secs)

be replaced with $module->cron = 0; //Frequency for cron to check this module (secs). Copied to the cron field of modules table

Examples

There are, of course, lots of example of all this in the Moodle codebase.

For an example of a simple module, see https://github.com/moodle/moodle/tree/master/mod/page. For more complex examples, see https://github.com/moodle/moodle/tree/master/mod/forum or https://github.com/moodle/moodle/tree/master/mod/quiz