Moodle Gradebook Closeout Reconciliation
Domain: education_info — Educational Technology

Summary: Repair a broken offline Moodle-style course backup and rebuild the registrar plus OneRoster closeout exports from the repaired bundle.

Task prompt:
You are working on Linux on an offline Moodle gradebook closeout task.

## Task Root
- `base`

## Visible Inputs
- Task prompt: `base/input/TASK_PROMPT.md`
- Bundle README: `base/input/README.md`
- Shared helper library: `base/input/bundle_lib.py`
- Starter project: `base/input/starter_project`
- Starter backup: `base/input/starter_project/course_backup.mbz`
- Roster snapshot: `base/input/starter_project/roster.csv`
- Rebuild helper: `base/input/starter_project/tools/rebuild_exports.py`
- Python wrapper: `base/software/python_with_task_deps.sh`

## What You Should Do
1. Read `base/input/TASK_PROMPT.md` and the starter materials under `base/input/starter_project`.
2. Repair the broken Moodle-style backup in `base/input/starter_project/course_backup.mbz` by changing only the benchmark-designated editable backup files.
3. Rebuild the registrar and OneRoster outputs using the staged helper tools.
4. Write the required deliverables under `base/output`.

## Final Deliverables
- `base/output/corrected_course.mbz`
- `base/output/final_grade_export.csv`
- `base/output/final_grade_export.xml`
- `base/output/audit_report.csv`
- `base/output/audit_report.json`
- `base/output/exception_log.csv`
- `base/output/decisions.md`
- `base/output/oneroster_package/manifest.csv`
- `base/output/oneroster_package/users.csv`
- `base/output/oneroster_package/classes.csv`
- `base/output/oneroster_package/enrollments.csv`
- `base/output/oneroster_package/lineItems.csv`
- `base/output/oneroster_package/results.csv`

Use `base/software/python_with_task_deps.sh` if you want the pinned Python runtime for the helper scripts.
Do not modify files under `base/input`.
Do not rely on files outside the visible task root listed above during solve time.


The agent must:
Read `input/TASK_PROMPT.md` and the starter materials under `input/starter_project/`.
Repair the offline Moodle-style backup `input/starter_project/course_backup.mbz` by editing only the benchmark-designated editable backup files.
Rebuild the registrar export and the OneRoster package with the staged helper tools.
Write all required deliverables under `output/`, including the repaired `.mbz`, registrar CSV/XML exports, audit outputs, exception log, decisions memo, and the `oneroster_package/` CSV files.

Software: Python
pandas
uv

Input files:
name: TASK_PROMPT.md
format: Markdown
description: Agent-visible benchmark contract for the offline Moodle gradebook closeout workflow.
name: README.md
format: Markdown
description: Top-level starter-bundle README from the normalized visible package.
name: bundle_lib.py
format: Python
description: Sanitized solve-time rebuild helper used by the bundled starter scripts.
name: starter_project
format: Directory
description: Starter bundle containing the broken Moodle-style backup, roster snapshot, policy docs, helper tools, and supporting artifacts.
name: runtime_env
format: uv Python environment
description: Pinned agent-visible runtime metadata plus local wheelhouse; the wrapper installs from `input/runtime_env/wheels` and the staged manifest files remain for provenance.
name: python_with_task_deps.sh
format: Shell wrapper
description: Agent-visible wrapper that runs the staged helper scripts with `/usr/bin/python` plus the local wheelhouse under `input/runtime_env/wheels`.