Exemple #1
0
 /**
  * getLaunchContent - Get the launch data for am LTI ContentItem launch
  */
 public static function getLaunchContent($endpoint, $debug = false)
 {
     $info = LTIX::getKeySecretForLaunch($endpoint);
     if ($info === false) {
         return '<p style="color:red">Unable to load key/secret for ' . htmlentities($endpoint) . "</p>\n";
     }
     $key = $info['key'];
     $secret = $info['secret'];
     $parms = LTIX::getLaunchData();
     $parms = LTI::signParameters($parms, $endpoint, "POST", $key, $secret, "Button");
     $content = LTI::postLaunchHTML($parms, $endpoint, false);
     return $content;
 }