BOM-227
python3 compatibility
This commit is contained in:
@@ -305,7 +305,8 @@ def _sort_map_entries(category_map, sort_alpha):
|
||||
for title, category in category_map["subcategories"].items():
|
||||
things.append((title, category, TYPE_SUBCATEGORY))
|
||||
_sort_map_entries(category_map["subcategories"][title], sort_alpha)
|
||||
category_map["children"] = [(x[0], x[2]) for x in sorted(things, key=lambda x: x[1]["sort_key"])]
|
||||
key_method = lambda x: x[1]["sort_key"] if x[1]["sort_key"] is not None else ''
|
||||
category_map["children"] = [(x[0], x[2]) for x in sorted(things, key=key_method)]
|
||||
|
||||
|
||||
def get_discussion_category_map(course, user, divided_only_if_explicit=False, exclude_unstarted=True):
|
||||
|
||||
Reference in New Issue
Block a user