Courses don't have a user
authorCharles Connell <charles@connells.org>
Thu, 23 Jan 2014 00:47:06 +0000 (19:47 -0500)
committerCharles Connell <charles@connells.org>
Thu, 23 Jan 2014 15:44:36 +0000 (10:44 -0500)
karmaworld/apps/courses/views.py
karmaworld/apps/users/models.py

index d6957fde63e2c3d169f7889c4baf832ab89e112e..36df93f5976656ef77bdde04c0bdf25dc0fc2be3 100644 (file)
@@ -213,10 +213,6 @@ def process_course_flag_events(request_user, course):
     # Take a point away from person flagging this course
     if request_user.is_authenticated():
         CourseKarmaEvent.create_event(request_user, course, CourseKarmaEvent.GIVE_FLAG)
-    # If this is the 6th time this course has been flagged,
-    # punish the uploader
-    if course.flags == 6:
-        CourseKarmaEvent.create_event(course.user, course, CourseKarmaEvent.GET_FLAGGED)
 
 
 def flag_course(request, pk):
index cc34cc6ec6ad79b428619737a21c465fb204c0a7..de80967532d2702f71008bcf988531e255782344 100644 (file)
@@ -138,17 +138,14 @@ class NoteKarmaEvent(BaseKarmaEvent):
 
 class CourseKarmaEvent(BaseKarmaEvent):
     GIVE_FLAG    = 'give_flag'
-    GET_FLAGGED  = 'get_flagged'
     EVENT_TYPE_CHOICES = (
         (GIVE_FLAG,    "You flagged a course"),
-        (GET_FLAGGED,  "Your course was flagged as spam"),
     )
     course = models.ForeignKey('courses.Course')
     event_type = models.CharField(max_length=15, choices=EVENT_TYPE_CHOICES)
 
     POINTS = {
         GIVE_FLAG: -1,
-        GET_FLAGGED: -100
     }
 
     def get_message(self):