-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: add basic lms chat #398
base: main
Are you sure you want to change the base?
Conversation
995a4f2
to
09f8a7d
Compare
ded723b
to
cb94286
Compare
|
||
$.ajax({ | ||
type: "POST", | ||
url: runtime.handlerUrl(element, 'mock_handler'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Does tthis call the problem-specific OLChatAside
mock_handler method? So the actual URL might be like problem/uuid-1234-xyz/
?
And is this way, the chat API knows the context—which problem is it helping with?
Am I understanding that roughly correctly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, You are spot on.
function AiChatAsideView(runtime, element) { | ||
$('.chat-button').on('click', function () { | ||
const blockKey = $(this).data("block-key") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor question... I see the data-
attribute can be used to pass serialized data from python to the JS file.
I noticed in https://docs.openedx.org/projects/xblock/en/latest/xblock-tutorial/anatomy/javascript.html the JS function had signature
function ThumbsAside(runtime, element, block_element, init_args) { /* etc */ }
Do we control the 3rd argument? Is that another way to pass data?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we can pass the data via the 4th init_args argument.
86fb807
to
2664d33
Compare
What are the relevant tickets?
Closes https://github.com/mitodl/hq/issues/6087
Description (What does it do?)
Adds a basic chat window in the LMS for the MCQ blocks.
Screenshots (if appropriate):
Screen.Recording.2024-11-21.at.5.28.18.PM.mov
How can this be tested?
pants package :: .
pip install /edx/src/open-edx-plugins/dist/ol-openedx-chat-0.1.0.tar.gz