get_record('course', array('id' => $id), '*', MUST_EXIST); } else { print_error('You must specify a course ID'); } require_login($course); $PAGE->set_url('/mod/exp360/index.php', array('id' => $id)); $PAGE->set_title($course->shortname); $PAGE->set_heading($course->fullname); $PAGE->set_context(context_course::instance($course->id)); echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('modulenameplural', 'exp360')); if (!$exp360s = get_all_instances_in_course('exp360', $course)) { notice(get_string('noexp360s', 'exp360'), new moodle_url('/course/view.php', array('id' => $course->id))); } foreach ($exp360s as $exp360) { $url = new moodle_url('/mod/exp360/view.php', array('id' => $exp360->coursemodule)); echo html_writer::link($url, format_string($exp360->name)); } echo $OUTPUT->footer();