From dfbe7dd4f9fb52f3f5fd81520d83eb35f6251f63 Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Thu, 24 Jan 2013 15:54:02 -0500 Subject: [PATCH] fix merge problem. assign_default_role() ended up being defined twice as that code was added in both master and cms-master branches, but the merge didn't pick it up as a conflict --- lms/djangoapps/django_comment_client/models.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lms/djangoapps/django_comment_client/models.py b/lms/djangoapps/django_comment_client/models.py index 631e68f2fe..10c05c75e9 100644 --- a/lms/djangoapps/django_comment_client/models.py +++ b/lms/djangoapps/django_comment_client/models.py @@ -62,14 +62,3 @@ class Permission(models.Model): def __unicode__(self): return self.name - - -@receiver(post_save, sender=CourseEnrollment) -def assign_default_role(sender, instance, **kwargs): - if instance.user.is_staff: - role = Role.objects.get_or_create(course_id=instance.course_id, name="Moderator")[0] - else: - role = Role.objects.get_or_create(course_id=instance.course_id, name="Student")[0] - - logging.info("assign_default_role: adding %s as %s" % (instance.user, role)) - instance.user.roles.add(role)