Merge branch 'master' of https://github.com/edx/edx-platform into slater/search
This commit is contained in:
@@ -41,7 +41,9 @@ def marketing_link(name):
|
||||
return settings.MKTG_URLS.get('ROOT') + settings.MKTG_URLS.get(name)
|
||||
# only link to the old pages when the marketing site isn't on
|
||||
elif not settings.MITX_FEATURES.get('ENABLE_MKTG_SITE') and name in link_map:
|
||||
return reverse(link_map[name])
|
||||
# don't try to reverse disabled marketing links
|
||||
if link_map[name] is not None:
|
||||
return reverse(link_map[name])
|
||||
else:
|
||||
log.warning("Cannot find corresponding link for name: {name}".format(name=name))
|
||||
return '#'
|
||||
|
||||
@@ -4,13 +4,15 @@ from django.core.urlresolvers import reverse
|
||||
from django.conf import settings
|
||||
from mitxmako.shortcuts import marketing_link
|
||||
from mock import patch
|
||||
|
||||
from nose.plugins.skip import SkipTest
|
||||
|
||||
class ShortcutsTests(TestCase):
|
||||
"""
|
||||
Test the mitxmako shortcuts file
|
||||
"""
|
||||
|
||||
# TODO: fix this test. It is causing intermittent test failures on
|
||||
# subsequent tests due to the way urls are loaded
|
||||
raise SkipTest()
|
||||
@override_settings(MKTG_URLS={'ROOT': 'dummy-root', 'ABOUT': '/about-us'})
|
||||
@override_settings(MKTG_URL_LINK_MAP={'ABOUT': 'login'})
|
||||
def test_marketing_link(self):
|
||||
|
||||
@@ -1194,6 +1194,10 @@ def accept_name_change(request):
|
||||
def _get_news(top=None):
|
||||
"Return the n top news items on settings.RSS_URL"
|
||||
|
||||
# Don't return anything if we're in a themed site
|
||||
if settings.MITX_FEATURES["USE_CUSTOM_THEME"]:
|
||||
return None
|
||||
|
||||
feed_data = cache.get("students_index_rss_feed_data")
|
||||
if feed_data is None:
|
||||
if hasattr(settings, 'RSS_URL'):
|
||||
|
||||
@@ -28,6 +28,9 @@ def export_to_xml(modulestore, contentstore, course_location, root_dir, course_d
|
||||
# export the course updates
|
||||
export_extra_content(export_fs, modulestore, course_location, 'course_info', 'info', '.html')
|
||||
|
||||
# export the 'about' data (e.g. overview, etc.)
|
||||
export_extra_content(export_fs, modulestore, course_location, 'about', 'about', '.html')
|
||||
|
||||
# export the grading policy
|
||||
policies_dir = export_fs.makeopendir('policies')
|
||||
course_run_policy_dir = policies_dir.makeopendir(course.location.name)
|
||||
|
||||
Reference in New Issue
Block a user