Individual Contributions ‐ Hasan Kerem Şeker - bounswe/bounswe2024group11 GitHub Wiki
Hasan Kerem Şeker
Responsibilities
- I am implementing the Web application's front end with Ümit Can Evleksiz.
- We divided the things that needed to be done and reviewed each other's outputs to push only high-quality code to the main branch. Therefore, I am also responsible for code reviews.
Main Contributions
- Created Initial forum page with mock server
- Connected Quiz Page to the backend
- Implemented initial hint functionality
- Created initial profile page
- Implemented forum pagination for the web page
API Contributions
- /api/v1/quizzes: This endpoint retrieves all quizzes in a paginated manner. I used it to display a feed of quizzes. It requires quizzes per page and the current page number to retrieve quizzes. If they are not provided, default values determined by the backend team are used.
curl -X 'GET' \
'http://127.0.0.1:8000/api/v1/quizzes/?page=1&per_page=1' \
-H 'accept: application/json'
Response Body
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 2,
"title": "Cars Quiz",
"description": "Test your knowledge about cars",
"difficulty": 2,
"author": {
"id": 3,
"username": "jackma",
"email": "[email protected]",
"full_name": "jackma",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=David%20Bush"
},
"tags": [
{
"name": "car",
"linked_data_id": "bn:00007309n",
"description": "A motor vehicle with four wheels; usually propelled by an internal combustion engine"
}
],
"type": 2,
"created_at": "2024-11-12T12:33:23Z",
"questions": [
{
"id": 6,
"question_text": "Kaput",
"question_point": 0,
"choices": [
{
"id": 21,
"choice_text": "Hood",
"is_correct": true
},
{
"id": 22,
"choice_text": "Fender",
"is_correct": false
},
{
"id": 23,
"choice_text": "Bumper",
"is_correct": false
},
{
"id": 24,
"choice_text": "Windshield",
"is_correct": false
}
],
"hints": []
},
],
"num_taken": 3,
"is_taken": false,
"rating": {
"score": 4,
"count": 1
},
"is_my_quiz": false,
"quiz_point": 0
},
]
}
- /api/v1/quizzes/{id}: This endpoint retrieves the quiz with the given id. I used it to get the quiz the user was going to solve.
curl -X 'GET' \
'http://127.0.0.1:8000/api/v1/quizzes/2/' \
-H 'accept: application/json'
Response Body
{
"id": 2,
"title": "Cars Quiz",
"description": "Test your knowledge about cars",
"difficulty": 2,
"author": {
"id": 3,
"username": "jackma",
"email": "[email protected]",
"full_name": "jackma",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=David%20Bush"
},
"tags": [
{
"name": "car",
"linked_data_id": "bn:00007309n",
"description": "A motor vehicle with four wheels; usually propelled by an internal combustion engine"
}
],
"type": 2,
"created_at": "2024-11-12T12:33:23Z",
"questions": [
{
"id": 6,
"question_text": "Kaput",
"question_point": 0,
"choices": [
{
"id": 21,
"choice_text": "Hood",
"is_correct": true
},
{
"id": 22,
"choice_text": "Fender",
"is_correct": false
},
{
"id": 23,
"choice_text": "Bumper",
"is_correct": false
},
{
"id": 24,
"choice_text": "Windshield",
"is_correct": false
}
],
"hints": []
},
],
],
"num_taken": 3,
"is_taken": false,
"rating": {
"score": 4,
"count": 1
},
"is_my_quiz": false,
"quiz_point": 0
}
- /api/v1/take-quiz/: This endpoint saves users quiz results after solving it to the backend.
curl 'http://138.68.97.90:8000/api/v1/take-quiz/' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzMzNDkzMDU1LCJpYXQiOjE3MzI4ODgyNTUsImp0aSI6IjQ4ZjZmOTcyYjlmMDQ3YzNiZjMwMjU2Yzk3ZDRjYWQ1IiwidXNlcl9pZCI6MTN9.XiXhDA5mAAL-F72Phsxp51rktjPYPp7QNq_RwVJ0IkQ' \
-H 'Content-Type: application/json' \
--data-raw '{"quiz":16,"answers":[{"question":49,"answer":191,"is_hint_used":false},{"question":50,"answer":197,"is_hint_used":false}]}'
Response Body
{
"id": 68,
"quiz": 16,
"user": 13,
"date": "2024-11-29T13:51:28.874251Z",
"answers": [
{
"id": 206,
"take_quiz": 68,
"question": 49,
"answer": 191,
"is_hint_used": false
},
{
"id": 207,
"take_quiz": 68,
"question": 50,
"answer": 197,
"is_hint_used": false
}
],
"score": 20,
"correct_answer_count": 1,
"wrong_answer_count": 1,
"empty_answer_count": 0
}
Code Related Significant Issues
Issue Title | Description | Issue and/or PR Link |
---|---|---|
Implement Create Answer for Forum Question | Created initial forum question answering mechanism which was later redesigned by Ümit Can Evleksiz | #639 #613 |
Implement Upvote and Downvote mechanism | Created mechanism to implement upvoting, downvoting, and rescinding vote mechanism for forum questions and answers | #638 #613 |
Implement Forum Question Bookmark | Implemented bookmarking and unbookmarking mechanism | #637 #613 |
Implement Forum Question Details | Created a page showing a forum questions answers which can be reached by clicking a forum question on the forum feed | #591 593 |
Implement Forum View Feed | Created the forum feed which shows the forum questions | #591 #592 |
Implement Forum Pagination On ClientSide | Implemented pagination for the forum page to show forum questions in a paginated manner | #675 #680 |
Implement Create Forum Question for Client | Created the initial mechanism to allow users to ask questions on the forum. This was redesigned by Ümit Can later. | #618 #613 |
Implement Initial Profile Page | Created a profile page with the users' bookmarked post, static badges, and static points | #723 #707. |
Non-compliance to ARIA and WCAG in Forum | Some of the components in the forums page and forum inner page did not comply with WCAG and WAI-ARIA guidelines and had to be fixed. | #603 |
Implement Hint Feature For Quiz on Client | Implemented the mechanism to see hint while solving a quiz | #686 #695 |
Fix Radio Button for Quiz Sorting (W3C ARIA) | Fixed radio buttons for sorting quiz feed under Quizzes tab which were not accessible with ARIA standard | #559 #591 #595 |
Management-Related Significant Issues
Issue Title | Description | Issue and/or PR Link |
---|---|---|
Move Forum Question Creation to a New Page | Assigned Ümit Can to move forum question creation to the new page | #687 |
Forum Question Tagging on Client | Assigned Ümit Can to allow tagging while creating forum question | #683 |
Use cookie instead of localStorage | Assigned Ümit Can to use cookies instead of localStorage | #674 |
Forum Question Search Based On Tag | Assigned Ümit Can to allow search question based on tags | #684 |
Use Axios on the Client Side | Assigned Ümit Can to use Axios on the Web Application | #673 |
PRs
PR | Summary |
---|---|
#680 | fix(client): can load quiz page |
#695 | feat(client): implement view hint |
#707 | feat(client): create initial profile page |
#613 | lab(client): lab6 work |
#646 | lab: work done for lab7 & forum integration |