Course formats: Difference between revisions
ca2si Etan (talk | contribs) (Created page with "Course formats are plugins that determine the layout of course resources. =Components= '''course/format/format_name/lang/language_code/format_name.php''' Contains the...") |
(Adding to a top level category) |
||
Line 1: | Line 1: | ||
Course formats are plugins that determine the layout of [[Course|course]] resources. | Course formats are plugins that determine the layout of [[:en:Course|course]] resources. | ||
=Components= | =Components= | ||
'''course/format/format_name/lang/language_code/format_name.php''' | '''course/format/format_name/lang/language_code/format_name.php''' | ||
Line 7: | Line 7: | ||
'''course/format/config.php''' | '''course/format/config.php''' | ||
Contains $format['defaultblocks'] which defines the default [[blocks|blocks]] loaded with the format. | Contains $format['defaultblocks'] which defines the default [[:en:blocks|blocks]] loaded with the format. | ||
'''course/format/format.php''' | '''course/format/format.php''' | ||
Line 34: | Line 34: | ||
4. The new format is ready for modification. | 4. The new format is ready for modification. | ||
[[Category:Plugins]] |
Revision as of 09:04, 4 November 2011
Course formats are plugins that determine the layout of course resources.
Components
course/format/format_name/lang/language_code/format_name.php
Contains the language strings used in the format.
course/format/config.php
Contains $format['defaultblocks'] which defines the default blocks loaded with the format.
course/format/format.php
This is is the layout itself. It is loaded by course/view.php.
course/format/lib.php
The main library of the format.
course/format/styles.css
Optional stylesheet.
course/format/version.php
Optional version definitions.
Creating a New Format
The easiest way to create a new course format is to copy an existing one.
1. Copy the folder containing the format files.
2. Rename the folder to the new name. NOTE: course format names cannot exceed ten characters. This is a limit set in the database.
3. Change $string['pluginname'] in course/format/format_name/lang/language_code/format_name.php to the new name.
4. The new format is ready for modification.