- Download the NEWMODULE.zip (HEAD) from http://docs.moodle.org/en/Development:NEWMODULE_Documentation (or download here) (Follow the README.txt from the zip file! (not the tutorial at moodle.org, it is not for 2.0))
- Rename all occurrences of "NEWMODULE" to "widget" (or your new module name) of the all files in the zip (161 replacements) (Also rename "newmodule" to "widget" for unix system)
- Rename "NEWMODULE" folder to "widget"
- Rename lang\en\NEWMODULE.php to widget.php
- In version.php, modify $module->version to current date (you need to change the XX for each update). Comment this line: $module->version = 0
- Optional: In view.php, just before the footer(), add -> echo 'Hello World';
- Copy the widget folder to moodle\mod\
- Site Administration -> Notifications, when you see the new module, -> Update
- Done.
2011年1月24日 星期一
Build a Hello World new module
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言