- Moodle 1.9 Extension Development
- Jonathan Moore Michael Churchward
- 295字
- 2021-08-06 17:24:08
The scope of creating an activity module
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 module. We will flesh out each component of the listing as we progress through the chapter:
./README.txt
./lib.php
./restorelib.php
./lang
./lang/en_utf8
./lang/en_utf8/foo.php
./lang/en_utf8/help
./lang/en_utf8/help/newmodule
./lang/en_utf8/help/newmodule/index.html
./lang/en_utf8/help/newmodule/mods.html
./version.php
./mod_form.php
./backuplib.php
./submit_form.php
./view.php
./icon.gif
./index.php
./db
./db/access.php
./db/upgrade.php
./db/install.xml
See http://docs.moodle.org/en/Development:Modules for the official project documentation on activity module development.
Included in this chapter's source code files is an empty template folder for starting a new activity module. The folder is named NEWMODULE
.
Most new modules are created by using the NEWMODULE template, which is a contributed module. This means that the module is not part of the Moodle core distribution, but has been donated to the Moodle project under the same GPL. The module can be downloaded from http://moodle.org/mod/data/view.php?d=13&rid=715&filter=1. NEWMODULE is a useful starting point for creating our activity. However, it does miss a few important functional requirements. The most notable of these is the lack of backup and restore functionality. The code in this chapter, while based on NEWMODULE, also includes adapted components from other core modules, especially in places where NEWMODULE is incomplete. This method of examining the core code, as a way to learn how Moodle works, is common practice in the Moodle development community. In the next section, we will describe the features of the module that we will be creating in this chapter.
- Vulkan學(xué)習(xí)指南
- 爸媽微信e時代
- 中文版3ds Max 2012實用教程(第2版)
- Creo 4.0中文版從入門到精通
- 中文版SolidWorks 2015技術(shù)大全
- Dreamweaver基礎(chǔ)與實戰(zhàn)教程
- Lightroom Classic完全自學(xué)一本通
- Autodesk Ecotect Analysis 2011綠色建筑分析應(yīng)用
- SolidWorks2014基礎(chǔ)實例教程
- Photoshop CS6實戰(zhàn)從入門到精通(超值版)
- 量化投資與FOF投資:以MATLAB+Python為工具
- Premiere pro CC中文版自學(xué)視頻教程
- Photoshop手繪從新手到高手
- 中文版AutoCAD自學(xué)經(jīng)典
- Inkscape Starter (Microcontent)