Objective became OK

Fires as and when a user becomes on schedule with a learning objective. The user must be a group member and the objective must be defined on that same group.

Example target URL

The events may be sent either as a POST or a PUT request.

POST https://www.example.com/drillster/OBJECTIVE_BECAME_OK

PUT https://www.example.com/drillster/OBJECTIVE_BECAME_OK/{event_id}

Concepts

The red line in the below diagram, between the “study start date” and the “review date”, represents an indication of the minimum proficiency a user must have at a certain time to be on schedule for the objective. After the “review date”, the red line represents the minimum proficiency to maintain in order to meet the objective.

Every time the user's proficiency crosses the red line, an event notification is sent. If the proficiency becomes not OK (i.e. it drops below the red line), an ObjectiveBecameNok notification is sent. Conversely, if the line is crossed in the other direction (i.e. it goes above the red line) an ObjectiveBecameOk notification is sent.

For permanent objectives, the notifications continue to be sent after the review date.

Permanent objective events

For one-off objectives, the notifications are being sent up until the review date. No notifications are sent after the review date.

One-off objective events

No news is bad news

Users are assumed to not have met their objectives. It is possible that there are users who have already built up some proficiency before an objective is applied to them. This could happen if an objective is defined on an existing group, or if users are added to a group for which they already had access to its content via others means.

This means that if an objective is applied to a user (either by defining the objective or because the user is made a group member) and they happen to immediately meet the objective, an ObjectiveBecameOk notification is sent. On the other hand, if the newly added user has not already met the objective no ObjectiveBecameNok is sent.

In summary: the default objective evaluation status is “not OK”, and the first notification Drillster will send will always be the ObjectiveBecameOk message.

Status evaluation

The notifications sent for crossing the red line in the diagram in either direction are based upon events that happen inside the Drillster system. They do not directly translate to a user's learning objective status.

There are four learning objective statuses:

  1. Not on schedule – the learner is before the review date and the proficiency is below the schedule.
  2. On schedule – the learner is on or after the review date and the proficiency is on or above the schedule.
  3. Not met – the learner is before the review date and the proficiency is below the objective level.
  4. Met – the learner is on or after the review date and the proficiency is on or above the objective level.

It is possible to derive this status from the event notification by comparing the timestamp of the notification with the objective's review date. This is represented by the below snippet of pseudo code.

if (event.type == OBJECTIVE_BECAME_NOK) then
    if (event.evaluationDate < event.objective.reviewDate) then
        status = NOT_ON_SCHEDULE
    else
        status = NOT_MET
    end
else if (event.type == OBJECTIVE_BECAME_OK) then
    if (event.evaluationDate < event.objective.reviewDate) then
        status = ON_SCHEDULE
    else
        status = MET
    end
end

Payload

An PUSH ObjectiveBecameOkEvent object.

Example

{
  "eventId": "c9bfc267-1cb9-4f8a-9126-2e24f8491f19",
  "eventType": "OBJECTIVE_BECAME_OK",
  "objectiveEvaluation": {
    "objective": {
      "id": "LIv2wQYYORusdy4E4BG1mQ",
      "reviewDate": "2020-07-19T10:15:30Z",
      "type": "PERMANENT"
    },
    "evaluationDate": "2020-07-28T09:23:57Z",
    "proficiency": 81,
    "user": {
      "id": "CkGyUQ2b5mNHxyCqkzflKg",
      "name": "John Smith",
      "emailAddress": "john@example.com",
      "thirdPartyIds": [{
        "thirdParty": "EXAMPLE",
        "id": "abc123"
      }]
    }
  }
}

Obtaining context information

In order to find out more information about the context of the objective became (N)OK event, the recipient of the notification may call the GET /api/2.1.1/objective/{objective_id} endpoint to obtain details about the objective itself.

For information about the group or groups where the objective is used, the GET /api/2.1.1/objective/{objective_id}/accesses endpoint may be called. This will provide more details for the objective and insight into the group that is associated with it.