Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions common/lib/xmodule/xmodule/course_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,9 +569,9 @@ class CourseFields(object):
"soon as certificates are generated, enter early_no_info."
),
scope=Scope.settings,
# Appsembler: Defaulting to "early_with_info" rather than edX's "end" to match customers needs
# More info on: https://trello.com/c/bi7J0a4z
default="early_with_info",
# Tahoe: RED-1599: Customize the default value to 'early_with_info' instead of edX's 'end'
# RED-1599: Defaulting to "early_with_info" rather than edX's "end" to match customers needs
default=getattr(settings, "TAHOE_CERTIFICATE_DISPLAY_BEHAVIOUR", "early_with_info"),
)
course_image = String(
display_name=_("Course About Page Image"),
Expand Down
15 changes: 15 additions & 0 deletions common/lib/xmodule/xmodule/tests/test_course_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,21 @@ def test_may_certify(self):
self.assertFalse(self.future_noshow_certs.may_certify())


def test_tahoe_customized_certificate_behaviour_setting():
"""
Test for the `TAHOE_CERTIFICATE_DISPLAY_BEHAVIOUR` setting to customize certificates_display_behavior.
"""
course_xml = """
<course org="{org}" course="{course}" url_name="test">
<chapter url="hi" url_name="ch" display_name="CH"></chapter>
</course>
""".format(org=ORG, course=COURSE)

system = DummySystem(load_error_modules=True)
course = system.process_xml(course_xml)
assert course.certificates_display_behavior == 'early_with_info'


class CourseSummaryHasEnded(unittest.TestCase):
""" Test for has_ended method when end date is missing timezone information. """

Expand Down