Hello Vickey,
There are cases where it's irrelevant—and therefore unnecessary—to record the time spent on each question, let alone assign a bonus for it. However, there may be instances where this is useful, and I imagine this is the case for you.
Writing a plugin to account for all the possible parameters a quiz might have would likely be a significant undertaking. However, a client-side solution for specific parameters is feasible.
Let's assume that security isn't a primary concern. Since time is being tracked, students probably won't waste time trying to alter the JavaScript.
Let's also assume that each question appears on a separate page, which simplifies the process as we only need to monitor page progress. Recording the time spent on each question would be challenging if multiple questions were on the same page.
Additionally, assume for now the quiz navigation is sequential, meaning students cannot go back. This simplifies the code.
Finally, suppose we want to award a bonus for each question if it’s completed quickly.
With these assumptions, writing a simple script to handle this seems like a straightforward task—a tailored solution for a specific need. It may not be perfect, but it’s better than nothing.