Skip to content

Commit

Permalink
fix: Log all learner transmissions (#2313)
Browse files Browse the repository at this point in the history
  • Loading branch information
zamanafzal authored Jan 14, 2025
1 parent 23d0122 commit 9779f3e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
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

0 comments on commit 9779f3e

Please sign in to comment.