From e4e5397e40062f393226a2b78118b8d291ec9d42 Mon Sep 17 00:00:00 2001
From: Sander Roosendaal
+ Standards Collections
+
+
+
+
+
+
+
+
+
+ {% for standard in standards %}
+ Name
+ Maintainer
+
+
+
+ {% endfor %}
+
+ {{ standard.name }}
+ {{ standard.manager.first_name }} {{ standard.manager.last_name }}
+
+ {% if standard.manager == user %}
+ {{ standard.name }}
+ {% else %}
+ {{ standard.name }}
+ {% endif %}
+
+
+
No standards found
+ {% endif %} + ++
+ ++ Add Standards +
+ ++ A set of Course Standard Times allows you to calculate a score for + each participant on how well they have done against the course + standard time for their category. This allows for comparison + and competition between the different categories. +
+| Name | {{ collection.name }} | +
|---|---|
| Manager | {{ collection.manager.first_name }} {{ collection.manager.last_name }} | +
| Notes | {{ collection.notes|linebreaks }} | +
| Name▲▼ | +Distance▲▼ | +Standard Time▲▼ | +Boat Class▲▼ | +Boat Type▲▼ | +Gender▲▼ | +Weight Class▲▼ | +Adaptive Class▲▼ | +Skill Class▲▼ | +Minimum▲▼/Maximum Age▲▼ | + + {% for standard in standards %} +
|---|---|---|---|---|---|---|---|---|---|
| {{ standard.name }} | +{{ standard.coursedistance }} | +{{ standard.coursetime }} | +{{ standard.boatclass }} | +{{ standard.boattype }} | +{{ standard.sex }} | +{{ standard.weightclass }} | +{{ standard.adaptiveclass }} | +{{ standard.skillclass }} | +{{ standard.agemin }}/{{ standard.agemax }} | +
Drag and drop files here
+| Challenge Time Zone | {{ race.timezone }} | {% endif %} + {% if race.coursestandards %} +
|---|---|
| Standard Times | {{ race.coursestandards }} | +
|
{{ race.sessionmode }} challenge
@@ -541,6 +546,17 @@
review and reject entries. If you are disqualified in this
way, you will receive an email with the reason.
+ {% if race.coursestandards %}
+ + Standard Times are a way to compare results in a race category with + a course record or golden standard for that event. A point score is calculated + which compares the participant's result with the standard. This offers an + engaging way to compete on points across different categories, boat types, and skill + levels. + If you select a Standard Times set from the drop-down list, race categories will + be limited to those in the selected set of Standard Times. + + {% endif %} diff --git a/rowers/templates/virtualeventcreate.html b/rowers/templates/virtualeventcreate.html index c26e54c2..6bd65d53 100644 --- a/rowers/templates/virtualeventcreate.html +++ b/rowers/templates/virtualeventcreate.html @@ -49,6 +49,15 @@ is strongly recommended that you fill out a contact email or phone number. ++ Standard Times are a way to compare results in a race category with + a course record or golden standard for that event. A point score is calculated + which compares the participant's result with the standard. This offers an + engaging way to compete on points across different categories, boat types, and skill + levels. + If you select a Standard Times set from the drop-down list, race categories will + be limited to those in the selected set of Standard Times. + diff --git a/rowers/views/racesviews.py b/rowers/views/racesviews.py index 700adfac..95bf3eb0 100644 --- a/rowers/views/racesviews.py +++ b/rowers/views/racesviews.py @@ -529,6 +529,11 @@ def standards_upload_view(request,id=0): is_ajax = True r = getrower(request.user) + if id != 0: + collection = StandardCollection.objects.get(id=id) + if request.user != collection.manager: + raise PermissionDenied("You cannot change this set of time standards") + if request.method == 'POST': form = StandardsForm(request.POST,request.FILES) @@ -573,6 +578,12 @@ def standards_upload_view(request,id=0): else: if not is_ajax: form = StandardsForm() + if id != 0: + collection = StandardCollection.objects.get(id=id) + form = StandardsForm(initial={ + 'name':collection.name, + 'notes': collection.notes, + }) return render(request,'standard_form.html', {'form':form, 'active':'nav-racing', @@ -655,7 +666,6 @@ def virtualevents_view(request): country__in=countries ).order_by("startdate","start_time") else: - form = VirtualRaceSelectForm() if is_ajax: @@ -1938,6 +1948,7 @@ def indoorvirtualevent_create_view(request): evaluation_closure = cd['evaluation_closure'] contact_phone = cd['contact_phone'] contact_email = cd['contact_email'] + coursestandards = cd['coursestandards'] # correct times @@ -1992,6 +2003,7 @@ def indoorvirtualevent_create_view(request): sessionvalue = sessionvalue, course=None, timezone=timezone_str, + coursestandards=coursestandards, evaluation_closure=evaluation_closure, registration_closure=registration_closure, contact_phone=contact_phone, @@ -2078,6 +2090,7 @@ def virtualevent_create_view(request): evaluation_closure = cd['evaluation_closure'] contact_phone = cd['contact_phone'] contact_email = cd['contact_email'] + coursestandards = cd['coursestandards'] # correct times @@ -2129,6 +2142,7 @@ def virtualevent_create_view(request): evaluation_closure=evaluation_closure, registration_closure=registration_closure, contact_phone=contact_phone, + coursestandards=coursestandards, contact_email=contact_email, country = course.country, manager=request.user, From 5952e85694c0ed5ff8be3d210cf0efe91134a938 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal |