Pearson
Always Learning

Overview

When a student completes an exam, LearningStudio sends this event to let you know.

Message Type ID

Use this message type id to subscribe to this event and identify incoming instances of it: pearson.ls.assessment.studentexam.completed

What Triggers This Event

This event is triggered when a student completes an exam in the LearningStudio User Interface, as well as if the exam is taken and completed using the APIs. Using the APIs, the trigger point is when the isComplete property is set to true. See Manage exam attempts by user requests:

  • PUT /users/{userId}/courses/{courseId}/exams/{examId}/attempts/{attemptId}
  • PUT /me/courses/{courseId}/exams/{examId}/attempts/{attemptId}

See Exam for the resources, use cases, and concepts for the exam API resources.

Event Payload

Here is the structure of the event's payload. Text directly surrounded by curly brackets (e.g., {eventId}) are parameters that are defined in the table below.

{
  "eventId": "{eventId}",
  "eventDate": "{eventDate}",
  "eventType": "{eventType}",
  "object": {
    "id": "{objectId}",
    "type": "{parentEventType}",
    "comment": "{Comment}",
    "endTime": "{EndTime}",
    "startTime": "{StartTime}",
    "isLateSubmission": {IsLateSubmissionFlag},
    "examId": {ExamId},
    "isAutoGradingOn": {IsAutoGradingOnFlag},
    "isComplete": {IsCompleteFlag}
  },
  "actor": {
    "id": "{actorId}",
    "type": "{actorType}",
    "firstName": "{FirstName}",
    "lastName": "{LastName}",
    "emailAddress": "{EmailAddress}",
    "userName": "{Username}"
  },
  "contexts": {
    "course": {
      "id": "{courseId}",
      "title": "{courseTitle}",
      "displayCourseCode": "{displayCourseCode}",
      "callNumbers": [{courseCallNumbers}],
      "nodes": ["{courseNode}"]
    },
    "ep": {
      "id": "{epId}",
      "clientString": "{clientString}"
    }
  }
}

Event Payload Parameter Descriptions

Name Description Valid Values
{eventId} Unique ID assigned to the specific event.
{eventDate} Date and time when the event was published to the eventing message queue. Time is in UTC (no timezone offset). Format is
YYYY-MM-DDTHH:MM:SS.SSSZ
.
{eventType} Event type to which you will subscribe to receive this event.
pearson.ls.assessment.
↳ studentexam.completed
{objectId} Unique object ID for the specific event contract data.
pearson.ls.assessment.
↳ studentexam_
↳ {objectExamId}
.
{parentEventType} An ID that represents the category of events, less specific than this event message type.
pearson.ls.assessment
↳ .studentexam
{Comment} Comment text associated with the event object, if any. In this case, a comment that may be associated to the student exam.
{StartTime} Date and time when the exam attempt instance was created (exam was started by the student). Time is in UTC (no timezone offset). Format is
YYYY-MM-DDTHH:MM:SS.SSSZ
.
{EndTime} Date and time when the exam attempt instance was marked as completed. Time is in UTC (no timezone offset). Format is
YYYY-MM-DDTHH:MM:SS.SSSZ
.
{IsLateSubmissionFlag} Designates whether the exam attempt was marked as completed after the exam duration ended.
true
Exam attempt was marked as completed after the exam duration ended (for example, your application marked the exam as completed after the exam duration expired).
false
Exam attempt was marked as completed before the exam duration ended (for example, the student submitted the exam as completed before the exam duration expired).
{ExamId} ID of the exam that was completed.
{IsAutoGradingOnFlag} Designates whether the exam is configured to be automatically graded upon completion. true Exam is configured to be automatically graded upon completion. false Exam must be manually graded upon completion.
{IsCompleteFlag} Designates whether the exam attempt instance is marked as completed. true Exam attempt instance attribute isCompleted is set to true false Exam attempt instance attribute isCompleted is set to false
{actorId} LearningStudio user ID of student who took the exam.
{actorType} Designates the type of user that generated the event.
user
Event was generated by a user action, such as the student submitting the exam as completed.
{FirstName} First name of student who took the exam.
{LastName} Last name of student who took the exam.
{EmailAddress} Email address of student who took the exam.
{Username} LearningStudio username (login ID) of student who took the exam.
{courseId} LearningStudio course ID that contained the exam.
{courseTitle} Title of the course that contained the exam.
{courseDisplayCourseCode} Display code for the course that contained the exam.
{courseCallNumbers} Array of institution's call numbers assigned to the course that contained the exam. Zero or more IDs written as strings.
{courseNode} Array of IDs of the nodes for which this course is associated. Zero or more IDs written as strings.
{epId} The numeric ID of the institution (the LearningStudio campus or instance).
{clientString} The institution's client string (primary identifier for campuses).

Example

{
  "eventId": "bb2d559b-8487-4fc1-8714-f2907a2c2434",
  "eventDate": "2013-05-17T14:06:10.688Z",
  "eventType": "pearson.ls.assessment.studentexam.completed",
  "object": {
    "id": "pearson.ls.assessment.studentexam_123456",
    "type": "pearson.ls.assessment.studentexam",
    "comment": " ",
    "endTime": "2013-05-17T14:06:10.673Z",
    "startTime": "2013-05-17T14:04:38.000Z",
    "isLateSubmission": false,
    "examId": 123456,
    "isAutoGradingOn": true,
    "isComplete": true
  },
  "actor": {
    "id": "7777777",
    "type": "user",
    "firstName": "John",
    "lastName": "Smith",
    "emailAddress": "john.smith@domain.com",
    "userName": "jsmith123"
  },
  "contexts": {
    "course": {
      "id": "2022425",
      "title": "What About Bob? 101",
      "displayCourseCode": "WAB - 101",
      "callNumbers": [],
      "nodes": ["402629"]
    },
    "ep": {
      "id": "987654",
      "clientString": "epsamplestring"
    }
  }
}
2755 reads
Always Learning
Pearson