From 2b99ea9efb6d65a2e8e63a0c4ea3a25af0266f04 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Tue, 16 Nov 2004 23:36:35 +0000 Subject: [PATCH] Print view isn't accesible if the activity is hidden. Bug 1837 (http://moodle.org/bugs/bug.php?op=show&bugid=1837) Merged from MOODLE_14_STABLE --- mod/glossary/print.php | 4 ++++ mod/glossary/view.php | 1 + 2 files changed, 5 insertions(+) diff --git a/mod/glossary/print.php b/mod/glossary/print.php index 41824631ca..326120cedd 100644 --- a/mod/glossary/print.php +++ b/mod/glossary/print.php @@ -41,6 +41,10 @@ require_course_login($course); + if (!$cm->visible and !isteacher($course->id)) { + notice(get_string("activityiscurrentlyhidden")); + } + /// setting the default values for the display mode of the current glossary /// only if the glossary is viewed by the first time if ( $dp = get_record('glossary_formats','name', $glossary->displayformat) ) { diff --git a/mod/glossary/view.php b/mod/glossary/view.php index 2499927565..b7496ec415 100644 --- a/mod/glossary/view.php +++ b/mod/glossary/view.php @@ -111,6 +111,7 @@ require_login($course->id); } if (!$cm->visible and !isteacher($course->id)) { + print_header(); notice(get_string("activityiscurrentlyhidden")); } add_to_log($course->id, "glossary", "view", "view.php?id=$cm->id&tab=$tab", $glossary->id, $cm->id); -- 2.39.5