src/Core/LTIX.php
public static function caliperSend($caliperBody, $content_type='application/json', &$debug_log=false)
    {

        $caliperURL = LTIX::ltiRawParameter('custom_sub_canvas_xapi_url');
        if ( strlen($caliperURL) == 0 ) {
            if ( is_array($debug_log) ) $debug_log[] = array('custom_sub_canvas_xapi_url not found in launch data');
            return false;
        }

        $key_key = self::ltiParameter('key_key');
        $secret = self::decrypt_secret(self::ltiParameter('secret'));

        $retval = LTI::sendJSONBody("POST", $caliperBody, $content_type,
            $caliperURL, $key_key, $secret, $debug_log);
        return $retval;
    }
public static function caliperSend($caliperBody, $content_type='application/json', &$debug_log=false)
    {

        $caliperURL = LTIX::ltiRawParameter('custom_sub_canvas_xapi_url');
        if ( strlen($caliperURL) == 0 ) {
            if ( is_array($debug_log) ) $debug_log[] = array('custom_sub_canvas_xapi_url not found in launch data');
            return false;
        }

        $key_key = self::ltiParameter('key_key');
        $secret = self::decrypt_secret(self::ltiParameter('secret'));

        $retval = LTI::sendJSONBody("POST", $caliperBody, $content_type,
            $caliperURL, $key_key, $secret, $debug_log);
        return $retval;
    }
public static function caliperSend ( $ caliperBody , $ content_type = 'application/json' , & $ debug_log = false ) { $ caliperURL = LTIX :: ltiRawParameter ( 'custom_sub_canvas_xapi_url' ) ; if ( strlen ( $ caliperURL ) == 0 ) { if ( is_array ( $ debug_log ) ) $ debug_log [ ] = array ( 'custom_sub_canvas_xapi_url not found in launch data' ) ; return false ; } $ key_key = self :: ltiParameter ( 'key_key' ) ; $ secret = self :: decrypt_secret ( self :: ltiParameter ( 'secret' ) ) ; $ retval = LTI :: sendJSONBody ( "POST" , $ caliperBody , $ content_type , $ caliperURL , $ key_key , $ secret , $ debug_log ) ; return $ retval ; }
Send a Caliper Body to the correct URL using the key and secret

This is not yet a standard or production - it uses the Canvas
extension only.
Send a Caliper Body to the correct URL using the key and secret