From 34fb06515c8723ea565768bdf1da6b38381d2fc2 Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 9 Nov 2003 03:35:36 +0000 Subject: [PATCH] if the glossary is at site-level then don't require a login --- mod/glossary/print.php | 12 +++++++----- mod/glossary/view.php | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/mod/glossary/print.php b/mod/glossary/print.php index 51a0dc0648..5a97381ebb 100644 --- a/mod/glossary/print.php +++ b/mod/glossary/print.php @@ -25,10 +25,12 @@ 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 = ''; @@ -167,4 +169,4 @@ echo ''; echo ''; } -?> \ No newline at end of file +?> diff --git a/mod/glossary/view.php b/mod/glossary/view.php index 786a5b54d8..27d7f0bb66 100644 --- a/mod/glossary/view.php +++ b/mod/glossary/view.php @@ -39,7 +39,9 @@ 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")); } -- 2.39.5