Move hook helpers functions to quiz.hooks.inc