Fork me on GitHub

The Progress resource refers to the progress of a user with respect to a Lecture. This resource indicates whether the lecture was finished by student.

Attributes

Attribute Description
id Progress ID
finalized It indicates whether the lecture was finished
updated_at It indicates when the lecture was finished (if finalized = true)

Links

Link Description
self Progress in question
user User who is responsible for the progress in lecture
lecture Lecture to be finished
subject Subject to which the lecture belongs

GET /api/progress/:id

Returns progress with the specified ID

Authorization

You need to be enrolled in the course to which the lecture belongs, and be the user of the Progress entity.

Parameters

Attribute Description Restrictions
id Progress ID N/A

Example

Request:
GET /api/progress/4

Response:

{
  "id" : 4,
  "finalized" : false,
  "updated_at" : "2012-01-13T12:11:22-02:00",
  "links" : [
    { "rel" : "self", "href" : "http://www.redu.com.br/api/progress/1" },
    { "rel" : "user", "href" : "http://www.redu.com.br/api/users/4" },
    { "rel" : "lecture", "href" : "http://www.redu.com.br/api/lectures/8" },
    { "rel" : "subject", "href" : "http://www.redu.com.br/api/subjects/5" }
  ]
}

PUT /api/progress/:id

Updates the progress of the logged user with respect to a lecture.

Authorization

You need to be enrolled in the course to which the lecture belongs, and be the user of the Progress entity.

Parameters

Attribute Description Restrictions
id Progress ID N/A
progress[finalized] It indicates that the lecture was finished It must be either true or false

Example

Request:
PUT /api/progress/4

Response:

{
  "id" : 4,
  "finalized" : true,
  "updated_at" : "2012-01-15T12:11:22-02:00",
  "links" : [
    { "rel" : "self", "href" : "http://www.redu.com.br/api/progress/1" },
    { "rel" : "user", "href" : "http://www.redu.com.br/api/users/4" },
    { "rel" : "lecture", "href" : "http://www.redu.com.br/api/lectures/8" },
    { "rel" : "subject", "href" : "http://www.redu.com.br/api/subjects/5" }
  ]
}

GET /api/lectures/:lecture_id/progress/

Returns all the progresses of a lecture, i.e., for every user connected to that lecture. You can filter the progress of a lecture by user(s).

Authorization

You need to be enrolled in the course to which the lecture belongs, as teacher or environment_admin.

Parameters

Attribute Description Restrictions
lecture_id Lecture ID N/A
users_ids[] User ID. It allows filtering progresses based on the user(s) You need to be a user enrolled in the course to which the lecture belongs

Example

Request:
GET /api/lectures/25/progress

Response:

[
  {
    "id" : 1,
    "finalized" : true,
    "updated_at" : "2012-01-15T12:11:22-02:00",
    "links" : [
      { "rel" : "self", "href" : "http://www.redu.com.br/api/progress/1" },
      { "rel" : "user", "href" : "http://www.redu.com.br/api/users/4" },
      { "rel" : "lecture", "href" : "http://www.redu.com.br/api/lectures/25" },
      { "rel" : "subject", "href" : "http://www.redu.com.br/api/subjects/5" }
    ]
  },
  {
    "id" : 9,
    "finalized" : false,
    "updated_at" : "2012-01-07T12:11:22-02:00",
    "links" : [
      { "rel" : "self", "href" : "http://www.redu.com.br/api/progress/9" },
      { "rel" : "user", "href" : "http://www.redu.com.br/api/users/23" },
      { "rel" : "lecture", "href" : "http://www.redu.com.br/api/lectures/25" },
      { "rel" : "subject", "href" : "http://www.redu.com.br/api/subjects/5" }
    ]
  },
]

GET /api/subjects/:subject_id/progress/

Returns all the progresses of a subject, i.e., for every user connected to that subject. You can filter the progress of a subject by user(s).

Authorization

You need to be enrolled in the course to which the subject belongs, as teacher or environment_admin.

Parameters

Attribute Description Restrictions
subject_id Subject ID N/A
users_ids[] User ID. It allows filtering the progresses based on the user(s) You need to be a user enrolled in the course to which the subject belongs

Example

Request:
GET /api/subjects/74/progress

Response:

[
  {
    "id" : 1,
    "finalized" : true,
    "updated_at" : "2012-01-15T12:11:22-02:00",
    "links" : [
      { "rel" : "self", "href" : "http://www.redu.com.br/api/progress/1" },
      { "rel" : "user", "href" : "http://www.redu.com.br/api/users/4" },
      { "rel" : "lecture", "href" : "http://www.redu.com.br/api/lectures/25" },
      { "rel" : "subject", "href" : "http://www.redu.com.br/api/subjects/5" }
    ]
  },
  {
    "id" : 9,
    "finalized" : false,
    "updated_at" : "2012-01-07T12:11:22-02:00",
    "links" : [
      { "rel" : "self", "href" : "http://www.redu.com.br/api/progress/9" },
      { "rel" : "user", "href" : "http://www.redu.com.br/api/users/23" },
      { "rel" : "lecture", "href" : "http://www.redu.com.br/api/lectures/25" },
      { "rel" : "subject", "href" : "http://www.redu.com.br/api/subjects/5" }
    ]
  },
  {
    "id" : 2,
    "finalized" : true,
    "updated_at" : "2012-01-15T12:11:22-02:00",
    "links" : [
      { "rel" : "self", "href" : "http://www.redu.com.br/api/progress/2" },
      { "rel" : "user", "href" : "http://www.redu.com.br/api/users/4" },
      { "rel" : "lecture", "href" : "http://www.redu.com.br/api/lectures/48" },
      { "rel" : "subject", "href" : "http://www.redu.com.br/api/subjects/7" }
    ]
  },
  {
    "id" : 10,
    "finalized" : true,
    "updated_at" : "2012-01-07T12:11:22-02:00",
    "links" : [
      { "rel" : "self", "href" : "http://www.redu.com.br/api/progress/10" },
      { "rel" : "user", "href" : "http://www.redu.com.br/api/users/23" },
      { "rel" : "lecture", "href" : "http://www.redu.com.br/api/lectures/48" },
      { "rel" : "subject", "href" : "http://www.redu.com.br/api/subjects/7" }
    ]
  },
]

GET /api/users/:user_id/progress/

Returns all the progresses of a user. You can filter the progresses of a user by lectures or subjects.

Authorization

Each user has access only to their own progresses.

Parameters

Attribute Description Restrictions
user_id User UD N/A
lectures_ids[] Lecture ID. It allows filtering progresses based on the lecture(s) It needs to be a lecture that belongs to a course in which the user is enrolled.
subjects_ids[] Subject ID. It allows filtering progresses based on the subject(s). It needs to be a subject that belongs to a course in which the user us enrolled.

Example

Request:
GET /api/users/216/progress

Response:

[
  {
    "updated_at": "2013-03-26T15:52:53-03:00",
    "id": 131061,
    "finalized": false,
    "links": [
      { "rel": "self", "href": "http://www.redu.com.br/api/progress/131061" },
      { "rel": "user", "href": "http://www.redu.com.br/api/users/juliana" },
      { "rel": "subject", "href": "http://www.redu.com.br/api/subjects/78" },
      { "rel": "lecture", "href": "http://www.redu.com.br/api/lectures/82" }
    ]
  },
  {
    "updated_at": "2013-05-02T15:25:01-03:00",
    "id": 580275,
    "finalized": false,
    "links": [
      { "rel": "self", "href": "http://www.redu.com.br/api/progress/580275" },
      { "rel": "user", "href": "http://www.redu.com.br/api/users/juliana" },
      { "rel": "subject", "href": "http://www.redu.com.br/api/subjects/114" },
      { "rel": "lecture", "href": "http://www.redu.com.br/api/lectures/964" }
    ]
  }
]