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

fix: Log all learner transmissions #2313

Merged
merged 1 commit into from
Jan 14, 2025
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 @@ -17,6 +17,10 @@ Unreleased
----------
* nothing unreleased

[5.6.1]
--------
* fix: Log all learner transmission records.

[5.6.0]
--------
* feat: Adds sorting support to enterprise-customer-members endpoint
Expand Down
2 changes: 1 addition & 1 deletion enterprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Your project description goes here.
"""

__version__ = "5.6.0"
__version__ = "5.6.1"
26 changes: 13 additions & 13 deletions integrated_channels/moodle/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,19 +418,19 @@ def _wrapped_create_course_completion(self, user_id, payload):
headers = response.headers
else:
headers = None
if not status_code or not text or not headers:
LOGGER.info(
'Learner Data Transmission'
f'for course={completion_data["courseID"]} with data '
f'source: {module_name}, '
f'activityid: {course_module_id}, '
f'grades[0][studentid]: {moodle_user_id}, '
f'grades[0][grade]: {completion_data["grade"] * self.enterprise_configuration.grade_scale} '
f' with response: {response} '
f'Status Code: {status_code}, '
f'Text: {text}, '
f'Headers: {headers}, '
)

LOGGER.info(
'Learner Data Transmission'
f'for course={completion_data["courseID"]} with data '
f'source: {module_name}, '
f'activityid: {course_module_id}, '
f'grades[0][studentid]: {moodle_user_id}, '
f'grades[0][grade]: {completion_data["grade"] * self.enterprise_configuration.grade_scale} '
f' with response: {response} '
f'Status Code: {status_code}, '
f'Text: {text}, '
f'Headers: {headers}, '
)

return response

Expand Down
Loading