With this form, you can create a new virtual challenge. After you submit
+ the form, the challenge is created and will be visible to all users. From
+ that moment, only the site admin can delete the challenge
+ (admin@rowsandall.com). You can still edit the challenge until
+ the start of the challenge window.
+
+
+
+
+
+
+ {% csrf_token %}
+
+
+
+
+
+
+
+
All times are local times in the time zone you select
+
Adding a contact phone number and email is not mandatory, but we
+ strongly recommend it.
+
If your event has a registration closure deadline, participants
+ have to enter (and can withdraw) before the registration closure time.
+
Participants can submit results until the evaluation closure time.
+
Until one hour after evaluation closure time, the challenge organizer
+ can review and reject submitted results ("disqualification"). If
+ you as the challenge organizer intend to use this functionality, it
+ is strongly recommended that you fill out a contact email or phone
+ number.
+
+
+ The participants can row this challenge on any course, and their fastest time
+ over the challenge distance (respectively the largest distance achieved over the
+ challenge duration) is automatically extracted from the workout. No
+ need to program a set piece.
+
+
+ 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.
+
+
+
+
+
+
+
+{% endblock %}
+
+{% block scripts %}
+
+
+{% endblock %}
+
+{% block sidebar %}
+{% include 'menu_racing.html' %}
+{% endblock %}
From 99c081c67e862ad385f94434f328fe7ede101903 Mon Sep 17 00:00:00 2001
From: Sander Roosendaal
Date: Tue, 10 Nov 2020 19:12:17 +0100
Subject: [PATCH 2/4] delted
---
rowers/plannedsessions.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/rowers/plannedsessions.py b/rowers/plannedsessions.py
index 888ccb47..4ab8ab0e 100644
--- a/rowers/plannedsessions.py
+++ b/rowers/plannedsessions.py
@@ -397,6 +397,9 @@ def add_workouts_plannedsession(ws,ps,r):
if ps.sessiontype == 'fastest_distance':
records = CourseTestResult.objects.filter(userid=w.user.id,plannedsession=ps)
for record in records:
+ w1 = Workout.objects.get(id=record.workoutid)
+ w1.plannedsession = None
+ w1.save()
record.delete()
df = dataprep.getsmallrowdata_db(['time','cumdist'],ids=[w.id])
@@ -429,6 +432,9 @@ def add_workouts_plannedsession(ws,ps,r):
if ps.sessiontype == 'fastest_time':
records = CourseTestResult.objects.filter(userid=w.user.id,plannedsession=ps)
for record in records:
+ w1 = Workout.objects.get(id=record.workoutid)
+ w1.plannedsession = None
+ w1.save()
record.delete()
df = dataprep.getsmallrowdata_db(['time','cumdist'],ids=[w.id])
From a5f0ce5b8408f9190e1fa804c465b064de992f69 Mon Sep 17 00:00:00 2001
From: Sander Roosendaal
Date: Tue, 10 Nov 2020 19:20:52 +0100
Subject: [PATCH 3/4] fix
---
rowers/plannedsessions.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/rowers/plannedsessions.py b/rowers/plannedsessions.py
index 4ab8ab0e..6f707c46 100644
--- a/rowers/plannedsessions.py
+++ b/rowers/plannedsessions.py
@@ -406,6 +406,8 @@ def add_workouts_plannedsession(ws,ps,r):
fastest_milliseconds = datautils.getfastest(df,ps.sessionvalue,mode='distance')
if fastest_milliseconds > 0:
+ w.plannedsession = ps
+ w.save()
duration = to_time(1000.*fastest_milliseconds)
@@ -441,6 +443,8 @@ def add_workouts_plannedsession(ws,ps,r):
fastest_meters = datautils.getfastest(df,ps.sessionvalue,mode='time')
if fastest_meters > 0:
+ w.plannedsession = ps
+ w.save()
duration = dt.time(0,ps.sessionvalue)
record = CourseTestResult(
From c230dd6e1bc9cb1b6ceadfbf71af56c108af53ac Mon Sep 17 00:00:00 2001
From: Sander Roosendaal
Date: Tue, 10 Nov 2020 19:26:53 +0100
Subject: [PATCH 4/4] fix
---
rowers/plannedsessions.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rowers/plannedsessions.py b/rowers/plannedsessions.py
index 6f707c46..b4ddb230 100644
--- a/rowers/plannedsessions.py
+++ b/rowers/plannedsessions.py
@@ -720,7 +720,7 @@ def is_session_complete_ws(ws,ps):
return ratio,'partial',completiondate
return (0,'partial',None)
elif ps.sessiontype in ['fastest_time','fastest_distance']:
- vs = CourseTestResult.objects.filter(plannedsession=ps,userid=ws[0].user.id)
+ vs = CourseTestResult.objects.filter(plannedsession=ps,userid=ws[0].user.user.id)
completiondate = ws.reverse()[0].date
wids = [w.id for w in ws]
for record in vs: