本文整理匯總了PHP中Tsugi\Core\LTIX::signParameters方法的典型用法代碼示例。如果您正苦於以下問題:PHP LTIX::signParameters方法的具體用法?PHP LTIX::signParameters怎麽用?PHP LTIX::signParameters使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Tsugi\Core\LTIX
的用法示例。
在下文中一共展示了LTIX::signParameters方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isset
echo "<h1>" . htmlent_utf8($title) . "</h1>\n";
echo "<p>" . htmlent_utf8($text) . "</p>\n";
$script = isset($REGISTER_LTI2['script']) ? $REGISTER_LTI2['script'] : "index.php";
$path = $CFG->wwwroot . '/' . str_replace("register.php", $script, $path);
// Title is for the href and text is for display
$json = LTI::getLtiLinkJSON($path, $title, $title, false, $fa_icon);
$retval = json_encode($json);
$parms = array();
$parms["lti_message_type"] = "ContentItemSelection";
$parms["lti_version"] = "LTI-1p0";
$parms["content_items"] = $retval;
$data = LTIX::postGet('data');
if ($data) {
$parms['data'] = $data;
}
$parms = LTIX::signParameters($parms, $result_url, "POST", "Install Tool");
$endform = '<a href="index.php" class="btn btn-warning">Back to Store</a>';
$content = LTI::postLaunchHTML($parms, $result_url, true, false, $endform);
echo $content;
} else {
echo '<div style="border: 2px, solid, red;" class="card">';
if ($fa_icon) {
echo '<a href="index.php?install=' . urlencode($tool) . '">';
echo '<i class="fa ' . $fa_icon . ' fa-2x" style="color: #1894C7; float:right; margin: 2px"></i>';
echo '</a>';
}
echo '<p><strong>' . htmlent_utf8($title) . "</strong></p>";
echo '<p>' . htmlent_utf8($text) . "</p>\n";
echo '<center><a href="index.php?install=' . urlencode($tool) . '" class="btn btn-default" role="button">Details</a></center>';
echo "</div>\n";
}