Skip to content

Commit 15384e1

Browse files
authored
Merge pull request #39 from edx/ashultz0/positive-log
feat: add log line to positive case
2 parents fcea1eb + eae553d commit 15384e1

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

CHANGELOG.rst

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ Change Log
1414
Unreleased
1515
**********
1616

17+
3.0.1 – 2023-07-20
18+
**********************************************
19+
20+
* Add positive log when summary fragement decides to inject
1721

1822
3.0.0 – 2023-07-16
1923
**********************************************

ai_aside/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
A plugin containing xblocks and apps supporting GPT and other LLM use on edX.
33
"""
44

5-
__version__ = '3.0.0'
5+
__version__ = '3.0.1'

ai_aside/block.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -209,14 +209,18 @@ def _student_view_can_throw(self, block):
209209
if length < settings.SUMMARY_HOOK_MIN_SIZE:
210210
return fragment
211211

212+
usage_id = block.scope_ids.usage_id
213+
214+
log.info(f'Summary hook injecting into {usage_id}')
215+
212216
handler_url = self._summary_handler_url()
213217

214218
fragment.add_content(
215219
_render_summary(
216220
{
217221
'data_url_api': settings.SUMMARY_HOOK_HOST,
218-
'data_course_id': block.scope_ids.usage_id.course_key,
219-
'data_content_id': block.scope_ids.usage_id,
222+
'data_course_id': usage_id.course_key,
223+
'data_content_id': usage_id,
220224
'data_handler_url': handler_url,
221225
'js_url': settings.SUMMARY_HOOK_HOST + settings.SUMMARY_HOOK_JS_PATH,
222226
}

0 commit comments

Comments
 (0)