Adding logs in capa_base

This commit is contained in:
Awais Jibran
2020-05-13 17:25:50 +05:00
parent 5f26cde55f
commit 0dc5bacfb4

View File

@@ -1214,6 +1214,12 @@ class CapaMixin(ScorableXBlockMixin, CapaFields):
# Too late. Cannot submit
if self.closed():
problem_location = text_type(self.location)
if 'HarvardX+MCB80.1x+3T2019' in problem_location:
log.info(
'Problem %s closed, close date: %s, attempts: %s/%s, is_past_due: %s',
problem_location, self.close_date, self.attempts, self.max_attempts, self.is_past_due()
)
event_info['failure'] = 'closed'
self.track_function_unmask('problem_check_fail', event_info)
raise NotFoundError(_("Problem is closed."))