Moodle

Create test-run REST Webservices to wrap the basic functionalities coded.

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Not a bug
  • Affects Version/s: 1.9.2, 2.0
  • Fix Version/s: None
  • Component/s: Administration
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE

Description

This REST Webservices will serve as testing purposes, before the full 3 layered architecture is on place. So no security is regarded, nor authentication etc..

Issue Links

Activity

Hide
Tusefomal added a comment -

There's a test client in the CVS:

http://cvs.moodle.org/contrib/patches/dfws/client/clientrest/

It work just copying directory into public apache dir, edit the "config_rest.php" and set $CFG->serveurl to you moodle webservice rest connector url.

For example, if you moodle url is:

http://localhost/moodle

the $CFG->serverurl must be:

$CFG->serverurl = 'http://localhost/moodle/webservice/inout/rest/inout.php';

That's all!

For daredevils only!

We will keep this example updated to test every API functionality.

Show
Tusefomal added a comment - There's a test client in the CVS: http://cvs.moodle.org/contrib/patches/dfws/client/clientrest/ It work just copying directory into public apache dir, edit the "config_rest.php" and set $CFG->serveurl to you moodle webservice rest connector url. For example, if you moodle url is: http://localhost/moodle the $CFG->serverurl must be: $CFG->serverurl = 'http://localhost/moodle/webservice/inout/rest/inout.php'; That's all! For daredevils only! We will keep this example updated to test every API functionality.
Hide
Tusefomal added a comment -

Rest connector is done for the implemented API functions. Source can be found here:

http://cvs.moodle.org/contrib/patches/dfws/webservice/inout/rest/

The 3 main files are:

  • inout.php: general acces to functions. Uses implicit params via "get_file_argument" moodle function to select which API function must be called.
  • lib.php: support library
  • wrapper (dir): contains API wrappers libraries

Inside wrappers, every lib contains a certain number of wrapper functions.

Show
Tusefomal added a comment - Rest connector is done for the implemented API functions. Source can be found here: http://cvs.moodle.org/contrib/patches/dfws/webservice/inout/rest/ The 3 main files are:
  • inout.php: general acces to functions. Uses implicit params via "get_file_argument" moodle function to select which API function must be called.
  • lib.php: support library
  • wrapper (dir): contains API wrappers libraries
Inside wrappers, every lib contains a certain number of wrapper functions.
Hide
Tusefomal added a comment -

Rest connector works properly with basic API functions wrappers. From now we only have to code new wrappers and incorporate authentication methods.

Show
Tusefomal added a comment - Rest connector works properly with basic API functions wrappers. From now we only have to code new wrappers and incorporate authentication methods.
Hide
Martin Dougiamas added a comment -

Closing this one as this doesn't quite make sense with the new structure.

Show
Martin Dougiamas added a comment - Closing this one as this doesn't quite make sense with the new structure.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: