Overview
μLearn is a gamified learning platform where students earn karma points by completing tasks. Each task belongs to an Interest Group (IG) (e.g., Web Development, AI/ML, Design).
Your task is to implement a new API endpoint that returns a task activity summary for a given IG — including tasks completed, total karma earned, unique contributors, and the top 5 contributors, with optional date range filtering.
GET /api/v1/dashboard/ig/<ig_id>/task-summary/
This endpoint will be consumed by the IG analytics section of the admin dashboard.
What to Build
Endpoint Details
| Detail |
Value |
| Method |
GET |
| Auth |
Required |
| Allowed Roles |
ADMIN, FELLOW, ASSOCIATE |
| Path Param |
ig_id — UUID of the Interest Group |
| Query Params |
from_date and to_date (optional, format: YYYY-MM-DD) |
Expected Response
{
"hasError": false,
"statusCode": 200,
"message": { "general": ["Task summary fetched successfully"] },
"response": {
"ig_id": "abc-123",
"ig_name": "Web Development",
"ig_code": "WEB",
"total_tasks_completed": 124,
"total_karma_awarded": 3720,
"unique_contributors": 38,
"top_contributors": [
{
"full_name": "Alice Johnson",
"muid": "alicejohnson@mulearn",
"karma_earned": 540
}
],
"date_range": {
"from_date": "2025-01-01",
"to_date": "2025-03-14"
}
}
}
Error Cases
| Situation |
Expected Behaviour |
ig_id does not exist |
Failure response — "Interest Group not found" |
| Invalid date format |
Failure response — "Invalid date format. Use YYYY-MM-DD" |
| No activity in date range |
Return zeros — do not return a failure |
| Unauthenticated |
401 (handled automatically) |
| Wrong role |
403 (handled automatically) |
Where to Work
You'll work primarily in:
- api/dashboard/ig/dash_ig_view.py — add the new view class
- api/dashboard/ig/urls.py — register the new URL
- api/dashboard/ig/dash_ig_serializer.py — add a serializer if needed
Study the existing views and serializers in the ig/ and task/ modules to understand the patterns before writing code.
Deliverables
Submit everything as a single Pull Request to this repository.
Your PR description must include:
- A brief explanation of your implementation approach
- The key ORM query you used for aggregation
- Any assumptions you made
- How you tested it (Postman screenshots or steps)
Checklist
We value code quality and clarity over speed. A well-written solution that handles edge cases correctly is more impressive than a quick but broken one.
Stack: Python · Django · Django REST Framework · MySQL
Repo: https://github.com/gtech-mulearn/mulearnbackend
All the best! 🚀
Overview
μLearn is a gamified learning platform where students earn karma points by completing tasks. Each task belongs to an Interest Group (IG) (e.g., Web Development, AI/ML, Design).
Your task is to implement a new API endpoint that returns a task activity summary for a given IG — including tasks completed, total karma earned, unique contributors, and the top 5 contributors, with optional date range filtering.
This endpoint will be consumed by the IG analytics section of the admin dashboard.
What to Build
Endpoint Details
GETADMIN,FELLOW,ASSOCIATEig_id— UUID of the Interest Groupfrom_dateandto_date(optional, format:YYYY-MM-DD)Expected Response
{ "hasError": false, "statusCode": 200, "message": { "general": ["Task summary fetched successfully"] }, "response": { "ig_id": "abc-123", "ig_name": "Web Development", "ig_code": "WEB", "total_tasks_completed": 124, "total_karma_awarded": 3720, "unique_contributors": 38, "top_contributors": [ { "full_name": "Alice Johnson", "muid": "alicejohnson@mulearn", "karma_earned": 540 } ], "date_range": { "from_date": "2025-01-01", "to_date": "2025-03-14" } } }Error Cases
ig_iddoes not existWhere to Work
You'll work primarily in:
Study the existing views and serializers in the
ig/andtask/modules to understand the patterns before writing code.Deliverables
Submit everything as a single Pull Request to this repository.
Your PR description must include:
Checklist
IGTaskSummaryAPIadded todash_ig_view.pyurls.py(mind the ordering — Django matches top-down)dash_ig_serializer.py(if used)ig_idis invalidStack: Python · Django · Django REST Framework · MySQL
Repo: https://github.com/gtech-mulearn/mulearnbackend
All the best! 🚀