Sloodle required param

From SLIS Second Life Wiki
Jump to: navigation, search

Declaration

function sloodle_required_param($parname, $type)
Defined in: File.gif lib/sl_iolib.php


Summary

This function provides a Sloodle-friendly alternative to the moodle "required_param" funtion. It will fetch an HTTP request parameter of the name specified in parameter $parname, and parse/clean it as type $type. If successful, it will return the value directly. However, if it fails, it will terminate the script with an LSL-friendly error message (unlike the Moodle function, which renders an HTML error message). For a fuller discussion on why we need to strip the standard Moodle HTML away, see the Linker Script page.

  • Note: this is a global-function alternative to the member-function version found in the SloodleLSLRequest class. You can use this function if you do not have a SloodleLSLRequest object available. Otherwise, it is recommended that you use the member function version instead.


See Also


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