Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Team name is not shown in the leaderboard #1838

Closed
xbaro opened this issue Jun 15, 2017 · 1 comment
Closed

Team name is not shown in the leaderboard #1838

xbaro opened this issue Jun 15, 2017 · 1 comment
Assignees

Comments

@xbaro
Copy link
Collaborator

xbaro commented Jun 15, 2017

The name of the team is not shown in the leaderboard.

To fix this, the team information from submission should be added.

File: codalab/codalab/apps/web/views.py (line 730) Method CompetitionResultsPage

Change:

            for group in context['groups']:
                    for _, scoredata in group['scores']:
                         sub = models.CompetitionSubmission.objects.get(pk=scoredata['id'])
                         scoredata['date'] = sub.submitted_at
                         scoredata['count'] = sub.phase.submissions.filter(participant=sub.participant).count()

To:

            for group in context['groups']:
                    for _, scoredata in group['scores']:
                         sub = models.CompetitionSubmission.objects.get(pk=scoredata['id'])
                         scoredata['date'] = sub.submitted_at
                         scoredata['count'] = sub.phase.submissions.filter(participant=sub.participant).count()
                         if sub.team:
                              scoredata['team_name']` = sub.team.name
@ckcollab
Copy link
Contributor

Closing this unless Xavier runs into some problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants