Commit df2bbe8c by David Ormsbee Committed by Matthew Mongeau

Add scanning of data directory for courses.

These are then displayed at /courses.
parent 036529e6
...@@ -57,6 +57,14 @@ def courses(request): ...@@ -57,6 +57,14 @@ def courses(request):
'csrf' : csrf_token} 'csrf' : csrf_token}
return render_to_response("courses.html", context) return render_to_response("courses.html", context)
@ensure_csrf_cookie
def courses(request):
csrf_token = csrf(request)['csrf_token']
# TODO: Clean up how 'error' is done.
context = {'courses' : settings.COURSES,
'csrf' : csrf_token}
return render_to_response("courses.html", context)
@cache_control(no_cache=True, no_store=True, must_revalidate=True) @cache_control(no_cache=True, no_store=True, must_revalidate=True)
def gradebook(request): def gradebook(request):
if 'course_admin' not in user_groups(request.user): if 'course_admin' not in user_groups(request.user):
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
<hgroup> <hgroup>
<h2>${course.title}</h2> <h2>${course.title}</h2>
<p>${",".join(course.instructors)} &mdash; ${course.institution}</p> <p>${",".join(course.instructors)} &mdash; ${course.institution}</p>
<p>${course.id}</p>
</hgroup> </hgroup>
<div class="edit">Register</div> <div class="edit">Register</div>
<section class="meta"> <section class="meta">
......
...@@ -24,8 +24,8 @@ sympy ...@@ -24,8 +24,8 @@ sympy
newrelic newrelic
glob2 glob2
pymongo pymongo
-e common/lib/xmodule
django_nose django_nose
nosexcover nosexcover
rednose rednose
-e common/lib/xmodule
PyYAML PyYAML
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