This is an Educational application. This app is developed using Python/Django based on Django Rest Framework (RESTFul APIs).
- User
- Register
- Login
- Search on course
- Courses
- Has Content
- Content may be Video or Audio
- Description
- Attachments
- Has Privacy (public, private, give an access to a client) (Admin level)
- Has Quiz
- Add quiz (Admin level)
- Start a quiz
- Retry
- Add comment on Content
- Pending (Admin level)
- Published (Admin level)
- Actions
- Request to correct info
- Minute - Minute
- Scientific Evedence
- Report a problem
- Request to correct info
- Mark as Completed
- Content will be tracked to be added in watch history playlist of the user in case opened it
- Has Privacy (public, private, give an access to a client) (Admin level)
- Add feedback
- Rating
- Description
- Add comment on Course
- Pending (Admin level)
- Published (Admin level)
- Add to a Playlist
- Add to Favorites
- Has Quiz
- Add quiz (Admin level)
- Start a quiz
- Retry
- Category
- Course Acticity Tracking
- Enroll a Course
- Has Content
- SignIn
- Signup
- List all Courses
- List Course Detail
- List Course's Content
- List content Detail
- List Enrolled courses
- Track Course Activity (Watched or not)
- Add Feedback to an enrolled Course
- List Course Feedbacks
- Add Comment on Course
- List Course's Comments
- Add Comment on Content
- List Content's Comments
- Get Course's Quiz
- Get Content's Quiz
- Submit Quiz's answers
- Get Quiz's results
- List Course's Attachments
- List Content's Attachments
- Create a Playlist
- Delete a Playlist
- List all playlists
- Add content to a playlist
- Delete content from a playlist
- List playlist's Content
- List all contents in favorites
- Add content to favorite
- Remove content from favorite
- List all contents in watch history
- List all previous Enrollments of a User
All you have to do is:
1- Clone the project
2- Create Virtual environment
3- Run
$ pip install -r requirements.txt
4- Run
$ python manage.py makemigrations
$ python manage.py migrate
$ python manage.py createsuperuser
$ python manage.py runserver
SignIn
Example:
Request body:
{
"email_or_username": "jane.smith@example.gov",
"password": "123",
}
SignUp
Example:
Request body:
{
"email": "jane.smith@example.gov",
"username": "jane",
"password": "123",
"password2": "123",
"user_type": "student"
}
GET /users/[user_id]/enrolled-courses
Example:
GET /users/[user_id]/profile
Example:
PUT /users/change-password
Example:
Request body:
{
"old_password": "Old@123",
"new_password": "New@123"
}
POST /users/password_reset
Example:
Request body:
{
"email": [Email]
}
POST /users/password_reset/confirm/
Example:
Request body:
{
"password": [Email],
"Token": [Token]
}
GET /courses
Example:
GET /courses/featured
Example:
GET /courses/[course_id]
Example:
GET /courses
Example:
GET /courses/[course_id]/contents
Example:
GET /courses/[course_id]/contents/[content_id]
Example:
GET http://example.gov/api/courses/[course_id]/contents/[content_id]
GET /courses/[course_id]/contents/[content_id]/mark_as_read
Example:
GET http://example.gov/api/courses/[course_id]/contents/[content_id]/mark_as_read
POST /courses/[course_id]/feedbacks
Example:
Request body:
{
"rating": "[from 1 to 5]",
"description": "Nice!"
}
GET /courses/[course_id]/feedbacks
Example:
POST /courses/[course_id]/comments
Example:
Request body:
{
"body": "Nice"
}
GET /courses/[course_id]/comments
Example:
POST /courses/[course_id]/contents/[content_id]/comments
Example:
POST http://example.gov/api/courses/[course_id]/contents/[content_id]/comments
Request body:
{
"body": "Nice"
}
GET /courses/[course_id]/contents/[content_id]/comments
Example:
GET http://example.gov/api/courses/[course_id]/contents/[content_id]/comments
GET /courses/[course_id]/quiz?retake=1
Example:
GET http://example.gov/api/courses/[course_id]/quiz?retake=1
GET /courses/[course_id]/contents/[content_id]/quiz?retake=0
Example:
GET http://example.gov/api/courses/[course_id]/contents/[content_id]/quiz?retake=0
PUT /courses/[course_id]/quiz/answer
Example:
Request body: { "quiz_answers": [ { "question_id": 1, "selected_choice_id": 4 }, { "question_id": 2, "selected_choice_id": 55 } ] }
PUT /courses/[course_id]/contents/[content_id]/quiz/answer
Example:
PUT http://example.gov/api/courses/[course_id]/contents/[content_id]/quiz/answer
Request body:
{
"quiz_answers": [
{
"question_id": 1,
"selected_choice_id": 4
},
{
"question_id": 2,
"selected_choice_id": 55
}
]
}
GET /courses/[course_id]/quiz/result
Example:
GET /courses/[course_id]/contents/[content_id]/quiz/result
Example:
GET http://example.gov/api/courses/[course_id]/contents/[content_id]/quiz/result
GET /courses/[course_id]/attachments
Example:
GET /courses/[course_id]/contents/[content_id]/attachments
Example:
GET http://example.gov/api/courses/[course_id]/content/[content_id]/attachments
POST /playlists
Example:
Request body:
{
"name": "Python Vids"
}
GET /playlists
Example:
GET /playlists/[playlist_id]
Example:
PUT /playlists/[playlist_id]
Example:
Request body:
{
"content_id": [content_id]
}
DELETE /playlists/[playlist_id]/contents/[content_id]
Example:
DELETE http://example.gov/api/playlists/[playlist_id]/contents/[content_id]
GET /playlists/favorites
Example:
PUT /playlists/favorites
Example:
Request body:
{
"content_id": [content_id]
}
DELETE /playlists/favorites/[content_id]
Example:
DELETE http://example.gov/api/playlists/favorites/[content_id]
GET /playlists/favorites/watch_history
Example:
GET /users/[user_id]/enrollments
Example:
POST /users/[user_id]/enrollments
Example:
Request body:
{
"course": [course_id]
}
Note:
This project is built using Sqlite3 Database.
This commands is working for MacOS