Skip to content

Commit

Permalink
Merge pull request #125 from Code-Institute-Org/remove_useremail_from…
Browse files Browse the repository at this point in the history
…_logs

Removing username from event tracking
  • Loading branch information
ray-codeinstitute authored Jan 7, 2025
2 parents 50b2c33 + ced5162 commit e250062
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common/djangoapps/track/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ def user_track(request):
"""
try:
username = request.user.username
user_id = request.user.id
except:
username = "anonymous"
user_id = 0

name = _get_request_value(request, 'event_type')
data = _get_request_value(request, 'event', {})
Expand All @@ -91,7 +93,7 @@ def user_track(request):
pass

context_override = contexts.course_context_from_url(page)
context_override['username'] = username
context_override['user_id'] = user_id
context_override['event_source'] = 'browser'
context_override['page'] = page

Expand Down

0 comments on commit e250062

Please sign in to comment.