]> git.mjollnir.org Git - moodle.git/commitdiff
Print view isn't accesible if the activity is hidden.
authorstronk7 <stronk7>
Tue, 16 Nov 2004 23:36:35 +0000 (23:36 +0000)
committerstronk7 <stronk7>
Tue, 16 Nov 2004 23:36:35 +0000 (23:36 +0000)
Bug 1837
(http://moodle.org/bugs/bug.php?op=show&bugid=1837)

Merged from MOODLE_14_STABLE

mod/glossary/print.php
mod/glossary/view.php

index 41824631ca13387906ae5b03619169036fd38873..326120cedd889884d6aa473e1ef8c8b21e95608b 100644 (file)
 
     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) ) {
index 24999275658c75c59a8217998442ed0478ef90f8..b7496ec415f75265d692e22bcb7d20aebe17a9d2 100644 (file)
         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&amp;tab=$tab", $glossary->id, $cm->id);