getConfigSetting("ServiceName"); $Email = $Plugin->getConfigSetting("AdminEmail"); if (strlen($Email) == 0) { $IntConfig = InterfaceConfiguration::getInstance(); $Email = $IntConfig->getString("AdminEmail"); } $MailtoLink = "mailto:".$Email ."?subject=".rawurlencode($ServiceName." error") ."&body=".rawurlencode($DebuggingInfo); ?>

ERROR: Could not validate LTI launch.

This most frequently occurs when could not set a browser cookie to identify itself to your LMS.

If you are using Firefox and you have enabled enhanced tracking protection, that can cause the issue. Please add an exception for this site by clicking the shield icon in your address bar and toggling the Enhanced Tracking Protection setting:
gUIFileTagAbs("LTIState_FirefoxTracking.jpg") ?>

Otherwise, it may be the case that your browser has revoked permission to embed content and now requires an additional confirmation to embed content again. Reloading this page should prompt you for permission.

If reloading does not resolve the issue, please clear your cache and cookies.

In Chrome, select Delete Browsing Data... from the Chrome menu, then check the Cookies and other site data and Cached images and files boxes, then click Delete data:
gUIFileTagAbs("LTIState_ChromeClear.jpg") ?>

In Firefox, select Clear Recent History... from the History menu, check the Cookies and site data and Temporary cached files and pages boxes, then press Clear:
gUIFileTagAbs("LTIState_FirefoxClear.jpg") ?>

In Safari, select Clear History... from the History menu, then press the Clear History button:
gUIFileTagAbs("LTIState_SafariClear.jpg") ?>

Ifthe above steps do not resolve the error, please contact and provide the following debugging information.

Debugging information:

getConfigSetting("PreferredFileField"); $Files = []; if (!is_null($PreferredFileField) && strlen($PreferredFileField) > 0) { $Files = $Record->get($PreferredFileField, true); } if (count($Files) == 0) { $Files = $Record->getMapped("File", true); } # if no attached files, embed the site in an iframe if (count($Files) == 0) { $PreferredUrlField = $Plugin->getConfigSetting("PreferredUrlField"); $Url = ""; if (!is_null($PreferredUrlField) && strlen($PreferredUrlField) > 0) { $Url = $Record->get($PreferredUrlField) ?? ""; } if (strlen($Url) == 0) { $Url = $Record->getMapped("Url"); } # if this is a youtube URL, use their embed code to display it if (preg_match("%^https://www\.youtube\.com/watch\?v=([A-Za-z0-9_-]+)%", $Url, $Matches)) { print '
'; return; } if ($Plugin->canEmbedUrl($Url)) { print "
"; } else { $Screenshot = $Record->getMapped("Screenshot", true); if (count($Screenshot) > 0) { $Screenshot = reset($Screenshot); print "
" .$Screenshot->getHtml("mv-image-screenshot") ."
" ."

## ".$Record->getMapped("Title")."

" ."

".$Url."

" ."
".$Record->getMapped("Description")."
" ."
" ."
"; } else { print "
" ."
" ."

## ".$Record->getMapped("Title")."

" ."

".$Url."

" ."
".$Record->getMapped("Description")."
" ."
" ."
"; } } return; } # otherwise, embed each file foreach ($Files as $Id => $File) { $MimeType = $File->getMimeType(); $FileUrl = $AF->baseUrl().$File->getLink(); switch ($MimeType) { # use img tags for commonly supported formats # see https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types case "image/apng": case "image/avif": case "image/gif": case "image/jpeg": case "image/png": case "image/xvg+xml": case "image/webp": print ""; break; # object tags for PDF case "application/pdf": print "
"; break; # video tags for video files case "video/webm": case "video/mp4": print "" ."" .""; break; # audio tags for audio files case "audio/mpeg": print ""; break; # otherwise provide a download link for things we do not know how to embed default: print "".$File->name().""; break; } } } /** * Output the HTML footer to load the CSS and JS. */ function printHtmlFooter() : void { $AF = ApplicationFramework::getInstance(); # css manually included because StdPageStart/End is not loaded by this page # (disable phpcs whitespace checks so that we don't have to make our # markup ugly and confusing to please them) // phpcs:disable Generic.WhiteSpace.ScopeIndent.IncorrectExact // phpcs:disable Generic.WhiteSpace.ScopeIndent.Incorrect ?>
".$H_Error.""; return; } if (!isset($H_RecordIds)) { throw new Exception("H_RecordIds not defined."); } if (!isset($H_Plugin)) { throw new Exception("H_Plugin is not defined."); } # ----- DISPLAY -------------------------------------------------------------- if (count($H_RecordIds) == 0) { print "

ERROR: No selected resources are publicly-visible.

"; return; } $Html = $H_Plugin->getCachedRecordListHtml($H_RecordIds); if (is_null($Html)) { ob_start(); foreach ($H_RecordIds as $RecordId) { $Record = new Record($RecordId); printRecord($H_Plugin, $Record); } printHtmlFooter(); $Html = ob_get_clean(); $H_Plugin->cacheRecordListHtml($H_RecordIds, $Html); } print $Html;