Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
f8b835f2
Commit
f8b835f2
authored
Mar 13, 2015
by
Brian Talbot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
certificates: pruning default asset references
parent
5c0d7718
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
53 deletions
+31
-53
lms/djangoapps/certificates/migrations/0020_certificatehtmlviewconfiguration_data.py
+27
-36
lms/djangoapps/certificates/tests/factories.py
+4
-15
lms/templates/certificates/_assets-primary.html
+0
-2
No files found.
lms/djangoapps/certificates/migrations/0020_certificatehtmlviewconfiguration_data.py
View file @
f8b835f2
...
...
@@ -12,42 +12,33 @@ class Migration(DataMigration):
Bootstraps the HTML view template with some default configuration parameters
"""
json_config
=
"""{
"default": {
"accomplishment_class_append": "accomplishment--certificate--honorcode",
"certificate_verify_url_prefix": "https://verify-test.edx.org/cert/",
"certificate_verify_url_suffix": "/verify.html",
"company_about_url": "http://www.edx.org/about-us",
"company_courselist_url": "http://www.edx.org/course-list",
"company_careers_url": "http://www.edx.org/jobs",
"company_contact_url": "http://www.edx.org/contact-us",
"platform_name": "edX",
"company_privacy_url": "http://www.edx.org/edx-privacy-policy",
"company_tos_url": "http://www.edx.org/edx-terms-service",
"company_verified_certificate_url": "http://www.edx.org/verified-certificate",
"document_script_src_modernizr": "https://verify-test.edx.org/v2/static/js/vendor/modernizr-2.6.2.min.js",
"document_stylesheet_url_normalize": "https://verify-test.edx.org/v2/static/css/vendor/normalize.css",
"document_stylesheet_url_fontawesome": "https://verify-test.edx.org/v2/static/css/vendor/font-awesome.css",
"document_stylesheet_url_application": "https://verify-test.edx.org/v2/static/css/style-application.css",
"logo_src": "https://verify-test.edx.org/v2/static/images/logo-edx.svg",
"logo_url": "http://www.edx.org"
},
"honor": {
"certificate_type": "Honor Code",
"document_body_class_append": "is-honorcode"
},
"verified": {
"certificate_type": "Verified",
"document_body_class_append": "is-idverified"
},
"xseries": {
"certificate_type": "XSeries",
"document_body_class_append": "is-xseries",
"document_script_src_modernizr": "https://verify-test.edx.org/xseries/static/js/vendor/modernizr-2.6.2.min.js",
"document_stylesheet_url_normalize": "https://verify-test.edx.org/xseries/static/css/vendor/normalize.css",
"document_stylesheet_url_fontawesome": "https://verify-test.edx.org/xseries/static/css/vendor/font-awesome.css",
"document_stylesheet_url_application": "https://verify-test.edx.org/xseries/static/css/style-application.css",
"logo_src": "https://verify-test.edx.org/xseries/static/images/logo-edx.svg"
}
{
"default": {
"accomplishment_class_append": "accomplishment--certificate",
"certificate_verify_url_prefix": "https://verify-test.edx.org/cert/",
"certificate_verify_url_suffix": "/verify.html",
"company_about_url": "http://www.edx.org/about-us",
"platform_name": "edX",
"company_privacy_url": "http://www.edx.org/edx-privacy-policy",
"company_tos_url": "http://www.edx.org/edx-terms-service",
"company_verified_certificate_url": "http://www.edx.org/verified-certificate",
"document_stylesheet_url_application": "/static/certificates/css/style-application.css",
"logo_src": "/static/certificates/images/logo-edx.svg",
"logo_url": "http://www.edx.org"
},
"honor": {
"certificate_type": "Honor Code",
"document_body_class_append": "is-honorcode"
},
"verified": {
"certificate_type": "Verified",
"document_body_class_append": "is-idverified"
},
"xseries": {
"certificate_type": "XSeries",
"document_body_class_append": "is-xseries"
}
}
}"""
orm
.
CertificateHtmlViewConfiguration
.
objects
.
create
(
configuration
=
json_config
,
...
...
lms/djangoapps/certificates/tests/factories.py
View file @
f8b835f2
...
...
@@ -24,22 +24,16 @@ class CertificateHtmlViewConfigurationFactory(DjangoModelFactory):
enabled
=
True
configuration
=
"""{
"default": {
"accomplishment_class_append": "accomplishment--certificate
--honorcode
",
"accomplishment_class_append": "accomplishment--certificate",
"certificate_verify_url_prefix": "https://verify-test.edx.org/cert/",
"certificate_verify_url_suffix": "/verify.html",
"company_about_url": "http://www.edx.org/about-us",
"company_courselist_url": "http://www.edx.org/course-list",
"company_careers_url": "http://www.edx.org/jobs",
"company_contact_url": "http://www.edx.org/contact-us",
"platform_name": "edX",
"company_privacy_url": "http://www.edx.org/edx-privacy-policy",
"company_tos_url": "http://www.edx.org/edx-terms-service",
"company_verified_certificate_url": "http://www.edx.org/verified-certificate",
"document_script_src_modernizr": "https://verify-test.edx.org/v2/static/js/vendor/modernizr-2.6.2.min.js",
"document_stylesheet_url_normalize": "https://verify-test.edx.org/v2/static/css/vendor/normalize.css",
"document_stylesheet_url_fontawesome": "https://verify-test.edx.org/v2/static/css/vendor/font-awesome.css",
"document_stylesheet_url_application": "https://verify-test.edx.org/v2/static/css/style-application.css",
"logo_src": "https://verify-test.edx.org/v2/static/images/logo-edx.svg",
"document_stylesheet_url_application": "/static/certificates/css/style-application.css",
"logo_src": "/static/certificates/images/logo-edx.svg",
"logo_url": "http://www.edx.org"
},
"honor": {
...
...
@@ -52,11 +46,6 @@ class CertificateHtmlViewConfigurationFactory(DjangoModelFactory):
},
"xseries": {
"certificate_type": "XSeries",
"document_body_class_append": "is-xseries",
"document_script_src_modernizr": "https://verify-test.edx.org/xseries/static/js/vendor/modernizr-2.6.2.min.js",
"document_stylesheet_url_normalize": "https://verify-test.edx.org/xseries/static/css/vendor/normalize.css",
"document_stylesheet_url_fontawesome": "https://verify-test.edx.org/xseries/static/css/vendor/font-awesome.css",
"document_stylesheet_url_application": "https://verify-test.edx.org/xseries/static/css/style-application.css",
"logo_src": "https://verify-test.edx.org/xseries/static/images/logo-edx.svg"
"document_body_class_append": "is-xseries"
}
}"""
lms/templates/certificates/_assets-primary.html
View file @
f8b835f2
<link
rel=
"stylesheet"
href=
"${document_stylesheet_url_normalize}"
/>
<link
rel=
"stylesheet"
href=
"${document_stylesheet_url_fontawesome}"
/>
<link
rel=
"stylesheet"
href=
"${document_stylesheet_url_application}"
/>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment