Ejemplo n.º 1
0
def get_index(user_dao):
    """
    Summary: Get juror-level index of all campaigns and rounds.
    """
    juror_dao = JurorDAO(user_dao)
    stats = [
        make_juror_round_details(rnd, rnd_stats, ballot)
        for rnd, rnd_stats, ballot in juror_dao.get_all_rounds_task_counts()
    ]
    return stats
Ejemplo n.º 2
0
def get_index(user_dao, only_active=True):
    """
    Summary: Get juror-level index of active campaigns and rounds.
    """
    juror_dao = JurorDAO(user_dao)
    counts = juror_dao.get_all_rounds_task_counts(only_active=True)
    stats = [
        make_juror_round_details(rnd, rnd_stats, ballot)
        for rnd, rnd_stats, ballot in counts
    ]
    return stats