Contents
On this page

Get Learner Transcript - Plugixa Exam

GET /plugixa-exam/v1/gradebook/transcript/{user}

Read one learner’s transcript: their result on every exam they have been graded on, and a weighted overall percentage, band and grade points.

Scope attempts:read; the token’s user needs the attempts:view permission. It needs Plugixa Exam Pro with the Gradebook app on in Plugixa Exam -> App Manager: with the app off, the route answers 404.

Note. When {user} is the token’s own user id, no scope and no permission are needed: any valid token can read its own user’s transcript.

Only graded attempts whose results are released count. When a learner has several attempts at an exam, the site’s gradebook setting picks which one counts: the best (the default), the latest, the first, or the average. The overall figure is weighted by each exam’s grade weight; an exam with a weight of 0 is listed but does not count towards it. Bands come from the site’s default grade scale.

Request

GET https://your-site.example/wp-json/plugixa-exam/v1/gradebook/transcript/25

Path parameters

Name Type Description
user integer The learner’s WordPress user id

Responses

200 OK. data is the transcript.

{
  "success": true,
  "data": {
    "exams": [
      {
        "exam_id": 7,
        "title": "Algebra midterm",
        "percent": 75,
        "attempts": 2,
        "weight": 1,
        "band": "B",
        "colour": "#558b2f"
      },
      {
        "exam_id": 9,
        "title": "Geometry final",
        "percent": 84.5,
        "attempts": 1,
        "weight": 1,
        "band": "A",
        "colour": "#2e7d32"
      }
    ],
    "overall": 79.8,
    "band": "B",
    "colour": "#558b2f",
    "points": 3.5
  }
}
Field Type Meaning
data.exams[].exam_id integer The exam
data.exams[].title string The exam’s title
data.exams[].percent number The counted result, to 1 decimal
data.exams[].attempts integer How many graded, released attempts the learner has at this exam
data.exams[].weight number The exam’s grade weight, 0 to 100. 1 when the exam sets none
data.exams[].band string|null The band for percent, null when none applies
data.exams[].colour string The band’s colour, "" when there is no band
data.overall number|null Weighted overall percentage, to 1 decimal. null when nothing counts
data.band string|null The band for overall
data.colour string That band’s colour, "" when there is no band
data.points number|null Weighted grade points, to 2 decimals. null when nothing counts

For user id 0, data is {"exams": [], "overall": null, "band": null, "points": null}.

Errors

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-exam/v1/gradebook/transcript/25" \
  -H "Authorization: Bearer $PLUGIXA_EXAM_TOKEN"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-exam/v1/gradebook/transcript/25');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer ' . getenv('PLUGIXA_EXAM_TOKEN'),
    ],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-exam/v1/gradebook/transcript/25', {
  headers: {
    'Authorization': `Bearer ${process.env.PLUGIXA_EXAM_TOKEN}`,
  },
});
const { data } = await response.json();

Quick Links

Share