SCORM reports: Difference between revisions
(Created page with "{{Moodle 2.2}} == Introduction == SCORM reports were converted to a pluggable architecture as of MOODLE 2.2. The original documentation of the project can be found at [http://doc...") |
No edit summary |
||
Line 21: | Line 21: | ||
* The lang file is not optional. That is each plugin must define the string "pluginname" in the lang files. | * The lang file is not optional. That is each plugin must define the string "pluginname" in the lang files. | ||
== Naming Conventions == | == Naming Conventions == | ||
Following Naming conventions should be kept in mind while writing a scorm report plugin:- | |||
* Folder name should be same as pluginname | |||
* Name of the extended class should be scorm_pluginname_report | |||
* scorm_pluginname_report must implement the function | |||
<code php> | |||
function display($scorm, $cm, $course, $download) {} | |||
</code> | |||
* Each plugin must define the string "pluginname" in the language files. | |||
== Interfacing to APIs == | == Interfacing to APIs == | ||
== See Also == | == See Also == | ||
Line 26: | Line 34: | ||
=== User Docs === | === User Docs === | ||
[https://docs.moodle.org/en/Using_SCORM Using SCORM] | [https://docs.moodle.org/en/Using_SCORM Using SCORM] | ||
[https://docs.moodle.org/en/SCORM_FAQ SCORM FAQ] | [https://docs.moodle.org/en/SCORM_FAQ SCORM FAQ] | ||
[https://docs.moodle.org/en/SCORM_module SCORM Module] | [https://docs.moodle.org/en/SCORM_module SCORM Module] |
Revision as of 08:13, 27 January 2012
Moodle 2.2
Introduction
SCORM reports were converted to a pluggable architecture as of MOODLE 2.2. The original documentation of the project can be found at SCORM Reporting Improvements. Scorm Reports define a way for developer to develop reports of their own for the scorm module. The rest of this page deals with the details of how to develop such a report.
Template
File structure
Each plugin is allowed to have following files and folders:
Mandatory Files
- report.php
- lang/xx/scormreport_pluginname.php
Other Optional Files
- Version.php
- db/install.php
- db/install.xml
- db/upgrade.php
- db/access.php
As you might have noticed the file structure for scorm report plugin is similar to any other standard plugin in Moodle. The only differences are:-
- There must a file report.php must extend the default reporting class "scorm_default_report" and the extended class must implement the method "display($scorm, $cm, $course, $download)", which should handle the core reporting feature.
- The lang file is not optional. That is each plugin must define the string "pluginname" in the lang files.
Naming Conventions
Following Naming conventions should be kept in mind while writing a scorm report plugin:-
- Folder name should be same as pluginname
- Name of the extended class should be scorm_pluginname_report
- scorm_pluginname_report must implement the function
function display($scorm, $cm, $course, $download) {}
- Each plugin must define the string "pluginname" in the language files.
Interfacing to APIs
See Also
SCORM Reporting Improvements Original GSOC 2011 Project Documentation