Beacon Hill Cottage

...because open source matters

  • Increase font size
  • Default font size
  • Decrease font size
Home MoodleRest

MoodleRest (Current Development)

Version (0.1.6) is under development so will change and can be downloaded from https://github.com/bantonia/MoodleRest


09/11/2013 Many changes have been undertaken to catch up on developments in the Moodle 2.5 webservices. There are still some calls needed to be added and are under development.

27/04/2012 MoodleGroupUser class, changed userId to Long instead of long.

14/04/2012 Modifying the container classes so they are composed of objects rather than primitives. This will enable the use of null to indicate that the instance member is not set.

11/04/2012 Completed the addition of the non-static methods which are currently supported by the library.

10/04/2012 Adding non static thread safe methods so the library can be used in a multi-user environment such as a Moodle webservices proxy server.

Calls added, so far:

NodeList __call(String url, String params)
MoodleCourse[] __getAllCourses(String url, String token)
MoodleCourse __getCourseFromId(String url, String token, long id)
MoodleCourse[] __getCoursesById(String url, String token, long[] courseids)
MoodleCourse __createCourse(String url, String token, MoodleCourse course)
MoodleCourse[] __createCourses(String url, String token, MoodleCourse[] course)
MoodleCourseContent[] __getCourseContent(String url, String token, long courseId, MoodleCourseContentOption[] options)
MoodleCategory __createCategory(String url, String token, MoodleCategory category)
MoodleCategory[] __createCategories(String url, String token, MoodleCategory[] categories)
void __deleteCategory(String url, String token, MoodleCategory category)
void __deleteCategories(String url, String token, MoodleCategory[] categories)
void __updateCategory(String url, String token, MoodleCategory category)
void __updateCategories(String url, String token, MoodleCategory[] categories)
MoodleCategory[] __getCategories(String url, String token)
MoodleCategory[] __getCategories(String url, String token, long categoryId)
MoodleCategory[] __getCategories(String url, String token, long categoryId, boolean subcategories)

These mirror their non-underscored counterparts except the url and token are not stored in a static area, no need to call MoodleCallRestWebService.Init of any form with these methods. The __call method is used internally, the params parameter contains the token along with any other parameters required. Note no username/password authentication.

09/04/2012 Entity injection into the XML stream returned modified. Code and XML file still present in source but is commented out and the XML file is unused. Replaced by appending a string containing the entities instead so no requirements for accessing the XML file. To fix the possibility of not finding the XML file and therefore producing a java.lang.NullPointerException

Since V0.1.5 Added code for some of the newer function calls possibly to be released in Moodle 2.3

core_user_get_users (complete)
core_course_create_categories (complete)
core_course_delete_categories (complete)
core_course_get_categories (complete)
core_course_update_categories(complete)
mod_assign_get_submissions (complete)
mod_assign_get_grades (in development)
mod_assign_get_assignments (to be added)

Note these routines are untested!

Last Updated on Saturday, 09 November 2013 12:35