get_record('course', array('id' => $cm->course), '*', MUST_EXIST); $exp360 = $DB->get_record('exp360', array('id' => $cm->instance), '*', MUST_EXIST); } else if ($n) { $exp360 = $DB->get_record('exp360', array('id' => $n), '*', MUST_EXIST); $course = $DB->get_record('course', array('id' => $exp360->course), '*', MUST_EXIST); $cm = get_coursemodule_from_instance('exp360', $exp360->id, $course->id, false, MUST_EXIST); } else { print_error('You must specify a course_module ID or an instance ID'); } require_login($course, true, $cm); $PAGE->set_url('/mod/exp360/view.php', array('id' => $cm->id)); $PAGE->set_title(format_string($exp360->name)); $PAGE->set_heading(format_string($course->fullname)); echo $OUTPUT->header(); $content_id = $exp360->content_id; $activity_name = $exp360->name; echo ""; echo $OUTPUT->footer();