示例#1
0
            window.GLOBAL_ERROR = true;
            hideall();
            $("#spinner").hide();
            $("#redo").show();
            if ( window.GLOBAL_TIMER != false ) window.clearInterval(window.GLOBAL_TIMER);
            window.GLOBAL_TIMER = false;
            alert(e);
        }
        return false;
    }

    function gradeit() {
        $("#check").hide();
        $("#spinner").show();
        $.getJSON('<?php 
echo $context->addSession('grade.php');
?>
', function(data) {
            console.log(data);
            $("#spinner").hide();
            if ( data["status"] == "success") {
                $("#gradegood").show();
            } else {
                $("#gradebad").show();
            }
        });
        return false;
    }

$(document).ready( function() {
	$doc = $(window).height();
示例#2
0
文件: ads.php 项目: jesusvaz/ims-dev
ini_set("display_errors", 1);
// Load up the Basic LTI Support code
require_once '../ims-blti/blti.php';
// Establish the database connnection
require_once "db.php";
// Establish the context
$context = new BLTI(array('table' => 'blti_keys'));
if ($context->complete) {
    exit;
}
if (!$context->valid) {
    print "Could not establish context: " . $context->message . "<p>\n";
    exit;
}
// Start of the ad code
$self = $context->addSession($_SERVER['PHP_SELF']);
if (strpos($self, '?') > 0) {
    $selfp = $self . '&';
} else {
    $selfp = $self . '?';
}
$action = $_REQUEST['action'];
$message = false;
$title = false;
$description = false;
$idvalue = false;
// print_r($_REQUEST);
// AuthZ WHERE clause terms
$authzsql = "course_key=" . "'" . mysql_real_escape_string($context->getCourseKey()) . "'";
if (!$context->isInstructor()) {
    $authzsql = $authzsql . "AND user_key=" . "'" . mysql_real_escape_string($context->getUserKey()) . "'";