EOT;
// the size is hardcoded in the boject obove intentionally because it is adjusted by the following function on-the-fly
$PAGE->requires->js_init_call('M.util.init_maximised_embed', array('resourceobject'), true);
return $code;
}
/**
* Returns general link or file embedding html.
* @param string $fullurl
* @param string $title
* @param string $clicktoopen
* @param string $mimetype
* @return string html
*/
function resourcelib_embed_general($fullurl, $title, $clicktoopen, $mimetype) {
global $CFG, $PAGE;
if ($fullurl instanceof moodle_url) {
$fullurl = $fullurl->out();
}
$param = '';
// Always use iframe embedding because object tag does not work much,
// this is ok in HTML5.
$code = <<
EOT;
// the size is hardcoded in the boject obove intentionally because it is adjusted by the following function on-the-fly
$PAGE->requires->js_init_call('M.util.init_maximised_embed', array('resourceobject'), true);
return $code;
}