Commit bc5d7923 by dcadams

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

parents 0fb11365 582b35a9
......@@ -10,6 +10,8 @@
.AppleDouble
database.sqlite
requirements/private.txt
lms/envs/private.py
cms/envs/private.py
courseware/static/js/mathjax/*
flushdb.sh
build
......@@ -27,6 +29,7 @@ conf/locale/en/LC_MESSAGES/*.po
!messages.po
lms/static/sass/*.css
lms/static/sass/application.scss
lms/static/sass/course.scss
cms/static/sass/*.css
lms/lib/comment_client/python
nosetests.xml
......
......@@ -486,6 +486,9 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
# check for custom_tags
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
filesystem = OSFS(root_dir / 'test_export/policies/6.002_Spring_2012')
self.assertTrue(filesystem.exists('grading_policy.json'))
......
......@@ -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
# happen with some browsers (e.g. Firefox)
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
DEFAULT_FROM_EMAIL = ENV_TOKENS.get('DEFAULT_FROM_EMAIL', DEFAULT_FROM_EMAIL)
......
......@@ -165,3 +165,11 @@ MITX_FEATURES['ENABLE_SERVICE_STATUS'] = True
# segment-io key for dev
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):
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 '#'
......
......@@ -1198,6 +1198,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)
......
......@@ -202,9 +202,10 @@ To view test coverage:
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
......
......@@ -84,7 +84,8 @@ rake phantomjs_jasmine_cms || TESTS_FAILED=1
rake phantomjs_jasmine_common/lib/xmodule || 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' ]
rake autodeploy_properties
......
......@@ -99,6 +99,8 @@ CELERY_QUEUES = {
with open(ENV_ROOT / CONFIG_PREFIX + "env.json") as env_file:
ENV_TOKENS = json.load(env_file)
PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME', PLATFORM_NAME)
SITE_NAME = ENV_TOKENS['SITE_NAME']
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
# happen with some browsers (e.g. Firefox)
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']
MEDIA_URL = ENV_TOKENS['MEDIA_URL']
......@@ -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)
ADMINS = ENV_TOKENS.get('ADMINS', ADMINS)
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_NAME = ENV_TOKENS.get('THEME_NAME', None)
if not THEME_NAME is None:
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
TIME_ZONE = ENV_TOKENS.get('TIME_ZONE', TIME_ZONE)
......
......@@ -31,6 +31,9 @@ from path import path
from .discussionsettings import *
################################### FEATURES ###################################
# The display name of the platform to be used in templates/emails/etc.
PLATFORM_NAME = "edX"
COURSEWARE_ENABLED = True
ENABLE_JASMINE = False
......@@ -315,6 +318,9 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
DEFAULT_FROM_EMAIL = 'registration@edx.org'
DEFAULT_FEEDBACK_EMAIL = 'feedback@edx.org'
SERVER_EMAIL = 'devops@edx.org'
TECH_SUPPORT_EMAIL = 'technical@edx.org'
CONTACT_EMAIL = 'info@edx.org'
BUGS_EMAIL = 'bugs@edx.org'
ADMINS = (
('edX Admins', 'admin@edx.org'),
)
......@@ -330,6 +336,8 @@ STATICFILES_DIRS = [
PROJECT_ROOT / "static",
]
FAVICON_PATH = 'images/favicon.ico'
# Locale/Internationalization
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
......
......@@ -243,3 +243,11 @@ MITX_FEATURES['ENABLE_PEARSON_LOGIN'] = False
ANALYTICS_SERVER_URL = "http://127.0.0.1:9000/"
ANALYTICS_API_KEY = ""
#####################################################################
# Lastly, see if the developer has any local overrides.
try:
from .private import *
except ImportError:
pass
......@@ -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 @@
@import 'base/font_face';
@import 'base/mixins';
@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/extends';
@import 'base/animations';
......@@ -36,16 +50,3 @@
@import 'news';
@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 @@
overflow: hidden;
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);
$text-color: $dark-gray;
$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-bg: transparent;
$header-bg: $white;
$courseware-header-image: linear-gradient(top, #fff, #eee);
$courseware-header-bg: transparent;
$footer-bg: transparent;
$footer-bg: $white;
$courseware-footer-border: none;
$courseware-footer-shadow: none;
$courseware-footer-margin: 0px;
......@@ -87,7 +88,7 @@ $dashboard-profile-header-color: transparent;
$dashboard-profile-color: rgb(252,252,252);
$dot-color: $light-gray;
$content-wrapper-bg: rgb(255,255,255);
$content-wrapper-bg: shade($body-bg, 2%);
$course-bg-color: #d6d6d6;
$course-bg-image: url(../images/bg-texture.png);
......@@ -100,6 +101,7 @@ $border-color-3: rgb(100,100,100);
$border-color-4: rgb(252,252,252);
$link-color: $blue;
$link-color-d1: $m-blue;
$link-hover: $pink;
$selection-color-1: $pink;
$selection-color-2: #444;
......@@ -118,9 +120,18 @@ $sidebar-active-image: linear-gradient(top, #e6e6e6, #d6d6d6);
$form-bg-color: #fff;
$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
//-----------------
$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';
......@@ -4,6 +4,20 @@
@import 'base/font_face';
@import 'base/mixins';
@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/extends';
@import 'base/animations';
......
......@@ -65,7 +65,7 @@ header.global.slim {
height: auto;
padding: 5px 0 10px 0;
border-bottom: 1px solid $outer-border-color;
background: $white;
background: $header-bg;
.guest .secondary {
margin-right: 0;
......
footer {
border: $courseware-footer-border;
box-shadow: $courseware-footer-shadow;
margin-top: $courseware-footer-margin;
}
\ No newline at end of file
......@@ -6,7 +6,7 @@
// page-level
.view-register, .view-login, .view-passwordreset {
background: $white;
background: $body-bg;
......@@ -22,14 +22,14 @@
margin: 0 0 $baseline 0;
font-weight: 300;
text-transform: uppercase;
color: $m-blue;
color: $link-color-d1;
}
.heading-3 {
font-size: 21px;
margin: 0 0 $baseline 0;
font-weight: 300;
color: $m-gray-d2;
color: $base-font-color;
}
.heading-4 {
......@@ -37,7 +37,7 @@
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0 !important;
color: $m-blue-s1;
color: saturate($link-color-d1,15%);
}
.heading-5 {
......@@ -48,7 +48,7 @@
font-size: 18px;
margin: 0 0 $baseline 0;
font-weight: 300;
color: $m-gray-a1;
color: $base-font-color;
font-family: 'Open Sans', sans-serif;
line-height: lh(1.1);
}
......@@ -56,18 +56,18 @@
.body-text {
font-size: 15px;
margin: 0 0 $baseline 0;
color: $m-gray-a1;
color: $base-font-color;
line-height: lh(1);
}
// specific examples - buttons
.button-primary {
@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;
padding: $baseline/2 $baseline*2.5;
text-transform: lowercase;
color: $white;
color: $very-light-text;
letter-spacing: 0.1rem;
font-weight: 500;
cursor: pointer;
......@@ -80,11 +80,11 @@
}
.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;
padding: $baseline/2 $baseline*2.5;
text-transform: lowercase;
color: $white;
color: $very-light-text;
letter-spacing: 0.1rem;
font-weight: 600;
cursor: pointer;
......@@ -98,7 +98,7 @@
// layout
.content-wrapper {
background: $m-gray-l2;
background: $content-wrapper-bg;
padding-bottom: 0;
}
......@@ -107,7 +107,7 @@
@include clearfix;
margin: 0 auto;
width: 960px;
background: $white;
background: $container-bg;
}
.container {
......@@ -142,14 +142,15 @@
@include transition(color 0.15s ease-in-out, border 0.15s ease-in-out);
&:link, &:visited, &:hover, &:active {
color: $m-blue;
text-decoration: none !important;
color: $link-color-d1;
font-weight: 400;
text-decoration: none !important; // needed but nasty
font-family: $sans-serif;
}
&:hover, &:active {
border-bottom: 1px dotted $m-blue-l1;
color: $m-blue-l1;
text-decoration: none !important; // needed but nasty
border-bottom: 1px dotted $link-color-d1;
}
}
......@@ -254,7 +255,7 @@
font-family: $sans-serif;
font-style: normal;
font-weight: 500;
color: $m-gray-d2;
color: $base-font-color;
}
label {
......@@ -267,7 +268,7 @@
@include transition(color 0.15s ease-in-out);
display: block;
margin-top: ($baseline/4);
color: tint($m-gray, 50%);
color: tint($outer-border-color, 50%);
font-size: em(13);
}
......@@ -330,7 +331,7 @@
}
textarea, input {
background: $white;
background: $body-bg;
color: rgba(0,0,0,.25);
}
}
......@@ -339,11 +340,11 @@
&.is-focused {
label {
color: $m-blue-l1;
color: saturate($link-color-d1,15%);
}
.tip {
color: $m-blue-l1;
color: saturate($link-color-d1,15%);
}
}
......@@ -461,7 +462,7 @@
// misc
.orn-plus {
color: $white;
color: $very-light-text;
padding: 0 $baseline/4;
}
......@@ -492,7 +493,7 @@
header {
height: 120px;
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 @@
header {
height: 120px;
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
.view-passwordreset {
background: $m-gray-l2;
background: $sidebar-color;
header.global {
......@@ -543,7 +544,7 @@
.inner-wrapper {
@include border-radius(2px);
background: $white;
background: $body-bg;
padding-bottom: 0 !important;
}
......
......@@ -11,7 +11,7 @@
border-bottom: 1px solid $border-color-3;
@include box-shadow(inset 0 1px 5px 0 rgba(0,0,0, 0.1));
height: 280px;
margin-top: -69px;
margin-top: $header_image_margin;
padding-top: 150px;
overflow: hidden;
position: relative;
......
......@@ -10,7 +10,7 @@
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));
height: 430px;
margin-top: -69px;
margin-top: $header_image_margin;
width: 100%;
.inner-wrapper {
......
......@@ -15,7 +15,7 @@
@include clearfix;
height: 460px;
overflow: hidden;
margin-top: -69px;
margin-top: $header_image_margin;
padding: 0px;
width: flex-grid(12);
......
......@@ -2,7 +2,7 @@
@include box-shadow(0 -1px 5px 0 rgba(0,0,0, 0.1));
border-top: 1px solid tint($m-gray,50%);
padding: 25px ($baseline/2) ($baseline*1.5) ($baseline/2);
background: $white;
background: $footer-bg;
footer {
@include clearfix();
......@@ -16,18 +16,18 @@
}
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 {
border-bottom: none;
color: $m-blue;
color: $link-color;
text-decoration: none !important;
font-family: $sans-serif;
}
&:hover, &:active {
border-bottom: 1px dotted $m-blue-s1;
color: $m-blue-s1;
border-bottom: 1px dotted $link-color;
color: $link-color;
}
}
......@@ -39,7 +39,7 @@
.nav-colophon {
@include clearfix();
margin: ($baseline/4) 0 ($baseline*1.5) 0;
margin: $footer_margin;
li {
float: left;
......@@ -49,7 +49,7 @@
color: tint($black, 20%);
&:hover, &:active {
color: $m-blue-s1;
color: $link-color;
}
}
......
header.global {
border-bottom: 1px solid $m-gray;
@include box-shadow(0 1px 5px 0 rgba(0,0,0, 0.1));
background: $white;
background: $header-bg;
height: 76px;
position: relative;
width: 100%;
......@@ -246,12 +246,12 @@ header.global {
a {
display:block;
padding: ($baseline/4);
color: $m-gray-d1;
color: $lighter-base-font-color;
font-weight: 600;
&:hover, &:active {
text-decoration: none;
color: $m-blue-s1;
color: $link-color;
}
}
......@@ -259,7 +259,7 @@ header.global {
a {
text-decoration: none;
color: $m-blue-s1;
color: $link-color;
}
}
}
......@@ -280,11 +280,11 @@ header.global {
a {
@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;
padding: $baseline/2 $baseline*2.5;
text-transform: lowercase;
color: $white;
color: $very-light-text;
letter-spacing: 0.1rem;
font-weight: 300;
cursor: pointer;
......@@ -324,6 +324,6 @@ header.global {
a {
text-decoration: none;
color: $m-blue-s1 !important;
color: $link-color !important;
}
}
<%namespace name='static' file='static_content.html'/>
<%namespace file='main.html' import="stanford_theme_enabled"/>
<%!
from django.core.urlresolvers import reverse
from courseware.courses import course_image_url, get_course_about_section
......@@ -24,7 +25,11 @@
<p>${get_course_about_section(course, 'short_description')}</p>
</div>
<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>
</div>
</section>
......
......@@ -8,7 +8,11 @@
<%inherit file="../main.html" />
<%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 name="js_extra">
......@@ -46,7 +50,12 @@
<div class="table">
<section class="intro">
<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>
<div class="main-cta">
......@@ -105,14 +114,26 @@
<header>
<div class="social-sharing">
<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">
<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>
## TODO: this should probably be an overrideable block,
## or something allowing themes to do whatever they
## want here (and on this whole page, really).
% if self.stanford_theme_enabled():
<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">
<img src="${static.url('images/social/twitter-sharing.png')}">
</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>
</header>
......
......@@ -5,13 +5,21 @@
<%block name="title"><title>Courses</title></%block>
<section class="find-courses">
<header class="search" style="background: url('/static/images/homepage-bg.jpg')">
<header class="search">
<div class="inner-wrapper main-search">
<hgroup>
<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>
<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>
</div>
</header>
......
......@@ -150,6 +150,8 @@
</ul>
</section>
## `news` should be `None` whenever a non-edX theme is enabled:
## see common/djangoapps/student/views.py#_get_news
%if news:
<article class="news-carousel">
<header>
......@@ -292,7 +294,7 @@
${"{0:.0f}%".format(float(course.lowest_passing_grade)*100)}</span>.
% elif cert_status['status'] == 'restricted':
<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>
% endif
</p>
......@@ -449,11 +451,11 @@
<div id="change_name_body">
<form id="change_name_form">
<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/>
<fieldset>
<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" />
<label>Reason for name change:</label>
<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>
\ No newline at end of file
<section class="container activation">
<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,
please copy and paste this address into your web browser's
address bar:
<%namespace file="../main.html" import="stanford_theme_enabled" />
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:
https://${ site }/activate/${ key }
......@@ -8,6 +10,15 @@ address bar:
http://${ site }/activate/${ key }
% endif
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 edX web site.
## Temporary hack until we develop a better way to adjust language
% if stanford_theme_enabled():
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 %>
This is to confirm that you changed the e-mail associated with edX
from ${old_email} to ${new_email}. If you did not make this request,
please contact us immediately. Contact information is listed at:
<%namespace file="../main.html" import="stanford_theme_enabled" />
## Again, ugly hack that needs to be changed
## 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:
https://${ site }${reverse('contact')}
${settings.CONTACT_EMAIL}
% 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
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
account from ${old_email} to ${new_email}. If this is correct, please
confirm your new e-mail address by visiting:
<%namespace file="../main.html" import="stanford_theme_enabled" />
We received a request to change the e-mail associated with your
${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:
https://${ site }/email_confirm/${ key }
......@@ -8,6 +10,15 @@ confirm your new e-mail address by visiting:
http://${ site }/email_confirm/${ key }
% endif
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 edX web site.
## TODO: fix this ugly hack
% if stanford_theme_enabled():
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)
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.
## TODO: fix this ugly hack
% if stanford_theme_enabled():
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:
https://edx.org
https://${settings.SITE_NAME}
% else:
http://edx.org
http://${settings.SITE_NAME}
% endif
A login button will be at the top right-hand corner of the window.
......@@ -14,7 +20,12 @@ place to reset it.
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 --
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 @@
<li class="field required text" id="field-email">
<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" />
<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>
</ol>
</fieldset>
......
......@@ -21,9 +21,12 @@
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
<a href="${discussion_link}" target="_blank"/>course discussion forum</a>.
</p>
% endif
<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>
......
<h1>Invalid key</h1>
<%inherit file="main.html" />
<p> This e-mail key is not valid. Please check:
<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>
<section class="container activation">
<section class="message">
<h1 class="invalid">Invalid email change key</h1>
<hr class="horizontal-divider">
<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 @@
<%! from django.core.urlresolvers import reverse %>
<%! 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">
<script type="text/javascript">
......@@ -66,7 +66,7 @@
$submitButton.
removeClass('is-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 {
$submitButton.
......@@ -94,7 +94,7 @@
<!-- status messages -->
<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>
</div>
......@@ -106,7 +106,7 @@
</div>
<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>
<fieldset class="group group-form group-form-requiredinformation">
......@@ -164,14 +164,16 @@
<div class="cta cta-help">
<h3>Not Enrolled?</h3>
<p><a href="${reverse('register_user')}">Sign up for edX today!</a></p>
<h3>Need Help?</h3>
<p>Looking for help in logging in or with your edX account?
<a href="${marketing_link('FAQ')}">
View our help section for answers to commonly asked questions.
</a></p>
<p><a href="${reverse('register_user')}">Sign up for ${settings.PLATFORM_NAME} today!</a></p>
## Disable help unless the FAQ marketing link is enabled
% if settings.MKTG_URL_LINK_MAP.get('FAQ'):
<h3>Need Help?</h3>
<p>Looking for help in logging in or with your ${settings.PLATFORM_NAME} account?
<a href="${marketing_link('FAQ')}">
View our help section for answers to commonly asked questions.
</a></p>
% endif
</div>
</aside>
</section>
......
<%namespace name='static' file='static_content.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>
<html>
<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">
/* immediately break out of an iframe if coming
from the marketing website */
......@@ -14,12 +33,15 @@
})(this);
</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:js group='main_vendor'/>
<%block name="headextra"/>
% if theme_enabled():
<%include file="theme-head-extra.html" />
% endif
<!--[if lt IE 9]>
<script src="${static.url('js/html5shiv.js')}"></script>
......@@ -32,14 +54,20 @@
<meta name="google-site-verification" content="_mipQ4AtZQDNmbtOkwehQDOgCxUUV2fb_C0b6wbiRHY" />
% 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
</head>
<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" />
% endif
......@@ -48,7 +76,9 @@
<%block name="bodyextra"/>
</section>
% if not suppress_toplevel_navigation:
% if theme_enabled():
<%include file="theme-footer.html" />
% elif not suppress_toplevel_navigation:
<%include file="footer.html" />
% endif
......
## mako
<%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
......@@ -10,6 +10,9 @@ import branding
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">
<%
try:
......@@ -38,9 +41,12 @@ site_status_msg = get_site_status_msg(course_id)
<nav>
<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" />
</a></h1>
</%block>
</a>
</h1>
% if course:
<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)
% if user.is_authenticated():
<ol class="left nav-global authenticated">
<li class="nav-global-01">
<a href="${marketing_link('COURSES')}">Find Courses</a>
</li>
<%block name="navigation_global_links_authenticated">
<li class="nav-global-01">
<a href="${marketing_link('COURSES')}">Find Courses</a>
</li>
</%block>
</ol>
<ol class="user">
<li class="primary">
......@@ -63,10 +71,9 @@ site_status_msg = get_site_status_msg(course_id)
<li class="primary">
<a href="#" class="dropdown">&#9662</a>
<ul class="dropdown-menu">
<li>
<a href="${marketing_link('FAQ')}">
Help
</a></li>
<%block name="navigation_dropdown_menu_links" >
<li><a href="${marketing_link('FAQ')}">Help</a></li>
</%block>
<li><a href="${reverse('logout')}">Log Out</a></li>
</ul>
</li>
......@@ -74,17 +81,19 @@ site_status_msg = get_site_status_msg(course_id)
% else:
<ol class="left nav-global">
% if settings.MITX_FEATURES.get('ENABLE_MKTG_SITE'):
<li class="nav-global-01">
<a href="${marketing_link('HOW_IT_WORKS')}">How it Works</a>
</li>
<li class="nav-global-02">
<a href="${marketing_link('COURSES')}">Courses</a>
</li>
<li class="nav-global-03">
<a href="${marketing_link('SCHOOLS')}">Schools</a>
</li>
% endif
<%block name="navigation_global_links">
% if settings.MITX_FEATURES.get('ENABLE_MKTG_SITE'):
<li class="nav-global-01">
<a href="${marketing_link('HOW_IT_WORKS')}">How it Works</a>
</li>
<li class="nav-global-02">
<a href="${marketing_link('COURSES')}">Courses</a>
</li>
<li class="nav-global-03">
<a href="${marketing_link('SCHOOLS')}">Schools</a>
</li>
% endif
</%block>
% if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']:
<li class="nav-global-04">
<a class="cta cta-register" href="/register">Register Now</a>
......
......@@ -11,7 +11,7 @@
<%! from datetime import date %>
<%! 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">
<script type="text/javascript">
......@@ -69,7 +69,7 @@
$submitButton.
removeClass('is-disabled').
removeProp('disabled').
html('Create my edX Account');
html('Create my ${settings.PLATFORM_NAME} Account');
}
else {
$submitButton.
......@@ -83,7 +83,7 @@
<section class="introduction">
<header>
<h1 class="sr">${_("Register for edX")}</h1>
<h1 class="sr">Register for ${settings.PLATFORM_NAME}</h1>
</header>
</section>
......@@ -97,7 +97,7 @@
<!-- status messages -->
<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>
</div>
......@@ -107,7 +107,7 @@
</div>
<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>.
</p>
......@@ -203,7 +203,7 @@
</li>
<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>
</li>
</ol>
......@@ -221,7 +221,14 @@
<div class="field required checkbox" id="field-honorcode">
<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>
</li>
</ol>
......@@ -252,23 +259,33 @@
</p>
</div>
<div class="cta cta-welcome">
<h3>Welcome to edX</h3>
<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>
</div>
## TODO: Use a %block tag or something to allow themes to
## override in a more generalizable fashion.
% if not self.stanford_theme_enabled():
<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">
<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 class="cta cta-help">
<h3>Need Help?</h3>
<p>Need help in registering with edX?
<a href="${marketing_link('FAQ')}">
View our FAQs for answers to commonly asked questions.
</a>
Once registered, most questions can be answered in the course specific discussion forums or through the FAQs.</p>
</div>
% if settings.MKTG_URL_LINK_MAP.get('FAQ'):
<div class="cta cta-help">
<h3>Need Help?</h3>
<p>Need help in registering with ${settings.PLATFORM_NAME}?
<a href="${marketing_link('FAQ')}">
View our FAQs for answers to commonly asked questions.
</a>
Once registered, most questions can be answered in the course specific discussion forums or through the FAQs.</p>
</div>
% endif
</aside>
</section>
......@@ -12,7 +12,7 @@
<p>Something went wrong. Check to make sure the URL you went to was
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
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>
</section>
......
......@@ -4,5 +4,5 @@
<section class="outside-app">
<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>
<%inherit file="../main.html" />
<section class="outside-app">
<h1>Currently the <em>edX</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>
<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:${settings.TECH_SUPPORT_EMAIL}">${settings.TECH_SUPPORT_EMAIL}</a> to report any problems or downtime.</p>
</section>
<%inherit file="../main.html" />
<section class="outside-app">
<h1>There has been a 500 error on the <em>edX</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>
<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:${settings.TECH_SUPPORT_EMAIL}">${settings.TECH_SUPPORT_EMAIL}</a>.</p>
</section>
<%inherit file="../main.html" />
<section class="outside-app">
<h1>Currently the <em>edX</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>
<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:${settings.TECH_SUPPORT_EMAIL}">${settings.TECH_SUPPORT_EMAIL}</a> to report any problems or downtime.</p>
</section>
......@@ -58,66 +58,92 @@ urlpatterns = ('', # nopep8
name='auth_password_reset_done'),
url(r'^heartbeat$', include('heartbeat.urls')),
)
##
## Only universities without courses should be included here. If
## courses exist, the dynamic profile rule below should win.
##
url(r'^(?i)university_profile/WellesleyX$', 'courseware.views.static_university_profile',
name="static_university_profile", kwargs={'org_id': 'WellesleyX'}),
url(r'^(?i)university_profile/McGillX$', 'courseware.views.static_university_profile',
name="static_university_profile", kwargs={'org_id': 'McGillX'}),
url(r'^(?i)university_profile/TorontoX$', 'courseware.views.static_university_profile',
name="static_university_profile", kwargs={'org_id': 'TorontoX'}),
url(r'^(?i)university_profile/RiceX$', 'courseware.views.static_university_profile',
name="static_university_profile", kwargs={'org_id': 'RiceX'}),
url(r'^(?i)university_profile/ANUx$', 'courseware.views.static_university_profile',
name="static_university_profile", kwargs={'org_id': 'ANUx'}),
url(r'^(?i)university_profile/EPFLx$', 'courseware.views.static_university_profile',
name="static_university_profile", kwargs={'org_id': 'EPFLx'}),
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)
# University profiles only make sense in the default edX context
if not settings.MITX_FEATURES["USE_CUSTOM_THEME"]:
urlpatterns += (
##
## Only universities without courses should be included here. If
## courses exist, the dynamic profile rule below should win.
##
url(r'^(?i)university_profile/WellesleyX$', 'courseware.views.static_university_profile',
name="static_university_profile", kwargs={'org_id': 'WellesleyX'}),
url(r'^(?i)university_profile/McGillX$', 'courseware.views.static_university_profile',
name="static_university_profile", kwargs={'org_id': 'McGillX'}),
url(r'^(?i)university_profile/TorontoX$', 'courseware.views.static_university_profile',
name="static_university_profile", kwargs={'org_id': 'TorontoX'}),
url(r'^(?i)university_profile/RiceX$', 'courseware.views.static_university_profile',
name="static_university_profile", kwargs={'org_id': 'RiceX'}),
url(r'^(?i)university_profile/ANUx$', 'courseware.views.static_university_profile',
name="static_university_profile", kwargs={'org_id': 'ANUx'}),
url(r'^(?i)university_profile/EPFLx$', 'courseware.views.static_university_profile',
name="static_university_profile", kwargs={'org_id': 'EPFLx'}),
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',
{'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:
urlpatterns += (url(r'^reprofile$', 'perfstats.views.end_profile'),)
......
......@@ -81,12 +81,11 @@ TEST_TASK_DIRS = []
end
Dir["common/lib/*"].select{|lib| File.directory?(lib)}.each do |lib|
task_name = "test_#{lib}"
report_dir = report_dir_path(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")
cmd = "nosetests #{lib}"
sh(run_under_coverage(cmd, lib)) do |ok, res|
......@@ -95,10 +94,13 @@ Dir["common/lib/*"].select{|lib| File.directory?(lib)}.each do |lib|
end
TEST_TASK_DIRS << lib
desc "Run tests for common lib #{lib} (without coverage)"
task "fasttest_#{lib}" do
sh("nosetests #{lib}")
end
# There used to be a fasttest_#{lib} command that ran without coverage.
# However, this is an inconsistent usage of "fast":
# When running tests for lms and cms, "fast" means skipping
# 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
task :report_dirs
......@@ -119,30 +121,35 @@ task :test do
end
end
namespace :coverage do
desc "Build the html coverage reports"
task :html => :report_dirs do
TEST_TASK_DIRS.each do |dir|
report_dir = report_dir_path(dir)
desc "Build the html, xml, and diff coverage reports"
task :coverage => :report_dirs do
found_coverage_info = false
if !File.file?("#{report_dir}/.coverage")
next
end
TEST_TASK_DIRS.each do |dir|
report_dir = report_dir_path(dir)
sh("coverage html --rcfile=#{dir}/.coveragerc")
if !File.file?("#{report_dir}/.coverage")
next
else
found_coverage_info = true
end
end
desc "Build the xml coverage reports"
task :xml => :report_dirs do
TEST_TASK_DIRS.each do |dir|
report_dir = report_dir_path(dir)
# Generate the coverage.py HTML report
sh("coverage html --rcfile=#{dir}/.coveragerc")
if !File.file?("#{report_dir}/.coverage")
next
end
# Why doesn't the rcfile control the xml output file properly??
sh("coverage xml -o #{report_dir}/coverage.xml --rcfile=#{dir}/.coveragerc")
end
# Generate the coverage.py XML report
sh("coverage xml -o #{report_dir}/coverage.xml --rcfile=#{dir}/.coveragerc")
# Generate the diff coverage HTML report, based on the XML report
sh("diff-cover #{report_dir}/coverage.xml --html-report #{report_dir}/diff_cover.html")
# 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
......@@ -10,3 +10,4 @@
# Our libraries:
-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/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