xblock changed attribute names from 'student' to 'user'. Need to update consumers
This commit is contained in:
@@ -93,13 +93,13 @@ 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):
|
||||
if getattr(field.scope, 'user', 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):
|
||||
if getattr(field.scope, 'user', False):
|
||||
continue
|
||||
|
||||
data.append(["{}.{}".format(namespace, field.name), json.dumps(field.read_json(course))])
|
||||
|
||||
Reference in New Issue
Block a user