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. 

  1. Make sure you have administrator access to Moodle, or contact your administrator to continue.
     
  2. In Moodle, navigate to Site Administration > Appearance > Additional HTML.

  3. 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>
  1. 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.  


screenshot of Moodle Administration page under "Additional HTML"