Fix links to student profile pages from gradebook
This commit is contained in:
@@ -84,7 +84,8 @@ def gradebook(request, course_id):
|
||||
}
|
||||
for student in enrolled_students]
|
||||
|
||||
return render_to_response('gradebook.html', {'students': student_info, 'course': course})
|
||||
return render_to_response('gradebook.html', {'students': student_info,
|
||||
'course': course, 'course_id': course_id})
|
||||
|
||||
|
||||
@login_required
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<%inherit file="main.html" />
|
||||
<%! from django.core.urlresolvers import reverse %>
|
||||
<%namespace name='static' file='static_content.html'/>
|
||||
|
||||
<%block name="js_extra">
|
||||
@@ -59,7 +60,10 @@
|
||||
|
||||
%for student in students:
|
||||
<tr>
|
||||
<td><a href="/profile/${student['id']}/">${student['username']}</a></td>
|
||||
<td><a href="${reverse('student_profile',
|
||||
kwargs={'course_id' : course_id,
|
||||
'student_id': student['id']})}">
|
||||
${student['username']}</a></td>
|
||||
%for section in student['grade_summary']['section_breakdown']:
|
||||
${percent_data( section['percent'] )}
|
||||
%endfor
|
||||
|
||||
@@ -137,7 +137,7 @@ if settings.COURSEWARE_ENABLED:
|
||||
'courseware.views.profile', name="profile"),
|
||||
# Takes optional student_id for instructor use--shows profile as that student sees it.
|
||||
url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/profile/(?P<student_id>[^/]*)/$',
|
||||
'courseware.views.profile'),
|
||||
'courseware.views.profile', name="student_profile"),
|
||||
|
||||
# For the instructor
|
||||
url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/gradebook$',
|
||||
|
||||
Reference in New Issue
Block a user