1 / 18

Exposing Moodle

Exposing Moodle. The programming behind SLOODLE. Peter R. Bloomfield University of the West of Scotland. SLOODLE is funded and supported by Eduserv SLOODLE is supported by San Jose State University. What is SLOODLE?. Integration of Moodle and “Second Life”

ethan-beard
Download Presentation

Exposing Moodle

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Exposing Moodle The programming behind SLOODLE Peter R. Bloomfield University of the West of Scotland SLOODLE is funded and supported by Eduserv SLOODLE is supported by San Jose State University

  2. What is SLOODLE? • Integration of Moodle and “Second Life” • Totally different interface and experience • Our research explores how and why

  3. “WebIntercom” Moodle Chatroom “MetaGloss” Moodle Glossary Modules • SLOODLE ‘objects’ in SL typically correspond to activities in Moodle

  4. Users & Avatars • Moodle user accounts correspond to SL avatars • SLOODLE stores this association in the database

  5. Second Life Moodle Communication • Second Life talks to Moodle using HTTP • Communication is text only (UTF-8) http

  6. Limitations • SL uses “Linden Scripting Language” • Very limited processing • Very limited memory • HTTP responses are max. 2048 bytes • Data must be concise and structured • Parsing must be simple • Conventional web services are not possible

  7. Getting the data out • Dedicated “linker scripts” access Moodle DB • PHP scripts which link SL with Moodle • Using Moodle’s DB functions (get_record, etc.) • Will use web service API in future! • Old versions of linker scripts are maintained • Using HTTP for input/output • WebIntercom linker script: • Input: chat messages from SL • Output: recent chat messages from Moodle

  8. Simple example (version linker): 1|OK0.4|2009031003 Complex example (WebIntercom): 1|OK|10101||||cb62238b-5ff9-44b4-b705-4ac11cb05b68292|Peter Bloomfield|enter298|Peter Bloomfield|blah blah blah299|Pedro McMillan |(SL) hello world HTTP responses

  9. MOODLE Controller (Object) (Object) SECOND LIFE Security • Need to verify authenticity of requests • Uses internal passwords • SLOODLE Controllers: • Activity modules • Control SLOODLE access to their course Course Course

  10. SLOODLE PHP API • Lots of tools = lots of linker scripts • Needed a re-usable API to help • Object-oriented • Compatible with PHP 4 and 5

  11. Sessions • Linker scripts create a SloodleSession object • Has many members and methods • Supports: • Input (HTTP parameters) • Output (HTTP response) • Abstracted data access • Security • And more...

  12. Class Structure

  13. Why? • Simplification • Keeps low-level code out of linker scripts • Makes them easier to read/write • Re-use code • Quicker to develop later tools • Easier to debug/fix general problems • Abstraction • Copes with version changes • Greater portability potential

  14. Example Linker -- Setup $sloodle = new SloodleSession(); $sloodle->authenticate_request(); $sloodle->load_module('chat', true); $sloodle->validate_user(false);

  15. Example Linker -- Processing $message = $sloodle->request-> optional_param('message', null); if ($message != null) $sloodle->module->add_message($message);

  16. Example Linker -- Output $sloodle->response->set_status_code(1); $sloodle->response->set_status_descriptor('OK'); $messages = $sloodle->module->get_chat_history(); foreach ($messages as $m) { $author = $m->user->get_user_name(); $sloodle->response->add_data_line( array($m->id, $author, $m->message)); } $sloodle->response->render_to_output();

  17. The Road Ahead • Consolidate functionality • Keep related code together • Make it easier for new developers • Work-out some ‘quirks’ in the system • Porting to other platforms? • We love Moodle though! 

  18. Thanks! Visit us online: www.sloodle.org Or contact me: peter.bloomfield@uws.ac.uk

More Related