Skip to content

Commit

Permalink
correctly create an AttemptLaunch when the user is anonymous
Browse files Browse the repository at this point in the history
  • Loading branch information
christianp committed Nov 24, 2023
1 parent 79a00af commit bfb66db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion numbas_lti/views/attempt.py
Expand Up @@ -247,10 +247,11 @@ def get(self, request, *args, **kwargs):
except BrokenAttemptException as e:
response = http.HttpResponseServerError(_("This attempt is broken - there isn't enough saved SCORM data to resume it."))
self.mode = 'broken'

AttemptLaunch.objects.create(
attempt = self.object,
mode = self.mode,
user = self.request.user
user = self.request.user if not self.request.user.is_anonymous else None
)
return response

Expand Down

0 comments on commit bfb66db

Please sign in to comment.