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 Sep 15, 2023
1 parent cc7f9f1 commit 8c7c0cd
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 @@ -248,6 +248,7 @@ class HastexoXBlock(XBlock,
has_children = True
icon_class = 'problem'
block_settings_key = SETTINGS_KEY
show_in_read_only_mode = True

def parse_attributes(tag, node, block):
"""
Expand Down

0 comments on commit 8c7c0cd

Please sign in to comment.