Always show solutions for teachers
This commit is contained in:
parent
5eadff662d
commit
a47a41d351
|
|
@ -49,7 +49,8 @@ class ContentBlockNode(DjangoObjectType):
|
||||||
def resolve_contents(self, info, **kwargs):
|
def resolve_contents(self, info, **kwargs):
|
||||||
updated_stream_data = []
|
updated_stream_data = []
|
||||||
for content in self.contents.stream_data:
|
for content in self.contents.stream_data:
|
||||||
if content['type'] == 'solution' and not are_solutions_enabled_for(info.context.user, self.module):
|
# only show solutions to teachers and students for whom their teachers have them enabled
|
||||||
|
if content['type'] == 'solution' and not (are_solutions_enabled_for(info.context.user, self.module) or info.context.user.is_teacher()):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if content['type'] == 'content_list_item':
|
if content['type'] == 'content_list_item':
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue