Example #1
0
 def handle(self, *args, **options):
     """send reminders"""
     print '****** Processing send_reminders at %s *******' % datetime.datetime.today(
     )
     smartgrid.send_reminders()
     smartgrid.check_new_submissions()
     participation.award_participation()
Example #2
0
def send_reminders():
    """send reminders."""
    print '****** Processing send_reminders at %s *******' % datetime.datetime.today(
    )

    challenge_mgr.init()
    smartgrid.send_reminders()
    smartgrid.check_new_submissions()
    participation.award_participation()
Example #3
0
    def testParticipation(self):
        """Test that the participation widget loads current round information."""

        # Give the user points in the round and then check the queryset used in the page.
        profile = self.user.profile
        profile.add_points(60, datetime.datetime.today(), "test")
        profile.save()

        participation.award_participation()

        response = self.client.get(reverse("learn_index"))

        self.assertEqual(response.context["view_objects"]["participation"][
            "round_participation_ranks"]["Round 1"]["participation_100"][0].team,
            profile.team,
            "The user's team should be leading.")
Example #4
0
    def testParticipation(self):
        """Test that the participation widget loads current round information."""

        # Give the user points in the round and then check the queryset used in the page.
        profile = self.user.get_profile()
        profile.add_points(60, datetime.datetime.today(), "test")
        profile.save()

        participation.award_participation()

        response = self.client.get(reverse("learn_index"))

        self.assertEqual(response.context["view_objects"]["participation"][
            "round_participation_ranks"]["Round 1"]["participation_100"][0].team,
            profile.team,
            "The user's team should be leading.")
Example #5
0
def send_reminders():
    """send reminders."""
    smartgrid.send_reminders()
    smartgrid.check_new_submissions()
    participation.award_participation()
 def handle(self, *args, **options):
     """send reminders"""
     print '****** Processing send_reminders at %s *******' % datetime.datetime.today()
     smartgrid.send_reminders()
     smartgrid.check_new_submissions()
     participation.award_participation()
    def handle(self, *args, **options):
        """check the energy goal for all teams"""
        print '****** Processing award participation for %s *******\n' % datetime.datetime.today()

        participation.award_participation()