footerHeight +
imsnavHeight +
topMargin +
- bottomMargin;
+ bottomMargin + 20; // +20 to save a minor vertical scroll always present!
if (hasNav == true) {
var navBarWidth = document.getElementById('ims-menudiv').offsetWidth;
document.getElementById('ims-menudiv').style.height = (winHeight - totalHeight)+'px';
}
else {
- var iframeWidth = '99%';
+ var iframeWidth = (winWidth - 25)+'px';
}
if (hasNav == true) {
}
/// content - this produces everything else
$this->print_ims($cm, $course, $items, $resource, $page);
- /// moodle footer. no footer if it's in a popup - save space.
- if ($resource->popup) {
- echo "</div></div></body></html>";
- }
- else {
- /// Putting the footer inside one div to be able to handle it
- print_footer();
- }
+ /// no Moodle footer (because we cannot insert there the resize script).
+ echo "</div></div><script type=\"text/javascript\">resizeiframe($jsarg);</script></body></html>";
/// log it.
add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id);
}
/// prints iframe filled with $fullurl
- echo "<iframe id=\"".$contentframe."\" name=\"ims-contentframe\" src=\"{$fullurl}\"></iframe>"; //Content frame
+ echo "<iframe id=\"".$contentframe."\" name=\"".$contentframe."\" src=\"{$fullurl}\"></iframe>"; //Content frame
echo '</div>';
}