]> git.mjollnir.org Git - moodle.git/commitdiff
lib MDL-19236 Added boilerplates and copyrights
authorsamhemelryk <samhemelryk>
Tue, 26 May 2009 03:57:03 +0000 (03:57 +0000)
committersamhemelryk <samhemelryk>
Tue, 26 May 2009 03:57:03 +0000 (03:57 +0000)
lib/searchlib.php
lib/session-test.php
lib/sessionlib.php
lib/setup.php
lib/setuplib.php
lib/simpletestlib.php
lib/soaplib.php
lib/statslib.php

index ceb462d5f8e20d42add97c40f0ceab740803f8da..de0cf18b7d9263e7e62a0fc5ae8196bf54d5d1f4 100644 (file)
@@ -1,8 +1,30 @@
-<?php  // $Id$
+<?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
+/**
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+/** @see lexer.php */
 require_once($CFG->libdir.'/lexer.php');
 
-// Constants for the various types of tokens
+/** Constants for the various types of tokens */
 
 define("TOKEN_USER","0");
 define("TOKEN_META","1");
@@ -14,8 +36,13 @@ define("TOKEN_DATEFROM","6");
 define("TOKEN_DATETO","7");
 define("TOKEN_INSTANCE","8");
 
-// Class to hold token/value pairs after they're parsed.
-
+/**
+ * Class to hold token/value pairs after they're parsed.
+ *
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 class search_token {
   private $value;
   private $type;
@@ -45,6 +72,10 @@ class search_token {
  * This class does the heavy lifting of lexing the search string into tokens.
  * Using a full-blown lexer is probably overkill for this application, but 
  * might be useful for other tasks.
+ *
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class search_lexer extends Lexer{
 
@@ -168,6 +199,10 @@ class search_lexer extends Lexer{
  * the parsed token  array.
  * Most functions in this class should only be called by the lexer, the
  * one exception being getParseArray() which returns the result.
+ *
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class search_parser {
     private $tokens;
@@ -310,6 +345,9 @@ class search_parser {
  * $parsetree should be a parse tree generated by a 
  * search_lexer/search_parser combination. 
  * Other fields are database table names to search.
+ *
+ * @global object
+ * @global object
  */
 function search_generate_text_SQL($parsetree, $datafield, $metafield, $mainidfield, $useridfield,
                              $userfirstnamefield, $userlastnamefield, $timefield, $instancefield) {
@@ -449,6 +487,9 @@ function search_generate_text_SQL($parsetree, $datafield, $metafield, $mainidfie
  * $parsetree should be a parse tree generated by a 
  * search_lexer/search_parser combination. 
  * Other fields are database table names to search.
+ *
+ * @global object
+ * @global object
  */
 function search_generate_SQL($parsetree, $datafield, $metafield, $mainidfield, $useridfield,
                              $userfirstnamefield, $userlastnamefield, $timefield, $instancefield) {
index f73da062eae8ba0cb272de2dc216a38509444bb3..01fcd659c095da3c8cf0a6b4ea80258de35b77c7 100644 (file)
@@ -1,11 +1,35 @@
 <?php
-/// This is a tiny standalone diagnostic script to test that sessions 
-/// are working correctly on a given server.  
-///
-/// Just run it from a browser.   The first time you run it will 
-/// set a new variable, and after that it will try to find it again.
-/// The random number is just to prevent browser caching.
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
+/**
+ * This is a tiny standalone diagnostic script to test that sessions
+ * are working correctly on a given server.
+ *
+ * Just run it from a browser.   The first time you run it will
+ * set a new variable, and after that it will try to find it again.
+ * The random number is just to prevent browser caching.
+ *
+ * @todo add code that actually tests moodle sessions, the old one only tested
+ *       PHP sessions used from installer, not the real moodle sessions
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+/** Include config {@see config.php} */
 require '../config.php';
 
 error('session test not reimplemented yet');
index 179964b48dc3a05ae5b656269be6eca19ae1d376..80d11d19bf78e27d4accde8c9282e5db781691d9 100644 (file)
@@ -1,9 +1,30 @@
-<?php  //$Id$
+<?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
- * Factory method returning moodle_session object.
- * @return moodle_session
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
+
+/**
+  * Factory method returning moodle_session object.
+  * @return moodle_session
+  */
 function session_get_instance() {
     global $CFG, $DB;
 
@@ -35,6 +56,11 @@ function session_get_instance() {
     return $session;
 }
 
+/**
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 interface moodle_session {
     /**
      * Terminate current session
@@ -52,6 +78,10 @@ interface moodle_session {
 
 /**
  * Class handling all session and cookies related stuff.
+ *
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 abstract class session_stub implements moodle_session {
     protected $justloggedout;
@@ -285,6 +315,10 @@ abstract class session_stub implements moodle_session {
 
 /**
  * Legacy moodle sessions stored in files, not recommended any more.
+ *
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class legacy_file_session extends session_stub {
     protected function init_session_storage() {
@@ -319,6 +353,10 @@ class legacy_file_session extends session_stub {
 
 /**
  * Recommended moodle session storage.
+ *
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class database_session extends session_stub {
     protected $record   = null;
index 23e5aafa817228f5050ef2b3b385c4f10e266c8b..e39e6744ab9b3cbff26e17cd6f7f5355f1a32ac4 100644 (file)
@@ -1,13 +1,29 @@
 <?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
  * setup.php - Sets up sessions, connects to databases and so on
  *
  * Normally this is only called by the main config.php file
  * Normally this file does not need to be edited.
- * @author Martin Dougiamas
- * @version $Id$
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package moodlecore
+ *
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
 /**
  *  - $CFG->libdir  - Path to moodle's library folder on server's filesystem.
  *
  * @global object $CFG
+ * @name $CFG
  */
 global $CFG;
 
 /**
  * Database connection. Used for all access to the database.
  * @global moodle_database $DB
+ * @name $DB
  */
 global $DB;
 
@@ -33,6 +51,7 @@ global $DB;
  * Moodle's wrapper round PHP's $_SESSION.
  *
  * @global object $SESSION
+ * @name $SESSION
  */
 global $SESSION;
 
@@ -54,6 +73,7 @@ global $SESSION;
  *  - $USER->lang - The user's language choice.
  *
  * @global object $USER
+ * @name $USER
  */
 global $USER;
 
@@ -62,12 +82,14 @@ global $USER;
  * generating in response to the user's request.
  *
  * @global moodle_page $PAGE
+ * @name $PAGE
  */
 global $PAGE;
 
 /**
  * The current course. An alias for $PAGE->course.
  * @global object $COURSE
+ * @name $COURSE
  */
 global $COURSE;
 
@@ -79,12 +101,14 @@ global $COURSE;
  *  - $THEME->cellheading2 - Alternate cell colors.
  *
  * @global object $THEME
+ * @name THEME
  */
 global $THEME;
 
 /**
  * Shared memory cache.
  * @global object $MCACHE
+ * @name $MCACHE
  */
 global $MCACHE;
 
@@ -93,19 +117,38 @@ global $MCACHE;
  *
  * Its primary goal is to allow 100% HTTPS pages when $CFG->loginhttps is enabled. Default to false.
  * Its enabled only by the httpsrequired() function and used in some pages to update some URLs
-*/
+ *
+ * @global bool $HTTPSPAGEREQUIRED
+ * @name $HTTPSPAGEREQUIRED
+ */
 global $HTTPSPAGEREQUIRED;
 
-/** Full script path including all params, slash arguments, scheme and host.*/
+/**
+ * Full script path including all params, slash arguments, scheme and host.
+ * @global string $FULLME
+ * @name $FULLME
+ */
 global $FULLME;
 
-/** Script path including query string and slash arguments without host. */
+/**
+ * Script path including query string and slash arguments without host.
+ * @global string $ME
+ * @name $ME
+ */
 global $ME;
 
-/** $FULLME without slasharguments and query string.*/
+/**
+ * $FULLME without slasharguments and query string.
+ * @global string $FULLSCRIPT
+ * @name $FULLSCRIPT
+ */
 global $FULLSCRIPT;
 
-/** Relative moodle script path '/course/view.php' */
+/**
+ * Relative moodle script path '/course/view.php'
+ * @global string $SCRIPT
+ * @name $SCRIPT
+ */
 global $SCRIPT;
 
     if (!isset($CFG->wwwroot)) {
@@ -118,6 +161,7 @@ global $SCRIPT;
         if (isset($_SERVER['REMOTE_ADDR'])) {
             define('CLI_SCRIPT', false);
         } else {
+            /** @ignore */
             define('CLI_SCRIPT', true);
         }
     }
index 61b478be35508e75be682ba9f1f94b1143d50e97..275aa8f08d06a123f973451d276de2a99c5d6051 100644 (file)
@@ -1,16 +1,46 @@
-<?php // $Id$
-      // These functions are required very early in the Moodle
-      // setup process, before any of the main libraries are
-      // loaded.
+<?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 
+/**
+ * These functions are required very early in the Moodle
+ * setup process, before any of the main libraries are
+ * loaded.
+ * 
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
 /**
  * Simple class
+ *
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class object {};
 
 /**
  * Base Moodle Exception class
+ *
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class moodle_exception extends Exception {
     public $errorcode;
@@ -47,6 +77,10 @@ class moodle_exception extends Exception {
 /**
  * Exception indicating programming error, must be fixed by a programer. For example
  * a core API might throw this type of exception if a plugin calls it incorrectly.
+ *
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class coding_exception extends moodle_exception {
     /**
@@ -65,6 +99,10 @@ class coding_exception extends moodle_exception {
  * CONTEXT_... constant. You might throw an invalid_state_exception in the
  * default case, to just in case something really weird is going on, and
  * $context->contextlevel is invalid - rather than ignoring this possibility.
+ *
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class invalid_state_exception extends moodle_exception {
     /**
index 47bb9bb758d0ed1d4be90503b9c022f522ebb016..3c447ae8d585c14e387a59ab64bb57e815f0e66d 100644 (file)
@@ -1,4 +1,20 @@
-<?php // $Id$
+<?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
  * Utility functions to make unit testing easier.
  *
  * dirty methods for getting things done in test cases. None of these
  * methods should be used outside test code.
  *
+ * Major Contirbutors
+ *     - T.J.Hunt@open.ac.uk
+ *
+ * @package moodlecore
+ * @subpackage simpletestex
  * @copyright &copy; 2006 The Open University
- * @author T.J.Hunt@open.ac.uk
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @version $Id$
- * @package SimpleTestEx
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+/**
+ * Includes
+ */
 require_once(dirname(__FILE__) . '/../config.php');
 require_once($CFG->libdir . '/simpletestlib/simpletest.php');
 require_once($CFG->libdir . '/simpletestlib/unit_tester.php');
@@ -52,6 +73,11 @@ function recurseFolders($path, $callback, $fileregexp = '/.*/', $exclude = false
 
 /**
  * An expectation for comparing strings ignoring whitespace.
+ *
+ * @package moodlecore
+ * @subpackage simpletestex
+ * @copyright &copy; 2006 The Open University
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class IgnoreWhitespaceExpectation extends SimpleExpectation {
     var $expect;
@@ -76,6 +102,11 @@ class IgnoreWhitespaceExpectation extends SimpleExpectation {
 
 /**
  * An Expectation that two arrays contain the same list of values.
+ *
+ * @package moodlecore
+ * @subpackage simpletestex
+ * @copyright &copy; 2006 The Open University
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class ArraysHaveSameValuesExpectation extends SimpleExpectation {
     var $expect;
@@ -108,6 +139,11 @@ class ArraysHaveSameValuesExpectation extends SimpleExpectation {
  * An Expectation that compares to objects, and ensures that for every field in the
  * expected object, there is a key of the same name in the actual object, with
  * the same value. (The actual object may have other fields to, but we ignore them.)
+ *
+ * @package moodlecore
+ * @subpackage simpletestex
+ * @copyright &copy; 2006 The Open University
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class CheckSpecifiedFieldsExpectation extends SimpleExpectation {
     var $expect;
@@ -160,6 +196,11 @@ class CheckSpecifiedFieldsExpectation extends SimpleExpectation {
  * The tear-down method for this class should automatically revert any changes
  * you make during test set-up using the metods defined here. That is, it will
  * drop tables for you automatically and revert to the real $DB and $USER->id.
+ *
+ * @package moodlecore
+ * @subpackage simpletestex
+ * @copyright &copy; 2006 The Open University
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class UnitTestCaseUsingDatabase extends UnitTestCase {
     private $realdb;
@@ -378,6 +419,12 @@ class UnitTestCaseUsingDatabase extends UnitTestCase {
     }
 }
 
+/**
+ * @package moodlecore
+ * @subpackage simpletestex
+ * @copyright &copy; 2006 The Open University
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 class FakeDBUnitTestCase extends UnitTestCase {
     public $tables = array();
     public $pkfile;
@@ -389,7 +436,8 @@ class FakeDBUnitTestCase extends UnitTestCase {
      * If this file already exists, it means that a previous run of unit tests
      * did not complete, and has left data undeleted in the DB. This data is then
      * deleted and the file is retained. Otherwise it is created.
-     * @throws moodle_exception if CSV file cannot be created
+     *
+     * throws moodle_exception if CSV file cannot be created
      */
     public function __construct($label = false) {
         global $DB, $CFG;
@@ -455,8 +503,10 @@ class FakeDBUnitTestCase extends UnitTestCase {
      * Given a filename, opens it and parses the csv contained therein. It expects two fields per line:
      * 1. Table name
      * 2. Max id
+     *
+     * throws moodle_exception if file doesn't exist
+     *
      * @param string $filename
-     * @throws moodle_exception if file doesn't exist
      */
     public function get_table_data($filename) {
         global $CFG;
@@ -485,7 +535,7 @@ class FakeDBUnitTestCase extends UnitTestCase {
     /**
      * Method called before each test method. Replaces the real $DB with the one configured for unit tests (different prefix, $CFG->unittestprefix).
      * Also detects if this config setting is properly set, and if the user table exists.
-     * TODO Improve detection of incorrectly built DB test tables (e.g. detect version discrepancy and offer to upgrade/rebuild)
+     * @todo Improve detection of incorrectly built DB test tables (e.g. detect version discrepancy and offer to upgrade/rebuild)
      */
     public function setUp() {
         global $DB, $CFG;
@@ -602,6 +652,11 @@ class FakeDBUnitTestCase extends UnitTestCase {
  * Internally, it routes all calls to $DB to a real instance of the database engine (aggregated as a member variable),
  * except those that are defined in this proxy class. This makes it possible to add extra code to the database engine
  * without subclassing it.
+ *
+ * @package moodlecore
+ * @subpackage simpletestex
+ * @copyright &copy; 2006 The Open University
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 class UnitTestDB {
     public static $DB;
@@ -672,7 +727,8 @@ class UnitTestDB {
     /**
      * Overriding update_record: If we are updating a record that was NOT inserted by unit tests,
      * throw an exception and cancel update.
-     * @throws moodle_exception If trying to update a record not inserted by unit tests.
+     * 
+     * throws moodle_exception If trying to update a record not inserted by unit tests.
      */
     public function update_record($table, $dataobject, $bulk=false) {
         global $DB;
@@ -691,7 +747,8 @@ class UnitTestDB {
     /**
      * Overriding delete_record: If we are deleting a record that was NOT inserted by unit tests,
      * throw an exception and cancel delete.
-     * @throws moodle_exception If trying to delete a record not inserted by unit tests.
+     *
+     * throws moodle_exception If trying to delete a record not inserted by unit tests.
      */
     public function delete_records($table, array $conditions=array()) {
         global $DB;
@@ -730,7 +787,8 @@ class UnitTestDB {
     /**
      * Overriding delete_records_select: If we are deleting a record that was NOT inserted by unit tests,
      * throw an exception and cancel delete.
-     * @throws moodle_exception If trying to delete a record not inserted by unit tests.
+     *
+     * throws moodle_exception If trying to delete a record not inserted by unit tests.
      */
     public function delete_records_select($table, $select, array $params=null) {
         global $DB;
index b5eaf962c11814cb5cc6f4521ff54af0df4cac4f..7ddfd2273cef52b68a7001744eb4dd3158cc0a15 100644 (file)
@@ -1,13 +1,34 @@
 <?php
 
-// Web services wrapper library script
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Web services wrapper library script
+ *
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 
 if (check_php_version('5') && class_exists('SoapClient')) {
-    // Use the native PHP5 support
+    /** Use the native PHP5 support */
     require_once($CFG->libdir . '/soap/phpsoap.php');
 }
 else{
-    // Use nuSOAP instead
+    /** Use nuSOAP instead */
     require_once($CFG->libdir . '/soap/nusoap.php');
 
     function make_soap_fault($faultcode, $faultstring, $faultactor='', $detail='', $faultname='', $headerfault='') {
@@ -26,6 +47,7 @@ else{
         }
     }
     else {
+        /** @ignore */
         function soap_connect($wsdl, $trace=false) {
             return new soapclient($wsdl, 'wsdl');
         }
index 00de7537a833f1d3d785856e8fb5089cfd01146d..9f00f648dae4576b63bd53a16f6c5abd6ac05303 100644 (file)
@@ -1,6 +1,27 @@
 <?php
 
-    // THESE CONSTANTS ARE USED FOR THE REPORTING PAGE.
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * @package   moodlecore
+ * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+    /** THESE CONSTANTS ARE USED FOR THE REPORTING PAGE. */
 
     define('STATS_REPORT_LOGINS',1); // double impose logins and unqiue logins on a line graph. site course only.
     define('STATS_REPORT_READS',2); // double impose student reads and teacher reads on a line graph.