Enable the edge virtual university landing page in the lms

This commit is contained in:
Calen Pennington
2012-10-11 13:18:01 -04:00
parent d21c5761df
commit 9e9825cb88
5 changed files with 12 additions and 3 deletions

View File

@@ -420,7 +420,7 @@ def university_profile(request, org_id):
Return the profile for the particular org_id. 404 if it's not valid.
"""
all_courses = modulestore().get_courses()
valid_org_ids = set(c.org for c in all_courses)
valid_org_ids = set(c.org for c in all_courses).union(settings.VIRTUAL_UNIVERSITIES)
if org_id not in valid_org_ids:
raise Http404("University Profile not found for {0}".format(org_id))

View File

@@ -58,6 +58,7 @@ LOGGING = get_logger_config(LOG_DIR,
COURSE_LISTINGS = ENV_TOKENS.get('COURSE_LISTINGS', {})
SUBDOMAIN_BRANDING = ENV_TOKENS.get('SUBDOMAIN_BRANDING', {})
VIRTUAL_UNIVERSITIES = ENV_TOKENS.get('VIRTUAL_UNIVERSITIES', [])
COMMENTS_SERVICE_URL = ENV_TOKENS.get("COMMENTS_SERVICE_URL",'')
COMMENTS_SERVICE_KEY = ENV_TOKENS.get("COMMENTS_SERVICE_KEY",'')

View File

@@ -4,6 +4,11 @@ Settings for the LMS that runs alongside the CMS on AWS
from ..dev import *
MITX_FEATURES['AUTH_USE_MIT_CERTIFICATES'] = False
SUBDOMAIN_BRANDING['edge'] = 'edge'
VIRTUAL_UNIVERSITIES = ['edge']
modulestore_options = {
'default_class': 'xmodule.raw_module.RawDescriptor',
'host': 'localhost',
@@ -24,6 +29,6 @@ CONTENTSTORE = {
'ENGINE': 'xmodule.contentstore.mongo.MongoContentStore',
'OPTIONS': {
'host': 'localhost',
'db' : 'xcontent',
'db': 'xcontent',
}
}

View File

@@ -101,6 +101,10 @@ SUBDOMAIN_BRANDING = {
'harvard': 'HarvardX',
}
# List of `university` landing pages to display, even though they may not
# have an actual course with that org set
VIRTUAL_UNIVERSITIES = []
COMMENTS_SERVICE_KEY = "PUT_YOUR_API_KEY_HERE"

View File

@@ -1,5 +1,4 @@
<%inherit file="base.html" />
<%! from django.core.urlresolvers import reverse %>
<%block name="title">edX edge</%block>
<%block name="bodyclass">no-header edge-landing</%block>