Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

SCORM reports: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
Line 15: Line 15:
* db/install.xml
* db/install.xml
* db/upgrade.php
* db/upgrade.php
* db/access.php  
* db/access.php
Please refer [[Upgrade API]] and [[Access API]] to understand the working of above files.


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:-
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:-
Line 29: Line 30:
</code>
</code>
* Each plugin must define the string "pluginname" in the language files.
* Each plugin must define the string "pluginname" in the language files.
== Interfacing to APIs ==
== See Also ==
== See Also ==
[https://docs.moodle.org/dev/SCORM_reporting_improvements SCORM Reporting Improvements] Original GSOC 2011 Project Documentation
[https://docs.moodle.org/dev/SCORM_reporting_improvements SCORM Reporting Improvements] Original GSOC 2011 Project Documentation
Line 38: Line 38:


[https://docs.moodle.org/en/SCORM_module SCORM Module]
[https://docs.moodle.org/en/SCORM_module SCORM Module]
[[Category:Tutorial]]
[[Category:Plugins]]

Revision as of 02:31, 30 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

Please refer Upgrade API and Access API to understand the working of above files.

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.

See Also

SCORM Reporting Improvements Original GSOC 2011 Project Documentation

User Docs

Using SCORM

SCORM FAQ

SCORM Module