-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Builtin poll_question
block rendering is broken
#32827
Comments
@kdmccormick, according to #26873, this XBlock never had a Studio editor. It was modified by changing the XML and re-importing the course. I verified that this behavior in Nutmeg, as I didn't have an older instance around. Theoretically, an editor can be easily added by:
"PollBlockEditor": [
"./xmodule/js/src/xmodule.js",
"./xmodule/js/src/raw/edit/metadata-only.js",
],
studio_js_module_name = "MetadataOnlyEditingDescriptor"
mako_template = "widgets/metadata-edit.html"
def studio_view(self, _context):
"""
Return the studio view.
"""
fragment = Fragment(self.runtime.service(self, 'mako').render_template(self.mako_template, self.get_context()))
add_webpack_js_to_fragment(fragment, 'PollBlockEditor')
shim_xmodule_js(fragment, self.studio_js_module_name)
return fragment
However, getting it to work properly would likely require creating a custom editor. That's because the answers have a bit unusual format: edx-platform/xmodule/poll_block.py Lines 68 to 73 in 3557799
cc: @ormsbee |
poll_question
block rendering is brokenpoll_question
or mark it as unsupported
poll_question
or mark it as unsupportedpoll_question
block rendering is broken
Makes sense @Agrendalath , thank you. Given that this block is opt-in and a better Poll block exists, I don't think we need to make a Studio editor for it. It would be nice if Studio's error were more helpful (a la "There is no Studio editor for this component type. It may only be edited by exporting to XML.") but that's a different issue. |
The Problem
poll_question rendering seems broken (see screenshots below).
The Studio view shows an error which may be helpful:
Note: This is not xblock-poll, a.k.a. the
poll
component. This is thepoll_question
component, a former XModule which is defined in edx-platform.Steps to reproduce
I found this in both master (using tutor dev & local) and Palm (using current-release.openedx.org).
Go to a course in Studio
In advanced settings, add
"poll_question"
to the advanced module list. Save.In the unit editor, add an Advanced->poll_question component.
Author view:
Edit view:
Click "Publish" and then "View Live Version"
Student view
The text was updated successfully, but these errors were encountered: