> ## Documentation Index
> Fetch the complete documentation index at: https://memberpulseptyltd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CPD Point Assignment

> Configure automatic CPD point allocation for course completion

Configure how CPD points are automatically awarded when members complete courses.

## Configuration Options

### Per Course

* Set CPD points per course
* Map to CPD category
* Require minimum score

#### Acceptance Criteria

##### Frontend

* [ ] Per Course workflow is implemented in the UI as described.

##### Backend / API

* [ ] Backend behavior supports Per Course as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] All business rules for this feature are enforced.

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

### Assignment Rules

* Award on completion only
* Award on passing quiz
* Award based on time spent
* Pro-rata for partial completion

#### Acceptance Criteria

##### Frontend

* [ ] Assignment Rules workflow is implemented in the UI as described.

##### Backend / API

* [ ] Backend behavior supports Assignment Rules as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] All business rules for this feature are enforced.

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

### Automatic vs Manual

| Mode      | Description                              |
| --------- | ---------------------------------------- |
| Automatic | Points awarded immediately on completion |
| Manual    | Points require admin approval            |

#### Acceptance Criteria

##### Frontend

* [ ] Automatic vs Manual workflow is implemented in the UI as described.

##### Backend / API

* [ ] Backend behavior supports Automatic vs Manual as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] All business rules for this feature are enforced.

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

## UI Spec (from supplied spreadsheet)

The spreadsheet defines CPD-related course fields under "Courses":

| Field        | Input Type   | Required | Notes                                          |
| ------------ | ------------ | -------- | ---------------------------------------------- |
| CPD Points   | Number       | Required | model: `cpdPoints`                             |
| CPD Category | Multi-select | Required | model: `cpdCategories` (autocomplete selector) |

These fields are used to automatically award CPD on course completion (or on passing criteria), depending on the configuration mode.

#### Data Model Cross‑Reference (Entities)

* Course CPD configuration lives on: [`Course`](/entities/core/course)
* Course completion status is tracked via: [`Course Enrollment`](/entities/core/course-enrollment)
* Awarded points should be recorded as: [`CPD Record`](/entities/core/cpd-record)
* Categories are configured via: [`CPD Category`](/entities/core/cpd-category)

## Features

### CPD Point Assignment

#### Acceptance Criteria

##### Frontend

* [ ] UI supports the workflows described in this feature.

##### Backend / API

* [ ] Backend behavior supports this feature as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] CPD points must be positive and divisible by 0.5
* [ ] Points awarded to correct calendar year
* [ ] Cannot award points twice for same course completion
* [ ] Course must be completed to award points

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

## Implementation Contracts

### Backend (API)

```
GET    /api/courses/{id}/cpd-config          # Get CPD config
PUT    /api/courses/{id}/cpd-config          # Update config

GET    /api/cpd/auto-assignments             # List auto assignments
POST   /api/cpd/auto-assignments/{id}/approve # Approve pending
```
