With the help of your Moodle administrator, you can make CourseArc content appear more seamless and size appropriately within Moodle by adding a snippet of Javascript to your theme.
- Make sure you have administrator access to Moodle, or contact your administrator to continue.
- In Moodle, navigate to Site Administration > Appearance > Additional HTML.
- In the Before BODY is closed field, paste the following code:
<script type="text/javascript">
window.addEventListener('message', function(e) {
if (typeof e.data === "string") {
var message = JSON.parse(e.data);
} else if (typeof e.data === "object") {
var message = e.data
}
if (typeof message === "object") {
if (message.subject == 'lti.frameResize') {
var height = message.height;
if (height <= 0) height = 1;
document.getElementById('contentframe').style.height = height + 'px';
}
if (message.subject == 'lti.scrollToTop') {
document.body.scrollTop = document.documentElement.scrollTop = 0;
}
}
});
</script>- Click the Save changes button to update the code.
Note: These instructions were tested in Moodle 3.1 and may vary slightly for your version of Moodle.

Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article