Require course ids to be case-insensitively unique

This commit is contained in:
Don Mitchell
2013-10-23 15:47:07 -04:00
parent e1b39774de
commit 277f327690
3 changed files with 28 additions and 10 deletions

View File

@@ -195,7 +195,7 @@ def is_user_in_course_group_role(user, location, role, check_staff=True):
# all "is_staff" flagged accounts belong to all groups
if check_staff and user.is_staff:
return True
return user.groups.filter(name=get_course_groupname_for_role(location, role)).count() > 0
return user.groups.filter(name=get_course_groupname_for_role(location, role)).exists()
return False