Commit bc5d7923 by dcadams

Merge branch 'master' of github.com:edx/edx-platform into feature-dcadams-usermanagement

parents 0fb11365 582b35a9
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
.AppleDouble .AppleDouble
database.sqlite database.sqlite
requirements/private.txt requirements/private.txt
lms/envs/private.py
cms/envs/private.py
courseware/static/js/mathjax/* courseware/static/js/mathjax/*
flushdb.sh flushdb.sh
build build
...@@ -27,6 +29,7 @@ conf/locale/en/LC_MESSAGES/*.po ...@@ -27,6 +29,7 @@ conf/locale/en/LC_MESSAGES/*.po
!messages.po !messages.po
lms/static/sass/*.css lms/static/sass/*.css
lms/static/sass/application.scss lms/static/sass/application.scss
lms/static/sass/course.scss
cms/static/sass/*.css cms/static/sass/*.css
lms/lib/comment_client/python lms/lib/comment_client/python
nosetests.xml nosetests.xml
......
...@@ -486,6 +486,9 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): ...@@ -486,6 +486,9 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
# check for custom_tags # check for custom_tags
self.verify_content_existence(module_store, root_dir, location, 'custom_tags', 'custom_tag_template') self.verify_content_existence(module_store, root_dir, location, 'custom_tags', 'custom_tag_template')
# check for about content
self.verify_content_existence(module_store, root_dir, location, 'about', 'about', '.html')
# check for graiding_policy.json # check for graiding_policy.json
filesystem = OSFS(root_dir / 'test_export/policies/6.002_Spring_2012') filesystem = OSFS(root_dir / 'test_export/policies/6.002_Spring_2012')
self.assertTrue(filesystem.exists('grading_policy.json')) self.assertTrue(filesystem.exists('grading_policy.json'))
......
...@@ -95,7 +95,8 @@ SESSION_COOKIE_DOMAIN = ENV_TOKENS.get('SESSION_COOKIE_DOMAIN') ...@@ -95,7 +95,8 @@ SESSION_COOKIE_DOMAIN = ENV_TOKENS.get('SESSION_COOKIE_DOMAIN')
# this is to fix a bug regarding simultaneous logins between edx.org and edge.edx.org which can # this is to fix a bug regarding simultaneous logins between edx.org and edge.edx.org which can
# happen with some browsers (e.g. Firefox) # happen with some browsers (e.g. Firefox)
if ENV_TOKENS.get('SESSION_COOKIE_NAME', None): if ENV_TOKENS.get('SESSION_COOKIE_NAME', None):
SESSION_COOKIE_NAME = ENV_TOKENS.get('SESSION_COOKIE_NAME') # NOTE, there's a bug in Django (http://bugs.python.org/issue18012) which necessitates this being a str()
SESSION_COOKIE_NAME = str(ENV_TOKENS.get('SESSION_COOKIE_NAME'))
#Email overrides #Email overrides
DEFAULT_FROM_EMAIL = ENV_TOKENS.get('DEFAULT_FROM_EMAIL', DEFAULT_FROM_EMAIL) DEFAULT_FROM_EMAIL = ENV_TOKENS.get('DEFAULT_FROM_EMAIL', DEFAULT_FROM_EMAIL)
......
...@@ -165,3 +165,11 @@ MITX_FEATURES['ENABLE_SERVICE_STATUS'] = True ...@@ -165,3 +165,11 @@ MITX_FEATURES['ENABLE_SERVICE_STATUS'] = True
# segment-io key for dev # segment-io key for dev
SEGMENT_IO_KEY = 'mty8edrrsg' SEGMENT_IO_KEY = 'mty8edrrsg'
#####################################################################
# Lastly, see if the developer has any local overrides.
try:
from .private import *
except ImportError:
pass
...@@ -41,7 +41,9 @@ def marketing_link(name): ...@@ -41,7 +41,9 @@ def marketing_link(name):
return settings.MKTG_URLS.get('ROOT') + settings.MKTG_URLS.get(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 # 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: 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: else:
log.warning("Cannot find corresponding link for name: {name}".format(name=name)) log.warning("Cannot find corresponding link for name: {name}".format(name=name))
return '#' return '#'
......
...@@ -1198,6 +1198,10 @@ def accept_name_change(request): ...@@ -1198,6 +1198,10 @@ def accept_name_change(request):
def _get_news(top=None): def _get_news(top=None):
"Return the n top news items on settings.RSS_URL" "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") feed_data = cache.get("students_index_rss_feed_data")
if feed_data is None: if feed_data is None:
if hasattr(settings, 'RSS_URL'): if hasattr(settings, 'RSS_URL'):
......
...@@ -28,6 +28,9 @@ def export_to_xml(modulestore, contentstore, course_location, root_dir, course_d ...@@ -28,6 +28,9 @@ def export_to_xml(modulestore, contentstore, course_location, root_dir, course_d
# export the course updates # export the course updates
export_extra_content(export_fs, modulestore, course_location, 'course_info', 'info', '.html') 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 # export the grading policy
policies_dir = export_fs.makeopendir('policies') policies_dir = export_fs.makeopendir('policies')
course_run_policy_dir = policies_dir.makeopendir(course.location.name) course_run_policy_dir = policies_dir.makeopendir(course.location.name)
......
...@@ -202,9 +202,10 @@ To view test coverage: ...@@ -202,9 +202,10 @@ To view test coverage:
2. Generate reports: 2. Generate reports:
rake coverage:html rake coverage
3. HTML reports are located in the `reports` folder. 3. Reports are located in the `reports` folder. The command
generates HTML and XML (Cobertura format) reports.
## Testing using queue servers ## Testing using queue servers
......
...@@ -84,7 +84,8 @@ rake phantomjs_jasmine_cms || TESTS_FAILED=1 ...@@ -84,7 +84,8 @@ rake phantomjs_jasmine_cms || TESTS_FAILED=1
rake phantomjs_jasmine_common/lib/xmodule || TESTS_FAILED=1 rake phantomjs_jasmine_common/lib/xmodule || TESTS_FAILED=1
rake phantomjs_jasmine_common/static/coffee || TESTS_FAILED=1 rake phantomjs_jasmine_common/static/coffee || TESTS_FAILED=1
rake coverage:xml coverage:html # Generate coverage reports
rake coverage
[ $TESTS_FAILED == '0' ] [ $TESTS_FAILED == '0' ]
rake autodeploy_properties rake autodeploy_properties
......
...@@ -99,6 +99,8 @@ CELERY_QUEUES = { ...@@ -99,6 +99,8 @@ CELERY_QUEUES = {
with open(ENV_ROOT / CONFIG_PREFIX + "env.json") as env_file: with open(ENV_ROOT / CONFIG_PREFIX + "env.json") as env_file:
ENV_TOKENS = json.load(env_file) ENV_TOKENS = json.load(env_file)
PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME', PLATFORM_NAME)
SITE_NAME = ENV_TOKENS['SITE_NAME'] SITE_NAME = ENV_TOKENS['SITE_NAME']
SESSION_COOKIE_DOMAIN = ENV_TOKENS.get('SESSION_COOKIE_DOMAIN') SESSION_COOKIE_DOMAIN = ENV_TOKENS.get('SESSION_COOKIE_DOMAIN')
...@@ -106,7 +108,8 @@ SESSION_COOKIE_DOMAIN = ENV_TOKENS.get('SESSION_COOKIE_DOMAIN') ...@@ -106,7 +108,8 @@ SESSION_COOKIE_DOMAIN = ENV_TOKENS.get('SESSION_COOKIE_DOMAIN')
# this is to fix a bug regarding simultaneous logins between edx.org and edge.edx.org which can # this is to fix a bug regarding simultaneous logins between edx.org and edge.edx.org which can
# happen with some browsers (e.g. Firefox) # happen with some browsers (e.g. Firefox)
if ENV_TOKENS.get('SESSION_COOKIE_NAME', None): if ENV_TOKENS.get('SESSION_COOKIE_NAME', None):
SESSION_COOKIE_NAME = ENV_TOKENS.get('SESSION_COOKIE_NAME') # NOTE, there's a bug in Django (http://bugs.python.org/issue18012) which necessitates this being a str()
SESSION_COOKIE_NAME = str(ENV_TOKENS.get('SESSION_COOKIE_NAME'))
BOOK_URL = ENV_TOKENS['BOOK_URL'] BOOK_URL = ENV_TOKENS['BOOK_URL']
MEDIA_URL = ENV_TOKENS['MEDIA_URL'] MEDIA_URL = ENV_TOKENS['MEDIA_URL']
...@@ -119,11 +122,18 @@ DEFAULT_FROM_EMAIL = ENV_TOKENS.get('DEFAULT_FROM_EMAIL', DEFAULT_FROM_EMAIL) ...@@ -119,11 +122,18 @@ DEFAULT_FROM_EMAIL = ENV_TOKENS.get('DEFAULT_FROM_EMAIL', DEFAULT_FROM_EMAIL)
DEFAULT_FEEDBACK_EMAIL = ENV_TOKENS.get('DEFAULT_FEEDBACK_EMAIL', DEFAULT_FEEDBACK_EMAIL) DEFAULT_FEEDBACK_EMAIL = ENV_TOKENS.get('DEFAULT_FEEDBACK_EMAIL', DEFAULT_FEEDBACK_EMAIL)
ADMINS = ENV_TOKENS.get('ADMINS', ADMINS) ADMINS = ENV_TOKENS.get('ADMINS', ADMINS)
SERVER_EMAIL = ENV_TOKENS.get('SERVER_EMAIL', SERVER_EMAIL) SERVER_EMAIL = ENV_TOKENS.get('SERVER_EMAIL', SERVER_EMAIL)
TECH_SUPPORT_EMAIL = ENV_TOKENS.get('TECH_SUPPORT_EMAIL', TECH_SUPPORT_EMAIL)
CONTACT_EMAIL = ENV_TOKENS.get('CONTACT_EMAIL', CONTACT_EMAIL)
BUGS_EMAIL = ENV_TOKENS.get('BUGS_EMAIL', BUGS_EMAIL)
#Theme overrides #Theme overrides
THEME_NAME = ENV_TOKENS.get('THEME_NAME', None) THEME_NAME = ENV_TOKENS.get('THEME_NAME', None)
if not THEME_NAME is None: if not THEME_NAME is None:
enable_theme(THEME_NAME) enable_theme(THEME_NAME)
FAVICON_PATH = 'themes/%s/images/favicon.ico' % THEME_NAME
# Marketing link overrides
MKTG_URL_LINK_MAP.update(ENV_TOKENS.get('MKTG_URL_LINK_MAP', {}))
#Timezone overrides #Timezone overrides
TIME_ZONE = ENV_TOKENS.get('TIME_ZONE', TIME_ZONE) TIME_ZONE = ENV_TOKENS.get('TIME_ZONE', TIME_ZONE)
......
...@@ -31,6 +31,9 @@ from path import path ...@@ -31,6 +31,9 @@ from path import path
from .discussionsettings import * from .discussionsettings import *
################################### FEATURES ################################### ################################### FEATURES ###################################
# The display name of the platform to be used in templates/emails/etc.
PLATFORM_NAME = "edX"
COURSEWARE_ENABLED = True COURSEWARE_ENABLED = True
ENABLE_JASMINE = False ENABLE_JASMINE = False
...@@ -315,6 +318,9 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' ...@@ -315,6 +318,9 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
DEFAULT_FROM_EMAIL = 'registration@edx.org' DEFAULT_FROM_EMAIL = 'registration@edx.org'
DEFAULT_FEEDBACK_EMAIL = 'feedback@edx.org' DEFAULT_FEEDBACK_EMAIL = 'feedback@edx.org'
SERVER_EMAIL = 'devops@edx.org' SERVER_EMAIL = 'devops@edx.org'
TECH_SUPPORT_EMAIL = 'technical@edx.org'
CONTACT_EMAIL = 'info@edx.org'
BUGS_EMAIL = 'bugs@edx.org'
ADMINS = ( ADMINS = (
('edX Admins', 'admin@edx.org'), ('edX Admins', 'admin@edx.org'),
) )
...@@ -330,6 +336,8 @@ STATICFILES_DIRS = [ ...@@ -330,6 +336,8 @@ STATICFILES_DIRS = [
PROJECT_ROOT / "static", PROJECT_ROOT / "static",
] ]
FAVICON_PATH = 'images/favicon.ico'
# Locale/Internationalization # Locale/Internationalization
TIME_ZONE = 'America/New_York' # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name TIME_ZONE = 'America/New_York' # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html
......
...@@ -243,3 +243,11 @@ MITX_FEATURES['ENABLE_PEARSON_LOGIN'] = False ...@@ -243,3 +243,11 @@ MITX_FEATURES['ENABLE_PEARSON_LOGIN'] = False
ANALYTICS_SERVER_URL = "http://127.0.0.1:9000/" ANALYTICS_SERVER_URL = "http://127.0.0.1:9000/"
ANALYTICS_API_KEY = "" ANALYTICS_API_KEY = ""
#####################################################################
# Lastly, see if the developer has any local overrides.
try:
from .private import *
except ImportError:
pass
...@@ -98,3 +98,16 @@ ...@@ -98,3 +98,16 @@
} }
} }
} }
//--------------------------------------
// The Following is to enable themes to
// display H1s on login and register pages
//--------------------------------------
.view-login .introduction header h1,
.view-register .introduction header h1 {
@include login_register_h1_style;
}
footer .references {
@include footer_references_style;
}
\ No newline at end of file
...@@ -4,6 +4,20 @@ ...@@ -4,6 +4,20 @@
@import 'base/font_face'; @import 'base/font_face';
@import 'base/mixins'; @import 'base/mixins';
@import 'base/variables'; @import 'base/variables';
## THEMING
## -------
## Set up this file to import an edX theme library if the environment
## indicates that a theme should be used. The assumption is that the
## theme resides outside of this main edX repository, in a directory
## called themes/<theme-name>/, with its base Sass file in
## themes/<theme-name>/static/sass/_<theme-name>.scss. That one entry
## point can be used to @import in as many other things as needed.
% if env.get('THEME_NAME') is not None:
// import theme's Sass overrides
@import '${env.get('THEME_NAME')}';
% endif
@import 'base/base'; @import 'base/base';
@import 'base/extends'; @import 'base/extends';
@import 'base/animations'; @import 'base/animations';
...@@ -36,16 +50,3 @@ ...@@ -36,16 +50,3 @@
@import 'news'; @import 'news';
@import 'shame'; @import 'shame';
## THEMING
## -------
## Set up this file to import an edX theme library if the environment
## indicates that a theme should be used. The assumption is that the
## theme resides outside of this main edX repository, in a directory
## called themes/<theme-name>/, with its base Sass file in
## themes/<theme-name>/static/sass/_<theme-name>.scss. That one entry
## point can be used to @import in as many other things as needed.
% if env.get('THEME_NAME') is not None:
// import theme's Sass overrides
@import '${env.get('THEME_NAME')}'
% endif
...@@ -42,3 +42,11 @@ ...@@ -42,3 +42,11 @@
overflow: hidden; overflow: hidden;
display: block; display: block;
} }
//-----------------
// Theme Mixin Styles
//-----------------
@mixin login_register_h1_style {}
@mixin footer_references_style {}
\ No newline at end of file
...@@ -62,11 +62,12 @@ $lighter-base-font-color: rgb(100,100,100); ...@@ -62,11 +62,12 @@ $lighter-base-font-color: rgb(100,100,100);
$text-color: $dark-gray; $text-color: $dark-gray;
$body-bg: rgb(250,250,250); $body-bg: rgb(250,250,250);
$container-bg: $white;
$header-image: linear-gradient(-90deg, rgba(255,255,255, 1), rgba(230,230,230, 0.9)); $header-image: linear-gradient(-90deg, rgba(255,255,255, 1), rgba(230,230,230, 0.9));
$header-bg: transparent; $header-bg: $white;
$courseware-header-image: linear-gradient(top, #fff, #eee); $courseware-header-image: linear-gradient(top, #fff, #eee);
$courseware-header-bg: transparent; $courseware-header-bg: transparent;
$footer-bg: transparent; $footer-bg: $white;
$courseware-footer-border: none; $courseware-footer-border: none;
$courseware-footer-shadow: none; $courseware-footer-shadow: none;
$courseware-footer-margin: 0px; $courseware-footer-margin: 0px;
...@@ -87,7 +88,7 @@ $dashboard-profile-header-color: transparent; ...@@ -87,7 +88,7 @@ $dashboard-profile-header-color: transparent;
$dashboard-profile-color: rgb(252,252,252); $dashboard-profile-color: rgb(252,252,252);
$dot-color: $light-gray; $dot-color: $light-gray;
$content-wrapper-bg: rgb(255,255,255); $content-wrapper-bg: shade($body-bg, 2%);
$course-bg-color: #d6d6d6; $course-bg-color: #d6d6d6;
$course-bg-image: url(../images/bg-texture.png); $course-bg-image: url(../images/bg-texture.png);
...@@ -100,6 +101,7 @@ $border-color-3: rgb(100,100,100); ...@@ -100,6 +101,7 @@ $border-color-3: rgb(100,100,100);
$border-color-4: rgb(252,252,252); $border-color-4: rgb(252,252,252);
$link-color: $blue; $link-color: $blue;
$link-color-d1: $m-blue;
$link-hover: $pink; $link-hover: $pink;
$selection-color-1: $pink; $selection-color-1: $pink;
$selection-color-2: #444; $selection-color-2: #444;
...@@ -118,9 +120,18 @@ $sidebar-active-image: linear-gradient(top, #e6e6e6, #d6d6d6); ...@@ -118,9 +120,18 @@ $sidebar-active-image: linear-gradient(top, #e6e6e6, #d6d6d6);
$form-bg-color: #fff; $form-bg-color: #fff;
$modal-bg-color: rgb(245,245,245); $modal-bg-color: rgb(245,245,245);
//TOP HEADER IMAGE MARGIN
$header_image_margin: -69px;
//FOOTER MARGIN
$footer_margin: ($baseline/4) 0 ($baseline*1.5) 0;
//----------------- //-----------------
// CSS BG Images // CSS BG Images
//----------------- //-----------------
$homepage-bg-image: '../images/homepage-bg.jpg'; $homepage-bg-image: '../images/homepage-bg.jpg';
$login-banner-image: '../images/bg-banner-login.png';
$register-banner-image: '../images/bg-banner-register.png';
$video-thumb-url: '../images/courses/video-thumb.jpg'; $video-thumb-url: '../images/courses/video-thumb.jpg';
...@@ -4,6 +4,20 @@ ...@@ -4,6 +4,20 @@
@import 'base/font_face'; @import 'base/font_face';
@import 'base/mixins'; @import 'base/mixins';
@import 'base/variables'; @import 'base/variables';
## THEMING
## -------
## Set up this file to import an edX theme library if the environment
## indicates that a theme should be used. The assumption is that the
## theme resides outside of this main edX repository, in a directory
## called themes/<theme-name>/, with its base Sass file in
## themes/<theme-name>/static/sass/_<theme-name>.scss. That one entry
## point can be used to @import in as many other things as needed.
% if env.get('THEME_NAME') is not None:
// import theme's Sass overrides
@import '${env.get('THEME_NAME')}';
% endif
@import 'base/base'; @import 'base/base';
@import 'base/extends'; @import 'base/extends';
@import 'base/animations'; @import 'base/animations';
......
...@@ -65,7 +65,7 @@ header.global.slim { ...@@ -65,7 +65,7 @@ header.global.slim {
height: auto; height: auto;
padding: 5px 0 10px 0; padding: 5px 0 10px 0;
border-bottom: 1px solid $outer-border-color; border-bottom: 1px solid $outer-border-color;
background: $white; background: $header-bg;
.guest .secondary { .guest .secondary {
margin-right: 0; margin-right: 0;
......
footer { footer {
border: $courseware-footer-border;
box-shadow: $courseware-footer-shadow; box-shadow: $courseware-footer-shadow;
margin-top: $courseware-footer-margin; margin-top: $courseware-footer-margin;
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// page-level // page-level
.view-register, .view-login, .view-passwordreset { .view-register, .view-login, .view-passwordreset {
background: $white; background: $body-bg;
...@@ -22,14 +22,14 @@ ...@@ -22,14 +22,14 @@
margin: 0 0 $baseline 0; margin: 0 0 $baseline 0;
font-weight: 300; font-weight: 300;
text-transform: uppercase; text-transform: uppercase;
color: $m-blue; color: $link-color-d1;
} }
.heading-3 { .heading-3 {
font-size: 21px; font-size: 21px;
margin: 0 0 $baseline 0; margin: 0 0 $baseline 0;
font-weight: 300; font-weight: 300;
color: $m-gray-d2; color: $base-font-color;
} }
.heading-4 { .heading-4 {
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
font-weight: 600; font-weight: 600;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0 !important; letter-spacing: 0 !important;
color: $m-blue-s1; color: saturate($link-color-d1,15%);
} }
.heading-5 { .heading-5 {
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
font-size: 18px; font-size: 18px;
margin: 0 0 $baseline 0; margin: 0 0 $baseline 0;
font-weight: 300; font-weight: 300;
color: $m-gray-a1; color: $base-font-color;
font-family: 'Open Sans', sans-serif; font-family: 'Open Sans', sans-serif;
line-height: lh(1.1); line-height: lh(1.1);
} }
...@@ -56,18 +56,18 @@ ...@@ -56,18 +56,18 @@
.body-text { .body-text {
font-size: 15px; font-size: 15px;
margin: 0 0 $baseline 0; margin: 0 0 $baseline 0;
color: $m-gray-a1; color: $base-font-color;
line-height: lh(1); line-height: lh(1);
} }
// specific examples - buttons // specific examples - buttons
.button-primary { .button-primary {
@include border-radius(0); @include border-radius(0);
@include linear-gradient($m-blue-s1 5%, $m-blue-d1 95%); @include linear-gradient(saturate($link-color-d1,15%) 5%, shade($link-color-d1,15%) 95%);
display: inline-block; display: inline-block;
padding: $baseline/2 $baseline*2.5; padding: $baseline/2 $baseline*2.5;
text-transform: lowercase; text-transform: lowercase;
color: $white; color: $very-light-text;
letter-spacing: 0.1rem; letter-spacing: 0.1rem;
font-weight: 500; font-weight: 500;
cursor: pointer; cursor: pointer;
...@@ -80,11 +80,11 @@ ...@@ -80,11 +80,11 @@
} }
.button-secondary { .button-secondary {
@include linear-gradient($m-gray 5%, $m-gray-d1 95%); @include linear-gradient($outer-border-color 5%, $lighter-base-font-color 95%);
display: inline-block; display: inline-block;
padding: $baseline/2 $baseline*2.5; padding: $baseline/2 $baseline*2.5;
text-transform: lowercase; text-transform: lowercase;
color: $white; color: $very-light-text;
letter-spacing: 0.1rem; letter-spacing: 0.1rem;
font-weight: 600; font-weight: 600;
cursor: pointer; cursor: pointer;
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
// layout // layout
.content-wrapper { .content-wrapper {
background: $m-gray-l2; background: $content-wrapper-bg;
padding-bottom: 0; padding-bottom: 0;
} }
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
@include clearfix; @include clearfix;
margin: 0 auto; margin: 0 auto;
width: 960px; width: 960px;
background: $white; background: $container-bg;
} }
.container { .container {
...@@ -142,14 +142,15 @@ ...@@ -142,14 +142,15 @@
@include transition(color 0.15s ease-in-out, border 0.15s ease-in-out); @include transition(color 0.15s ease-in-out, border 0.15s ease-in-out);
&:link, &:visited, &:hover, &:active { &:link, &:visited, &:hover, &:active {
color: $m-blue; color: $link-color-d1;
text-decoration: none !important; font-weight: 400;
text-decoration: none !important; // needed but nasty
font-family: $sans-serif; font-family: $sans-serif;
} }
&:hover, &:active { &:hover, &:active {
border-bottom: 1px dotted $m-blue-l1; text-decoration: none !important; // needed but nasty
color: $m-blue-l1; border-bottom: 1px dotted $link-color-d1;
} }
} }
...@@ -254,7 +255,7 @@ ...@@ -254,7 +255,7 @@
font-family: $sans-serif; font-family: $sans-serif;
font-style: normal; font-style: normal;
font-weight: 500; font-weight: 500;
color: $m-gray-d2; color: $base-font-color;
} }
label { label {
...@@ -267,7 +268,7 @@ ...@@ -267,7 +268,7 @@
@include transition(color 0.15s ease-in-out); @include transition(color 0.15s ease-in-out);
display: block; display: block;
margin-top: ($baseline/4); margin-top: ($baseline/4);
color: tint($m-gray, 50%); color: tint($outer-border-color, 50%);
font-size: em(13); font-size: em(13);
} }
...@@ -330,7 +331,7 @@ ...@@ -330,7 +331,7 @@
} }
textarea, input { textarea, input {
background: $white; background: $body-bg;
color: rgba(0,0,0,.25); color: rgba(0,0,0,.25);
} }
} }
...@@ -339,11 +340,11 @@ ...@@ -339,11 +340,11 @@
&.is-focused { &.is-focused {
label { label {
color: $m-blue-l1; color: saturate($link-color-d1,15%);
} }
.tip { .tip {
color: $m-blue-l1; color: saturate($link-color-d1,15%);
} }
} }
...@@ -461,7 +462,7 @@ ...@@ -461,7 +462,7 @@
// misc // misc
.orn-plus { .orn-plus {
color: $white; color: $very-light-text;
padding: 0 $baseline/4; padding: 0 $baseline/4;
} }
...@@ -492,7 +493,7 @@ ...@@ -492,7 +493,7 @@
header { header {
height: 120px; height: 120px;
border-bottom: 1px solid $m-gray; border-bottom: 1px solid $m-gray;
background: transparent url("../images/bg-banner-login.png") 0 0 no-repeat; background: transparent url($login-banner-image) 0 0 no-repeat;
} }
} }
} }
...@@ -506,14 +507,14 @@ ...@@ -506,14 +507,14 @@
header { header {
height: 120px; height: 120px;
border-bottom: 1px solid $m-gray; border-bottom: 1px solid $m-gray;
background: transparent url("../images/bg-banner-register.png") 0 0 no-repeat; background: transparent url($register-banner-image) 0 0 no-repeat;
} }
} }
} }
// password reset // password reset
.view-passwordreset { .view-passwordreset {
background: $m-gray-l2; background: $sidebar-color;
header.global { header.global {
...@@ -543,7 +544,7 @@ ...@@ -543,7 +544,7 @@
.inner-wrapper { .inner-wrapper {
@include border-radius(2px); @include border-radius(2px);
background: $white; background: $body-bg;
padding-bottom: 0 !important; padding-bottom: 0 !important;
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
border-bottom: 1px solid $border-color-3; border-bottom: 1px solid $border-color-3;
@include box-shadow(inset 0 1px 5px 0 rgba(0,0,0, 0.1)); @include box-shadow(inset 0 1px 5px 0 rgba(0,0,0, 0.1));
height: 280px; height: 280px;
margin-top: -69px; margin-top: $header_image_margin;
padding-top: 150px; padding-top: 150px;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
border-bottom: 1px solid $border-color-3; border-bottom: 1px solid $border-color-3;
@include box-shadow(inset 0 -1px 8px 0 rgba(0,0,0, 0.2), inset 0 1px 12px 0 rgba(0,0,0, 0.3)); @include box-shadow(inset 0 -1px 8px 0 rgba(0,0,0, 0.2), inset 0 1px 12px 0 rgba(0,0,0, 0.3));
height: 430px; height: 430px;
margin-top: -69px; margin-top: $header_image_margin;
width: 100%; width: 100%;
.inner-wrapper { .inner-wrapper {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
@include clearfix; @include clearfix;
height: 460px; height: 460px;
overflow: hidden; overflow: hidden;
margin-top: -69px; margin-top: $header_image_margin;
padding: 0px; padding: 0px;
width: flex-grid(12); width: flex-grid(12);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
@include box-shadow(0 -1px 5px 0 rgba(0,0,0, 0.1)); @include box-shadow(0 -1px 5px 0 rgba(0,0,0, 0.1));
border-top: 1px solid tint($m-gray,50%); border-top: 1px solid tint($m-gray,50%);
padding: 25px ($baseline/2) ($baseline*1.5) ($baseline/2); padding: 25px ($baseline/2) ($baseline*1.5) ($baseline/2);
background: $white; background: $footer-bg;
footer { footer {
@include clearfix(); @include clearfix();
...@@ -16,18 +16,18 @@ ...@@ -16,18 +16,18 @@
} }
a { a {
@include transition(color 0.15s ease-in-out, border 0.15s ease-in-out); @include transition(link-color 0.15s ease-in-out, border 0.15s ease-in-out);
&:link, &:visited, &:hover, &:active { &:link, &:visited, &:hover, &:active {
border-bottom: none; border-bottom: none;
color: $m-blue; color: $link-color;
text-decoration: none !important; text-decoration: none !important;
font-family: $sans-serif; font-family: $sans-serif;
} }
&:hover, &:active { &:hover, &:active {
border-bottom: 1px dotted $m-blue-s1; border-bottom: 1px dotted $link-color;
color: $m-blue-s1; color: $link-color;
} }
} }
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
.nav-colophon { .nav-colophon {
@include clearfix(); @include clearfix();
margin: ($baseline/4) 0 ($baseline*1.5) 0; margin: $footer_margin;
li { li {
float: left; float: left;
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
color: tint($black, 20%); color: tint($black, 20%);
&:hover, &:active { &:hover, &:active {
color: $m-blue-s1; color: $link-color;
} }
} }
......
header.global { header.global {
border-bottom: 1px solid $m-gray; border-bottom: 1px solid $m-gray;
@include box-shadow(0 1px 5px 0 rgba(0,0,0, 0.1)); @include box-shadow(0 1px 5px 0 rgba(0,0,0, 0.1));
background: $white; background: $header-bg;
height: 76px; height: 76px;
position: relative; position: relative;
width: 100%; width: 100%;
...@@ -246,12 +246,12 @@ header.global { ...@@ -246,12 +246,12 @@ header.global {
a { a {
display:block; display:block;
padding: ($baseline/4); padding: ($baseline/4);
color: $m-gray-d1; color: $lighter-base-font-color;
font-weight: 600; font-weight: 600;
&:hover, &:active { &:hover, &:active {
text-decoration: none; text-decoration: none;
color: $m-blue-s1; color: $link-color;
} }
} }
...@@ -259,7 +259,7 @@ header.global { ...@@ -259,7 +259,7 @@ header.global {
a { a {
text-decoration: none; text-decoration: none;
color: $m-blue-s1; color: $link-color;
} }
} }
} }
...@@ -280,11 +280,11 @@ header.global { ...@@ -280,11 +280,11 @@ header.global {
a { a {
@include border-radius(0); @include border-radius(0);
@include linear-gradient($m-blue-s1 5%, $m-blue-d1 95%); @include linear-gradient(saturate($link-color-d1,15%) 5%, shade($link-color-d1,15%) 95%);
display: inline-block; display: inline-block;
padding: $baseline/2 $baseline*2.5; padding: $baseline/2 $baseline*2.5;
text-transform: lowercase; text-transform: lowercase;
color: $white; color: $very-light-text;
letter-spacing: 0.1rem; letter-spacing: 0.1rem;
font-weight: 300; font-weight: 300;
cursor: pointer; cursor: pointer;
...@@ -324,6 +324,6 @@ header.global { ...@@ -324,6 +324,6 @@ header.global {
a { a {
text-decoration: none; text-decoration: none;
color: $m-blue-s1 !important; color: $link-color !important;
} }
} }
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<%namespace file='main.html' import="stanford_theme_enabled"/>
<%! <%!
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from courseware.courses import course_image_url, get_course_about_section from courseware.courses import course_image_url, get_course_about_section
...@@ -24,7 +25,11 @@ ...@@ -24,7 +25,11 @@
<p>${get_course_about_section(course, 'short_description')}</p> <p>${get_course_about_section(course, 'short_description')}</p>
</div> </div>
<div class="bottom"> <div class="bottom">
<a href="${reverse('university_profile', args=[course.org])}" class="university">${get_course_about_section(course, 'university')}</a> % if stanford_theme_enabled():
<span class="university">${get_course_about_section(course, 'university')}</span>
% else:
<a href="${reverse('university_profile', args=[course.org])}" class="university">${get_course_about_section(course, 'university')}</a>
% endif
<span class="start-date">${course.start_date_text}</span> <span class="start-date">${course.start_date_text}</span>
</div> </div>
</section> </section>
......
...@@ -8,7 +8,11 @@ ...@@ -8,7 +8,11 @@
<%inherit file="../main.html" /> <%inherit file="../main.html" />
<%block name="headextra"> <%block name="headextra">
<%include file="../google_analytics.html" /> % if self.theme_enabled():
<%include file="../theme-google-analytics.html" />
% else:
<%include file="../google_analytics.html" />
% endif
</%block> </%block>
<%block name="js_extra"> <%block name="js_extra">
...@@ -46,7 +50,12 @@ ...@@ -46,7 +50,12 @@
<div class="table"> <div class="table">
<section class="intro"> <section class="intro">
<hgroup> <hgroup>
<h1>${course.number}: ${get_course_about_section(course, "title")}<a href="${reverse('university_profile', args=[course.org])}">${get_course_about_section(course, "university")}</a></h1> <h1>
${course.number}: ${get_course_about_section(course, "title")}
% if not self.theme_enabled():
<a href="${reverse('university_profile', args=[course.org])}">${get_course_about_section(course, "university")}</a>
% endif
</h1>
</hgroup> </hgroup>
<div class="main-cta"> <div class="main-cta">
...@@ -105,14 +114,26 @@ ...@@ -105,14 +114,26 @@
<header> <header>
<div class="social-sharing"> <div class="social-sharing">
<div class="sharing-message">Share with friends and family!</div> <div class="sharing-message">Share with friends and family!</div>
<a href="http://twitter.com/intent/tweet?text=I+just+registered+for+${course.number}+${get_course_about_section(course, 'title')}+through+@edxonline:+http://www.edx.org${reverse('about_course', args=[course.id])}" class="share"> ## TODO: this should probably be an overrideable block,
<img src="${static.url('images/social/twitter-sharing.png')}"> ## or something allowing themes to do whatever they
</a> ## want here (and on this whole page, really).
<a href="http://www.facebook.com/EdxOnline" class="share"> <img src="${static.url('images/social/facebook-sharing.png')}"> % if self.stanford_theme_enabled():
</a> <a href="http://twitter.com/intent/tweet?text=I+just+registered+for+${course.number}+${get_course_about_section(course, 'title')}!+(http://class.stanford.edu)" class="share">
<a href="mailto:?subject=Take%20a%20course%20with%20edX%20online&body=I%20just%20registered%20for%20${course.number}%20${get_course_about_section(course, 'title')}%20through%20edX:+http://edx.org/${reverse('about_course', args=[course.id])}" class="share"> <img src="${static.url('images/social/twitter-sharing.png')}">
<img src="${static.url('images/social/email-sharing.png')}"> </a>
</a> <a href="mailto:?subject=Take%20a%20course%20at%20Stanford%20online!&body=I%20just%20registered%20for%20${course.number}%20${get_course_about_section(course, 'title')}+(http://class.stanford.edu)" class="share">
<img src="${static.url('images/social/email-sharing.png')}">
</a>
% else:
<a href="http://twitter.com/intent/tweet?text=I+just+registered+for+${course.number}+${get_course_about_section(course, 'title')}+through+@edxonline:+http://www.edx.org${reverse('about_course', args=[course.id])}" class="share">
<img src="${static.url('images/social/twitter-sharing.png')}">
</a>
<a href="http://www.facebook.com/EdxOnline" class="share"> <img src="${static.url('images/social/facebook-sharing.png')}">
</a>
<a href="mailto:?subject=Take%20a%20course%20with%20edX%20online&body=I%20just%20registered%20for%20${course.number}%20${get_course_about_section(course, 'title')}%20through%20edX:+http://edx.org/${reverse('about_course', args=[course.id])}" class="share">
<img src="${static.url('images/social/email-sharing.png')}">
</a>
% endif
</div> </div>
</header> </header>
......
...@@ -5,13 +5,21 @@ ...@@ -5,13 +5,21 @@
<%block name="title"><title>Courses</title></%block> <%block name="title"><title>Courses</title></%block>
<section class="find-courses"> <section class="find-courses">
<header class="search" style="background: url('/static/images/homepage-bg.jpg')"> <header class="search">
<div class="inner-wrapper main-search"> <div class="inner-wrapper main-search">
<hgroup> <hgroup>
<div class="logo"> <div class="logo">
<img src="${static.url('images/edx_bw.png')}" /> % if self.stanford_theme_enabled():
<img src="${static.url('themes/stanford/images/seal.png')}" />
% else:
<img src="${static.url('images/edx_bw.png')}" />
% endif
</div> </div>
<h2>Explore free courses from leading universities.</h2> % if self.stanford_theme_enabled():
<h2>Explore free courses from Stanford University.</h2>
% else:
<h2>Explore free courses from leading universities.</h2>
% endif
</hgroup> </hgroup>
</div> </div>
</header> </header>
......
...@@ -150,6 +150,8 @@ ...@@ -150,6 +150,8 @@
</ul> </ul>
</section> </section>
## `news` should be `None` whenever a non-edX theme is enabled:
## see common/djangoapps/student/views.py#_get_news
%if news: %if news:
<article class="news-carousel"> <article class="news-carousel">
<header> <header>
...@@ -292,7 +294,7 @@ ...@@ -292,7 +294,7 @@
${"{0:.0f}%".format(float(course.lowest_passing_grade)*100)}</span>. ${"{0:.0f}%".format(float(course.lowest_passing_grade)*100)}</span>.
% elif cert_status['status'] == 'restricted': % elif cert_status['status'] == 'restricted':
<p class="message-copy"> <p class="message-copy">
Your certificate is being held pending confirmation that the issuance of your certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know by contacting <a class="contact-link" href="mailto:info@edx.org">info@edx.org</a>. Your certificate is being held pending confirmation that the issuance of your certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know by contacting <a class="contact-link" href="mailto:${settings.CONTACT_EMAIL}">${settings.CONTACT_EMAIL}</a>.
</p> </p>
% endif % endif
</p> </p>
...@@ -449,11 +451,11 @@ ...@@ -449,11 +451,11 @@
<div id="change_name_body"> <div id="change_name_body">
<form id="change_name_form"> <form id="change_name_form">
<div id="change_name_error" class="modal-form-error"> </div> <div id="change_name_error" class="modal-form-error"> </div>
<p>To uphold the credibility of edX certificates, all name changes will be logged and recorded.</p> <p>To uphold the credibility of ${settings.PLATFORM_NAME} certificates, all name changes will be logged and recorded.</p>
<br/> <br/>
<fieldset> <fieldset>
<div class="input-group"> <div class="input-group">
<label>Enter your desired full name, as it will appear on the edX certificates: </label> <label>Enter your desired full name, as it will appear on the ${settings.PLATFORM_NAME} certificates: </label>
<input id="new_name_field" value="" type="text" /> <input id="new_name_field" value="" type="text" />
<label>Reason for name change:</label> <label>Reason for name change:</label>
<textarea id="name_rationale_field" value=""></textarea> <textarea id="name_rationale_field" value=""></textarea>
......
<h1>E-mail change failed.</h1> <%inherit file="main.html" />
<p>We were unable to send a confirmation email to ${email}</p> <section class="container activation">
<section class="message">
<h1 class="invalid">E-mail change failed</h1>
<hr class="horizontal-divider">
<p>We were unable to send a confirmation email to ${email}</p>
<p>Go back to the <a href="/">home page</a>.</p>
</section>
</section>
<h1>E-mail change successful!</h1> <%! from django.core.urlresolvers import reverse %>
<%inherit file="main.html" />
<p>You should see your new email in your <a href="/dashboard">dashboard</a>.</p> <section class="container activation">
\ No newline at end of file
<section class="message">
<h1 class="valid">E-mail change successful!</h1>
<hr class="horizontal-divider">
<p>You should see your new email in your <a href="${reverse('dashboard')}">dashboard</a>.</p>
</section>
</section>
<h1> Could not change e-mail </h1> <%inherit file="main.html" />
An account with the new e-mail address already exists. Sorry. <section class="container activation">
<section class="message">
<h1 class="invalid">E-mail change failed</h1>
<hr class="horizontal-divider">
<p>An account with the new e-mail address already exists.</p>
<p>Go back to the <a href="/">home page</a>.</p>
</section>
</section>
Thank you for signing up for edX! To activate your account, <%namespace file="../main.html" import="stanford_theme_enabled" />
please copy and paste this address into your web browser's
address bar: Thank you for signing up for ${settings.PLATFORM_NAME}! To activate
your account, please copy and paste this address into your web
browser's address bar:
% if is_secure: % if is_secure:
https://${ site }/activate/${ key } https://${ site }/activate/${ key }
...@@ -8,6 +10,15 @@ address bar: ...@@ -8,6 +10,15 @@ address bar:
http://${ site }/activate/${ key } http://${ site }/activate/${ key }
% endif % endif
If you didn't request this, you don't need to do anything; you won't ## Temporary hack until we develop a better way to adjust language
receive any more email from us. Please do not reply to this e-mail; if % if stanford_theme_enabled():
you require assistance, check the help section of the edX web site. If you didn't request this, you don't need to do anything; you won't
receive any more email from us. Please do not reply to this e-mail;
if you require assistance, check the about section of the
${settings.PLATFORM_NAME} Courses web site.
% else:
If you didn't request this, you don't need to do anything; you won't
receive any more email from us. Please do not reply to this e-mail;
if you require assistance, check the help section of the
${settings.PLATFORM_NAME} web site.
% endif
Your account for edX Your account for ${settings.PLATFORM_NAME}
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
This is to confirm that you changed the e-mail associated with edX <%namespace file="../main.html" import="stanford_theme_enabled" />
from ${old_email} to ${new_email}. If you did not make this request, ## Again, ugly hack that needs to be changed
please contact us immediately. Contact information is listed at: ## TODO: this probably needs better formatting to look nice in an
## email client (Mako leaves awkward whitespace)
% if stanford_theme_enabled():
This is to confirm that you changed the e-mail associated with
${settings.PLATFORM_NAME} from ${old_email} to ${new_email}. If you
did not make this request, please contact us at
% if is_secure: ${settings.CONTACT_EMAIL}
https://${ site }${reverse('contact')}
% else: % else:
http://${ site }${reverse('contact')} This is to confirm that you changed the e-mail associated with
${settings.PLATFORM_NAME} from ${old_email} to ${new_email}. If you
did not make this request, please contact us immediately. Contact
information is listed at:
% if is_secure:
https://${ site }${reverse('contact')}
% else:
http://${ site }${reverse('contact')}
% endif
% endif % endif
We keep a log of old e-mails, so if this request was unintentional, we We keep a log of old e-mails, so if this request was unintentional, we
......
We received a request to change the e-mail associated with your edX <%namespace file="../main.html" import="stanford_theme_enabled" />
account from ${old_email} to ${new_email}. If this is correct, please We received a request to change the e-mail associated with your
confirm your new e-mail address by visiting: ${settings.PLATFORM_NAME} account from ${old_email} to ${new_email}.
If this is correct, please confirm your new e-mail address by
visiting:
% if is_secure: % if is_secure:
https://${ site }/email_confirm/${ key } https://${ site }/email_confirm/${ key }
...@@ -8,6 +10,15 @@ confirm your new e-mail address by visiting: ...@@ -8,6 +10,15 @@ confirm your new e-mail address by visiting:
http://${ site }/email_confirm/${ key } http://${ site }/email_confirm/${ key }
% endif % endif
If you didn't request this, you don't need to do anything; you won't ## TODO: fix this ugly hack
receive any more email from us. Please do not reply to this e-mail; if % if stanford_theme_enabled():
you require assistance, check the help section of the edX web site. If you didn't request this, you don't need to do anything; you won't
receive any more email from us. Please do not reply to this e-mail;
if you require assistance, check the about section of the
${settings.PLATFORM_NAME} Courses web site.
% else:
If you didn't request this, you don't need to do anything; you won't
receive any more email from us. Please do not reply to this e-mail;
if you require assistance, check the help section of the
${settings.PLATFORM_NAME} web site.
% endif
Request to change edX account e-mail Request to change ${settings.PLATFORM_NAME} account e-mail
<%namespace file="../main.html" import="stanford_theme_enabled" />
(Not currently used) (Not currently used)
We are sorry. Our course staff did not approve your request to change ## TODO: fix this ugly hack
your name from ${old_name} to ${new_name}. If you need further % if stanford_theme_enabled():
assistance, please e-mail the course staff at ta@edx.org. We are sorry. Our course staff did not approve your request to change
your name from ${old_name} to ${new_name}. If you need further
assistance, please e-mail the tech support at
${settings.TECH_SUPPORT_EMAIL}.
% else:
We are sorry. Our course staff did not approve your request to change
your name from ${old_name} to ${new_name}. If you need further
assistance, please e-mail the course staff at ta@edx.org.
% endif
edX has launched! To log in, visit: <%namespace file="../main.html" import="stanford_theme_enabled" />
## TODO: fix ugly hack
% if stanford_theme_enabled():
${settings.PLATFORM_NAME} Courses has launched! To log in, visit:
% else:
${settings.PLATFORM_NAME} has launched! To log in, visit:
% endif
% if is_secure: % if is_secure:
https://edx.org https://${settings.SITE_NAME}
% else: % else:
http://edx.org http://${settings.SITE_NAME}
% endif % endif
A login button will be at the top right-hand corner of the window. A login button will be at the top right-hand corner of the window.
...@@ -14,7 +20,12 @@ place to reset it. ...@@ -14,7 +20,12 @@ place to reset it.
Thanks for joining us for the ride! Thanks for joining us for the ride!
The edX team ## TODO: fix ugly hack
% if stanford_theme_enabled():
The ${settings.PLATFORM_NAME} Courses team
% else:
The ${settings.PLATFORM_NAME} team
% endif
(Please note that this e-mail address does not receive e-mails -- (Please note that this e-mail address does not receive e-mails --
if you need assistance, please use the help section of the web if you need assistance, please use the help section of the web
......
Welcome to edX! <%namespace file="../main.html" import="stanford_theme_enabled" />
## TODO: fix ugly hack
% if stanford_theme_enabled():
Welcome to ${settings.PLATFORM_NAME} Courses!
% else:
Welcome to ${settings.PLATFORM_NAME}!
% endif
<h1>E-mail change successful!</h1> <%! from django.core.urlresolvers import reverse %>
<%inherit file="main.html" />
<p> You should see your new name in your profile. <section class="container activation">
<section class="message">
<h1 class="invalid">E-mail change successful!</h1>
<hr class="horizontal-divider">
<p>You should see your new email in your <a href="${reverse('dashboard')}">dashboard</a>.</p>
</section>
</section>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<li class="field required text" id="field-email"> <li class="field required text" id="field-email">
<label for="pwd_reset_email">Your E-mail Address</label> <label for="pwd_reset_email">Your E-mail Address</label>
<input class="" id="pwd_reset_email" type="email" name="email" value="" placeholder="example: username@domain.com" /> <input class="" id="pwd_reset_email" type="email" name="email" value="" placeholder="example: username@domain.com" />
<span class="tip tip-input">This is the email address you used to register with edX</span> <span class="tip tip-input">This is the email address you used to register with ${settings.PLATFORM_NAME}</span>
</li> </li>
</ol> </ol>
</fieldset> </fieldset>
......
...@@ -21,9 +21,12 @@ ...@@ -21,9 +21,12 @@
discussion_link = get_discussion_link(course) if course else None discussion_link = get_discussion_link(course) if course else None
%> %>
% if discussion_link:
<p>For <strong>questions on course lectures, homework, tools, or materials for this course</strong>, post in the <p>For <strong>questions on course lectures, homework, tools, or materials for this course</strong>, post in the
<a href="${discussion_link}" target="_blank"/>course discussion forum</a>. <a href="${discussion_link}" target="_blank"/>course discussion forum</a>.
</p> </p>
% endif
<p>Have <strong>general questions about edX</strong>? You can find lots of helpful information in the edX <p>Have <strong>general questions about edX</strong>? You can find lots of helpful information in the edX
<a href="/help" target="_blank">FAQ</a>.</p> <a href="/help" target="_blank">FAQ</a>.</p>
......
<h1>Invalid key</h1> <%inherit file="main.html" />
<p> This e-mail key is not valid. Please check: <section class="container activation">
<ul>
<li> Was this key already used? Check whether the e-mail change has already happened. <section class="message">
<li> Did your e-mail client break the URL into two lines? <h1 class="invalid">Invalid email change key</h1>
<li> The keys are valid for a limited amount of time. Has the key expired? <hr class="horizontal-divider">
</ul> <p> This e-mail key is not valid. Please check:</p>
<ul>
<li>Was this key already used? Check whether the e-mail change has already happened.
<li>Did your e-mail client break the URL into two lines?
<li>The keys are valid for a limited amount of time. Has the key expired?
</ul>
<p>Go back to the <a href="/">home page</a>.</p>
</section>
</section>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%block name="title"><title>Log into your edX Account</title></%block> <%block name="title"><title>Log into your ${settings.PLATFORM_NAME} Account</title></%block>
<%block name="js_extra"> <%block name="js_extra">
<script type="text/javascript"> <script type="text/javascript">
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
$submitButton. $submitButton.
removeClass('is-disabled'). removeClass('is-disabled').
removeProp('disabled'). removeProp('disabled').
html('Log into My edX Account <span class="orn-plus">+</span> Access My Courses'); html('Log into My ${settings.PLATFORM_NAME} Account <span class="orn-plus">+</span> Access My Courses');
} }
else { else {
$submitButton. $submitButton.
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
<!-- status messages --> <!-- status messages -->
<div role="alert" class="status message"> <div role="alert" class="status message">
<h3 class="message-title">We're Sorry, edX accounts are unavailable currently</h3> <h3 class="message-title">We're Sorry, ${settings.PLATFORM_NAME} accounts are unavailable currently</h3>
<p class="message-copy">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p> <p class="message-copy">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
</div> </div>
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
</div> </div>
<p class="instructions sr"> <p class="instructions sr">
Please provide the following information to log into your edX account. Required fields are noted by <strong class="indicator">bold text and an asterisk (*)</strong>. Please provide the following information to log into your ${settings.PLATFORM_NAME} account. Required fields are noted by <strong class="indicator">bold text and an asterisk (*)</strong>.
</p> </p>
<fieldset class="group group-form group-form-requiredinformation"> <fieldset class="group group-form group-form-requiredinformation">
...@@ -164,14 +164,16 @@ ...@@ -164,14 +164,16 @@
<div class="cta cta-help"> <div class="cta cta-help">
<h3>Not Enrolled?</h3> <h3>Not Enrolled?</h3>
<p><a href="${reverse('register_user')}">Sign up for edX today!</a></p> <p><a href="${reverse('register_user')}">Sign up for ${settings.PLATFORM_NAME} today!</a></p>
<h3>Need Help?</h3> ## Disable help unless the FAQ marketing link is enabled
<p>Looking for help in logging in or with your edX account? % if settings.MKTG_URL_LINK_MAP.get('FAQ'):
<a href="${marketing_link('FAQ')}"> <h3>Need Help?</h3>
View our help section for answers to commonly asked questions. <p>Looking for help in logging in or with your ${settings.PLATFORM_NAME} account?
</a></p> <a href="${marketing_link('FAQ')}">
View our help section for answers to commonly asked questions.
</a></p>
% endif
</div> </div>
</aside> </aside>
</section> </section>
......
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<%! from django.utils import html %> <%! from django.utils import html %>
## Define a couple of helper functions to make life easier when
## embedding theme conditionals into templates. All inheriting
## templates have access to these functions, and we can import these
## into non-inheriting templates via the %namespace tag.
<%def name="theme_enabled()">
<% return settings.MITX_FEATURES["USE_CUSTOM_THEME"] %>
</%def>
<%def name="stanford_theme_enabled()">
<% return theme_enabled() and getattr(settings, "THEME_NAME") == "stanford" %>
</%def>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<%block name="title"><title>edX</title></%block> <%block name="title">
% if stanford_theme_enabled():
<title>Home | class.stanford.edu</title>
% else:
<title>edX</title>
% endif
</%block>
<script type="text/javascript"> <script type="text/javascript">
/* immediately break out of an iframe if coming /* immediately break out of an iframe if coming
from the marketing website */ from the marketing website */
...@@ -14,12 +33,15 @@ ...@@ -14,12 +33,15 @@
})(this); })(this);
</script> </script>
<link rel="icon" type="image/x-icon" href="${static.url('images/favicon.ico')}" /> <link rel="icon" type="image/x-icon" href="${static.url(settings.FAVICON_PATH)}" />
<%static:css group='application'/> <%static:css group='application'/>
<%static:js group='main_vendor'/> <%static:js group='main_vendor'/>
<%block name="headextra"/> <%block name="headextra"/>
% if theme_enabled():
<%include file="theme-head-extra.html" />
% endif
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="${static.url('js/html5shiv.js')}"></script> <script src="${static.url('js/html5shiv.js')}"></script>
...@@ -32,14 +54,20 @@ ...@@ -32,14 +54,20 @@
<meta name="google-site-verification" content="_mipQ4AtZQDNmbtOkwehQDOgCxUUV2fb_C0b6wbiRHY" /> <meta name="google-site-verification" content="_mipQ4AtZQDNmbtOkwehQDOgCxUUV2fb_C0b6wbiRHY" />
% if not course: % if not course:
<%include file="google_analytics.html" /> % if theme_enabled():
<%include file="theme-google-analytics.html" />
% else:
<%include file="google_analytics.html" />
% endif
% endif % endif
</head> </head>
<body class="<%block name='bodyclass'/>"> <body class="<%block name='bodyclass'/>">
% if not suppress_toplevel_navigation: % if theme_enabled():
<%include file="theme-header.html" />
% elif not suppress_toplevel_navigation:
<%include file="navigation.html" /> <%include file="navigation.html" />
% endif % endif
...@@ -48,7 +76,9 @@ ...@@ -48,7 +76,9 @@
<%block name="bodyextra"/> <%block name="bodyextra"/>
</section> </section>
% if not suppress_toplevel_navigation: % if theme_enabled():
<%include file="theme-footer.html" />
% elif not suppress_toplevel_navigation:
<%include file="footer.html" /> <%include file="footer.html" />
% endif % endif
......
## mako ## mako
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<%namespace file='main.html' import="login_query"/> <%namespace file='main.html' import="login_query, stanford_theme_enabled"/>
<%! <%!
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
...@@ -10,6 +10,9 @@ import branding ...@@ -10,6 +10,9 @@ import branding
from status.status import get_site_status_msg from status.status import get_site_status_msg
%> %>
## Provide a hook for themes to inject branding on top.
<%block name="navigation_top" />
<%block cached="False"> <%block cached="False">
<% <%
try: try:
...@@ -38,9 +41,12 @@ site_status_msg = get_site_status_msg(course_id) ...@@ -38,9 +41,12 @@ site_status_msg = get_site_status_msg(course_id)
<nav> <nav>
<h1 class="logo"> <h1 class="logo">
<a href="${marketing_link('ROOT')}"> <a href="${marketing_link('ROOT')}">
<%block name="navigation_logo">
<img src="${static.url(branding.get_logo_url(request.META.get('HTTP_HOST')))}" alt="edX home" /> <img src="${static.url(branding.get_logo_url(request.META.get('HTTP_HOST')))}" alt="edX home" />
</a></h1> </%block>
</a>
</h1>
% if course: % if course:
<h2><span class="provider">${course.org}:</span> ${course.number} ${course.display_name_with_default}</h2> <h2><span class="provider">${course.org}:</span> ${course.number} ${course.display_name_with_default}</h2>
...@@ -49,9 +55,11 @@ site_status_msg = get_site_status_msg(course_id) ...@@ -49,9 +55,11 @@ site_status_msg = get_site_status_msg(course_id)
% if user.is_authenticated(): % if user.is_authenticated():
<ol class="left nav-global authenticated"> <ol class="left nav-global authenticated">
<li class="nav-global-01"> <%block name="navigation_global_links_authenticated">
<a href="${marketing_link('COURSES')}">Find Courses</a> <li class="nav-global-01">
</li> <a href="${marketing_link('COURSES')}">Find Courses</a>
</li>
</%block>
</ol> </ol>
<ol class="user"> <ol class="user">
<li class="primary"> <li class="primary">
...@@ -63,10 +71,9 @@ site_status_msg = get_site_status_msg(course_id) ...@@ -63,10 +71,9 @@ site_status_msg = get_site_status_msg(course_id)
<li class="primary"> <li class="primary">
<a href="#" class="dropdown">&#9662</a> <a href="#" class="dropdown">&#9662</a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li> <%block name="navigation_dropdown_menu_links" >
<a href="${marketing_link('FAQ')}"> <li><a href="${marketing_link('FAQ')}">Help</a></li>
Help </%block>
</a></li>
<li><a href="${reverse('logout')}">Log Out</a></li> <li><a href="${reverse('logout')}">Log Out</a></li>
</ul> </ul>
</li> </li>
...@@ -74,17 +81,19 @@ site_status_msg = get_site_status_msg(course_id) ...@@ -74,17 +81,19 @@ site_status_msg = get_site_status_msg(course_id)
% else: % else:
<ol class="left nav-global"> <ol class="left nav-global">
% if settings.MITX_FEATURES.get('ENABLE_MKTG_SITE'): <%block name="navigation_global_links">
<li class="nav-global-01"> % if settings.MITX_FEATURES.get('ENABLE_MKTG_SITE'):
<a href="${marketing_link('HOW_IT_WORKS')}">How it Works</a> <li class="nav-global-01">
</li> <a href="${marketing_link('HOW_IT_WORKS')}">How it Works</a>
<li class="nav-global-02"> </li>
<a href="${marketing_link('COURSES')}">Courses</a> <li class="nav-global-02">
</li> <a href="${marketing_link('COURSES')}">Courses</a>
<li class="nav-global-03"> </li>
<a href="${marketing_link('SCHOOLS')}">Schools</a> <li class="nav-global-03">
</li> <a href="${marketing_link('SCHOOLS')}">Schools</a>
% endif </li>
% endif
</%block>
% if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']: % if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']:
<li class="nav-global-04"> <li class="nav-global-04">
<a class="cta cta-register" href="/register">Register Now</a> <a class="cta cta-register" href="/register">Register Now</a>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<%! from datetime import date %> <%! from datetime import date %>
<%! import calendar %> <%! import calendar %>
<%block name="title"><title>Register for edX</title></%block> <%block name="title"><title>Register for ${settings.PLATFORM_NAME}</title></%block>
<%block name="js_extra"> <%block name="js_extra">
<script type="text/javascript"> <script type="text/javascript">
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
$submitButton. $submitButton.
removeClass('is-disabled'). removeClass('is-disabled').
removeProp('disabled'). removeProp('disabled').
html('Create my edX Account'); html('Create my ${settings.PLATFORM_NAME} Account');
} }
else { else {
$submitButton. $submitButton.
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<section class="introduction"> <section class="introduction">
<header> <header>
<h1 class="sr">${_("Register for edX")}</h1> <h1 class="sr">Register for ${settings.PLATFORM_NAME}</h1>
</header> </header>
</section> </section>
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<!-- status messages --> <!-- status messages -->
<div role="alert" class="status message"> <div role="alert" class="status message">
<h3 class="message-title">We're sorry, edX enrollment is not available in your region</h3> <h3 class="message-title">We're sorry, ${settings.PLATFORM_NAME} enrollment is not available in your region</h3>
<p class="message-copy">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p> <p class="message-copy">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
</div> </div>
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
</div> </div>
<p class="instructions"> <p class="instructions">
Please complete the following fields to register for an edX account. <br /> Please complete the following fields to register for an account. <br />
Required fields are noted by <strong class="indicator">bold text and an asterisk (*)</strong>. Required fields are noted by <strong class="indicator">bold text and an asterisk (*)</strong>.
</p> </p>
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
</li> </li>
<li class="field text" id="field-goals"> <li class="field text" id="field-goals">
<label for="goals">Please share with us your reasons for registering with edX</label> <label for="goals">Please share with us your reasons for registering with ${settings.PLATFORM_NAME}</label>
<textarea id="goals" name="goals" value=""></textarea> <textarea id="goals" name="goals" value=""></textarea>
</li> </li>
</ol> </ol>
...@@ -221,7 +221,14 @@ ...@@ -221,7 +221,14 @@
<div class="field required checkbox" id="field-honorcode"> <div class="field required checkbox" id="field-honorcode">
<input id="honorcode-yes" type="checkbox" name="honor_code" value="true" /> <input id="honorcode-yes" type="checkbox" name="honor_code" value="true" />
<label for="honorcode-yes">I agree to the <a href="${marketing_link('HONOR')}" class="new-vp">Honor Code</a></label> <%
## TODO: provide a better way to override these links
if self.stanford_theme_enabled():
honor_code_path = marketing_link('TOS') + "#honor"
else:
honor_code_path = marketing_link('HONOR')
%>
<label for="honorcode-yes">I agree to the <a href="${honor_code_path}" class="new-vp">Honor Code</a></label>
</div> </div>
</li> </li>
</ol> </ol>
...@@ -252,23 +259,33 @@ ...@@ -252,23 +259,33 @@
</p> </p>
</div> </div>
<div class="cta cta-welcome"> ## TODO: Use a %block tag or something to allow themes to
<h3>Welcome to edX</h3> ## override in a more generalizable fashion.
<p>Registering with edX gives you access to all of our current and future free courses. Not ready to take a course just yet? Registering puts you on our mailing list – we will update you as courses are added.</p> % if not self.stanford_theme_enabled():
</div> <div class="cta cta-welcome">
<h3>Welcome to ${settings.PLATFORM_NAME}</h3>
<p>Registering with ${settings.PLATFORM_NAME} gives you access to all of our current and future free courses. Not ready to take a course just yet? Registering puts you on our mailing list – we will update you as courses are added.</p>
</div>
% endif
<div class="cta cta-nextsteps"> <div class="cta cta-nextsteps">
<h3>Next Steps</h3> <h3>Next Steps</h3>
<p>As part of joining edX, you will receive an activation email. You must click on the activation link to complete the process. Don’t see the email? Check your spam folder and mark edX emails as ‘not spam’. At edX, we communicate mostly through email.</p> % if self.stanford_theme_enabled():
<p>You will receive an activation email. You must click on the activation link to complete the process. Don’t see the email? Check your spam folder and mark emails from class.stanford.edu as ‘not spam’, since you'll want to be able to receive email from your courses.</p>
% else:
<p>As part of joining ${settings.PLATFORM_NAME}, you will receive an activation email. You must click on the activation link to complete the process. Don’t see the email? Check your spam folder and mark ${settings.PLATFORM_NAME} emails as ‘not spam’. At ${settings.PLATFORM_NAME}, we communicate mostly through email.</p>
% endif
</div> </div>
<div class="cta cta-help"> % if settings.MKTG_URL_LINK_MAP.get('FAQ'):
<h3>Need Help?</h3> <div class="cta cta-help">
<p>Need help in registering with edX? <h3>Need Help?</h3>
<a href="${marketing_link('FAQ')}"> <p>Need help in registering with ${settings.PLATFORM_NAME}?
View our FAQs for answers to commonly asked questions. <a href="${marketing_link('FAQ')}">
</a> View our FAQs for answers to commonly asked questions.
Once registered, most questions can be answered in the course specific discussion forums or through the FAQs.</p> </a>
</div> Once registered, most questions can be answered in the course specific discussion forums or through the FAQs.</p>
</div>
% endif
</aside> </aside>
</section> </section>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<p>Something went wrong. Check to make sure the URL you went to was <p>Something went wrong. Check to make sure the URL you went to was
correct -- e-mail programs will sometimes split it into two correct -- e-mail programs will sometimes split it into two
lines. If you still have issues, e-mail us to let us know what happened lines. If you still have issues, e-mail us to let us know what happened
at <a href="mailto:bugs@edx.org">bugs@edx.org</a>.</p> at <a href="mailto:${settings.BUGS_EMAIL}">${settings.BUGS_EMAIL}</a>.</p>
<p>Or you can go back to the <a href="/">home page</a>.</p> <p>Or you can go back to the <a href="/">home page</a>.</p>
</section> </section>
......
...@@ -4,5 +4,5 @@ ...@@ -4,5 +4,5 @@
<section class="outside-app"> <section class="outside-app">
<h1>Page not found</h1> <h1>Page not found</h1>
<p>The page that you were looking for was not found. Go back to the <a href="/">homepage</a> or let us know about any pages that may have been moved at <a href="mailto:technical@edx.org">technical@edx.org</a>.</p> <p>The page that you were looking for was not found. Go back to the <a href="/">homepage</a> or let us know about any pages that may have been moved at <a href="mailto:${settings.TECH_SUPPORT_EMAIL}">${settings.TECH_SUPPORT_EMAIL}</a>.</p>
</section> </section>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
<section class="outside-app"> <section class="outside-app">
<h1>Currently the <em>edX</em> servers are down</h1> <h1>Currently the <em>${settings.PLATFORM_NAME}</em> servers are down</h1>
<p>Our staff is currently working to get the site back up as soon as possible. Please email us at <a href="mailto:technical@edx.org">technical@edx.org</a> to report any problems or downtime.</p> <p>Our staff is currently working to get the site back up as soon as possible. Please email us at <a href="mailto:${settings.TECH_SUPPORT_EMAIL}">${settings.TECH_SUPPORT_EMAIL}</a> to report any problems or downtime.</p>
</section> </section>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
<section class="outside-app"> <section class="outside-app">
<h1>There has been a 500 error on the <em>edX</em> servers</h1> <h1>There has been a 500 error on the <em>${settings.PLATFORM_NAME}</em> servers</h1>
<p>Please wait a few seconds and then reload the page. If the problem persists, please email us at <a href="mailto:technical@edx.org">technical@edx.org</a>.</p> <p>Please wait a few seconds and then reload the page. If the problem persists, please email us at <a href="mailto:${settings.TECH_SUPPORT_EMAIL}">${settings.TECH_SUPPORT_EMAIL}</a>.</p>
</section> </section>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
<section class="outside-app"> <section class="outside-app">
<h1>Currently the <em>edX</em> servers are overloaded</h1> <h1>Currently the <em>${settings.PLATFORM_NAME}</em> servers are overloaded</h1>
<p>Our staff is currently working to get the site back up as soon as possible. Please email us at <a href="mailto:technical@edx.org">technical@edx.org</a> to report any problems or downtime.</p> <p>Our staff is currently working to get the site back up as soon as possible. Please email us at <a href="mailto:${settings.TECH_SUPPORT_EMAIL}">${settings.TECH_SUPPORT_EMAIL}</a> to report any problems or downtime.</p>
</section> </section>
...@@ -58,66 +58,92 @@ urlpatterns = ('', # nopep8 ...@@ -58,66 +58,92 @@ urlpatterns = ('', # nopep8
name='auth_password_reset_done'), name='auth_password_reset_done'),
url(r'^heartbeat$', include('heartbeat.urls')), url(r'^heartbeat$', include('heartbeat.urls')),
)
## # University profiles only make sense in the default edX context
## Only universities without courses should be included here. If if not settings.MITX_FEATURES["USE_CUSTOM_THEME"]:
## courses exist, the dynamic profile rule below should win. urlpatterns += (
## ##
url(r'^(?i)university_profile/WellesleyX$', 'courseware.views.static_university_profile', ## Only universities without courses should be included here. If
name="static_university_profile", kwargs={'org_id': 'WellesleyX'}), ## courses exist, the dynamic profile rule below should win.
url(r'^(?i)university_profile/McGillX$', 'courseware.views.static_university_profile', ##
name="static_university_profile", kwargs={'org_id': 'McGillX'}), url(r'^(?i)university_profile/WellesleyX$', 'courseware.views.static_university_profile',
url(r'^(?i)university_profile/TorontoX$', 'courseware.views.static_university_profile', name="static_university_profile", kwargs={'org_id': 'WellesleyX'}),
name="static_university_profile", kwargs={'org_id': 'TorontoX'}), url(r'^(?i)university_profile/McGillX$', 'courseware.views.static_university_profile',
url(r'^(?i)university_profile/RiceX$', 'courseware.views.static_university_profile', name="static_university_profile", kwargs={'org_id': 'McGillX'}),
name="static_university_profile", kwargs={'org_id': 'RiceX'}), url(r'^(?i)university_profile/TorontoX$', 'courseware.views.static_university_profile',
url(r'^(?i)university_profile/ANUx$', 'courseware.views.static_university_profile', name="static_university_profile", kwargs={'org_id': 'TorontoX'}),
name="static_university_profile", kwargs={'org_id': 'ANUx'}), url(r'^(?i)university_profile/RiceX$', 'courseware.views.static_university_profile',
url(r'^(?i)university_profile/EPFLx$', 'courseware.views.static_university_profile', name="static_university_profile", kwargs={'org_id': 'RiceX'}),
name="static_university_profile", kwargs={'org_id': 'EPFLx'}), url(r'^(?i)university_profile/ANUx$', 'courseware.views.static_university_profile',
name="static_university_profile", kwargs={'org_id': 'ANUx'}),
url(r'^university_profile/(?P<org_id>[^/]+)$', 'courseware.views.university_profile', url(r'^(?i)university_profile/EPFLx$', 'courseware.views.static_university_profile',
name="university_profile"), name="static_university_profile", kwargs={'org_id': 'EPFLx'}),
#Semi-static views (these need to be rendered and have the login bar, but don't change) url(r'^university_profile/(?P<org_id>[^/]+)$', 'courseware.views.university_profile',
name="university_profile"),
)
#Semi-static views (these need to be rendered and have the login bar, but don't change)
urlpatterns += (
url(r'^404$', 'static_template_view.views.render', url(r'^404$', 'static_template_view.views.render',
{'template': '404.html'}, name="404"), {'template': '404.html'}, name="404"),
url(r'^about$', 'static_template_view.views.render',
{'template': 'about.html'}, name="about_edx"),
url(r'^jobs$', 'static_template_view.views.render',
{'template': 'jobs.html'}, name="jobs"),
url(r'^contact$', 'static_template_view.views.render',
{'template': 'contact.html'}, name="contact"),
url(r'^press$', 'student.views.press', name="press"),
url(r'^media-kit$', 'static_template_view.views.render',
{'template': 'media-kit.html'}, name="media-kit"),
url(r'^faq$', 'static_template_view.views.render',
{'template': 'faq.html'}, name="faq_edx"),
url(r'^help$', 'static_template_view.views.render',
{'template': 'help.html'}, name="help_edx"),
url(r'^tos$', 'static_template_view.views.render',
{'template': 'tos.html'}, name="tos"),
url(r'^privacy$', 'static_template_view.views.render',
{'template': 'privacy.html'}, name="privacy_edx"),
# TODO: (bridger) The copyright has been removed until it is updated for edX
# url(r'^copyright$', 'static_template_view.views.render',
# {'template': 'copyright.html'}, name="copyright"),
url(r'^honor$', 'static_template_view.views.render',
{'template': 'honor.html'}, name="honor"),
#Press releases
url(r'^press/([_a-zA-Z0-9-]+)$', 'static_template_view.views.render_press_release', name='press_release'),
# Favicon
(r'^favicon\.ico$', 'django.views.generic.simple.redirect_to', {'url': '/static/images/favicon.ico'}),
url(r'^submit_feedback$', 'util.views.submit_feedback_via_zendesk'),
# TODO: These urls no longer work. They need to be updated before they are re-enabled
# url(r'^reactivate/(?P<key>[^/]*)$', 'student.views.reactivation_email'),
) )
# Semi-static views only used by edX, not by themes
if not settings.MITX_FEATURES["USE_CUSTOM_THEME"]:
urlpatterns += (
url(r'^jobs$', 'static_template_view.views.render',
{'template': 'jobs.html'}, name="jobs"),
url(r'^press$', 'student.views.press', name="press"),
url(r'^media-kit$', 'static_template_view.views.render',
{'template': 'media-kit.html'}, name="media-kit"),
url(r'^help$', 'static_template_view.views.render',
{'template': 'help.html'}, name="help_edx"),
# TODO: (bridger) The copyright has been removed until it is updated for edX
# url(r'^copyright$', 'static_template_view.views.render',
# {'template': 'copyright.html'}, name="copyright"),
#Press releases
url(r'^press/([_a-zA-Z0-9-]+)$', 'static_template_view.views.render_press_release', name='press_release'),
# Favicon
(r'^favicon\.ico$', 'django.views.generic.simple.redirect_to', {'url': '/static/images/favicon.ico'}),
url(r'^submit_feedback$', 'util.views.submit_feedback_via_zendesk'),
# TODO: These urls no longer work. They need to be updated before they are re-enabled
# url(r'^reactivate/(?P<key>[^/]*)$', 'student.views.reactivation_email'),
)
# Only enable URLs for those marketing links actually enabled in the
# settings. Disable URLs by marking them as None.
for key, value in settings.MKTG_URL_LINK_MAP.items():
# Skip disabled URLs
if value is None:
continue
# These urls are enabled separately
if key == "ROOT" or key == "COURSES":
continue
# Make the assumptions that the templates are all in the same dir
# and that they all match the name of the key (plus extension)
template = "%s.html" % key.lower()
# To allow theme templates to inherit from default templates,
# prepend a standard prefix
if settings.MITX_FEATURES["USE_CUSTOM_THEME"]:
template = "theme-" + template
# Make the assumption that the URL we want is the lowercased
# version of the map key
urlpatterns += (url(r'^%s' % key.lower(),
'static_template_view.views.render',
{'template': template}, name=value),)
if settings.PERFSTATS: if settings.PERFSTATS:
urlpatterns += (url(r'^reprofile$', 'perfstats.views.end_profile'),) urlpatterns += (url(r'^reprofile$', 'perfstats.views.end_profile'),)
......
...@@ -81,12 +81,11 @@ TEST_TASK_DIRS = [] ...@@ -81,12 +81,11 @@ TEST_TASK_DIRS = []
end end
Dir["common/lib/*"].select{|lib| File.directory?(lib)}.each do |lib| Dir["common/lib/*"].select{|lib| File.directory?(lib)}.each do |lib|
task_name = "test_#{lib}"
report_dir = report_dir_path(lib) report_dir = report_dir_path(lib)
desc "Run tests for common lib #{lib}" desc "Run tests for common lib #{lib}"
task task_name => report_dir do task "test_#{lib}" => ["clean_test_files", report_dir] do
ENV['NOSE_XUNIT_FILE'] = File.join(report_dir, "nosetests.xml") ENV['NOSE_XUNIT_FILE'] = File.join(report_dir, "nosetests.xml")
cmd = "nosetests #{lib}" cmd = "nosetests #{lib}"
sh(run_under_coverage(cmd, lib)) do |ok, res| sh(run_under_coverage(cmd, lib)) do |ok, res|
...@@ -95,10 +94,13 @@ Dir["common/lib/*"].select{|lib| File.directory?(lib)}.each do |lib| ...@@ -95,10 +94,13 @@ Dir["common/lib/*"].select{|lib| File.directory?(lib)}.each do |lib|
end end
TEST_TASK_DIRS << lib TEST_TASK_DIRS << lib
desc "Run tests for common lib #{lib} (without coverage)" # There used to be a fasttest_#{lib} command that ran without coverage.
task "fasttest_#{lib}" do # However, this is an inconsistent usage of "fast":
sh("nosetests #{lib}") # When running tests for lms and cms, "fast" means skipping
end # staticfiles collection, but still running under coverage.
# We keep the fasttest_#{lib} command for backwards compatibility,
# but make it an alias to the normal test command.
task "fasttest_#{lib}" => "test_#{lib}"
end end
task :report_dirs task :report_dirs
...@@ -119,30 +121,35 @@ task :test do ...@@ -119,30 +121,35 @@ task :test do
end end
end end
namespace :coverage do desc "Build the html, xml, and diff coverage reports"
desc "Build the html coverage reports" task :coverage => :report_dirs do
task :html => :report_dirs do
TEST_TASK_DIRS.each do |dir| found_coverage_info = false
report_dir = report_dir_path(dir)
if !File.file?("#{report_dir}/.coverage") TEST_TASK_DIRS.each do |dir|
next report_dir = report_dir_path(dir)
end
sh("coverage html --rcfile=#{dir}/.coveragerc") if !File.file?("#{report_dir}/.coverage")
next
else
found_coverage_info = true
end end
end
desc "Build the xml coverage reports" # Generate the coverage.py HTML report
task :xml => :report_dirs do sh("coverage html --rcfile=#{dir}/.coveragerc")
TEST_TASK_DIRS.each do |dir|
report_dir = report_dir_path(dir)
if !File.file?("#{report_dir}/.coverage") # Generate the coverage.py XML report
next sh("coverage xml -o #{report_dir}/coverage.xml --rcfile=#{dir}/.coveragerc")
end
# Why doesn't the rcfile control the xml output file properly?? # Generate the diff coverage HTML report, based on the XML report
sh("coverage xml -o #{report_dir}/coverage.xml --rcfile=#{dir}/.coveragerc") sh("diff-cover #{report_dir}/coverage.xml --html-report #{report_dir}/diff_cover.html")
end
# Print the diff coverage report to the console
sh("diff-cover #{report_dir}/coverage.xml")
puts "\n"
end
if not found_coverage_info
puts "No coverage info found. Run `rake test` before running `rake coverage`."
end end
end end
...@@ -10,3 +10,4 @@ ...@@ -10,3 +10,4 @@
# Our libraries: # Our libraries:
-e git+https://github.com/edx/XBlock.git@2144a25d#egg=XBlock -e git+https://github.com/edx/XBlock.git@2144a25d#egg=XBlock
-e git+https://github.com/edx/codejail.git@5fb5fa0#egg=codejail -e git+https://github.com/edx/codejail.git@5fb5fa0#egg=codejail
-e git+https://github.com/edx/diff-cover.git@v0.1.0#egg=diff_cover
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment