davwillev / stopwatch Goto Github PK
View Code? Open in Web Editor NEWStopwatch external module for REDCap
License: MIT License
Stopwatch external module for REDCap
License: MIT License
The generated HTML makes use of IDs, which will lead to problems further down, i.e. can't have two or more stopwatches on the same page, or there may be conflicts with other EMs.
Either ids need to be unique, or (preferred) no ids are used at all.
Hi!, is there any way to hide the reset button??
And add a separate setting for surveys (show_target_survey)? Both false by default.
@davwillev , what do you think?
Currently, Stopwatch uses one timer per stopwatch. Thus, when there are multiple stopwatches on a page, each has its own timer. While this may be negligible for just a few timers, it might be better to have one ticker serve all Stopwatch instances.
This is low priority.
@davwillev - We should first define the concrete use cases the stopwatch EM is supposed to cover.
There are probably VERY many, such as:
This get's rather complicated very quickly. All needs to be configureable by the EM user aka project designer. Fields need to be mapped, etc....
Maybe start with just one use case, but keeping the design open to accomodate more/all of them.
To avoid loosing measurements - see also #34.
Awsome implementation thus far @grezniczek !
I had to read the readme instructions of how 'to set up the storage formats for the validated fields' before I understood it, so guess unfamiliar users will have to do the same.
I know it's a little fancy and probably involves lots more work, but for future versions, to avoid users having to write (for example) the /g
group separator placeholder, could a future interface use a row of drop-down menus to set the format and create the JSON parameters in the background?
Could we add a num_caps
parameter to provide a count ('tallying')? This would effectively give the user a method to calculate observed event rate: num_caps
/cumulated_time
How to handle?
Is it possible to use this module as a timer?
I would like to have users hit the "start" button, then have the timer/stopwatch STOP when 30 seconds have elapsed.
Thanks.
This can be done when adding config.json configuration options - these should be in English.ini, too.
noticed it while watching the call today ...
A very easy to implement way would be to store the laps in a notes field.
Storage as repeat instances of a separate form would require 2 things:
What exactly should be stored? What is optional? How to configure (for the user who sets up the instruments)?
An idea ...
There might be use cases where multiple timings need to be taken. An interface (buttons) to control all (or groups of) Stopwatches at the same time could be added. The functions would include:
This could be implemented as a @STOPWATCH-GROUP="group_id" action tag (that determines placement) and "group" parameters of individual @stopwatch action tags.
This would probably only support the basic use case (record time elapsed).
by dislaying not 0:00:00.000
but maybe -:--:--.---
or <blank>
or something like this.
See also #10.
Use case: show target field on data entry form hide on survey only.
This could be
of time elapsed.
UI could (optionally?) allow to remove individual measurements before storing the result.
When using a text box, the widget begins at the tope of the field display and stays there as rows are added to the capture table. However, when using a Text Box or Notes Box with lots of text, the widget begins in the vertical centre of the field and gradually moves upward as rows are added to the table. This means that the user has to keep looking at the widget to 'chase' the buttons up the display to continue using them. This is potentially distracting to the user and risks missing a button click.
Once the table fills the space, the top of the table reaches the top of the field space (after 10 rows or so) and remains there. As more rows are added, the field display increases in size and rows are now just added to the bottom of the table. This latter behaviour feels correct and is easy to use.
This came up several times in Q&A at the consortium presentation. Might this be related to #8 (Interface for controlling multiple stopwatches)?
Hello stopwatch folks,
I am looking for a way to track time on task for public facing REDCap surveys. Can stopwatch be set to start the timer when a survey is shown and stopped when the user submits the form? If not, can you suggest alternatives to capture time on task? I would like to try to calculate "typical" completion times?
I am a statistician not a web programmer so clues for the clueless would be greatly appreciated.
Ray
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.