Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/lti/locallib.php File Reference

Go to the source code of this file.

Namespaces

namespace  mod
 

Local Library of functions for module scorm.


Enumerations

enum  LTI_URL_DOMAIN_REGEX
enum  LTI_LAUNCH_CONTAINER_DEFAULT
enum  LTI_LAUNCH_CONTAINER_EMBED
enum  LTI_LAUNCH_CONTAINER_EMBED_NO_BLOCKS
enum  LTI_LAUNCH_CONTAINER_WINDOW
enum  LTI_LAUNCH_CONTAINER_REPLACE_MOODLE_WINDOW
enum  LTI_TOOL_STATE_ANY
enum  LTI_TOOL_STATE_CONFIGURED
enum  LTI_TOOL_STATE_PENDING
enum  LTI_TOOL_STATE_REJECTED
enum  LTI_SETTING_NEVER
enum  LTI_SETTING_ALWAYS
enum  LTI_SETTING_DELEGATE

Functions

 lti_view ($instance)
 lti_build_sourcedid ($instanceid, $userid, $launchid=null, $servicesalt)
 lti_build_request ($instance, $typeconfig, $course)
 lti_get_tool_table ($tools, $id)
 lti_split_custom_parameters ($customstr)
 lti_map_keyname ($key)
 lti_get_ims_role ($user, $cmid, $courseid)
 lti_get_type_config ($typeid)
 lti_get_tools_by_url ($url, $state, $courseid=null)
 lti_get_tools_by_domain ($domain, $state=null, $courseid=null)
 lti_filter_get_types ($course)
 lti_get_types_for_add_instance ()
 lti_get_domain_from_url ($url)
 lti_get_tool_by_url_match ($url, $courseid=null, $state=LTI_TOOL_STATE_CONFIGURED)
 lti_get_url_thumbprint ($url)
 lti_get_best_tool_by_url ($url, $tools, $courseid=null)
 lti_get_shared_secrets_by_key ($key)
 lti_delete_type ($id)
 lti_set_state_for_type ($id, $state)
 lti_get_config ($ltiobject)
 lti_get_type_config_from_instance ($id)
 lti_get_type_type_config ($id)
 lti_prepare_type_for_save ($type, $config)
 lti_update_type ($type, $config)
 lti_add_type ($type, $config)
 lti_add_config ($config)
 lti_update_config ($config)
 lti_sign_parameters ($oldparms, $endpoint, $method, $oauthconsumerkey, $oauthconsumersecret)
 lti_post_launch_html ($newparms, $endpoint, $debug=false)
 lti_get_type ($typeid)
 lti_get_launch_container ($lti, $toolconfig)
 lti_request_is_using_ssl ()
 lti_ensure_url_is_https ($url)

Enumeration Type Documentation

Definition at line 59 of file locallib.php.

Definition at line 60 of file locallib.php.

Definition at line 61 of file locallib.php.

Definition at line 62 of file locallib.php.

Definition at line 71 of file locallib.php.

Definition at line 72 of file locallib.php.

Definition at line 70 of file locallib.php.

Definition at line 65 of file locallib.php.

Definition at line 66 of file locallib.php.

Definition at line 67 of file locallib.php.

Definition at line 68 of file locallib.php.

Definition at line 57 of file locallib.php.


Function Documentation

lti_add_config ( config)

Add a tool configuration in the database

Parameters:
$configTool configuration
Returns:
int Record id number

Definition at line 958 of file locallib.php.

Here is the caller graph for this function:

lti_add_type ( type,
config 
)

Definition at line 907 of file locallib.php.

Here is the call graph for this function:

lti_build_request ( instance,
typeconfig,
course 
)

This function builds the request that must be sent to the tool producer

Parameters:
object$instanceBasic LTI instance object
object$typeconfigBasic LTI tool configuration
object$courseCourse object
Returns:
array $request Request details

Definition at line 222 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

lti_build_sourcedid ( instanceid,
userid,
launchid = null,
servicesalt 
)

Definition at line 191 of file locallib.php.

Here is the caller graph for this function:

lti_delete_type ( id)

Delete a Basic LTI configuration

Parameters:
int$idConfiguration id

Definition at line 707 of file locallib.php.

Definition at line 1134 of file locallib.php.

Here is the caller graph for this function:

lti_filter_get_types ( course)

Returns all basicLTI tools configured by the administrator

Definition at line 563 of file locallib.php.

lti_get_best_tool_by_url ( url,
tools,
courseid = null 
)

Definition at line 627 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

lti_get_config ( ltiobject)

Transforms a basic LTI object to an array

Parameters:
object$ltiobjectBasic LTI object
Returns:
array Basic LTI configuration details

Definition at line 735 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 596 of file locallib.php.

Here is the caller graph for this function:

lti_get_ims_role ( user,
cmid,
courseid 
)

Gets the IMS role string for the specified user and LTI course module.

Parameters:
mixed$userUser object or user id
int$cmidThe course module id of the LTI activity
Returns:
string A role string suitable for passing with an LTI launch

Definition at line 462 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

lti_get_launch_container ( lti,
toolconfig 
)

Definition at line 1100 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 673 of file locallib.php.

lti_get_tool_by_url_match ( url,
courseid = null,
state = LTI_TOOL_STATE_CONFIGURED 
)

Definition at line 604 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

lti_get_tool_table ( tools,
id 
)

Definition at line 327 of file locallib.php.

Here is the call graph for this function:

lti_get_tools_by_domain ( domain,
state = null,
courseid = null 
)

Definition at line 529 of file locallib.php.

Here is the caller graph for this function:

lti_get_tools_by_url ( url,
state,
courseid = null 
)

Definition at line 523 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

lti_get_type ( typeid)

Definition at line 1094 of file locallib.php.

lti_get_type_config ( typeid)

Returns configuration details for the tool

Parameters:
int$typeidBasic LTI tool typeid
Returns:
array Tool Configuration

Definition at line 500 of file locallib.php.

Here is the caller graph for this function:

Generates some of the tool configuration based on the instance details

Parameters:
int$id
Returns:
Instance configuration

Definition at line 752 of file locallib.php.

Here is the call graph for this function:

Generates some of the tool configuration based on the admin configuration details

Parameters:
int$id
Returns:
Configuration details

Definition at line 789 of file locallib.php.

Here is the call graph for this function:

Definition at line 575 of file locallib.php.

Here is the caller graph for this function:

Definition at line 610 of file locallib.php.

Here is the caller graph for this function:

lti_map_keyname ( key)

Used for building the names of the different custom parameters

Parameters:
string$keyParameter name
Returns:
string Processed name

Definition at line 440 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

lti_post_launch_html ( newparms,
endpoint,
debug = false 
)

Posts the launch petition HTML

Parameters:
$newparmsSigned parameters
$endpointURL of the external tool
$debugDebug (true/false)

Definition at line 1025 of file locallib.php.

Here is the caller graph for this function:

lti_prepare_type_for_save ( type,
config 
)

Definition at line 871 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1129 of file locallib.php.

Here is the caller graph for this function:

lti_set_state_for_type ( id,
state 
)

Definition at line 722 of file locallib.php.

lti_sign_parameters ( oldparms,
endpoint,
method,
oauthconsumerkey,
oauthconsumersecret 
)

Signs the petition to launch the external tool using OAuth

Parameters:
$oldparmsParameters to be passed for signing
$endpointurl of the external tool
$methodMethod for sending the parameters (e.g. POST)
$oauth_consumoer_keyKey
$oauth_consumoer_secretSecret
$submittextThe text for the submit button
$orgidLMS name
$orgdescLMS key

Definition at line 998 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

lti_split_custom_parameters ( customstr)

Splits the custom parameters field to the various parameters

Parameters:
string$customstrString containing the parameters
Returns:
Array of custom parameters

Definition at line 415 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

lti_update_config ( config)

Updates a tool configuration in the database

Parameters:
$configTool configuration
Returns:
Record id number

Definition at line 971 of file locallib.php.

Here is the caller graph for this function:

lti_update_type ( type,
config 
)

Definition at line 888 of file locallib.php.

Here is the call graph for this function:

lti_view ( instance)

Prints a Basic LTI activity

$param int $basicltiid Basic LTI activity id

Definition at line 79 of file locallib.php.

Here is the call graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations