Fileref:login/sl loginzone entry.php

From SLIS Second Life Wiki

Folder.gif (parent)

If accessed by a Moodle user who does not have a registered avatar, this Interface Script will allocate a new loginzone position to a user, providing them with a SLurl to teleport to in-world. The teleport point will be inside the Sloodle Login Zone object, allowing confirmation of avatar ownership. If the Moodle user already has a linked Sloodle user, then not loginzone position is allocated, and a SLurl to a point outside the loginzone is generated.


Dependencies

Sloodle files:


Algorithm

  1. Require user login
  2. Display page header
  3. If user is a guest: display error message and terminate
  4. Construct a SloodleUser object
  5. Assign the user's Moodle ID in the user object
  6. Attempt to find a linked Sloodle user (avatar)
  7. If an error occurred in finding the Sloodle user then:
    1. Output an error message
  8. Else if the user has a fully registered avatar then:
    1. Generate SLurl for point outside LoginZone
    2. Display message with SLurl
  9. Else:
    1. If user does not already have a partially registered Sloodle account then:
      1. Create a new Sloodle entry
    2. If the has no existing loginzone position, or if it has expired, then:
      1. Generate a new loginzone position
    3. Else:
      1. Renew current loginzone position
    4. Get the loginzone region
    5. If successful, generate and display a SLurl for the loginzone
  10. Display page footer
  11. Terminate script


This page is part of the SLOODLE documentation
Docs: Users | Administrators | Developers
Wiki Frontpage Sloodle.org
Toolbox
LANGUAGES