104 if ($this->object->getOfflineStatus() ||
105 $this->
object->isLaunchMethodEmbedded() ||
111 $this->object->getId(),
112 $this->
user->getId(),
113 $this->
object->getProvider()->getPrivacyIdent()
116 if ($user_ident ==
'' || $user_ident == null) {
122 $context = $ilLTIConsumerLaunch->getContext();
123 $contextType = $ilLTIConsumerLaunch::getLTIContextType($context[
"type"]);
124 $contextId = $context[
"id"];
125 $contextTitle = $context[
"title"];
128 $this->dic->user()->getId(),
129 $this->
object->getRefId(),
130 $this->
object->getId()
133 $returnUrl = !$this->
object->isLaunchMethodOwnWin() ?
'' : str_replace(
136 ILIAS_HTTP_PATH .
"/" . $this->dic->ctrl()->getLinkTarget($this,
"",
"",
false)
139 $launchParameters = $this->
object->buildLaunchParameters(
148 $target = $this->
object->getLaunchMethod() ==
"newWin" ?
"_blank" :
"_self";
149 $button =
'<input class="btn btn-default ilPre" type="button" onClick="ltilaunch()" value = "' . $this->lng->txt(
"show_content") .
'" />';
150 $output =
'<form id="lti_launch_form" name="lti_launch_form" action="' . $this->
object->getProvider()->getProviderUrl() .
'" method="post" target="' . $target .
'" encType="application/x-www-form-urlencoded">';
151 foreach ($launchParameters as $field => $value) {
152 $output .= sprintf(
'<input type="hidden" name="%s" value="%s" />', $field, $value) .
"\n";
155 $output .=
'</form>';
156 $output .=
'<span id ="lti_launched" style="display:none">' . $this->lng->txt(
"launched") .
'</span>';
157 $output .=
'<script type="text/javascript"> 158 function ltilaunch() { 159 document.lti_launch_form.submit(); 160 document.getElementById("lti_launch_form").style.display = "none"; 161 document.getElementById("lti_launched").style.display = "inline";
static fillToken($usrId, $refId, $objId, $lrsTypeId=0)
static getIdent($userIdentMode, ilObjUser $user)