Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d71c486507

Fetching latest commit…

Cannot retrieve the latest commit at this time

PEAR Libraries

This directory (lib/pear) contains unmodified copies of some
libraries from the standard PEAR distribution (

We include these in Moodle solely for the convenience of sites that
may not have PEAR installed.

If this directory is DELETED from Moodle then Moodle will search
the standard PHP directories and use the PEAR libraries there instead.

In detail, the libraries added here are:

- PEAR Spreadsheet_Excel_Writer classes:
    - Current version: 0.9.1
    - by Xavier Noguer and Mika Tuupola
    - License: LGPL
- PEAR OLE classes:
    - Current version: 0.5
    - by Xavier Noguer
    - License: PHP (Permission given to Moodle to redistribute under GPL)
- PEAR HTML_Quickform:
    - Current version: 3.2.6
    - by Bertrand Mansion, Adam Daniel, Alexey Borzov
    - License: PHP (Permission given to Moodle to redistribute under GPL)
- PEAR HTML_Quickform_Renderer_Tableless:
    - Current version: 0.3.4
    - by Mark Wiesemann
    - License: PHP (Permission given to Moodle to redistribute under GPL)
- PEAR HTML_QuickForm_DHTMLRulesTableless:
    - Current version: 0.1.2
    - by Alexey Borzov, Adam Daniel, Bertrand Mansion, Justin Patrin, Mark Wiesemann
    - License: PHP (Permission given to Moodle to redistribute under GPL)
- PEAR HTML_Common:
    - Current version: 1.2.2
    - by Adam Daniel, Bertrand Mansion, Klaus Guenther, Alexey Borzov,
    - License: PHP  (Permission given to Moodle to redistribute under GPL)
- PEAR main class:
    - Current version: 1.4.5
    - by Stig Bakken, Thomas V.V.Cox, Pierre-Alain Joye,
      Greg Beaver and Martin Jansen
    - License: PHP
    - Current version: HEAD @ 28-01-2008
    - by Hartmut Holzgraefe and Christian Stocker
    - License: BSD
    - Current version: 0.5.6
    - by Elizabeth Smith, Arpad Ray, Joshua Eichorn, David Coallier and Laurent Yaish
    - License: LGPL
    - Current version: 1.0.6 (2008-04-13)
    - by Michael Bretterklieber
    - License: BSD
- PEAR Crypt_CHAP:
    - Current Version: 1.0.1 (2007-03-14)
    - by Michael Bretterklieber
    - License: BSD
- PEAR XML_Parser:
    - Current Version: 1.3.2 (2009-01-21)
    - by Stephan Schmidt, Stig Bakken, Tomas V.V.Cox
    - License: BSD


We must not use these classes directly ever. Instead we must build
and use wrapper classes to isolate Moodle code from internal PEAR
implementations, allowing us to migrate if needed to other
libraries in the future. For an example of wrapped classes,
see the excel.class.lib file, that includes code to build
Excel files using the cool library inside PEAR, but using
the old calls used before Moodle 1.6 to maintain compatibility.

Please, don't forget it! Always use wrapper classes/functions!

Eloy Lafuente, 2005-12-17 :-)


Everything in Moodle in pure GPL.  This pear directory is the only
part of the distribution that is not.

There is some question about how PHP-licensed software can be
included within a GPL-licensed distribution like Moodle, specifically
the clause that annoyingly says no derivative of the software can
include the name PHP.

We don't intend to rename Moodle to anything of the sort, obviously,
but to help people downstream who could possibly want to do so,
we have sought special permission from the authors of these classes
to allow us an exemption on this point so that we don't need to
change our nice clean GPL license.

Several authors have given Moodle explicit permission to distribute
their PHP-licensed PEAR classes in the Moodle distribution, allowing
anybody using these classes ONLY as part of the Moodle distribution
exemption from clauses of the PHP license that could cause
conflict with the main GNU Public License that Moodle uses.

We are still waiting to hear back from the others but we assume
for now that it will likewise be OK.

If you are at all worried about this situation you can simply delete
this directory from Moodle and it will use your installed PEAR
libraries instead.

Martin Dougiamas, 2 April 2006
Something went wrong with that request. Please try again.