Пример #1
0
def jeecpot_reward_dashboard():
    jeecpot_rewards = RewardsFinder.get_all_jeecpot_rewards()
    rewards = RewardsFinder.get_all_rewards()

    if (jeecpot_rewards is None or len(jeecpot_rewards) < 1):
        RewardsHandler.create_jeecpot_reward()
        jeecpot_rewards = RewardsFinder.get_all_jeecpot_rewards()

    return render_template(
        'admin/students_app/rewards/jeecpot_rewards_dashboard.html',
        error=None,
        jeecpot_rewards=jeecpot_rewards[0],
        rewards=rewards,
        current_user=current_user)
Пример #2
0
def get_jeecpot_rewards(student):
    jeecpot_rewards = RewardsFinder.get_all_jeecpot_rewards()

    return JeecpotRewardsValue(jeecpot_rewards[0], student).json(200)