Let admins see answers of problems at any time
This commit is contained in:
@@ -347,6 +347,10 @@ class CapaModule(XModule):
|
||||
if self.show_answer == "never":
|
||||
return False
|
||||
|
||||
# Admins can see the answer, unless the problem explicitly prevents it
|
||||
if self.system.user_is_staff:
|
||||
return True
|
||||
|
||||
if self.show_answer == 'attempted':
|
||||
return self.attempts > 0
|
||||
|
||||
|
||||
@@ -765,6 +765,7 @@ class ModuleSystem(object):
|
||||
self.replace_urls = replace_urls
|
||||
self.node_path = node_path
|
||||
self.anonymous_student_id = anonymous_student_id
|
||||
self.user_is_staff = user.is_staff
|
||||
|
||||
def get(self, attr):
|
||||
''' provide uniform access to attributes (like etree).'''
|
||||
|
||||
Reference in New Issue
Block a user