V1::ActivitiesController

Activities

index

Get a list of course's activities

URL

GET /courses/:course_id/activities or /school_products/:school_product_id/activities or /enrollments/:enrollment_id/activities

Parâmetros obrigatórios

Nome Tipo Descrição
course_id Integer

Identifier of the course

Objeto resposta

Array<Activity>

Course's activities

show

View a activity

URL

GET /activities/:id /school_products/:school_product_id/activities/:id or /enrollments/:enrollment_id/activities/:id

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

Identifier the activity

Objeto resposta

Activity

The requested activity

create

Create {Activity activity}

URL

POST /activities

Parâmetros obrigatórios

Nome Tipo Descrição
activity Hash

The activity to create

activity[title] String

Title of the activity

activity[type] String

Type of the activity

activity[show_comments] String

Accept "always" and "approved". It is a view helper.

activity[exam_lesson_id] Integer

Lesson of the activity

Parâmetros opcionais

Nome Tipo Descrição
activity[time_limit] Integer

Time limit of the activity

activity[retry_time] Integer

Retry time of the activity

activity[max_attempts] Integer

Max attempts of the activity

exam_questions_attributes Hash

The exam question to create

exam_questions_attributes[title] String

Title of the exam question

exam_questions_attributes[type] String

Type of the exam question

exam_questions_attributes[comment] String

Comment of the exam question

exam_questions_attributes[point] Integer

Point of the exam question

exam_questions_attributes[options_attributes] Hash

The exam question option to create

exam_questions_attributes[options_attributes][first_assertion_attributes] Hash

The first assertion of associative exam question

exam_questions_attributes[options_attributes][first_assertion_attributes][text] String

The text of first assertion of associative exam question

exam_questions_attributes[options_attributes][second_assertion_attributes] Hash

The second assertion of associative exam question

exam_questions_attributes[options_attributes][second_assertion_attributes][text] String

The text of second assertion of associative exam question

exam_questions_attributes[options_attributes][title] String

Title of the multiple choice option

exam_questions_attributes[options_attributes][correct] Boolean

Defines it is correctt multiple choice option

update

Update an existing {Activity activity}

URL

PUT/PATCH /activities/:id

Parâmetros obrigatórios

Nome Tipo Descrição
activity Hash

The activity to update

activity[title] String

Title of the activity

activity[type] String

Type of the activity

activity[show_comments] String

Accept "always" and "approved". It is a view helper.

activity[exam_lesson_id] Integer

Lesson of the activity

Parâmetros opcionais

Nome Tipo Descrição
activity[time_limit] Integer

Time limit of the activity

activity[retry_time] Integer

Retry time of the activity

activity[max_attempts] Integer

Max attempts of the activity

exam_questions_attributes Hash

The exam question to update

exam_questions_attributes[title] String

Title of the exam question

exam_questions_attributes[type] String

Type of the exam question

exam_questions_attributes[comment] String

Comment of the exam question

exam_questions_attributes[point] Integer

Point of the exam question

exam_questions_attributes[options_attributes] Hash

The exam question option to update

exam_questions_attributes[options_attributes][first_assertion_attributes] Hash

The first assertion of associative exam question

exam_questions_attributes[options_attributes][first_assertion_attributes][text] String

The text of first assertion of associative exam question

exam_questions_attributes[options_attributes][second_assertion_attributes] Hash

The second assertion of associative exam question

exam_questions_attributes[options_attributes][second_assertion_attributes][text] String

The text of second assertion of associative exam question

exam_questions_attributes[options_attributes][title] String

Title of the multiple choice option

exam_questions_attributes[options_attributes][correct] Boolean

Defines it is correctt multiple choice option

destroy

Delete activity

URL

DELETE /activities/:id

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

Id of an activity