예제 #1
0
        $url .= "bubble=distinct";
    }
    return $url;
}
if (isset($_REQUEST['get_link'])) {
    $response = sendOAuthGET(doBubble($link_url), $oauth_consumer_key, $oauth_consumer_secret, $content_type);
    $debugin = get_get_sent_debug();
    $debugout = get_get_received_debug();
} else {
    if (isset($_REQUEST['get_tool'])) {
        $response = sendOAuthGET(doBubble($tool_url), $oauth_consumer_key, $oauth_consumer_secret, $content_type);
        $debugin = get_get_sent_debug();
        $debugout = get_get_received_debug();
    } else {
        if (isset($_REQUEST['get_proxy'])) {
            $response = sendOAuthGET(doBubble($proxy_url), $oauth_consumer_key, $oauth_consumer_secret, $content_type);
            $debugin = get_get_sent_debug();
            $debugout = get_get_received_debug();
        } else {
            if (isset($_REQUEST['set_link'])) {
                $postBody = true;
                $response = sendOAuthBody("PUT", $link_url, $oauth_consumer_key, $oauth_consumer_secret, $content_type, $settings);
                $debugin = get_body_sent_debug();
                $debugout = get_body_received_debug();
            } else {
                if (isset($_REQUEST['set_tool'])) {
                    $postBody = true;
                    $response = sendOAuthBody("PUT", $tool_url, $oauth_consumer_key, $oauth_consumer_secret, $content_type, $settings);
                    $debugin = get_body_sent_debug();
                    $debugout = get_body_received_debug();
                } else {
예제 #2
0
?>
"/>
Comment: <input type="text" name="comment" value="<?php 
echo htmlent_utf8($comment);
?>
"/>
(i.e. 0.95)<br/>
</p><p>
<input type='submit' name='get' value="Get Result">
<input type='submit' name='set' value="Set Result">
</form>
<?php 
$postBody = false;
$content_type = "application/vnd.ims.lis.v2.result+json";
if (isset($_REQUEST['get'])) {
    $response = sendOAuthGET($result_url, $oauth_consumer_key, $oauth_consumer_secret, "application/vnd.ims.lis.v2.result+json");
    $debugin = get_get_sent_debug();
    $debugout = get_get_received_debug();
} else {
    if (isset($_REQUEST['set'])) {
        $addStructureRequest = getResultJSON($_REQUEST['grade'], $_REQUEST['comment']);
        $postBody = indent(json_encode($addStructureRequest));
        $response = sendOAuthBody("PUT", $result_url, $oauth_consumer_key, $oauth_consumer_secret, $content_type, $postBody);
        $debugin = get_body_sent_debug();
        $debugout = get_body_received_debug();
    } else {
        exit;
    }
}
global $LastOAuthBodyBaseString;
$lbs = $LastOAuthBodyBaseString;