diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py
index e00e62a7c0..0d5fbcf55b 100644
--- a/common/lib/xmodule/xmodule/course_module.py
+++ b/common/lib/xmodule/xmodule/course_module.py
@@ -85,7 +85,8 @@ class CourseDescriptor(SequenceDescriptor):
# TODO: Remove number, instructors from this list
if section_key in ['short_description', 'description', 'key_dates', 'video', 'course_staff_short', 'course_staff_extended',
- 'requirements', 'syllabus', 'textbook', 'faq', 'more_info', 'number', 'instructors', 'overview']:
+ 'requirements', 'syllabus', 'textbook', 'faq', 'more_info', 'number', 'instructors', 'overview',
+ 'effort', 'end_date', 'prerequisites']:
try:
with self.system.resources_fs.open(path("about") / section_key + ".html") as htmlFile:
return htmlFile.read().decode('utf-8')
diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py
index 1d31600d55..badb7b1c17 100644
--- a/lms/djangoapps/courseware/views.py
+++ b/lms/djangoapps/courseware/views.py
@@ -250,12 +250,17 @@ def course_info(request, course_id):
course = check_course(course_id)
return render_to_response('info.html', {'course': course})
-
+
@ensure_csrf_cookie
def course_about(request, course_id):
+ def registered_for_course(course, user):
+ if user.is_authenticated():
+ return CourseEnrollment.objects.filter(user = user, course_id=course.id).exists()
+ else:
+ return False
course = check_course(course_id, course_must_be_open=False)
-
- return render_to_response('portal/course_about.html', {'course': course})
+ registered = registered_for_course(course, request.user)
+ return render_to_response('portal/course_about.html', {'course': course, 'registered': registered})
@login_required
diff --git a/lms/static/sass/_course_about.scss b/lms/static/sass/_course_about.scss
index e44989c2e0..f074ba795d 100644
--- a/lms/static/sass/_course_about.scss
+++ b/lms/static/sass/_course_about.scss
@@ -97,6 +97,20 @@
color: rgb(255,255,255);
}
}
+
+ span.register {
+ @include button(shiny, lighten(grayscale($blue), 50%));
+ @include box-sizing(border-box);
+ @include border-radius(3px);
+ color: #888;
+ display: block;
+ font: normal 1.2rem/1.6rem $sans-serif;
+ letter-spacing: 1px;
+ padding: 10px 0px;
+ text-transform: uppercase;
+ text-align: center;
+ width: flex-grid(12);
+ }
}
}
diff --git a/lms/templates/portal/course_about.html b/lms/templates/portal/course_about.html
index 22261a52af..25f6ce0875 100644
--- a/lms/templates/portal/course_about.html
+++ b/lms/templates/portal/course_about.html
@@ -19,7 +19,11 @@
%if user.is_authenticated():
-
Register
+ %if registered:
+
Registered
+ %else:
+
Register
+ %endif
%else:
Register
%endif
@@ -71,10 +75,23 @@
- Classes Start
${course.start_date_text}
- ##Final Exam
12/09/12
- ##Course Length
15 weeks
Course Number
${course.number}
+ Classes Start
${course.start_date_text}
+
+ ## End date should come from course.xml, but this is a quick hack
+ % if course.get_about_section("end_date"):
+ Classes End
${course.get_about_section("end_date")}
+ % endif
+
+ % if course.get_about_section("effort"):
+ Estimated Effort
${course.get_about_section("effort")}
+ % endif
+
+ % if course.get_about_section("prerequisites"):
+ Prerequisites
${course.get_about_section("prerequisites")}
+ % endif
+
+ ##Course Length
15 weeks