feat: Timer in LMS Quiz (#24246)

* feat: new fields in quiz doctypes

* feat: timer in lms quiz

* fix: variable initialisation

* fix: context, exception fix

* fix:sider

* fix:sider

* fix: indentation

* fix: timer

* fix: sider

* fix: return value and format

* fix: show time taken only after all attempts are over

* fix: sider

Co-authored-by: pateljannat <jannatpatel@MacBook-Air.local>
Co-authored-by: Marica <maricadsouza221197@gmail.com>
This commit is contained in:
Jannat Patel
2021-04-19 10:36:40 +05:30
committed by GitHub
parent 7eac4a250d
commit dcdd3bebbe
9 changed files with 218 additions and 411 deletions

View File

@@ -35,7 +35,7 @@ def get_contents(topic, course, program):
progress.append({'content': content, 'content_type': content.doctype, 'completed': status})
elif content.doctype == 'Quiz':
if student:
status, score, result = utils.check_quiz_completion(content, course_enrollment.name)
status, score, result, time_taken = utils.check_quiz_completion(content, course_enrollment.name)
else:
status = False
score = None