DisableHIT: Disable/Expire or Delete HIT

DisableHITR Documentation

Disable/Expire or Delete HIT

Description

This function will allow you to expire a HIT early, which means it will no longer be available for new workers to accept. Optionally, when disabling the HIT you can approve all pending assignments and you can also try to delete the HIT.

Usage

DisableHIT(
  hit = NULL,
  hit.type = NULL,
  annotation = NULL,
  approve.pending.assignments = FALSE,
  skip.delete.prompt = FALSE,
  verbose = getOption("pyMTurkR.verbose", TRUE)
)

Arguments

hit

A character string containing a HITId or a vector of character strings containing multiple HITIds. Must specify hit xor hit.type xor annotation.

hit.type

An optional character string containing a HITTypeId (or a vector of HITTypeIds). Must specify hit xor hit.type xor annotation.

annotation

An optional character string specifying the value of the RequesterAnnotation field for a batch of HITs. This can be used to disable all HITs from a “batch” created in the online Requester User Interface (RUI). To use a batch ID, the batch must be written in a character string of the form “BatchId:78382;”, where “73832” is the batch ID shown in the RUI. Must specify hit xor hit.type xor annotation.

approve.pending.assignments

A logical indicating whether the pending assignments should be approved when the HIT is disabled.

skip.delete.prompt

A logical indicating whether to skip the prompt that asks you to confirm the delete operation. If TRUE, you will not be asked to confirm that you wish to Delete the HITs. The prompt is a safeguard flag to protect the user from mistakenly deleting HITs.

verbose

Optionally print the results of the API request to the standard output. Default is taken from getOption('pyMTurkR.verbose', TRUE).

Details

Be careful when deleting a HIT: this will also delete the assignment data! Calling this function with DeleteHIT(), deletehit(), DisposeHIT(), or disposehit() will result in deleting the HIT. The user will be prompted before continuing, unless skip.delete.prompt is TRUE.

If you disable a HIT while workers are still working on an assignment, they will still be able to complete their task.

DisposeHIT(), ExpireHIT(), DeleteHIT(), disablehit(), disposehit(), expirehit(), deletehit() are aliases.

Value

A data frame containing a list of HITs and whether the request to disable each of them was valid.

Author(s)

Tyler Burleigh, Thomas J. Leeper

References

API Reference: Update Expiration for HIT API Reference: Delete HIT

Examples


## Not run: 
# Disable a single HIT
hittype1 <- RegisterHITType(title = "10 Question Survey",
                description = "Complete a 10-question survey",
                reward = ".20",
                duration = seconds(hours=1),
                keywords = "survey, questionnaire, politics")
a <- GenerateExternalQuestion("https://www.example.com/", "400")
hit1 <- CreateHIT(hit.type = hittype1$HITTypeId,
                 assignments = 1,
                 expiration = seconds(days=1),
                 question = a$string)

DisableHIT(hit = hit1$HITId)

# Disable all HITs of a given HITType
DisableHIT(hit.type = hit1$HITTypeId)

# Disable all HITs of a given batch from the RUI
DisableHIT(annotation="BatchId:78382;")

# Delete the HIT previously disabled
DeleteHIT(hit = hit1$HITId)

## End(Not run)


cloudyr/pyMTurkR documentation built on April 7, 2024, 12:07 p.m.