course)) { error("Course is misconfigured"); } if (! $resource = get_record("resource", "id", $cm->instance)) { error("Resource ID was incorrect"); } $content = resource_fetch_remote_file($cm, $url); echo format_text($content->results,FORMAT_HTML); ?>