Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict editing of QuestionnaireResopnse to when saving draft is enabled #3723

Merged
merged 3 commits into from
Mar 5, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Restrict editing of QuestionnaireResopnse to when saving draft is ena…
…bled
Rkareko committed Mar 4, 2025

Verified

This commit was signed with the committer’s verified signature.
commit 29f8eb83c24a6efca0bf78fdc249e7cd7de281a3
Original file line number Diff line number Diff line change
@@ -1208,7 +1208,13 @@ constructor(
)
?.let {
QuestionnaireResponse().apply {
id = it.id
/**
* Only set the ID value when [saveDraft] is set to true] this ensues that a new
* [QuestionnaireResponse] is generated when the questionnaire is submitted
*/
if (questionnaireConfig.saveDraft) {
id = it.id
}
status = it.status
item = it.item.removeUnAnsweredItems()
// Clearing the text prompts the SDK to re-process the content, which includes HTML