function show_atom($summary, $annotations) { global $CFG; $annotationobjs = array(); foreach ($annotations as $annotationrec) { $annotationobjs[] = annotation_globals::record_to_annotation($annotationrec); } MarginaliaHelper::generateAnnotationFeed($annotationobjs, annotation_globals::get_feed_tag_uri(), MarginaliaHelper::getLastModified($annotationObjs, annotation_globals::get_install_date()), annotation_globals::get_service_path(), annotation_globals::get_host(), $summary->get_feed_url('atom'), $CFG->wwwroot); }
function moodle_annotation_service($userid) { global $CFG; // Note: Cross-site request forgery protection requires cookies, so it will not be // activated if $CFG->usesid=true $csrfprotect = !empty($CFG->usesid) && $CFG->usesid; AnnotationService::AnnotationService(annotation_globals::get_host(), annotation_globals::get_service_path(), annotation_globals::get_install_date(), $userid, array('baseUrl' => $CFG->wwwroot, 'csrfCookie' => $csrfprotect ? null : 'MoodleSessionTest' . $CFG->sessioncookie, 'csrfCookieValue' => $csrfprotect ? null : $_SESSION['SESSION']->session_test)); $this->tablePrefix = $CFG->prefix; }