dirroot.'/mod/expcontent/lib.php'); require_once($CFG->libdir.'/completionlib.php'); $id = required_param('id', PARAM_INT); list ($course, $cm) = get_course_and_cm_from_cmid($id, 'expcontent'); $expcontent = $DB->get_record('expcontent', array('id'=> $cm->instance), '*', MUST_EXIST); $expconfig = get_config('mod_expcontent'); $baseurl = $expconfig->baseurl; $completion = new completion_info($course); $completion->set_module_viewed($cm); if ($baseurl[-1] != "/") $baseurl += "/"; ?>