Activity modules
Activity modules are a fundamental course feature and are usually the primary delivery method for learning content in Moodle.
The plugintype of an Activity module is mod
, and the frankenstyle name of a plugin is therefore mod_[modname]
.
All activity module plugins are located in the /mod/
folder of Moodle.
note
The term [modname]
is used as a placeholder in this documentation and should be replaced with the name of your activity module.
Folder layout
Activity modules reside in the /mod
directory.
Each module is in a separate subdirectory and consists of a number of mandatory files and any other files the developer is going to use.
Below is an example of the file structure for the folder
plugin.
View an example directory layout for the folder
plugin.
.
├── backup
│ ├── moodle1
│ │ └── lib.php
│ └── moodle2
│ ├── backup_folder_activity_task.class.php
│ ├── backup_folder_stepslib.php
│ ├── restore_folder_activity_task.class.php
│ └── restore_folder_stepslib.php
├── classes
│ ├── analytics
│ │ └── indicator
│ │ ├── activity_base.php
│ │ ├── cognitive_depth.php