Skip to content
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 log line to positive case #39

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Change Log
Unreleased
**********

3.0.1 – 2023-07-20
**********************************************

* Add positive log when summary fragement decides to inject

3.0.0 – 2023-07-16
**********************************************
Expand Down
2 changes: 1 addition & 1 deletion ai_aside/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
A plugin containing xblocks and apps supporting GPT and other LLM use on edX.
"""

__version__ = '3.0.0'
__version__ = '3.0.1'
8 changes: 6 additions & 2 deletions ai_aside/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,18 @@ def _student_view_can_throw(self, block):
if length < settings.SUMMARY_HOOK_MIN_SIZE:
return fragment

usage_id = block.scope_ids.usage_id

log.info(f'Summary hook injecting into {usage_id}')

handler_url = self._summary_handler_url()

fragment.add_content(
_render_summary(
{
'data_url_api': settings.SUMMARY_HOOK_HOST,
'data_course_id': block.scope_ids.usage_id.course_key,
'data_content_id': block.scope_ids.usage_id,
'data_course_id': usage_id.course_key,
'data_content_id': usage_id,
'data_handler_url': handler_url,
'js_url': settings.SUMMARY_HOOK_HOST + settings.SUMMARY_HOOK_JS_PATH,
}
Expand Down