I have set a time limit on a quiz for a user and display the time countdown with the help of Jquery countdown module so everything is working perfectly ok. But, once the user logs out from unfinished quiz and logs in back to resume, the time limit displayed on the jquery countdown resets back to it's starting time. Any help with this?

CommentFileSizeAuthor
#4 quiz.module.patch649 bytesnoobnathan

Comments

ryangambito’s picture

Priority: Normal » Critical
Som@roy’s picture

Please use this.I have solved it for Drupal 6.

write this code in _quiz_resume_existing_quiz($quiz, $uid, $rid) function line 2963.
/*som's patch*/
$sql_quiz="select time_left from `quiz_node_results` where result_id=".$rid."";
$sql_res=db_query($sql_quiz);
$sql_row=db_fetch_object($sql_res);
$_SESSION['quiz_'. $quiz->nid]['question_duration'] = $sql_row->time_left;
/*som's patch*/

sivaji_ganesh_jojodae’s picture

Fix mentioned above is fine, need to get time left from {quiz_node_results} instead of using $quiz->time_limit. I need some time to apply this fix, test & commit the same to git.

noobnathan’s picture

Issue summary: View changes
StatusFileSize
new649 bytes

kindly try this patch.. I used time_left from {quiz_node_results} instead of $quiz->time_lime in Drupal 7.

djdevin’s picture

Status: Needs work » Closed (outdated)

This issue is being closed because it was filed against a version that is no longer supported.

If the issue still persists in the latest version of Quiz, please open a new issue.