Removed duplicate code

This commit is contained in:
Julia Hansbrough
2013-11-05 14:17:34 +00:00
parent 0d1dc8e2d4
commit 8b6568f448

View File

@@ -65,21 +65,6 @@ def add_to_course_staff(username, course_num):
user.groups.add(group)
@world.absorb
def add_to_course_staff(username, course_num):
"""
Add the user with `username` to the course staff group
for `course_num`.
"""
# Based on code in lms/djangoapps/courseware/access.py
group_name = "instructor_{}".format(course_num)
group, _ = Group.objects.get_or_create(name=group_name)
group.save()
user = User.objects.get(username=username)
user.groups.add(group)
@world.absorb
def clear_courses():
# Flush and initialize the module store