Exemple #1
0
    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
        by adding to the notify_support_for_status list in edx_proctoring/backends/software_secure.py
        The notifications can be disabled by disabling the
        "Create Zendesk Tickets For Suspicious Proctored Exam Attempts" setting in the course's Advanced settings.
        """

        course_key = CourseKey.from_string(course_id)
        course = modulestore().get_course(course_key)

        if course.create_zendesk_tickets:
            requester_name = "edx-proctoring"
            email = "*****@*****.**"
            subject = _(u"Proctored Exam Review: {review_status}").format(
                review_status=review_status)
            body = _(
                u"A proctored exam attempt for {exam_name} in {course_name} by username: {student_username} "
                u"was reviewed as {review_status} by the proctored exam review provider.\n"
                u"Review link: {review_url}").format(
                    exam_name=exam_name,
                    course_name=course.display_name,
                    student_username=student_username,
                    review_status=review_status,
                    review_url=review_url or u'not available',
                )
            tags = ["proctoring"]
            create_zendesk_ticket(requester_name, email, subject, body, tags)
Exemple #2
0
    def send_support_notification(self, course_id, exam_name, student_username, review_status):
        """
        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
        by adding to the notify_support_for_status list in edx_proctoring/backends/software_secure.py
        The notifications can be disabled by disabling the
        "Create Zendesk Tickets For Suspicious Proctored Exam Attempts" setting in the course's Advanced settings.
        """

        course_key = CourseKey.from_string(course_id)
        course = modulestore().get_course(course_key)

        if course.create_zendesk_tickets:
            requester_name = "edx-proctoring"
            email = "*****@*****.**"
            subject = _("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."
            ).format(
                exam_name=exam_name,
                course_name=course.display_name,
                student_username=student_username,
                review_status=review_status
            )
            tags = ["proctoring"]
            create_zendesk_ticket(requester_name, email, subject, body, tags)