Commit 68a42902 by Julia Hansbrough

Merge pull request #1589 from edx/flowerhack/fix/remove-duplicate-course-helper-code

Removed duplicate code
parents 0d1dc8e2 8b6568f4
......@@ -66,21 +66,6 @@ def add_to_course_staff(username, course_num):
@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
# Note that if your test module gets in some weird state
......
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