Files
edx-platform/common/lib/xmodule/xmodule/hidden_module.py
Feanil Patel 9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00

21 lines
417 B
Python

from xmodule.raw_module import RawDescriptor
from xmodule.x_module import XModule
class HiddenModule(XModule):
HIDDEN = True
def get_html(self):
if self.system.user_is_staff:
return u"ERROR: This module is unknown--students will not see it at all"
else:
return u""
class HiddenDescriptor(RawDescriptor):
module_class = HiddenModule
resources_dir = None