hi every body
how about a feature that incorporates fixing time for each questions for example say 60 seconds or 30 seconds for each questions

Comments

kscheirer’s picture

I think this is a good idea,

but I'm a little concerned about the implementation. There could be all kinds
of delays between the server generating the question, and the user getting it
displayed on their screen. And the same issues when the user tries to submit.

carmel.alex’s picture

I'd like provide patch which give ability to setup time delay between attempts to take the quiz

westwesterson’s picture

Title: improved functionality » fixed time per question

i agree with ksheirer on this one, the only implementations i've seen of this were java based, and they required the client download an applet. while you could do this with javascript, it could be bypassed by a user disabling the javascript. So all that is left is an all or nothing approach which disables quizzes for all users who don't have javascript enabled. Not a 'drupal like' solution. And a messy one at that. Unless something else comes along, I don't know if this is a good way to go.

And as for a time delay between takes, this is not a bad idea, but you should create a separate topic for it, as it is very different from this one.

bls20’s picture

I would also find this feature very useful, was there ever any further work on this development?

mbutcher’s picture

Version: 5.x-1.x-dev » 6.x-3.x-dev

There has been no further development on per-question timing, though there is now support for a quiz-wide time limit (from when the quiz begins to when the quiz ends).

There are numerous issues that make this particular feature troublesome. A few are mentioned already in this thread, and I will not repeat them. Another important one is that the configuration for a question and for a quiz becomes substantially more complex with a feature like this. Do questions themselves have time limits, or do quizzes set time limits on the questions? Are these time limits fixed per quiz, or should every question have its own time limit? Questions like these admit more than one answer (it is going to be a matter of preference).

That said, if anyone contributes a patch adding this functionality (and the patch does not introduce onerous configuration or potential bugs), I'd be happy to add it.

Matt

sinasalek’s picture

Very useful feature
subscribed

aks_richa’s picture

hey can please help me how to add this functionally in site.. i want to add this feature in my site... please help me..........

sharif.tanveer’s picture

it seems there are a thead for this topic & someone claimed to solve it. check it @ http://drupal.stackexchange.com/questions/21859/fixed-time-per-questions...

if you can post details for a newbie, it will be much helpful.

ssoulless’s picture

anyone has an anwer for this?

ssoulless’s picture

Issue summary: View changes

I tried to do this but still can't get the desired result...

I have added to each question type a field for time_limit, then I created a custom module, the idea is to sumarize the time of each question and make a total for the whole quiz.

function brtest_node_update($node){
    
   if($node->type == 'quiz'){
    entity_get_controller('node')->resetCache(array($node->nid));
    $include_random = $node->randomization == 2;
    $questions = quiz_get_questions($node->nid, $node->vid, TRUE, FALSE, FALSE, $include_random);
    $time_limit = _sumarize_questions_timer($questions);
    $node->time_limit = $time_limit;
    $node->field_time_limit['und'][0]['value'] = $time_limit;
    field_attach_update('node', $node);
    dpm($node);
   }
}

function _sumarize_questions_timer($array_of_questions = array()){
    
    $time_sumarize = 0;
    
    foreach($array_of_questions as $question){
    $node_question = node_load($question->nid,$question->vid);
    dpm($node_question);
    $time_sumarize += $node_question->field_time_limit['und'][0]['value'];
    }
    
    return $time_sumarize;
    
}

So each time the button "submit" is clicked the hook_node_update is called, it does not work well, I do not understand why I get the old version of the node and not the updated version, so I cannot get the last questions added...

And when I create a question and save the question node, the hook_node_update is not called and I cannot update the time_limit property corretly.

So need more help with this. Thanks you

ssoulless’s picture

Version: 6.x-3.x-dev » 7.x-4.0-beta2

changing the version to 7.x

attheshow’s picture

Version: 7.x-4.0-beta2 » 7.x-5.x-dev
djdevin’s picture

Status: Active » Closed (duplicate)