コード例 #1
0
ファイル: play.php プロジェクト: jak786/xerteonlinetoolkits
             echo "Error No: " . $e->getCode() . " - " . $e->getMessage() . "<br />";
             echo nl2br($e->getTraceAsString());
         }
     }
 }
 if (!isset($lti)) {
     require_once 'LTI/ims-lti/UoN_LTI.php';
     if (strlen($xerte_toolkits_site->database_table_prefix) > 0) {
         $lti = new UoN_LTI($mysqli, array('table_prefix' => $xerte_toolkits_site->database_table_prefix));
     } else {
         $lti = new UoN_LTI($mysqli);
     }
     if (session_id() == '') {
         session_start();
     }
     $lti->init_lti();
 }
 if ($lti->valid) {
     $success = true;
     unset($errors);
 } else {
     $returnedproc = login_processing(false);
     list($success, $errors) = $returnedproc;
 }
 if ($success && empty($errors)) {
     //sucessfull authentication
     db_query("UPDATE {$xerte_toolkits_site->database_table_prefix}templatedetails SET number_of_uses=number_of_uses+1 WHERE template_id=?", array($safe_template_id));
     show_template($row_play);
 } else {
     html_headers();
     login_prompt($errors);
コード例 #2
0
ファイル: LTItest.php プロジェクト: vinod-co/centa
<?php

// This file is part of Rogō
//
// Rogō is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Rogō is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Rogō.  If not, see <http://www.gnu.org/licenses/>.
require_once 'ims-lti\\UoN_LTI.php';
$root = str_replace('/include', '/', str_replace('\\', '/', dirname(__FILE__)));
$root = $root . '/../';
require_once $root . 'include/load_config.php';
require_once $cfg_web_root . 'classes/dbutils.class.php';
$mysqli = DBUtils::get_mysqli_link($cfg_db_host, $cfg_db_username, $cfg_db_passwd, $cfg_db_database, $cfg_db_charset, $notice, $dbclass);
$lti = new UoN_LTI($mysqli);
$lti->init_lti0($mysqli);
$lti->init_lti(true, false);
print "<pre>";
print_r($lti);
var_dump($lti);
echo $lti->dump();
print "</pre>";