2004-09-12 17:34:35 +00:00
|
|
|
<?php // $Id$
|
2002-10-17 14:03:59 +00:00
|
|
|
|
2003-01-05 14:19:20 +00:00
|
|
|
require_once("../../config.php");
|
|
|
|
require_once("lib.php");
|
2003-11-27 19:09:47 +00:00
|
|
|
|
2002-10-17 14:03:59 +00:00
|
|
|
require_variable($id); // Course Module ID
|
|
|
|
|
2004-05-11 13:16:20 +00:00
|
|
|
if (!empty($CFG->forcelogin)) {
|
|
|
|
require_login();
|
|
|
|
}
|
|
|
|
|
2002-10-17 14:03:59 +00:00
|
|
|
if (! $cm = get_record("course_modules", "id", $id)) {
|
|
|
|
error("Course Module ID was incorrect");
|
|
|
|
}
|
|
|
|
|
|
|
|
if (! $resource = get_record("resource", "id", $cm->instance)) {
|
|
|
|
error("Resource ID was incorrect");
|
|
|
|
}
|
|
|
|
|
2004-07-25 14:32:05 +00:00
|
|
|
require ("$CFG->dirroot/mod/resource/type/$resource->type/resource.class.php");
|
2004-07-28 06:56:59 +00:00
|
|
|
$resourceclass = "resource_$resource->type";
|
2004-11-11 07:45:27 +00:00
|
|
|
$resourceinstance = new $resourceclass($cm->id);
|
2004-01-09 06:36:43 +00:00
|
|
|
|
2004-07-25 14:32:05 +00:00
|
|
|
$resourceinstance->display();
|
2002-10-17 14:03:59 +00:00
|
|
|
|
2003-12-06 07:34:55 +00:00
|
|
|
?>
|