Exemple #1
0
 def set_enrollment(self, experiment, group_id):
     self.experiment_user.store_temporary_enrollment(
         experiment.name, group_id)
     user_enrolled.send(sender=self.__class__,
                        experiment=experiment,
                        experiment_user=self.experiment_user,
                        group_id=group_id)
Exemple #2
0
 def set_enrollment(self, experiment, group_id):
     self.experiment_user.store_temporary_enrollment(experiment.name,
                                                     group_id)
     user_enrolled.send(sender=self.__class__,
                        experiment=experiment,
                        experiment_user=self.experiment_user,
                        group_id=group_id)
Exemple #3
0
 def set_enrollment(self, experiment, group_id):
     participant = Participant.objects.create(
         user=self.experiment_user.get_registered_user(), experiment=experiment, group=group_id
     )
     user_enrolled.send(
         sender=self.__class__, experiment=experiment, experiment_user=self.experiment_user, group_id=group_id
     )
Exemple #4
0
 def set_enrollment(self, experiment, group_id):
     participant = Participant.objects.create(
         user=self.experiment_user.get_registered_user(),
         experiment=experiment,
         group=group_id)
     user_enrolled.send(sender=self.__class__,
                        experiment=experiment,
                        experiment_user=self.experiment_user,
                        group_id=group_id)
 def set_enrollment(self, experiment, group_id):
     participant = Participant.objects.create(
         user=self.experiment_user.get_registered_user(),
         experiment=experiment, group=group_id,
         anonymous_visitor=AnonymousVisitor.objects.get(id=self.experiment_user.get_anonymous_id())
     )
     user_enrolled.send(sender=self.__class__,
                        experiment=experiment,
                        experiment_user=self.experiment_user,
                        group_id=group_id)
Exemple #6
0
 def set_enrollment(self, experiment, group_id):
     participant = Participant.objects.create(
         user=self.experiment_user.get_registered_user(),
         experiment=experiment,
         group=group_id,
         anonymous_visitor=AnonymousVisitor.objects.get(
             id=self.experiment_user.get_anonymous_id()))
     user_enrolled.send(sender=self.__class__,
                        experiment=experiment,
                        experiment_user=self.experiment_user,
                        group_id=group_id)
Exemple #7
0
        def set_enrollment(self, experiment, group_id):
            anonymous_visitor = self.__get_anonymous_visitor()
            if not anonymous_visitor:
                anonymous_visitor = AnonymousVisitor()
                anonymous_visitor.save()
                self.experiment_user.set_anonymous_id(anonymous_visitor.id)

            Participant.objects.create(anonymous_visitor=anonymous_visitor, experiment=experiment, group=group_id)
            user_enrolled.send(
                sender=self.__class__, experiment=experiment, experiment_user=self.experiment_user, group_id=group_id
            )
Exemple #8
0
        def set_enrollment(self, experiment, group_id):
            anonymous_visitor = self.__get_anonymous_visitor()
            if not anonymous_visitor:
                anonymous_visitor = AnonymousVisitor()
                anonymous_visitor.save()
                self.experiment_user.set_anonymous_id(anonymous_visitor.id)

            Participant.objects.create(anonymous_visitor=anonymous_visitor,
                                       experiment=experiment,
                                       group=group_id)
            user_enrolled.send(sender=self.__class__,
                               experiment=experiment,
                               experiment_user=self.experiment_user,
                               group_id=group_id)