diff --git a/cms/djangoapps/contentstore/views/certificates.py b/cms/djangoapps/contentstore/views/certificates.py index 8d3f5f9c70..91bdf80a36 100644 --- a/cms/djangoapps/contentstore/views/certificates.py +++ b/cms/djangoapps/contentstore/views/certificates.py @@ -176,6 +176,7 @@ class CertificateManager(object): "id": certificate_data['id'], "name": certificate_data['name'], "description": certificate_data['description'], + "is_active": certificate_data['is_active'], "version": CERTIFICATE_SCHEMA_VERSION, "signatories": certificate_data['signatories'] } diff --git a/cms/djangoapps/contentstore/views/tests/test_certificates.py b/cms/djangoapps/contentstore/views/tests/test_certificates.py index 0ceb0eaac2..fc728333b4 100644 --- a/cms/djangoapps/contentstore/views/tests/test_certificates.py +++ b/cms/djangoapps/contentstore/views/tests/test_certificates.py @@ -33,6 +33,7 @@ FEATURES_WITH_CERTS_ENABLED['CERTIFICATES_HTML_VIEW'] = True CERTIFICATE_JSON = { u'name': u'Test certificate', u'description': u'Test description', + u'is_active': True, u'version': CERTIFICATE_SCHEMA_VERSION, } @@ -41,6 +42,7 @@ CERTIFICATE_JSON_WITH_SIGNATORIES = { u'description': u'Test description', u'version': CERTIFICATE_SCHEMA_VERSION, u'course_title': 'Course Title Override', + u'is_active': True, u'signatories': [ { "name": "Bob Smith", @@ -217,6 +219,7 @@ class CertificatesListHandlerTestCase(EventTestMixin, CourseTestCase, Certificat u'version': CERTIFICATE_SCHEMA_VERSION, u'name': u'Test certificate', u'description': u'Test description', + u'is_active': True, u'signatories': [] } response = self.client.ajax_post( @@ -332,6 +335,7 @@ class CertificatesListHandlerTestCase(EventTestMixin, CourseTestCase, Certificat u'version': CERTIFICATE_SCHEMA_VERSION, u'name': u'New test certificate', u'description': u'New test description', + u'is_active': True, u'signatories': [] } @@ -383,6 +387,7 @@ class CertificatesDetailHandlerTestCase(EventTestMixin, CourseTestCase, Certific u'version': CERTIFICATE_SCHEMA_VERSION, u'name': u'Test certificate', u'description': u'Test description', + u'is_active': True, u'course_title': u'Course Title Override', u'signatories': [] } @@ -413,6 +418,7 @@ class CertificatesDetailHandlerTestCase(EventTestMixin, CourseTestCase, Certific u'version': CERTIFICATE_SCHEMA_VERSION, u'name': u'New test certificate', u'description': u'New test description', + u'is_active': True, u'course_title': u'Course Title Override', u'signatories': []