A web-based platform for collecting and managing student feedback, enabling institutions to make data-driven decisions and improve educational outcomes.
The Student Feedback Management System simplifies the process of collecting and managing student feedback. Designed for educational institutions, the system includes role-based access for students and admins. Students submit feedback on curriculum and campus facilities, while admins analyze this feedback via dashboards to make informed decisions.
- Role-Based Access:
- Students: Submit feedback.
- Admins: View and analyze aggregated feedback.
- Dynamic Feedback Questions:
- Text-based or multiple-choice questions.
- Real-Time Dashboards for administrators.
- Secure Authentication using Flask-Login.
- Python 3.8+
- MySQL
- Virtual Environment
- Clone the repository:
git clone https://github.com/rhoda-lee/Student-Feedback-Management-System.git- Move into cloned directory
cd Student-Feedback-Management-System- Create a virtual environment and activate it:
sudo apt install python3-venv
python3 -m venv ~/myenv
source ~/myenv/bin/activate- Install dependencies:
pip install mysql-connector-python sqlalchemy flask flask-login - Set up the database:
# Configure the database connection in config/config.py- Initialize the database:
python3 models.py- Run the Flask application:
export FLASK_APP=app
export FLASK_DEBUG=1
flask run- Open your browser and navigate to:
http://127.0.0.1:5000| Endpoint | Method | Description | Example Request | Example Response |
|---|---|---|---|---|
/register |
POST | Register a new user | { "username": "johndoe", "email": "john@example.com", "password": "password123" } |
{ "message": "Registration successful!" } |
/login |
POST | Log in a user | { "email": "john@example.com", "password": "password123" } |
{ "message": "Welcome back, johndoe!", "redirect": "stu_dash.html" } |
/logout |
POST | Log out the current user | - | { "message": "You have been logged out." } |
/users |
GET | List all users | - | { "Users": [{"id": 1, "username": "johndoe", "email": "john@example.com", "role": "user"}] } |
/users/<int:user_id> |
GET | Get a specific user | - | { "id": 1, "username": "johndoe", "email": "john@example.com", "role": "user" } |
/users/update/<int:user_id> |
PUT | Update a user | { "username": "john_updated", "email": "john_updated@example.com", "password": "newpassword123", "role": "user" } |
{ "message": "User updated successfully." } |
/users/delete/<int:user_id> |
DELETE | Delete a user | - | { "message": "User deleted successfully." } |
| Endpoint | Method | Description | Example Request | Example Response |
|---|---|---|---|---|
/questions |
POST | Add a new question | { "question_text": "What is your favorite color?", "question_type": "select", "options": ["Red", "Blue", "Green"] } |
{ "Message": "Question created successfully!", "Question": { "question_id": 1, "question_text": "What is your favorite color?", "question_type": "select" } } |
/questions |
GET | List all questions | - | { "Questions": [{"question_id": 1, "question_text": "What is your favorite color?", "question_type": "select", "options": ["Red", "Blue", "Green"]}] } |
/questions/<int:question_id> |
GET | Get a specific question | - | { "question_id": 1, "question_text": "What is your favorite color?", "question_type": "select", "options": ["Red", "Blue", "Green"] } |
/questions/update/<int:question_id> |
PUT | Update a question | { "question_text": "What is your favorite fruit?", "question_type": "select", "options": ["Apple", "Banana", "Cherry"] } |
{ "Message": "Question updated successfully." } |
/questions/delete/<int:question_id> |
DELETE | Delete a question | - | { "Message": "Question deleted successfully." } |
| Endpoint | Method | Description | Example Request | Example Response |
|---|---|---|---|---|
/feedback |
POST | Create new feedback | { "user_id": 1, "question_id": 2, "response": "I enjoy coding." } |
{ "Message": "Feedback created successfully!", "Feedback": { "feedback_id": 1, "user_id": 1, "question_id": 2, "response": "I enjoy coding." } } |
/feedback |
GET | List all feedback | - | { "Feedbacks": [{"feedback_id": 1, "user_id": 1, "question_id": 2, "response": "I enjoy coding."}] } |
/feedback/<int:feedback_id> |
GET | Get specific feedback | - | { "feedback_id": 1, "user_id": 1, "question_id": 2, "response": "I enjoy coding." } |
/feedback/update/<int:feedback_id> |
PUT | Update feedback | { "response": "I love coding challenges." } |
{ "Message": "Feedback updated successfully." } |
/feedback/delete/<int:feedback_id> |
DELETE | Delete feedback | - | { "Message": "Feedback deleted successfully." } |
To test the backend API endpoints using Postman, follow these steps:
- Register a User
- Endpoint: POST /register
- Request Body:
{
"username": "johndoe",
"email": "johndoe@example.com",
"password": "password123"
}- Expected Response:
{
"message": "Registration successful!"
}- Login a User
- Endpoint: POST /login
- Request Body:
{
"email": "johndoe@example.com",
"password": "password123"
}- Expected Response:
{
"message": "Welcome back, johndoe!",
"redirect": "stu_dash.html"
}- List All Users
- Endpoint: GET /users
- Expected Response:
{
"Users": [
{
"id": 1,
"username": "johndoe",
"email": "johndoe@example.com",
"role": "user"
}
]
}- Get a Specific User
- Endpoint: GET /users/int:user_id
- Example URL: /users/1
- Expected Response:
{
"id": 1,
"username": "johndoe",
"email": "johndoe@example.com",
"role": "user"
}- Update a User
- Endpoint: PUT /users/update/int:user_id
- Example URL: /users/update/1
- Request Body:
{
"username": "john_updated",
"email": "john_updated@example.com",
"password": "newpassword123",
"role": "admin"
}- Expected Response:
{
"message": "User updated successfully."
}- Delete a User
- Endpoint: DELETE /users/delete/int:user_id
- Example URL: /users/delete/1
- Expected Response:
{
"message": "User deleted successfully."
}- Add a New Question
- Endpoint: POST /questions
- Request Body (Text Question):
{
"question_text": "What are your hobbies?",
"question_type": "text"
}- Request Body (Select Question):
{
"question_text": "What is your favorite color?",
"question_type": "select",
"options": ["Red", "Blue", "Green"]
}- Expected Response:
{
"Message": "Question created successfully!",
"Question": {
"question_id": 1,
"question_text": "What is your favorite color?",
"question_type": "select",
"options": ["Red", "Blue", "Green"]
}
}- List All Questions
- Endpoint: GET /questions
- Expected Response:
{
"Questions": [
{
"question_id": 1,
"question_text": "What is your favorite color?",
"question_type": "select",
"options": ["Red", "Blue", "Green"]
}
]
}- Get a Specific Question
- Endpoint: GET /questions/int:question_id
- Example URL: /questions/1
- Expected Response:
{
"question_id": 1,
"question_text": "What is your favorite color?",
"question_type": "select",
"options": ["Red", "Blue", "Green"]
}- Update a Question
- Endpoint: PUT /questions/update/int:question_id
- Example URL: /questions/update/1
- Request Body:
{
"question_text": "What is your favorite fruit?",
"question_type": "select",
"options": ["Apple", "Banana", "Cherry"]
}- Expected Response:
{
"Message": "Question updated successfully."
}- Delete a Question
- Endpoint: DELETE /questions/delete/int:question_id
- Example URL: /questions/delete/1
- Expected Response:
{
"Message": "Question deleted successfully."
}- Create Feedback
- Endpoint: POST /feedback
- Request Body:
{
"user_id": 1,
"question_id": 1,
"response": "I love learning new things."
}- Expected Response:
{
"Message": "Feedback created successfully!",
"Feedback": {
"feedback_id": 1,
"user_id": 1,
"question_id": 1,
"response": "I love learning new things."
}
}- List All Feedback
- Endpoint: GET /feedback
- Expected Response:
{
"Feedbacks": [
{
"feedback_id": 1,
"user_id": 1,
"question_id": 1,
"response": "I love learning new things."
}
]
}- Get Specific Feedback
- Endpoint: GET /feedback/int:feedback_id
- Example URL: /feedback/1
- Expected Response:
{
"feedback_id": 1,
"user_id": 1,
"question_id": 1,
"response": "I love learning new things."
}- Update Feedback
- Endpoint: PUT /feedback/update/int:feedback_id
- Example URL: /feedback/update/1
- Request Body:
{
"response": "I enjoy learning Python."
}- Expected Response:
{
"Message": "Feedback updated successfully."
}- Delete Feedback
- Endpoint: DELETE /feedback/delete/int:feedback_id
- Example URL: /feedback/delete/1
- Expected Response:
{
"Message": "Feedback deleted successfully."
}- Open Postman.
- Create a new request and set the appropriate method (e.g., POST, GET, PUT, or DELETE).
- Enter the endpoint URL (e.g., http://127.0.0.1:5000/register).
- For endpoints that require data (e.g., POST):
- Go to the Body tab -Select raw
- Choose JSON format
- Input the JSON data
- Click Send and verify that the response matches the expected output.
Hi ๐, I'm Rhoda Lee, a passionate software developer and data science enthusiast. I love creating solutions that solve real-world problems and enjoy contributing to open-source projects.
-
Web Development:
- Full-stack expertise with Python, Flask, and React
-
Data Science and Analytics:
- Working on projects that analyze and visualize data insights
-
Tech Advocacy:
- Committed to sharing knowledge and empowering others through workshops and online content
- Simulated the processes of an Automated Teller Machine
- Implemented some key algorithms used by the CPU to schedule tasks in an Operating System
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to fork, contribute or reach out to collaborate! ๐
