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

v1.5.0 updates #109

Merged
merged 44 commits into from
Aug 31, 2023
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
cd41d0e
disabled server tokens
mmcinnestaylor Apr 4, 2023
115fd76
updated extension
mmcinnestaylor Apr 7, 2023
47a0907
updated django volume name
mmcinnestaylor Apr 7, 2023
a619387
corrected display of announcement post time
mmcinnestaylor Apr 13, 2023
f313b3b
implemented import and display of team's contest score
mmcinnestaylor Apr 21, 2023
419302b
implemented separate table for faculty teams
mmcinnestaylor Apr 21, 2023
31d7771
exclude empty teams from teams table
mmcinnestaylor Apr 21, 2023
5906eaa
implemented caching of domserver status
mmcinnestaylor Apr 22, 2023
6c6d6b6
Update nginx.conf
mmcinnestaylor Apr 22, 2023
860db48
Merge branch 'develop' into release
mmcinnestaylor Apr 22, 2023
2850b3b
restructured project assets
mmcinnestaylor May 24, 2023
0e5231a
self hosted bootstrap v4.5.3
mmcinnestaylor May 24, 2023
c3a62a2
updated domjudge server status check
mmcinnestaylor May 24, 2023
2261135
updated default domjudge url
mmcinnestaylor May 24, 2023
81ac2c5
moved messages template
mmcinnestaylor May 24, 2023
6c1b0d8
moved base template
mmcinnestaylor May 24, 2023
1b54bf9
updated log levels
mmcinnestaylor May 24, 2023
8bce3bd
updated string formatting of celery logs
mmcinnestaylor May 24, 2023
dfa39af
updated celery task log levels
mmcinnestaylor Jun 19, 2023
38817f8
added section IDs to faq links
mmcinnestaylor Jun 21, 2023
ca40240
various faculty dashboard updates
mmcinnestaylor Jun 23, 2023
c8b3ed1
updated faq language + added intra-page anchors
mmcinnestaylor Aug 10, 2023
d7ad86b
added exception handling to send_validation_email task
mmcinnestaylor Aug 10, 2023
e20bfb4
refactored walk-in team generator
mmcinnestaylor Aug 11, 2023
2577ad6
refactored domjudge file generator
mmcinnestaylor Aug 11, 2023
dda07fa
added team division code accessor
mmcinnestaylor Aug 16, 2023
cfe1997
updated team divison accessor
mmcinnestaylor Aug 16, 2023
b0870f1
refactored extra credit report generator
mmcinnestaylor Aug 16, 2023
606fea1
refactored extra credit notifier
mmcinnestaylor Aug 16, 2023
a5bff12
refactored domjudge result processor
mmcinnestaylor Aug 16, 2023
1969572
implemented profile role updater
mmcinnestaylor Aug 16, 2023
d4ffed6
added user account activator to admin dashboard
mmcinnestaylor Aug 16, 2023
eb01a42
reorganized contest dashboard
mmcinnestaylor Aug 16, 2023
8ce8d9a
implemented Profile role accessor
mmcinnestaylor Aug 16, 2023
0dd1ef0
refactored dashboards to utilize profile role accessor
mmcinnestaylor Aug 16, 2023
7a50319
refactored admin tasks
mmcinnestaylor Aug 16, 2023
5afd6a7
implemented faculty team assignment tool
mmcinnestaylor Aug 16, 2023
ce723f5
updated contest dashboard gui
mmcinnestaylor Aug 16, 2023
7ee0580
homepage update
mmcinnestaylor Aug 17, 2023
14cc52f
bumped Django to 4.2.x
mmcinnestaylor Aug 22, 2023
4123e82
updated flower static file path
mmcinnestaylor Aug 22, 2023
b9351a6
added display, search, and filter fields for models in django admin
mmcinnestaylor Aug 29, 2023
d0fbb8a
updated formatting of team tables
mmcinnestaylor Aug 31, 2023
e4a7d24
Merge branch 'develop' into release
mmcinnestaylor Aug 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
implemented separate table for faculty teams
mmcinnestaylor committed Apr 21, 2023
commit 419302bcfe6b3ee31cfceb11835672fb99c58f00
56 changes: 53 additions & 3 deletions src/core/templates/core/teams.html
Original file line number Diff line number Diff line change
@@ -15,7 +15,8 @@ <h1 class="text-center">Registered Teams</h1>
<div class="col">
<h2>Upper Division</h2>
<button type="button" class="btn btn-sm btn-primary mr-2" disabled>
<i class="fa-solid fa-users fa-fw"></i> Teams <span class="badge badge-light">{{ num_upper_teams }}</span>
<i class="fa-solid fa-users fa-fw"></i> Teams <span class="badge badge-light">
{{ num_upper_teams }}</span>
<span class="sr-only">number of upper division teams</span>
</button>
<button type="button" class="btn btn-sm btn-info" disabled>
@@ -62,7 +63,8 @@ <h2>Upper Division</h2>
<div class="col">
<h2>Lower Division</h2>
<button type="button" class="btn btn-sm btn-primary mr-2" disabled>
<i class="fa-solid fa-users fa-fw"></i> Teams <span class="badge badge-light">{{ num_lower_teams }}</span>
<i class="fa-solid fa-users fa-fw"></i> Teams <span class="badge badge-light">
{{ num_lower_teams }}</span>
<span class="sr-only">number of lower division teams</span>
</button>
<button type="button" class="btn btn-sm btn-info" disabled>
@@ -105,5 +107,53 @@ <h2>Lower Division</h2>
</div>
</div>
</div>
<div class="row">
<div class="col">
<h2>Faculty</h2>
<button type="button" class="btn btn-sm btn-primary mr-2" disabled>
<i class="fa-solid fa-users fa-fw"></i> Teams <span class="badge badge-light">
{{ num_faculty_teams }}</span>
<span class="sr-only">number of faculty teams</span>
</button>
<button type="button" class="btn btn-sm btn-info" disabled>
<i class="fa-solid fa-user fa-fw"></i> Participants <span class="badge badge-light">{{ num_faculty_participants }}</span>
<span class="sr-only">number of faculty participants</span>
</button>
<div class="table-responsive mt-2">
<table class="table table-sm table-striped shadow ">
<thead class="thead-dark text-center">
<tr>
<th scope="col">Team Name</th>
<th scope="col">Questions Answered</th>
<th scope="col">Score</th>
<th scope="col">Team Members</th>
</tr>
</thead>
<tbody class="bg-light">
{% for team in faculty_teams %}
<tr>
<td class="text-center">{{ team.name }}</td>
<td class="text-center">{{ team.questions_answered }}</td>
<td class="text-center">{{ team.score }}</td>
<td class="text-center">
<small>
{% with team.get_members|last as last %}
{% for member in team.get_members %}
{% if member == last %}
{{ member }}
{% else %}
{{ member }},&puncsp;
{% endif %}
{% endfor %}
{% endwith %}
</small>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endcache %}
{% endblock %}
{% endblock %}
12 changes: 9 additions & 3 deletions src/core/views.py
Original file line number Diff line number Diff line change
@@ -53,15 +53,21 @@ def teams(request):
participants_set = Profile.objects.all()

# Aggregate upper division team and participant info
upper_teams_set = teams_set.filter(division=1)
upper_teams_set = teams_set.filter(division=1).filter(faculty=False)
context['upper_teams'] = upper_teams_set.order_by('-questions_answered', 'score', 'name')
context['num_upper_teams'] = upper_teams_set.count()
context['num_upper_participants'] = participants_set.filter(team__division=1).count()

# Aggregate division team and participant info
lower_teams_set = teams_set.filter(division=2)
# Aggregate lower division team and participant info
lower_teams_set = teams_set.filter(division=2).filter(faculty=False)
context['lower_teams'] = lower_teams_set.order_by('-questions_answered', 'score', 'name')
context['num_lower_teams'] = lower_teams_set.count()
context['num_lower_participants'] = participants_set.filter(team__division=2).count()

# Aggregate faculty team and participant info
faculty_teams_set = teams_set.filter(faculty=True)
context['faculty_teams'] = faculty_teams_set.order_by('-questions_answered', 'score', 'name')
context['num_faculty_teams'] = faculty_teams_set.count()
context['num_faculty_participants'] = participants_set.filter(team__faculty=True).count()

return render(request, 'core/teams.html', context)
18 changes: 18 additions & 0 deletions src/register/migrations/0003_team_faculty.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.1.7 on 2023-04-21 20:35

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('register', '0002_team_score'),
]

operations = [
migrations.AddField(
model_name='team',
name='faculty',
field=models.BooleanField(default=False),
),
]
1 change: 1 addition & 0 deletions src/register/models.py
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ class Team(models.Model):
questions_answered = models.PositiveSmallIntegerField(default=0)
score = models.PositiveSmallIntegerField(default=0)
num_members = models.PositiveSmallIntegerField(default=0)
faculty = models.BooleanField(default=False)

def __str__(self):
return (str(self.name) + ' : ' + ('U' if self.division == 1 else 'L'))