Skip to content

Commit

Permalink
Merged blog RSS fix MDL-7251
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Oct 27, 2006
1 parent 62eb037 commit 72f383b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions rss/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,20 @@

//Check name of module
if (!$isblog) {
$mods = get_list_of_plugins("mod");
$mods = get_list_of_plugins('mod');
if (!in_array(strtolower($modulename), $mods)) {
rss_not_found();
}
//Get course_module to check it's visible
if (!$cm = get_coursemodule_from_instance($modulename,$instance,$courseid)) {
rss_not_found();
}
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
$isuser = has_capability('moodle/course:view', $context, $userid); // Not ideal, this should be module-specific, but deferring until RSS gets a revamp with codes in the URLs
} else {
$context = get_context_instance(CONTEXT_COURSE, $course->id);
$isuser = has_capability('moodle/course:view', $context, $userid);
}

//Get course_module to check it's visible
if (!$isblog && (!$cm = get_coursemodule_from_instance($modulename,$instance,$courseid)) ) {
rss_not_found();
}

$context = get_context_instance(CONTEXT_MODULE, $cm->id);
$isuser = has_capability('moodle/course:view', $context, $userid);

//Check for "security" if !course->guest or course->password
if ($course->id != SITEID) {
Expand Down

0 comments on commit 72f383b

Please sign in to comment.