Skip to content

Fix 366 publish assessment grades for hook studies - #376

Open
akash9676 wants to merge 2 commits into
devfrom
fix-366-publish_assessment
Open

akash9676 wants to merge 2 commits into
devfrom
fix-366-publish_assessment

Conversation

@akash9676

Copy link
Copy Markdown
Collaborator

Summary

Publish Assessment and project grade export were reading only assessment_result and flattening scores as { Criterion: { currentScore } }. Hook studies store aiHook_{id} (or {name}_{skill}_assessment) in other shapes, so CSV, Moodle grades, and the grades ZIP came out as zeros. This PR looks up those keys, flattens the stored value through scoresFromStoredValue in assessment-score, and prefills Moodle connection fields from settings.

Improvements

  • Moodle course ID, API key, and API URL are copied from rpc.moodleAPI.* when a parent form starts with {} (MoodleOptions.vue). Assignment ID is still picked per publish.
  • assessment-score exports scoresFromStoredValue for NLP lists, numeric maps, and saved criterion state. Publish Assessment and export.js both import it. Tests cover the list and map cases.

Bug Fixes

  • Publish Assessment CSV and Moodle grades now use hook/NLP keys as well as assessment_result, including trigger rows with a null session (PublishAssessmentModal.vue).
  • The Moodle step binds moodleOptions: {} so the form actually renders.
  • Project grade export queries aiHook_% and *_assessment as well as assessment_result, groups duplicate keys, and prefers a non-zero saved result over the hook row (export.js).

Known Limitations

  • N/A

Future Steps

  • N/A

@akash9676 akash9676 linked an issue Sep 18, 2026 that may be closed by this pull request
3 tasks

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Publish assessment grades and hashes are not published correctly

1 participant