@@ -622,7 +622,7 @@ def get_current_child(xmodule, min_depth=None, requested_child=None):
|
||||
children = xmodule.get_display_items()
|
||||
if len(children) > 0:
|
||||
if xmodule.position is not None and not requested_child:
|
||||
pos = xmodule.position - 1 # position is 1-indexed
|
||||
pos = int(xmodule.position) - 1 # position is 1-indexed
|
||||
if 0 <= pos < len(children):
|
||||
child = children[pos]
|
||||
if min_depth is not None and (min_depth > 0 and not child.has_children_at_depth(min_depth - 1)):
|
||||
|
||||
@@ -344,7 +344,7 @@ def get_notes(request, course, page=DEFAULT_PAGE, page_size=DEFAULT_PAGE_SIZE, t
|
||||
response = send_request(request.user, course.id, page, page_size, path, text)
|
||||
|
||||
try:
|
||||
collection = json.loads(response.content.decode('utf-8'))
|
||||
collection = json.loads(response.content)
|
||||
except ValueError:
|
||||
log.error(u"Invalid JSON response received from notes api: response_content=%s", response.content)
|
||||
raise EdxNotesParseError(_("Invalid JSON response received from notes api."))
|
||||
|
||||
Reference in New Issue
Block a user