def setReminder(self,occurrence):
sendReminderTo = self[<NUM_LIT:0>].cleaned_data['<STR_LIT>']<EOL>sendReminderWhen = self[<NUM_LIT:0>].cleaned_data['<STR_LIT>']<EOL>sendReminderGroup = self[<NUM_LIT:0>].cleaned_data['<STR_LIT>']<EOL>sendReminderUsers = self[<NUM_LIT:0>].cleaned_data['<STR_LIT>']<EOL>new_reminder_time = occurrence.startTime - timedelta(minutes=int(float(sendReminderWhen)))<EOL>new_reminder = EventReminder(eventOccurrence=occurrence,time=new_reminder_time)<EOL>new_reminder.save()<EOL>if sendReminderTo == '<STR_LIT:all>':<EOL><INDENT>user_set = User.objects.filter(Q(staffmember__isnull=False) | Q(is_staff=True))<EOL><DEDENT>elif sendReminderTo == '<STR_LIT>':<EOL><INDENT>user_set = User.objects.filter(id=occurrence.event.submissionUser.id)<EOL><DEDENT>elif sendReminderTo == '<STR_LIT>':<EOL><INDENT>user_set = User.objects.filter(**{'<STR_LIT>': sendReminderUsers})<EOL><DEDENT>elif sendReminderTo == '<STR_LIT>':<EOL><INDENT>user_set = User.objects.filter(**{'<STR_LIT>': sendReminderGroup})<EOL><DEDENT>else:<EOL><INDENT>user_set = []<EOL><DEDENT>for user in user_set:<EOL><INDENT>new_reminder.notifyList.add(user)<EOL><DEDENT>
This function is called to create the actual reminders for each occurrence that is created.