Merge pull request #11347 from edx/ahsan/credentials-feature-changes

Credentials Feature changes reverted in release
This commit is contained in:
Ahsan Ulhaq
2016-01-28 15:28:49 +05:00
32 changed files with 1019 additions and 84 deletions

View File

@@ -735,6 +735,7 @@ CREDIT_HELP_LINK_URL = ENV_TOKENS.get('CREDIT_HELP_LINK_URL', CREDIT_HELP_LINK_U
#### JWT configuration ####
JWT_ISSUER = ENV_TOKENS.get('JWT_ISSUER', JWT_ISSUER)
JWT_EXPIRATION = ENV_TOKENS.get('JWT_EXPIRATION', JWT_EXPIRATION)
JWT_AUTH.update(ENV_TOKENS.get('JWT_AUTH', {}))
################# PROCTORING CONFIGURATION ##################

View File

@@ -1930,6 +1930,9 @@ INSTALLED_APPS = (
'openedx.core.djangoapps.self_paced',
'sorl.thumbnail',
# Credentials support
'openedx.core.djangoapps.credentials',
)
# Migrations which are not in the standard module "migrations"
@@ -2006,6 +2009,18 @@ SOCIAL_MEDIA_FOOTER_NAMES = [
"reddit",
]
# JWT Settings
JWT_AUTH = {
'JWT_SECRET_KEY': None,
'JWT_ALGORITHM': 'HS256',
'JWT_VERIFY_EXPIRATION': True,
'JWT_ISSUER': None,
'JWT_PAYLOAD_GET_USERNAME_HANDLER': lambda d: d.get('username'),
'JWT_AUDIENCE': None,
'JWT_LEEWAY': 1,
'JWT_DECODE_HANDLER': 'openedx.core.lib.api.jwt_decode_handler.decode',
}
# The footer URLs dictionary maps social footer names
# to URLs defined in configuration.
SOCIAL_MEDIA_FOOTER_URLS = {}

View File

@@ -224,6 +224,13 @@ CORS_ALLOW_CREDENTIALS = True
CORS_ORIGIN_WHITELIST = ()
CORS_ORIGIN_ALLOW_ALL = True
# JWT settings for devstack
JWT_AUTH.update({
'JWT_ALGORITHM': 'HS256',
'JWT_SECRET_KEY': 'lms-secret',
'JWT_ISSUER': 'http://127.0.0.1:8000/oauth2',
'JWT_AUDIENCE': 'lms-key',
})
#####################################################################
# See if the developer has any local overrides.

View File

@@ -563,3 +563,9 @@ FEATURES['ORGANIZATIONS_APP'] = True
# Financial assistance page
FEATURES['ENABLE_FINANCIAL_ASSISTANCE_FORM'] = True
JWT_AUTH.update({
'JWT_SECRET_KEY': 'test-secret',
'JWT_ISSUER': 'https://test-provider/oauth2',
'JWT_AUDIENCE': 'test-key',
})

View File

@@ -32,6 +32,32 @@
}
}
.wrapper-xseries-certificates{
@include float(right);
@include margin-left(flex-gutter());
width: flex-grid(3);
.title{
@extend %t-title7;
@extend %t-weight4;
}
ul{
@include padding-left(0);
margin-top: ($baseline/2);
}
li{
@include line-height(20);
list-style-type: none;
}
.copy {
@extend %t-copy-sub1;
margin-top: ($baseline/2);
}
}
.profile-sidebar {
background: transparent;
@include float(right);

View File

@@ -172,6 +172,19 @@ import json
</ul>
</section>
</section>
% if xseries_credentials:
<div class="wrapper-xseries-certificates">
<p class="title">${_("XSeries Program Certificates")}</p>
<p class="copy">${_("You have received a certificate for the following XSeries programs:")}</p>
<ul>
% for xseries_credential in xseries_credentials:
<li>
<a class="copy" href="${xseries_credential['credential_url']}">${xseries_credential['display_name']}</a>
</li>
% endfor
</ul>
</div>
% endif
</section>
<section id="email-settings-modal" class="modal" aria-hidden="true">