I need that specific users can take a quiz even if the closing date has expired.
To do this, it is necessary to modify the "quiz_availability" function using the drupal_alter command.

I attach a patch to do it.

Comments

lintxa created an issue. See original summary.

djdevin’s picture

Hi,

This won't be possible in 4.x.

In 5.0 you don't need the patch. Check out quiz.api.php for the sample implementation of hook_quiz_access_alter().

If you implement that hook, you can modify any access control, not just the expiration, as you wish.

lintxa’s picture

Title: Access bypass to allow take a closed quiz to certain users » Allow quiz availability alter
Issue summary: View changes
lintxa’s picture

Thanks for your comment but we have a lot of sites with Quiz 4 version and it is not posible for us update to 5 version yet. Anyway I attach this patch for users who can find it useful.

lintxa’s picture

Status: Active » Needs review
djdevin’s picture

Sure, Quiz 4.x is only receiving security and critical bugfixes, so we cannot introduce a new API hook that is already deprecated in the next version.

djdevin’s picture

Status: Needs review » Closed (won't fix)