diff --git a/mod/glossary/view.php b/mod/glossary/view.php index 0f90eef231d..b37f55c0638 100644 --- a/mod/glossary/view.php +++ b/mod/glossary/view.php @@ -396,7 +396,8 @@ $ratings = NULL; $ratingsmenuused = false; - if ($glossary->assessed and !empty($USER->id)) { + if ($glossary->assessed and isloggedin() and !isguestuser()) { + $ratings = new object(); if ($ratings->scale = make_grades_menu($glossary->scale)) { $ratings->assesstimestart = $glossary->assesstimestart; $ratings->assesstimefinish = $glossary->assesstimefinish; @@ -499,10 +500,9 @@ } echo ""; } - if ($entriesshown ) { - echo ""; - } else if (!empty($formsent)) { - // close the form properly if not used + + if (!empty($formsent)) { + // close the form properly if used echo ""; echo ""; }