From 85e36328f7bd5033efaa92c3b040769eb2eee181 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Fri, 13 Sep 2019 15:27:37 +0100 Subject: Assign new tasks on the fly The old logic assigned a task when the user finished the demo, logged in, or finished an annotation. This was not optimal as it could lead to race conditions where some datasets were annotated unnecessarily. With this change we select the dataset to annotate at the exact moment the user wants to do another one. --- app/templates/index.html | 56 +++++++++++------------------------------------- 1 file changed, 13 insertions(+), 43 deletions(-) (limited to 'app/templates') diff --git a/app/templates/index.html b/app/templates/index.html index 1606f2a..e1648c0 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -28,8 +28,7 @@

- When you have finished the introduction, the datasets to annotate - will appear here. + Once you have finished the introduction you will be able to annotate real datasets.

{% endif %} {% else %} @@ -37,52 +36,23 @@ Thank you for completing the introduction. If you want to revisit it, you can do so by clicking here.

- {% if tasks_todo|length == 0 and tasks_done|length == 0 %} -
-
-

- There are currently no datasets for you to annotate. Please check back - again later. -

- {% endif %} {% endif %} - {% if tasks_todo %} -

Datasets to Annotate

-

- Below are the datasets that we would like you to annotate, thank you - very much for your help! -

-
- - - - - {% for task in tasks_todo %} - - - - {% endfor %} -
Name
- - {% if current_user.is_admin %} - {{ task.dataset.name | title }} - {% else %} - Dataset {{ task.dataset.id | title }} - {% endif %} - -
-
- {% elif tasks_todo|length == 0 and tasks_done|length > 0 %} -
- - - No more annotations to do! Thank you so much for your help, - you rock! - + {% if current_user.is_introduced %} +

Doing Annotations

+ {% if tasks_done|length == 0 %} +

Click the button below to start annotating!

+ {% else %} +

Click the button below to do some more annotations!

+ {% endif %} + {% endif %} {% if tasks_done %}

Completed Annotations

+

Below are the time series that you've annotated so far. Thanks so much for your help!

-- cgit v1.2.3