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.

Co-authored-by: Maari Tamm <[email protected]>
  • Loading branch information
fghaas and Maari Tamm committed Sep 26, 2024
1 parent ed39fff commit b204745
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Unreleased
-------------------------
* [Enhancement] Enable `show_in_read_only_mode` XBlock attribute
to allow instuctors to use this XBlock while masquerading
as a specific learner.

Version 7.12.0 (2024-08-06)
-------------------------
* [Enhancement] Add support for the Open edX Redwood release.
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,14 @@ as usual, with the child element referring to it by URL name:

Child blocks will always be rendered _above_ the terminal.

### Using the hastexo XBlock while masquerading as a specific learner

Instructors can use the hastexo XBlock lab environments when masquerading as a specific learner by using the "View this course as:" option in the LMS staff header.

The learner will not know when an instructor is using their lab, so we advise to be mindful of the changes you make while the learner is active at the same lab.

This feature should be considered experimental, and is subject to future change or removal.

## Student experience

When students navigate to a unit with a hastexo XBlock in it, a new Heat
Expand Down
1 change: 1 addition & 0 deletions hastexo/hastexo.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,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 b204745

Please sign in to comment.