Commit 3fbde821 by Calen Pennington

Skip over fields that are scoped to students when looping through the…

Skip over fields that are scoped to students when looping through the CourseModule fields in the instructor dashboard
parent 27be7e15
......@@ -92,9 +92,15 @@ def instructor_dashboard(request, course_id):
data += compute_course_stats(course).items()
if request.user.is_staff:
for field in course.fields:
if getattr(field.scope, 'student', False):
continue
data.append([field.name, json.dumps(field.read_json(course))])
for namespace in course.namespaces:
for field in getattr(course, namespace).fields:
if getattr(field.scope, 'student', False):
continue
data.append(["{}.{}".format(namespace, field.name), json.dumps(field.read_json(course))])
datatable['data'] = data
......
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