Skip to content

Commit

Permalink
Enable instructors to grab a learner's session
Browse files Browse the repository at this point in the history
show_in_read_only_mode is an attribute that is False by default, and
means that when an instructor is masquerading (that is, using the
LMS with "View this course as: Specific learner" option), the
XBlock is replaced by the text "This type of component cannot be shown
while viewing the course as a specific student"
(in lms/djangoapps/courseware/masquerade.py).

In our case, however, we do want an instructor to be able to
conveniently take over another learner's session.

Thus, set show_in_read_only_mode to True, so that the XBlock is
rendered even when masquerading.
  • Loading branch information
fghaas committed Aug 19, 2019
1 parent d58a6c6 commit c857855
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hastexo/hastexo.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ class HastexoXBlock(XBlock,
has_children = True
icon_class = 'problem'
block_settings_key = SETTINGS_KEY
show_in_read_only_mode = True

@classmethod
def parse_xml(cls, node, runtime, keys, id_generator):
Expand Down

0 comments on commit c857855

Please sign in to comment.