2009-01-13 07:00:26 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2009-02-11 06:57:30 +00:00
|
|
|
* Moodle - Modular Object-Oriented Dynamic Learning Environment
|
|
|
|
* http://moodle.com
|
2009-01-13 07:00:26 +00:00
|
|
|
*
|
2009-02-11 06:57:30 +00:00
|
|
|
* LICENSE
|
|
|
|
*
|
|
|
|
* This program 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 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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:
|
|
|
|
*
|
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
*
|
|
|
|
* @category Moodle
|
|
|
|
* @package webservice
|
|
|
|
* @copyright Copyright (c) 1999 onwards Martin Dougiamas http://dougiamas.com
|
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL License
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2009-01-13 07:00:26 +00:00
|
|
|
* REST Moodle server.
|
|
|
|
*
|
|
|
|
* NOTE: for this first implementation, REST requires implicit url encoded params.
|
|
|
|
* It uses function get_file_argument to get them.
|
|
|
|
*
|
|
|
|
* @author Jerome Mouneyrac
|
|
|
|
* @author Ferran Recio
|
|
|
|
* @author David Castro Garcia
|
|
|
|
*/
|
|
|
|
|
|
|
|
require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
|
2009-02-11 06:57:30 +00:00
|
|
|
require_once('lib.php');
|
2009-01-13 07:00:26 +00:00
|
|
|
|
2009-01-15 07:53:10 +00:00
|
|
|
if (empty($CFG->enablewebservices)) {
|
|
|
|
die;
|
|
|
|
}
|
|
|
|
|
2009-02-11 06:57:30 +00:00
|
|
|
$server = new rest_server();
|
|
|
|
$server->run();
|
|
|
|
|
2009-01-13 07:00:26 +00:00
|
|
|
?>
|