forked from itsfourthidiot/ira
-
Notifications
You must be signed in to change notification settings - Fork 0
Add video module to the course
Gauri Pandharinath Bodke edited this page Jun 15, 2022
·
1 revision
Add a video module to the course if the course belongs to the logged-in instructor.
URL: /api/instructor/course/:courseId/module/video
URL Parameters : courseId=[integer]
where courseId
is the ID of the course to which module needs to be added.
Method: POST
Authorization required: Yes
Content-Type: multipart/form-data
Data constraints:
title: String with a minimum length of 1
file: video file
isPrivate: "true"/"false"
Example:
title: "My first video"
file: @~/videoFile.mkv
isPrivate: "true"
Code : 201 Created
Example:
{
"ID": 1,
"CreatedAt": "2022-03-29T17:01:54.029282868-04:00",
"UpdatedAt": "2022-03-29T17:01:54.029282868-04:00",
"DeletedAt": null,
"title": "My first video module",
"type": "video",
"isPrivate": true,
"courseId": 1,
"video": {
"ID": 1,
"CreatedAt": "2022-03-29T17:01:54.035578763-04:00",
"UpdatedAt": "2022-03-29T17:01:54.035578763-04:00",
"DeletedAt": null,
"key": "[email protected]/1/20220329170151_correctFile.mkv",
"moduleId": 1
},
"quiz": {
"ID": 0,
"CreatedAt": "0001-01-01T00:00:00Z",
"UpdatedAt": "0001-01-01T00:00:00Z",
"DeletedAt": null,
"moduleId": 0,
"numOfQuestions": 0,
"Questions": null
}
}
Code: 400 Bad Request
Example:
{
"error": "incorrect parameters"
}
Code: 401 Unauthorized
Example:
{
"error": "token not found"
}
Code: 401 Unauthorized
Example:
{
"error": "user unauthorized"
}
Code: 400 Bad Request
Example:
{
"error": "incorrect file format"
}
Code: 404 Bad Request
Example:
{
"error": "course not found"
}
Code: 500 Internal Server Error
Example:
{
"error": "internal server error"
}
- Sprint Progress:
- Database design
- CI/CD using GitHub Actions
- How to run the project?
- Sprint 3 UI Screenshots
-
Back-end API documentation
- Create an instructor account
- Login to an instructor account
- Create a student account
- Login to a student account
- Get the list of all courses
- Get the list of courses created by an instructor
- Create a course
- Publish a course
- Get course description
- Update the course description by an instructor
- Add video module to the course
- Add quiz module to the course
- Calculate student quiz score
- Get course details
- Get module details
- Check if the student is enrolled in a course
- Enroll a student into a particular course
- Get the list of all courses enrolled by a student