Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 22, 2024
1 parent cb94286 commit 86fb807
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/ol_openedx_chat/block.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pkg_resources
from django.template import Context, Template
from web_fragments.fragment import Fragment
from xblock.core import XBlockAside, XBlock
from webob.response import Response
from xblock.core import XBlock, XBlockAside

BLOCK_PROBLEM_CATEGORY = "problem"
MULTIPLE_CHOICE_TYPE = "multiplechoiceresponse"
Expand Down Expand Up @@ -44,7 +44,12 @@ def student_view_aside(self, block, context=None): # noqa: ARG002
""" # noqa: D401
fragment = Fragment("")
breakpoint()
fragment.add_content(render_template("static/html/student_view.html", {"block_key": self.scope_ids.usage_id.usage_key.block_id}))
fragment.add_content(
render_template(
"static/html/student_view.html",
{"block_key": self.scope_ids.usage_id.usage_key.block_id},
)
)
fragment.add_css(get_resource_bytes("static/css/ai_chat.css"))
fragment.add_javascript(get_resource_bytes("static/js/ai_chat.js"))
fragment.initialize_js("AiChatAsideView")
Expand All @@ -56,7 +61,11 @@ def mock_handler(self, request=None, suffix=None):
print(request.POST)
print(suffix)
print("\n\n\n")
return Response(json_body={"message": "Hello, This your MIT Teaching Assistant. (A Server message)"})
return Response(
json_body={
"message": "Hello, This your MIT Teaching Assistant. (A Server message)"
}
)

@XBlockAside.aside_for("author_view")
def author_view_aside(self, block, context=None): # noqa: ARG002
Expand Down

0 comments on commit 86fb807

Please sign in to comment.