Translations of this page:
 

Table of Contents

urnStatus()

array urnStatus(string urnIDs)

The function urnStatus() returns information regarding the status of the urns specified.

  • urnIDs
    The ID of the urn whose status is to be retrieved.

Return Value

If an error occurs, for example, if there is no urn with the ID specified, the function returns false. Otherwise, an array is returned with the following keys:

IndexMeaning
elementsNumber of ballots (elements) in the urn
drawnNumber of overall ballots already drawn and stored
roundNumber of time the urn has been emptied (begins with 1), corresponding to the return value of urnDraw()
doneNumer of ballots already drawn in the current round. If all ballots have been drawn from the urn, the next round commences and the number of ballots drawn is reset to 0
togoNumber of ballots in the current round that can still be drawn. If this number reaches 0, a new round begins and the value is reset to the number of ballots

Example

$info = urnStatus('urn1');
html('<p>Still '.$info['togo'].' out of '.$info['elements'].' prize codes available.</p>');
en/create/functions/urnstatus.txt · Last modified: 15.12.2014 15:01 by alexander.ritter
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki