diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index a556ca7b45..1644822d5f 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -35,9 +35,10 @@ from xmodule.modulestore.exceptions import ItemNotFoundError from models import Registration, UserProfile, PendingNameChange, PendingEmailChange, CourseEnrollment from datetime import date +from collections import namedtuple log = logging.getLogger("mitx.student") - +Article = namedtuple('Article', 'title url author image deck publication publish_date') def csrf_token(context): ''' A csrf token that can be included in a form. @@ -86,6 +87,20 @@ def course_from_id(id): return modulestore().get_item(course_loc) +def press(request): + json_articles = cache.get("student_press_json_articles") + if json_articles == None: + if hasattr(settings, 'RSS_URL'): + content = urllib.urlopen(settings.PRESS_URL).read() + json_articles = json.loads(content) + else: + content = open(settings.PROJECT_ROOT / "templates" / "press.json").read() + json_articles = json.loads(content) + cache.set("student_press_json_articles", json_articles) + articles = [Article(**article) for article in json_articles] + return render_to_response('static_templates/press.html', {'articles': articles}) + + @login_required @ensure_csrf_cookie def dashboard(request): diff --git a/lms/envs/common.py b/lms/envs/common.py index 5ec2125a59..4933871069 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -112,6 +112,7 @@ LIB_URL = '/static/js/' # BOOK_URL = '/static/book/' BOOK_URL = 'https://mitxstatic.s3.amazonaws.com/book_images/' # For AWS deploys # RSS_URL = r'lms/templates/feed.rss' +# PRESS_URL = r'' RSS_TIMEOUT = 600 # Configuration option for when we want to grab server error pages diff --git a/lms/static/images/press/bloomberg_logo_178x138.jpeg b/lms/static/images/press/bloomberg_logo_178x138.jpeg new file mode 100644 index 0000000000..d87819b7cd Binary files /dev/null and b/lms/static/images/press/bloomberg_logo_178x138.jpeg differ diff --git a/lms/static/images/press/chroniclehighered_logo_178x138.jpeg b/lms/static/images/press/chroniclehighered_logo_178x138.jpeg new file mode 100644 index 0000000000..95dce54e2e Binary files /dev/null and b/lms/static/images/press/chroniclehighered_logo_178x138.jpeg differ diff --git a/lms/static/images/press/harvardcrimson_logo_178x138.jpeg b/lms/static/images/press/harvardcrimson_logo_178x138.jpeg new file mode 100644 index 0000000000..7fa3bef5e1 Binary files /dev/null and b/lms/static/images/press/harvardcrimson_logo_178x138.jpeg differ diff --git a/lms/static/images/press/harvardgazette_logo_178x138.jpeg b/lms/static/images/press/harvardgazette_logo_178x138.jpeg new file mode 100644 index 0000000000..1f0bfac70b Binary files /dev/null and b/lms/static/images/press/harvardgazette_logo_178x138.jpeg differ diff --git a/lms/static/images/press/harvardmagazine_logo_178x138.jpeg b/lms/static/images/press/harvardmagazine_logo_178x138.jpeg new file mode 100644 index 0000000000..58b29a5596 Binary files /dev/null and b/lms/static/images/press/harvardmagazine_logo_178x138.jpeg differ diff --git a/lms/static/images/press/harvarduniv_logo_178x138.jpeg b/lms/static/images/press/harvarduniv_logo_178x138.jpeg new file mode 100644 index 0000000000..66dd05fb88 Binary files /dev/null and b/lms/static/images/press/harvarduniv_logo_178x138.jpeg differ diff --git a/lms/static/images/press/latimes_logo_178x138.jpeg b/lms/static/images/press/latimes_logo_178x138.jpeg new file mode 100644 index 0000000000..fed922f846 Binary files /dev/null and b/lms/static/images/press/latimes_logo_178x138.jpeg differ diff --git a/lms/static/images/press/mercurynews_logo_178x138.jpeg b/lms/static/images/press/mercurynews_logo_178x138.jpeg new file mode 100644 index 0000000000..798749ab22 Binary files /dev/null and b/lms/static/images/press/mercurynews_logo_178x138.jpeg differ diff --git a/lms/static/sass/base/_extends.scss b/lms/static/sass/base/_extends.scss index 7f6078252a..9dc10aed5f 100644 --- a/lms/static/sass/base/_extends.scss +++ b/lms/static/sass/base/_extends.scss @@ -85,7 +85,7 @@ } .success-message-colors { - background: rgb(99, 236, 137); - border: 1px solid rgb(17, 202, 54); - color: rgb(35, 143, 14); + background: rgb(19, 159, 58); + border: 1px solid rgb(6, 65, 18); + color: rgb(255, 255, 255); } diff --git a/lms/static/sass/multicourse/_course_about.scss b/lms/static/sass/multicourse/_course_about.scss index f96d12f7a3..fcf4382109 100644 --- a/lms/static/sass/multicourse/_course_about.scss +++ b/lms/static/sass/multicourse/_course_about.scss @@ -27,14 +27,17 @@ max-width: 1200px; min-width: 760px; position: relative; - width: 100%; z-index: 2; - + > div.table { + display: table; + width: 100%; + } .intro { @include box-sizing(border-box); @include clearfix; - float: left; + display: table-cell; + vertical-align: middle; padding: 20px 20px; position: relative; width: flex-grid(8) + flex-gutter(); @@ -130,9 +133,7 @@ .media { background: transparent; @include box-sizing(border-box); - display: block; - float: right; - height: 180px; + display: table-cell; padding: 20px; position: relative; width: flex-grid(4); @@ -273,6 +274,24 @@ } } } + + .faq { + @include clearfix; + + .responses { + float: left; + } + + .response { + margin-bottom: 40px; + + h3 { + font-family: $sans-serif; + font-weight: 700; + margin-bottom: 15px; + } + } + } } } diff --git a/lms/templates/index.html b/lms/templates/index.html index 2b03e51280..d8b0394927 100644 --- a/lms/templates/index.html +++ b/lms/templates/index.html @@ -126,7 +126,10 @@ Huffington Post, GigaOM, MIT News, - IEEE Spectrum + ##IEEE Spectrum, + Harvard Magazine, + Bloomberg + ## The Chronicle of Higher Education Read More → diff --git a/lms/templates/portal/course_about.html b/lms/templates/portal/course_about.html index bb00a6abf0..e6359d0542 100644 --- a/lms/templates/portal/course_about.html +++ b/lms/templates/portal/course_about.html @@ -51,6 +51,7 @@
+

${course.number}: ${get_course_about_section(course, "title")}${get_course_about_section(course, "university")}

@@ -84,6 +85,7 @@
% endif
+
@@ -107,7 +109,7 @@
diff --git a/lms/templates/static_templates/faq.html b/lms/templates/static_templates/faq.html index d95d07a8b3..785d34b828 100644 --- a/lms/templates/static_templates/faq.html +++ b/lms/templates/static_templates/faq.html @@ -48,8 +48,8 @@

EdX will be available to anyone in the world with an internet connection, and in general, there will not be an admissions process.

-

Will certificates be awarded?

-

Yes. Online learners who demonstrate mastery of subjects can earn a certificate of completion. Certificates will be issued by edX under the name of the underlying "X University" from where the course originated, i.e. HarvardX, MITx or BerkeleyX. For the courses in Fall 2012, those certificates will be free. There is a plan to charge a modest fee for certificates in the future

+

Will certificates be awarded?

+

Yes. Online learners who demonstrate mastery of subjects can earn a certificate of completion. Certificates will be issued by edX under the name of the underlying "X University" from where the course originated, i.e. HarvardX, MITx or BerkeleyX. For the courses in Fall 2012, those certificates will be free. There is a plan to charge a modest fee for certificates in the future.