ucfopen / Obojobo

Next generation course content for your LMS. Easy for beginners, but powerful enough for researchers.
https://ucfopen.github.io/Obojobo-Docs/
GNU Affero General Public License v3.0
70 stars 34 forks source link

Restructure NumericAssessment JSON #1313

Closed qwertynerd97 closed 3 years ago

qwertynerd97 commented 4 years ago

While working on #1299 some inconsistencies were found in how NumericAssessments treated their children between the editor and the viewer, particularly when trying to extract out duplicate code between Numeric and MC Assessments. In a discussion with @zachberry a logical structure that could be consistent between Assessments was decided as follows:

(Note: The PR for #1299 introduces the AbstractAssessment chunk, which is designed to maintain Abstract sub-components that can be re-used between Assessments)

Each Assessment should have a children array of abstract Choice nodes Each Choice node defines its score (currently 0 or 100) and has 1 or 2 children The first child is an Answer node, that implements behavior specific to the assessment The second child is an optional abstract Feedback node that holds content chunks to explain the choice

The Assessment can then implement specific behavior on how to score a submitted answer, based on its child choices (ergo: -once we do validation - a NumericAssessment could decide that must-meet-all could be in effect, and so the input would have to meet all correct validations and not meet any of the incorrect, similar to the multi-select MCAssessment)

The PR for #1299 implements this design pattern for the editor, but the viewer still needs work.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep our backlog under control, but we thank you for your contributions.