From 66454b9ba2e2c26c64c7e8e586f5165b29ae188a Mon Sep 17 00:00:00 2001
From: Sander Roosendaal
+ 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/templates/virtualevent.html b/rowers/templates/virtualevent.html index b3e1ff57..3589b469 100644 --- a/rowers/templates/virtualevent.html +++ b/rowers/templates/virtualevent.html @@ -104,6 +104,11 @@+ 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,