justify_absences
Preview and justify one student's absences and late arrivals for a date range, then confirm to save the changes.
Instructions
Justify ONE student's absences and lates in a date range, the way 'Detall d'assistència > Justificar en bloc' does in the student file. One student per call; never loops over a class.
Without confirm=True it lists what can be justified in the range and which items would be, and changes nothing. Each item has a key, date, time, subject and type: "absent" / "late" (unjustified), or with include_not_taken=True also "not_taken" (a session where the teacher did not take the register, shown by the page's eye icon). Call again with confirm=True only after the teacher approves.
keys picks items from that list; omit it to justify every absent/late item (and not_taken ones if include_not_taken). Justifying a not_taken session records the student as absent-with-justification there; only do it when the teacher says the student was not in class. note is the optional annotation (e.g. "Visita mèdica"). The 'email me a copy' box is never ticked. Dates are YYYY-MM-DD; date_to defaults to date_from. After saving it re-reads the range and reports each item's new state.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"alu_id": "<alu_id>",
"date_from": "<date_from>"
},
"name": "justify_absences"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | No | ||
| note | No | ||
| alu_id | Yes | ||
| confirm | No | ||
| date_to | No | ||
| date_from | Yes | ||
| include_not_taken | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |