If the quiz is closed the Take Quiz tab should be disabled for "takers" and only left available for admins.

Comments

add1sun’s picture

Status: Active » Needs review
StatusFileSize
new3.24 KB

Got this fixed up. Ended up pulling the availability stuff out to a new function so this also touches theme_quiz_availability.

kscheirer’s picture

looks good to me!

although purely as a style matter in _quiz_status_access()
I'd leave $access uninitialized, or initialized to FALSE rather than an empty string.
Just seems a little weird to start off with a string, and then return a boolean.

kscheirer’s picture

what about adding a test in _quiz_status_access()
for the quiz being published? then checking against this status could be used to
solve http://drupal.org/node/158966 ?

kscheirer’s picture

StatusFileSize
new3.07 KB

this is the same patch as addi's,
but with $access defaulting to false,
and an extra check that the quiz is published in addition to 'access quiz' permissions.

kscheirer’s picture

Status: Needs review » Fixed

committed to 5.x-1.x-dev

Anonymous’s picture

Status: Fixed » Closed (fixed)