# My Courses — `progress` is now a structured object

`GET /api/v1/user/my-courses` no longer returns a flat `progress_percent`
string on each enrollment. It now returns a `progress` object with
`completed`/`total` unit counts alongside the percentage, matching the shape
already used by `GET /api/v1/user/programs/fetch_my_programs`.

## What changed

### Response shape

**Before:**
```json
{
  "id": "…",
  "status": "active",
  "progress_percent": "60.00",
  "enrolled_at": "…",
  "completed_at": null,
  "course": { "…": "…" }
}
```

**After:**
```json
{
  "id": "…",
  "status": "active",
  "progress": {
    "completed": 3,
    "total": 5,
    "percent": 60.0
  },
  "enrolled_at": "…",
  "completed_at": null,
  "course": { "…": "…" }
}
```

`progress.percent` is the same value that used to live at `progress_percent`
(now a float, not a decimal string). `progress.completed`/`progress.total`
are new: for a `recorded` course they count video lessons watched vs. total
video lessons; for a `live` course they count sessions attended vs. total
scheduled sessions — the same split `percent` was already computed from
internally (quizzes don't count toward either number, per spec §9).

This affects only `GET /api/v1/user/my-courses`
(`App\Http\Resources\User\Course\EnrollmentResource`). No other endpoint
used this resource.

### My programs — unchanged, shown for reference

`GET /api/v1/user/programs/fetch_my_programs` already returned this shape
and is not affected by this change:
```json
{
  "status": "ongoing",
  "progress": {
    "sessions_attended": 3,
    "sessions_total": 5,
    "percent": 60.0
  }
}
```
Note the field names differ slightly from courses (`sessions_attended` /
`sessions_total` vs. `completed` / `total`) — the frontend should not assume
one shared schema between the two `progress` objects.

## Files touched

- `app/Services/Education/CourseProgressService.php` — added public
  `countsFor(Enrollment): array{completed: int, total: int}`; internal
  percent calculation refactored to reuse it (no behavior change to
  `percentFor()`/`recalculate()`).
- `app/Http/Resources/User/Course/EnrollmentResource.php` — `progress_percent`
  replaced with the `progress` object.

## Tests

`tests/Feature/Education/LearnerCourseApiTest.php::test_my_courses_lists_enrollments_with_progress`
updated to assert the new shape. Full Education (325) and Reviews (97) suites
pass; `vendor/bin/pint --dirty` is clean.

## Frontend action needed

Any screen reading `data[].progress_percent` from `my-courses` (e.g. كورساتي)
must switch to `data[].progress.percent`, and can optionally show
`data[].progress.completed` / `data[].progress.total` (e.g. "3 of 5 lessons
watched") if useful in the UI.
