Exemple #1
0
    if ($fileitem_allowed && $_POST['content_item_return_url']) {
        print '<p><form action="json/fileitem_json.php" method="post">' . "\n";
        foreach ($_POST as $k => $v) {
            print '<input type="hidden" name="' . $k . '" ';
            print 'value="' . htmlentities($v) . '"/>';
        }
        print '<input type="submit" value="Test FileItem Content Item"/>';
        print "</form></p>\n";
        $found = true;
    }
    if (!$found) {
        echo "<p>No Services are available for this launch.</p>\n";
    }
    print "<pre>\n";
    print "Context Information:\n\n";
    print htmlent_utf8($context->dump());
    print "</pre>\n";
} else {
    print "<p style=\"color:red\">Could not establish context: " . $context->message . "<p>\n";
}
print "<p>Base String:<br/>\n";
print htmlent_utf8($context->basestring);
print "<br/></p>\n";
echo '<a href="basecheck.php?b=' . urlencode($context->basestring) . '" target="_blank">Compare This Base String</a><br/>';
print "<br/></p>\n";
print "<pre>\n";
print "Raw POST Parameters:\n\n";
ksort($_POST);
foreach ($_POST as $key => $value) {
    if (get_magic_quotes_gpc()) {
        $value = stripslashes($value);
Exemple #2
0
    $line = fgets($fh);
    $line = str_replace("&", "&amp;", $line);
    $line = str_replace("<", "&lt;", $line);
    echo $line;
}
fclose($fh);
?>
</div>
<div id="footer">
<br clear="all"/>
<center>
This autograder is based on <a href="http://skulpt.org/" target="_new">Skulpt</a>.
</center>
</div>
<?php 
print "<!--\n";
print "Context Information:\n\n";
print $context->dump();
print "\nSESSION Parameters:\n\n";
ksort($_SESSION);
foreach ($_SESSION as $key => $value) {
    if (get_magic_quotes_gpc()) {
        $value = stripslashes($value);
    }
    print "{$key}={$value} (" . mb_detect_encoding($value) . ")\n";
}
print "-->";
?>
</div>
</body>
Exemple #3
0
        print "<p>\n";
        print '<a href="ext/setting.php?id=' . htmlentities($_POST['ext_ims_lti_tool_setting_id']);
        print '&key=' . urlencode($_POST['oauth_consumer_key']);
        print '&url=' . urlencode($_POST['ext_ims_lti_tool_setting_url']) . '">';
        print 'Test Sakai Settings API</a>.</p>' . "\n";
        $found = true;
    }
    if (!$found) {
        echo "<p>This launch did not include the necessary settings for any of the ";
        echo "Sakai External Tool API such as:\n<pre>\n";
        echo "ext_ims_lis_memberships_url\next_ims_lis_basic_outcome_url\next_ims_lti_tool_setting_url\n";
        echo "</pre>\n</p>\n";
    }
    print "<pre>\n";
    print "Context Information:\n\n";
    print htmlentities($context->dump());
    print "</pre>\n";
} else {
    print "<p style=\"color:red\">Could not establish context: " . $context->message . "<p>\n";
}
print "<p>Base String:<br/>\n";
print htmlentities($context->basestring);
print "<br/></p>\n";
print "<pre>\n";
print "Raw POST Parameters:\n\n";
ksort($_POST);
foreach ($_POST as $key => $value) {
    if (get_magic_quotes_gpc()) {
        $value = stripslashes($value);
    }
    print htmlentities($key) . "=" . htmlentities($value) . " (" . mb_detect_encoding($value) . ")\n";
Exemple #4
0
        $url->param('lti_msg', $msg);
        $url->param('lti_log', 'LTI log entry');
        $links[] = html_writer::link($url, 'Return to tool consumer with a message');
        $url->remove_params(array('lti_msg', 'lti_log'));
        $url->param('lti_errormsg', $error_msg);
        $url->param('lti_errorlog', 'LTI error entry: ' . $error_msg);
        $links[] = html_writer::link($url, 'Return to tool consumer with an error');
        if (!empty($sourcedid) and !empty($outcomeurl)) {
            $gradingurl = new moodle_url('/mod/equella/tools/ltigrading.php', array('lis_result_sourcedid' => $sourcedid, 'lis_outcome_service_url' => $outcomeurl));
            $links[] = html_writer::link($gradingurl, 'Send grade via LTI');
        }
        echo html_writer::alist($links);
    }
    echo $OUTPUT->heading('Context Information:', 6);
    //$lticontext->dump(false);
    echo html_writer::tag('pre', $lticontext->dump());
} else {
    echo $OUTPUT->notification("Could not establish context: " . $lticontext->message);
}
echo $OUTPUT->heading('Base String:', 6);
echo html_writer::tag('pre', $lticontext->basestring);
if (!empty($_POST)) {
    echo $OUTPUT->heading("Raw POST Parameters:", 6);
    echo html_writer::start_tag('pre');
    ksort($_POST);
    foreach ($_POST as $key => $value) {
        print "{$key}={$value} (" . mb_detect_encoding($value) . ")\n";
    }
    echo html_writer::end_tag('pre');
}
if (!empty($_GET)) {