From b204745b5af9500e79211175e8017dbd003df0a1 Mon Sep 17 00:00:00 2001 From: Florian Haas Date: Fri, 2 Mar 2018 17:09:48 +0100 Subject: [PATCH] Enable instructors to grab a learner's session 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 --- Changelog.md | 6 ++++++ README.md | 8 ++++++++ hastexo/hastexo.py | 1 + 3 files changed, 15 insertions(+) diff --git a/Changelog.md b/Changelog.md index 93c402f..d3b1438 100644 --- a/Changelog.md +++ b/Changelog.md @@ -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. diff --git a/README.md b/README.md index 549b5c8..eecc615 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/hastexo/hastexo.py b/hastexo/hastexo.py index 0b7cff4..be40867 100644 --- a/hastexo/hastexo.py +++ b/hastexo/hastexo.py @@ -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): """