Fileref:sl classroom/sl object auth.php

From SLIS Second Life Wiki

Jump to: navigation, search

Image:folder.gif (parent)

This Interface Script allows a user to authorize or reject an object's access to the Moodle site. See Object Authorization for more information.

It should be accessed through a user's web-browser, but only when they are provided a URL by an object in-world, as it requires certain parameters to be contained in the URL.


Dependencies

Sloodle files:


Parameters

The following HTTP GET parameters should be encoded in the initial URL:

  • sloodleobjuuid = UUID of the object to be authorized
  • sloodlechannel = UUID of the XMLRPC which should be used to send authorization data

The following parameter is optional in the initial URL (note: it is often omitted due to the 255 character limit on URLs with the "llLoadURL" function in Second Life):

  • sloodleobjname = the name of the object to be authorized

After the user has submitted the from the confirm or deny the object, the following parameter will be added:

  • auth = 'yes' or 'no' to indicate whether or not the object was authorized. Note: if blank, then the authorization form is displayed.


Algorithm

  1. Force user login
  2. If user is not an admin, then terminate
  3. Activate debug mode if necessary
  4. Fetch the 'auth' parameter
  5. If authorization was denied then terminate
  6. Fetch remaining parameters
  7. Display header
  8. Has authorization been allowed? If yes then:
    1. Authorize the object (adds it to database and sends XMLRPC message)
    2. Output success or error message
  9. Else has authorization not been done yet? If yes then:
    1. Display object data, and authorization form (yes/no buttons)
  10. Display page footer
  11. Terminate script


This page is part of the Sloodle documentation
SloodleDocs Home | User Documentation | Administrator Documentation | Developer Documentation | Sloodle Wiki Home