Skip to content

Edit Activity

David Alejandro Molano Vásquez edited this page May 8, 2020 · 2 revisions

Edit Activity

This endpoint allows an authenticated user with rol "Teacher" to update a concept map. Accepts PUT requests. If an authenticated user with rol "Student" tries to edit a base concept map the endpoint rejects the operation. The request must provide the following fields:

  • Activity Id: This parameter is passed by URL.
  • Title: The title of the text corresponding to the activity. This parameter is optional.
  • Date Close: The date on which the activity will no longer receive answers from students. This parameter is optional.
  • Is Closed: A flag indicating if the activity is closed. This parameter is optional.
  • Key Concepts: An array with the key concepts of the activity. This parameter is optional.

CAUTION

An empty key_concepts array, deletes ALL previous information of this field.

URL /api/activity/actId
Method PUT
URL Params actId
Data Params
{   "isClosed": [boolean],  "title": [string], "dateClose": [string],  "key_concepts" [array]}
Success Response
Code: 204
None
Error Response
Code: 400
{"Error": "Invalid field"}
Error Response
Code: 401
 {"Error": "User is not authorized to edit this activity"} 
Error Response
Code: 500
{"Error": "Something went wrong"}
Clone this wiki locally