New course cannot be started till web certificate is active
fixed broken test changes based on feedback on 6/24 fixed broken unit test after feedback changes added more checks and updated tests fixed broken bok choy test Fixed pylint quality error trying to fix pylint quality error
This commit is contained in:
@@ -8,7 +8,7 @@ from django.conf import settings
|
||||
|
||||
from opaque_keys.edx.locations import Location
|
||||
from xmodule.modulestore.exceptions import ItemNotFoundError
|
||||
from contentstore.utils import course_image_url
|
||||
from contentstore.utils import course_image_url, has_active_web_certificate
|
||||
from models.settings import course_grading
|
||||
from xmodule.fields import Date
|
||||
from xmodule.modulestore.django import modulestore
|
||||
@@ -52,7 +52,8 @@ class CourseDetails(object):
|
||||
self.entrance_exam_minimum_score_pct = settings.FEATURES.get(
|
||||
'ENTRANCE_EXAM_MIN_SCORE_PCT',
|
||||
'50'
|
||||
) # minimum passing score for entrance exam content module/tree
|
||||
) # minimum passing score for entrance exam content module/tree,
|
||||
self.has_cert_config = None # course has active certificate configuration
|
||||
|
||||
@classmethod
|
||||
def _fetch_about_attribute(cls, course_key, attribute):
|
||||
@@ -84,6 +85,7 @@ class CourseDetails(object):
|
||||
course_details.language = descriptor.language
|
||||
# Default course license is "All Rights Reserved"
|
||||
course_details.license = getattr(descriptor, "license", "all-rights-reserved")
|
||||
course_details.has_cert_config = has_active_web_certificate(descriptor)
|
||||
|
||||
for attribute in ABOUT_ATTRIBUTES:
|
||||
value = cls._fetch_about_attribute(course_key, attribute)
|
||||
|
||||
Reference in New Issue
Block a user