error("Course module is incorrect");
}
- require_login($course->id);
- if (isguest()) {
- error("You must be logged to use this page.");
- }
+ if ($course->category) {
+ require_login($course->id);
+ if (isguest()) {
+ error("You must be logged to use this page.");
+ }
+ }
if ( $eid ) {
$l = '';
echo '</table>';
echo '</center>';
}
-?>
\ No newline at end of file
+?>
error("Course module is incorrect");
}
- require_login($course->id);
+ if ($course->category) {
+ require_login($course->id);
+ }
if (!$cm->visible and !isteacher($course->id)) {
notice(get_string("activityiscurrentlyhidden"));
}