Skip to content

Commit

Permalink
replace CourseGradeFactory with deprecated courseware.grades
Browse files Browse the repository at this point in the history
  • Loading branch information
amirtds committed Dec 7, 2019
1 parent 2c1e57d commit 81358cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions accredible_certificate/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
from lms.djangoapps.certificates.models import CertificateStatuses as status
from lms.djangoapps.certificates.models import CertificateWhitelist

from courseware import grades, courses
from courseware import courses
from lms.djangoapps.grades.course_grade_factory import CourseGradeFactory
from django.test.client import RequestFactory
from capa.xqueue_interface import XQueueInterface
from capa.xqueue_interface import make_xheader, make_hashkey
Expand Down Expand Up @@ -138,7 +139,7 @@ def add_cert(self, student, course_id, defined_status="downloadable", course=Non

is_whitelisted = self.whitelist.filter(user=student, course_id=course_id, whitelist=True).exists()

grade = grades.grade(student, course)
grade = CourseGradeFactory().read(student, course)
enrollment_mode, __ = CourseEnrollment.enrollment_mode_for_user(student, course_id)
mode_is_verified = (enrollment_mode == GeneratedCertificate.MODES.verified)

Expand Down

0 comments on commit 81358cc

Please sign in to comment.