Translations of this page:
 

This is an old revision of the document!


Table of Contents

urnStatus()

array urnStatus(string urnIDs)

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

  • urnIDs
    The urn IDs whose status are to be retrieved.

Return Value

When 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.1418558655.txt.gz · Last modified: 14.12.2014 13:04 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