Moodle activities are plugins that provide instructional activities for learners. One or more activities of each type can be added to courses, and these typically have a graded component that sends results to the Moodle gradebook.
This chapter covers how to create a fully-functional Moodle activity. Topics include:
Creating an activity using the NEWMODULE template
Files required for an activity module
Form setup
Talking to the gradebook
Groups support
Upgrading the database
Course reset
Backup and restore
As we start to make an activity module, it's important to note that activity modules are inherently more complex than both blocks and filters. An activity module has roughly ten required PHP files, over a dozen functions, three sub folders, and an icon graphic. This is in sharp contrast to the other module types that we created in earlier chapters. Following is a listing of the structure of an empty activity...