From 79f67b9ce3fc464e4039c13cd76fe74bbec579a4 Mon Sep 17 00:00:00 2001 From: Pooja Kulkarni Date: Wed, 4 Jan 2023 13:50:52 -0500 Subject: [PATCH] refactor: rename descriptor -> block within lms/djangoapps/certificates Co-authored-by: Agrendalath --- lms/djangoapps/certificates/api.py | 6 +++--- lms/djangoapps/certificates/tests/test_webview_views.py | 2 +- lms/djangoapps/certificates/views/webview.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lms/djangoapps/certificates/api.py b/lms/djangoapps/certificates/api.py index 48fe0f7ef1..c76e34a95b 100644 --- a/lms/djangoapps/certificates/api.py +++ b/lms/djangoapps/certificates/api.py @@ -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 """ diff --git a/lms/djangoapps/certificates/tests/test_webview_views.py b/lms/djangoapps/certificates/tests/test_webview_views.py index 96832e3cb6..4d0cc82626 100644 --- a/lms/djangoapps/certificates/tests/test_webview_views.py +++ b/lms/djangoapps/certificates/tests/test_webview_views.py @@ -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, diff --git a/lms/djangoapps/certificates/views/webview.py b/lms/djangoapps/certificates/views/webview.py index b859cfe92c..4d99b7d772 100644 --- a/lms/djangoapps/certificates/views/webview.py +++ b/lms/djangoapps/certificates/views/webview.py @@ -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: