Include a link to the proctoring review, if available
This commit is contained in:
@@ -88,7 +88,7 @@ class InstructorService(object):
|
||||
"""
|
||||
return auth.user_has_role(user, CourseStaffRole(CourseKey.from_string(course_id)))
|
||||
|
||||
def send_support_notification(self, course_id, exam_name, student_username, review_status):
|
||||
def send_support_notification(self, course_id, exam_name, student_username, review_status, review_url=None):
|
||||
"""
|
||||
Creates a Zendesk ticket for an exam attempt review from the proctoring system.
|
||||
Currently, it sends notifications for 'Suspicious" status, but additional statuses can be supported
|
||||
@@ -103,15 +103,17 @@ class InstructorService(object):
|
||||
if course.create_zendesk_tickets:
|
||||
requester_name = "edx-proctoring"
|
||||
email = "edx-proctoring@edx.org"
|
||||
subject = _("Proctored Exam Review: {review_status}").format(review_status=review_status)
|
||||
subject = _(u"Proctored Exam Review: {review_status}").format(review_status=review_status)
|
||||
body = _(
|
||||
"A proctored exam attempt for {exam_name} in {course_name} by username: {student_username} "
|
||||
"was reviewed as {review_status} by the proctored exam review provider."
|
||||
u"A proctored exam attempt for {exam_name} in {course_name} by username: {student_username} "
|
||||
"was reviewed as {review_status} by the proctored exam review provider.\n"
|
||||
"Review link: {review_url}"
|
||||
).format(
|
||||
exam_name=exam_name,
|
||||
course_name=course.display_name,
|
||||
student_username=student_username,
|
||||
review_status=review_status
|
||||
review_status=review_status,
|
||||
review_url=review_url or u'not available',
|
||||
)
|
||||
tags = ["proctoring"]
|
||||
create_zendesk_ticket(requester_name, email, subject, body, tags)
|
||||
|
||||
@@ -147,9 +147,10 @@ class InstructorServiceTests(SharedModuleStoreTestCase):
|
||||
"""
|
||||
requester_name = "edx-proctoring"
|
||||
email = "edx-proctoring@edx.org"
|
||||
subject = "Proctored Exam Review: {review_status}".format(review_status="Suspicious")
|
||||
subject = u"Proctored Exam Review: {review_status}".format(review_status="Suspicious")
|
||||
body = "A proctored exam attempt for {exam_name} in {course_name} by username: {student_username} was " \
|
||||
"reviewed as {review_status} by the proctored exam review provider."
|
||||
"reviewed as {review_status} by the proctored exam review provider.\n" \
|
||||
"Review link: not available"
|
||||
body = body.format(
|
||||
exam_name="test_exam", course_name=self.course.display_name, student_username="test_student",
|
||||
review_status="Suspicious"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"dependencies": {
|
||||
"@edx/cookie-policy-banner": "1.1.10",
|
||||
"@edx/edx-bootstrap": "1.0.3",
|
||||
"@edx/edx-proctoring": "^1.5.0-rc.1",
|
||||
"@edx/edx-proctoring": "^1.5.0-rc.5",
|
||||
"@edx/paragon": "2.6.4",
|
||||
"@edx/studio-frontend": "1.16.12",
|
||||
"babel-core": "6.26.0",
|
||||
@@ -27,6 +27,7 @@
|
||||
"edx-pattern-library": "0.18.1",
|
||||
"edx-proctoring-proctortrack": "git+https://git@github.com/joshivj/edx-proctoring-proctortrack.git",
|
||||
"edx-ui-toolkit": "1.5.2",
|
||||
"eslint": "^5.10.0",
|
||||
"exports-loader": "0.6.4",
|
||||
"extract-text-webpack-plugin": "2.1.2",
|
||||
"file-loader": "1.1.6",
|
||||
|
||||
@@ -145,7 +145,7 @@ edx-milestones==0.1.13
|
||||
edx-oauth2-provider==1.2.2
|
||||
edx-opaque-keys[django]==0.4.4
|
||||
edx-organizations==1.0.0
|
||||
edx-proctoring==1.5.0rc3
|
||||
edx-proctoring==1.5.0rc5
|
||||
edx-rest-api-client==1.9.2
|
||||
edx-search==1.2.1
|
||||
edx-submissions==2.0.12
|
||||
|
||||
@@ -165,7 +165,7 @@ edx-milestones==0.1.13
|
||||
edx-oauth2-provider==1.2.2
|
||||
edx-opaque-keys[django]==0.4.4
|
||||
edx-organizations==1.0.0
|
||||
edx-proctoring==1.5.0rc3
|
||||
edx-proctoring==1.5.0rc5
|
||||
edx-rest-api-client==1.9.2
|
||||
edx-search==1.2.1
|
||||
edx-sphinx-theme==1.4.0
|
||||
|
||||
@@ -160,7 +160,7 @@ edx-milestones==0.1.13
|
||||
edx-oauth2-provider==1.2.2
|
||||
edx-opaque-keys[django]==0.4.4
|
||||
edx-organizations==1.0.0
|
||||
edx-proctoring==1.5.0rc3
|
||||
edx-proctoring==1.5.0rc5
|
||||
edx-rest-api-client==1.9.2
|
||||
edx-search==1.2.1
|
||||
edx-submissions==2.0.12
|
||||
|
||||
Reference in New Issue
Block a user