MBS-10691: Implement teacher-triggered AI (re)grading for qtype_aitext#5
Open
MBS-10691: Implement teacher-triggered AI (re)grading for qtype_aitext#5
Conversation
Add autograde setting to control whether AI feedback is generated automatically on quiz submission or must be triggered manually by a teacher from the grading interface. Changes: - New 'autograde' DB field (default: enabled) with upgrade step - Checkbox in question edit form to toggle automatic AI feedback - Conditional in grade_response(): skip AI task when autograde=0, set step to 'pending_teacher' state instead - New trigger_ai_regrade() method with upsert step data handling, runs adhoc task under teacher's identity (model + quota) - External API (qtype_aitext_trigger_regrade) for single and bulk regrading via AJAX with capability checks - AMD module (regrade.js) for the regrade button in grading UI - Renderer: pending_teacher state in feedback(), regrade button in manual_comment() for teachers - quizaccess_ai: skip access rule when all aitext questions in quiz have autograde disabled - Lang strings (EN + DE) - PHPUnit tests with data providers (13 cases): autograde on/off, teacher identity, upsert scenarios, persistence, edge cases - Behat test for autograde checkbox default and disable flow
7e7470a to
58cd4e1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add autograde setting to control whether AI feedback is generated automatically on quiz submission or must be triggered manually by a teacher from the grading interface.
Changes: