diff --git a/rowers/plannedsessions.py b/rowers/plannedsessions.py index 62aaeff9..1a48c7ab 100644 --- a/rowers/plannedsessions.py +++ b/rowers/plannedsessions.py @@ -940,7 +940,7 @@ def email_submit_race(r,race,workoutid): result = add_rower_race(r,race) otherrecords = IndoorVirtualRaceResult.objects.filter( - race = race).exclude(userid = r.id) + race = race) for otherrecord in otherrecords: @@ -978,7 +978,7 @@ def email_submit_race(r,race,workoutid): if result: otherrecords = IndoorVirtualRaceResult.objects.filter( - race = race).exclude(userid = r.id) + race = race) for otherrecord in otherrecords: otheruser = Rower.objects.get(id=otherrecord.userid) diff --git a/rowers/templates/virtualeventranking.html b/rowers/templates/virtualeventranking.html new file mode 100644 index 00000000..dac83880 --- /dev/null +++ b/rowers/templates/virtualeventranking.html @@ -0,0 +1,503 @@ +{% extends "newbase.html" %} +{% load staticfiles %} +{% load rowerfilters %} + +{% block title %}Rowsandall Virtual Race{% endblock %} + +{% block scripts %} +{% include "monitorjobs.html" %} + +{% endblock %} + +{% block og_title %}{{ race.name }}{% endblock %} +{% block description %}Virtual Rowing Race {{ race.name }}{% endblock %} + +{% if racelogo %} +{% block og_image %} + + + + +{% endblock %} +{% block image_src %} + +{% endblock %} +{% endif %} + +{% block main %} + + +
+ {% if race|is_final %} +
+
| + | Name | +Team Name | ++ | + | + | + | Class | + {% if race.sessiontype == 'race' %} +Boat | + {% endif %} +Time | +Distance | +Details | ++ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ forloop.counter }} | ++ + {{ result.username }} | +{{ result.teamname }} | +{{ result.age }} | +{{ result.sex }} | +{{ result.weightcategory }} | ++ {% if result.adaptiveclass == 'None' %} + + {% else %} + {{ result.adaptiveclass }} + {% endif %} + | +{{ result.boatclass }} | + {% if race.sessiontype == 'race' %} +{{ result.boattype }} | + {% endif %} +{{ result.duration |durationprint:"%H:%M:%S.%f" }} | +{{ result.distance }} m | ++ + Details | ++ {% if race.manager == request.user and not race|is_final %} + + Disqualify + + {% else %} + + {% endif %} + | +
| + | {{ result.username }} | +{{ result.teamname }} | +{{ result.age }} | +{{ result.sex }} | +{{ result.weightcategory }} | ++ {% if result.adaptiveclass == 'None' %} + + {% else %} + {{ result.adaptiveclass }} + {% endif %} + | +{{ result.boatclass }} | + {% if race.sessiontype == 'race' %} +{{ result.boattype }} | + {% endif %} +DNS | +
+ Compare Results +
+ {% else %} ++ No results yet +
+ {% endif %} ++
+ +
+
+
+
| Course | {{ race.course }} | +
|---|---|
| Indoor Race | To be rowed on a Concept2 ergometer | +
| Time Zone | {{ race.timezone }} | +
| + {{ race.sessionmode }} challenge + | {{ race.sessionvalue }} {{ race.sessionunit }} + | +
| Registration closure | +{{ race.registration_closure }} | +
| Date | {{ race.startdate }} | +
| Race Window | {{ race.startdate }} {{ race.start_time }} to {{ race.enddate }} {{ race.end_time }} | +
| Results Submission Deadline | {{ race.evaluation_closure }} | +
| Organizer | {{ race.manager.first_name }} {{ race.manager.last_name }} | +
| Contact Email | {{ race.contact_email }} | +
| Contact Phone | {{ race.contact_phone }} | +
| Comment | {{ race.comment|linebreaks }} | +
| Name | +Team Name | + {% if race.sessiontype == 'race' %} +Class | +Boat | + {% else %} +Class | + {% endif %} +Age | +Gender | +Weight Category | +Adaptive | +
|---|---|---|---|---|---|---|---|---|
| {{ record.username }} + | {{ record.teamname }} | +{{ record.boatclass }} | + {% if race.sessiontype == 'race' %} +{{ record.boattype }} | + {% endif %} +{{ record.age }} | +{{ record.sex }} | +{{ record.weightcategory }} | ++ {% if record.adaptiveclass == 'None' %} + + {% else %} + {{ record.adaptiveclass }} + {% endif %} + | + {% if record.userid == rower.id and 'withdrawbutton' in buttons %} ++ Withdraw + | + {% endif %} +
+
+ Virtual races are intended as an informal way to add a + competitive element to training and as a quick way to set + up and manage small regattas. +
++ On the water races are rowed on the course shown. + You cannot submit results rowed + on other bodies of water. +
++ Indoor races are open for all, wherever you live. + However, be aware of the + time zone for the race window. +
++ As a rowsandall.com user, you can + register to take part in this event. Please note the registration + deadline. You must register before this deadline. + You can always withdraw from participating before the registration + deadline or the start of the race window, whichever is earlier. +
++ After the start of the race window and before the submission deadline, + you can submit results by linking the race to one of your uploaded + workouts. The workout start time must be within the race window + and your course must pass through the blue polygons on the course + map (in the right order), for your result to be valid. +
++ The results table has a link to a page where details of your workout + are shown. +
++ Race results are stored permanently and are not deleted when + you delete the respective workout or remove your account. + By registering, you agree with this and the race rules. +
++ If you use a manually added workout for your indoor race result, + please attach a screenshot of the ergometer display for verification. +
++ Virtual Racing on rowsandall.com is honors based. Please be a good + sport, submit real results rowed by you, and make sure you set the + boat type correctly. For (future functionality) age and gender + corrected times, please be sure your gender and birth date are set + correctly in your user settings. +
++ Virtual races are intended as an informal way to add a + competitive element to training. Virtual races are not + refereed or staffed to provide for participants safety. + Individual participants are entirely responsible for their + safety while participating in a virtual race. +
++ Until the evaluation closure time, the race organizer can + review and reject entries. If you are disqualified in this + way, you will receive an email with the reason. +
++
++ Tweet + {% else %} + data-text="@rowsandall #rowingdata Participate in Indoor Rowing virtual race '{{ race.name }}'">Tweet +{% endif %} +
+ + +
+ + +{% if not racelogo and race.manager == request.user %} +Add Race Logo +{% endif %} +{% endblock %} + +{% block sidebar %} +{% include 'menu_racing.html' %} +{% endblock %} diff --git a/rowers/tests/testdata/testdata.csv.gz b/rowers/tests/testdata/testdata.csv.gz index 5201c511..216dabaf 100644 Binary files a/rowers/tests/testdata/testdata.csv.gz and b/rowers/tests/testdata/testdata.csv.gz differ diff --git a/rowers/tests/testdata/testdata.tcx b/rowers/tests/testdata/testdata.tcx index 09a7a0bc..2b309e36 100644 --- a/rowers/tests/testdata/testdata.tcx +++ b/rowers/tests/testdata/testdata.tcx @@ -2502,7 +2502,7 @@ -