From fffbb5594405c0bbf8733a0c4395ac5d88c057e2 Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Thu, 14 Feb 2013 09:09:11 -0500 Subject: [PATCH] Make hidden_module not cause 500 errors by adding a get_html() --- common/lib/xmodule/xmodule/hidden_module.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/hidden_module.py b/common/lib/xmodule/xmodule/hidden_module.py index d4f2a0fa33..e7639e63c8 100644 --- a/common/lib/xmodule/xmodule/hidden_module.py +++ b/common/lib/xmodule/xmodule/hidden_module.py @@ -3,7 +3,11 @@ from xmodule.raw_module import RawDescriptor class HiddenModule(XModule): - pass + def get_html(self): + if self.system.user_is_staff: + return "ERROR: This module is unknown--students will not see it at all" + else: + return "" class HiddenDescriptor(RawDescriptor):