Commit e66fe2b3 by Chris Rossi Committed by cewing

MIT: CCX. Properly handle possible representations of the course key

parent aa1333c3
......@@ -24,6 +24,8 @@ from .models import StudentModule
from .module_render import get_module_for_descriptor
from submissions import api as sub_api # installed from the edx-submissions repository
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
log = logging.getLogger("edx.courseware")
......@@ -501,7 +503,7 @@ def iterate_grades_for(course_or_id, students):
make up the final grade. (For display)
- raw_scores: contains scores for every graded module
"""
if isinstance(course_or_id, basestring):
if isinstance(course_or_id, (basestring, CourseKey)):
course = courses.get_course_by_id(course_or_id)
else:
course = course_or_id
......
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