refactor: rename descriptor -> block within lms/djangoapps/certificates
Co-authored-by: Agrendalath <piotr@surowiec.it>
This commit is contained in:
committed by
Agrendalath
parent
953e1f945e
commit
79f67b9ce3
@@ -610,7 +610,7 @@ def certificates_viewable_for_course(course):
|
||||
Returns True if certificates are viewable for any student enrolled in the course, False otherwise.
|
||||
|
||||
Arguments:
|
||||
course (CourseOverview or course descriptor): The course to check if certificates are viewable
|
||||
course (CourseOverview or course block): The course to check if certificates are viewable
|
||||
|
||||
Returns:
|
||||
boolean: whether the certificates are viewable or not
|
||||
@@ -879,7 +879,7 @@ def available_date_for_certificate(course, certificate):
|
||||
Returns the available date to use with a certificate
|
||||
|
||||
Arguments:
|
||||
course (CourseOverview or course descriptor): The course we're checking
|
||||
course (CourseOverview or course block): The course we're checking
|
||||
certificate (GeneratedCertificate): The certificate we're getting the date for
|
||||
"""
|
||||
if _course_uses_available_date(course):
|
||||
@@ -892,7 +892,7 @@ def display_date_for_certificate(course, certificate):
|
||||
Returns the display date that a certificate should display.
|
||||
|
||||
Arguments:
|
||||
course (CourseOverview or course descriptor): The course we're getting the date for
|
||||
course (CourseOverview or course block): The course we're getting the date for
|
||||
Returns:
|
||||
datetime.date
|
||||
"""
|
||||
|
||||
@@ -747,7 +747,7 @@ class CertificatesViewsTests(CommonCertificatesTestCase, CacheIsolationTestCase)
|
||||
|
||||
@override_settings(FEATURES=FEATURES_WITH_CERTS_ENABLED)
|
||||
def test_course_display_name_not_override_with_course_title(self):
|
||||
# if certificate in descriptor has not course_title then course name should not be overridden with this title.
|
||||
# if certificate in block has not course_title then course name should not be overridden with this title.
|
||||
test_certificates = [
|
||||
{
|
||||
'id': 0,
|
||||
|
||||
@@ -349,8 +349,8 @@ def _get_user_certificate(request, user, course_key, course_overview, preview_mo
|
||||
Returns None if there is no certificate generated for given user
|
||||
otherwise returns `GeneratedCertificate` instance.
|
||||
|
||||
We use the course_overview instead of the course descriptor here, so we get the certificate_available_date and
|
||||
certificates_display_behavior validation logic, rather than the raw data from the course descriptor.
|
||||
We use the course_overview instead of the course block here, so we get the certificate_available_date and
|
||||
certificates_display_behavior validation logic, rather than the raw data from the course block.
|
||||
"""
|
||||
user_certificate = None
|
||||
if preview_mode:
|
||||
|
||||
Reference in New Issue
Block a user