Skip to content

Commit b90447e

Browse files
mchurchwardclaude
andcommitted
Phase 3: Extract response handling into classes/local/response/manager.php
Create mod_questionnaire\local\response\manager to centralise all response CRUD and query operations previously scattered across questionnaire.class.php. - New classes/local/response/manager.php with 17 methods: - Loading: add_user_responses, add_response, add_response_from_formdata, build_response_from_appdata, get_responses, user_has_saved_response - Saving: response_insert, response_commit, delete_insert_response, commit_submission_response - Deletion: response_delete - Validation: response_check_format - Querying: get_survey_all_responses, response_select, get_structured_response, get_full_submission_for_export - From locallib (for new callers): get_user_responses, delete_response, delete_responses - questionnaire.class.php: replace each method body with a delegation call to responsemanager(); add responsemanager() lazy initialiser; make update_grades() public so the manager can call it. locallib.php global functions are left unchanged — their callers pass questionnaire IDs rather than objects and will be updated in a later phase. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent aa16ccb commit b90447e

File tree

2 files changed

+705
-391
lines changed

2 files changed

+705
-391
lines changed

0 commit comments

Comments
 (0)