考试项目中的多个计时器 [英] Multiple timer in exam project

查看:118
本文介绍了考试项目中的多个计时器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个在线考试项目,其中2个计时器应该是他们的一个显示总时间经过而另一个计时器是针对每个问题。



假设我有10个问题总时间将是10分钟

和每个提问时间是一分钟



所以我想我的第一个计时器显示10分钟和应该出现每秒减少一秒钟和第二次运行一分钟以及一分钟后出现下一个问题并且不会重置主计时器即10分钟定时器。



一次10分钟定时器结束它应该重定向到考试页面。我需要帮助

在此先感谢。



我尝试过:



我可以使用一个计时器但不能使用第二个计时器

I need to create a Online Exam Project in Which 2 Timer Should be their one is showing Total Time Elapsed and Another timer is for Per Question.

Suppose i have 10 Question total Time Will Be 10 Min
and Per Question Time is One Minute

So i want My First Timer Shows 10 Min and Decreases Per Second and Second Time Run for One minute and after one minute over next question should appear and not reset Main timer that is 10 Min Timer.

Once 10 Min Timer is over it should redirect to Exam Over Page.I need Help
Thanks in Advance.

What I have tried:

I am able to use one timer but not able to use 2nd timer

推荐答案

您只需要一个计时器:您将其设置为以一秒间隔(或更好的半秒)重复并检查两个值。首先检查检查结束,然后检查问题结束,如果它还没有结束,并且你已经排序了。
You only need one timer: You set it to repeat at one second intervals (or better half second) and check two values. Check the "exam over" first then the "question over" if it hasn't elapsed, and you're sorted.


你混淆了计时器和计时器。您显示的计时器是倒计时,计算机计时器是用于启动定期事件的实用程序,您可以决定在此类事件中发生的事情。

跟踪时间由硬件RTC(Real Tome Clock)完成。



所以你需要1个计时器来投掷定期事件,这些事件会启动一个例程来处理屏幕上的倒计时,问题变化以及你需要的任何东西。



RTC有现在功能

设置 QuestionDL 截止日期为现在+60 secondes

剩余问题时间为 QuestionDL-now



问题:您的程序每次测试执行10次1分钟和1个问题的测试。真的应该是它吗?

[更新]

You confound timer and timer. The timer you display is a countdown, the computer timer is an utility used to launch periodic events, you decide what happen on such an event.
Tracking time is done with hardware RTC (Real Tome Clock).

So you need 1 timer to throw periodical events, those events launch a routine that handle countdown on screen, questions change and any thing you need.

RTC have a now function
set QuestionDL deadline to now+60 secondes
remaining time for question is QuestionDL-now

Question: your program perform 10 tests of 1 minute and 1 question per test. Is it really what it is supposed to be?
[Update]
引用:

我有一个测试10Question总时间是10分钟

I have One Test With 10Question total Time is 10 Min



在这种情况下,每个问题强制执行1分钟是错误的,它会改变测试。

- 如果我回答缓慢,每个问题需要2分钟,我可以期待5个好的答案。如果你为每个问题设置1分钟限制,我可以回答零问题。

- 如果第一个问题非常容易,我在10秒内回答,我应该有一个50秒的奖励时间用于以后的问题。如果你为每个问题设置1分钟限制,则会丢失50秒。

- 在纸质测试中,所有问题都会同时显示,学生可以按任何顺序回答问题,他可以回答简单的问题首先为较难的人提供奖励时间。


In this case, enforcing 1 minutes per question is wrong, it change the test.
- if I am slow to answer and need 2 minutes per question, I can expect 5 good answers. if you set a 1 minute limit per question, I can answer zero question.
- if first question is super easy and I answer in 10 seconds, I should have a 50 seconds bonus time for a later question. if you set a 1 minute limit per question, the 50 seconds are lost.
- In paper test, all questions are shown at same time and student can answer questions in any order and he can answer easy questions first which give bonus time for harder ones.


这篇关于考试项目中的多个计时器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆