Example #1
0
function expireHit($hitId)
{
    global $dbh;
    turk_easyExpireHit($hitId);
    sleep(0.25);
    //Give the HIT a moment to expire
    $mt = turk_easyDispose($hitId);
    sleep(0.25);
    //Give the HIT a moment to dispose
}
Example #2
0
                $loop--;
            }
            break;
        case 'expireAll':
            $msg = 'All asssignable hits expired and disposed of.';
            $array = turk50_searchAllHits();
            if (isset($hitTitle) && isset($num)) {
                foreach ($array as $hit) {
                    if ($hit->Title != $hitTitle) {
                        unset($array[$num]);
                    }
                }
            }
            foreach ($array as $hit) {
                if ($hit->HITStatus == 'Assignable' && (isset($hitTitle) && $hit->Title == $hitTitle || !isset($hitTitle))) {
                    turk_easyExpireHit($hit->HITId);
                    turk_easyDispose($hit->HITId);
                }
            }
            break;
        default:
            break;
    }
    //die('action performed.');
}
?>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
	<title> Overview - What was that?</title>
	<!-- 
Example #3
0
function expireHit($hitId)
{
    global $dbh, $debug, $numAssignableHits, $SANDBOX;
    turk_easyExpireHit($hitId);
    sleep(0.25);
    //Give the HIT a moment to expire
    $mt = turk_easyDispose($hitId);
    sleep(0.25);
    //Give the HIT a moment to dispose
    return $mt;
}