PUT test/…

Updates a test definition. One or more of the following test definition properties may be updated:

  • test name
  • end user starting instruction
  • result disclosure settings

No properties that may change the number of total questions can be modified. These include:

  • drills
  • direction and style
  • question distribution
  • filter tags

Resource URL

https://www.drillster.com/api/2.1.1/test/{test_id}

Parameters

Field Type Description
testId
required
String The ID of the test definition. This defines the test itself, not the individual instances done by users.

Example value: 7OuHq7RcQOCsnGWR58TnBw
name
optional
String The new name of the test definition.
iconKey
optional
String A reference to a previously uploaded image file to be used as an icon for the test
coverKey
optional
String A reference to a previously uploaded image file to be used as a cover for the test
instructions
optional
String Optional instructions to be shown to the end user before starting the test. If a blank string is passed in, standard instructions will be shown to the user.
timeLimit
optional
ISO 8601 duration A time limit to have timed questions.

Please note: not supplying an time limit will disable a previously configured time limit.

Example value: PT30M
disclosures
optional
String array A set of test result disclosure options. These options determine to what extent the end user is made privy to the test results.

Valid options are:

  • OVERALL_SCORE
  • COMPONENT_SCORES
  • CORRECTIONS
  • FEEDBACK
Please note: not supplying any disclosure options will cause no options to be selected!
allowUnansweredQuestions
optional
Boolean Allow users not to provide answers to all questions in order to complete the test. It is false by default.
weights
optional
String array A set of weights that decide the relevance of questions per each drill. Each drill has a value from [1..100]. If not specified, all drills have 100 by default.
allowQuestionNavigation
optional
Boolean Allow users to see and answer questions in any order. It is true by default.
testScoreTransformers
optional
String array The ID of one or more test score transformers can be configured that transform the standard test score (0-100) into some other value. A list of all possible test score transformer IDs can be retrieved through the GET /api/2.1.1/test-score-transformers endpoint.

Example value: one-to-ten

If a PUT request has no body (i.e. the body is empty), it is still mandatory to include a Content-Length header (i.e. Content-Length: 0). Not all HTTP clients do this automatically. For more information, please see RFC 2616.

Response

A 2.1.1 Test object, with details about the test.

Error responses The following error situations are possible:

ID Response code Description
insufficient_questions 400 (Bad request) Insufficient questions available that meet the specified entry tag filters.
invalid_allow_question_navigation 400 (Bad request) Question navigation is not allowed for adaptive tests, or if any of the drills have answer time limits.
invalid_direction 400 (Bad request) Given direction is invalid.
invalid_disclosure 400 (Bad request) Given disclosure option is not valid.
invalid_nr_of_questions 400 (Bad request) Something is not right with the given number of questions. Reasons may include:

  • No number of questions specified
  • Exactly one number of questions can be specified for an adaptive test
  • No number of questions specified
  • The specified number of questions is invalid
  • The specified number of questions exceeds the number of available drill entries
  • The specified number of questions exceeds the number of available questions
invalid_nr_of_weights 400 (Bad request) The given number of drills does not match the given number of weights.
invalid_style 400 (Bad request) The given style is invalid.
invalid_tags 400 (Bad request) The given drill does not contain any of the specified entry tags.
invalid_time_limit 400 (Bad request) The given time limit is invalid.
invalid_weight 400 (Bad request) The given weight is not valid. Weights must be 0-100.
missing_unknown_columns 400 (Bad request) No unknown column names are specified, while the drills have more than one unknown columns.
modified_adaptive 400 (Bad request) The question distribution of a test definition cannot be modified.
modified_columns 400 (Bad request) The question columns cannot be modified, as it could change the number of total questions.
modified_direction 400 (Bad request) The mode of a test definition cannot be modified, as it could change the number of total questions.
modified_drills 400 (Bad request) The set of source drills cannot be modified within a test definition.
modified_number_of_questions 400 (Bad request) The test type and number of questions cannot be changed.
modified_tags 400 (Bad request) The filter tags of a test definition cannot be modified.
no_permission 401 (Unauthorized) You do not have permission to retrieve this test.
test_id_missing 400 (Bad request) No test ID was specified.
unable_to_set_time_limit 400 (Bad request) A time limit cannot be configured for this test, since one or more drills have configured answer time limits.
unknown_column_not_found 400 (Bad request) The specified drills do not have an unknown column with the given name.
unknown_test 404 (Not found) The specified test is unknown.