From c6db2e96fa37bb93ac876f4be9a68650a75eb95a Mon Sep 17 00:00:00 2001 From: Andrew Tesker Date: Wed, 15 May 2019 15:27:42 -0400 Subject: [PATCH 1/3] EDUCATOR-4290 support for extra columns in report --- edx_proctoring/api.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/edx_proctoring/api.py b/edx_proctoring/api.py index 9ea9c7d78b3..e6f94233746 100644 --- a/edx_proctoring/api.py +++ b/edx_proctoring/api.py @@ -1544,7 +1544,10 @@ def get_attempt_status_summary(user_id, course_id, content_id): return summary # let's check credit eligibility + + credit_service = get_runtime_service('credit') + # practice exams always has an attempt status regardless of # eligibility if credit_service and not exam['is_practice_exam']: @@ -2061,6 +2064,7 @@ def get_exam_violation_report(course_id, include_practice_exams=False): Violation status messages are aggregated as a list per attempt for each violation type. """ + attempts_by_code = { attempt['attempt_code']: { 'course_id': attempt['proctored_exam']['course_id'], @@ -2074,7 +2078,10 @@ def get_exam_violation_report(course_id, include_practice_exams=False): 'completed_at': attempt['completed_at'], 'status': attempt['status'], 'review_status': None - } for attempt in get_all_exam_attempts(course_id) + ,'provider': attempt['proctored_exam']['backend'] + ,'user_id': attempt['user']['id'] + + } for attempt in get_all_exam_attempts(course_id) # django OR db query } reviews = ProctoredExamSoftwareSecureReview.objects.prefetch_related( From 8e40f5f130d0b1feec57778d36c9f36a30415811 Mon Sep 17 00:00:00 2001 From: Andrew Tesker Date: Wed, 15 May 2019 15:59:05 -0400 Subject: [PATCH 2/3] cr changes --- edx_proctoring/__init__.py | 2 +- edx_proctoring/api.py | 6 +++--- package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/edx_proctoring/__init__.py b/edx_proctoring/__init__.py index 1ff927858a8..1008154892f 100644 --- a/edx_proctoring/__init__.py +++ b/edx_proctoring/__init__.py @@ -5,6 +5,6 @@ from __future__ import absolute_import # Be sure to update the version number in edx_proctoring/package.json -__version__ = '2.0.1' +__version__ = '2.0.2' default_app_config = 'edx_proctoring.apps.EdxProctoringConfig' # pylint: disable=invalid-name diff --git a/edx_proctoring/api.py b/edx_proctoring/api.py index e6f94233746..b7c671d93a9 100644 --- a/edx_proctoring/api.py +++ b/edx_proctoring/api.py @@ -2077,9 +2077,9 @@ def get_exam_violation_report(course_id, include_practice_exams=False): 'started_at': attempt['started_at'], 'completed_at': attempt['completed_at'], 'status': attempt['status'], - 'review_status': None - ,'provider': attempt['proctored_exam']['backend'] - ,'user_id': attempt['user']['id'] + 'review_status': None, + 'provider': attempt['proctored_exam']['backend'], + 'user_id': attempt['user']['id'] } for attempt in get_all_exam_attempts(course_id) # django OR db query } diff --git a/package.json b/package.json index 06d2c323ce7..d5b5545d662 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@edx/edx-proctoring", "//": "Be sure to update the version number in edx_proctoring/__init__.py", "//": "Note that the version format is slightly different than that of the Python version when using prereleases.", - "version": "2.0.0", + "version": "2.0.1", "main": "edx_proctoring/static/index.js", "repository": { "type": "git", From 989c96681e0813f08f778777f190972fc98773c2 Mon Sep 17 00:00:00 2001 From: Andrew Tesker Date: Thu, 16 May 2019 08:38:56 -0400 Subject: [PATCH 3/3] pylint fix --- edx_proctoring/api.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/edx_proctoring/api.py b/edx_proctoring/api.py index b7c671d93a9..a76d27e0563 100644 --- a/edx_proctoring/api.py +++ b/edx_proctoring/api.py @@ -1544,8 +1544,6 @@ def get_attempt_status_summary(user_id, course_id, content_id): return summary # let's check credit eligibility - - credit_service = get_runtime_service('credit') # practice exams always has an attempt status regardless of @@ -2081,7 +2079,7 @@ def get_exam_violation_report(course_id, include_practice_exams=False): 'provider': attempt['proctored_exam']['backend'], 'user_id': attempt['user']['id'] - } for attempt in get_all_exam_attempts(course_id) # django OR db query + } for attempt in get_all_exam_attempts(course_id) } reviews = ProctoredExamSoftwareSecureReview.objects.prefetch_related(