Skip to content

Commit

Permalink
Fix read-only linkIds for questionnaires in Edit mode
Browse files Browse the repository at this point in the history
  • Loading branch information
DebbieArita committed Feb 14, 2024
1 parent 8183ab7 commit 4ec121a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ fun List<Questionnaire.QuestionnaireItemComponent>.generateMissingItems(
*/
fun List<Questionnaire.QuestionnaireItemComponent>.prepareQuestionsForReadingOrEditing(
path: String = "QuestionnaireResponse.item",
readOnly: Boolean = false,
readOnly: Boolean,
readOnlyLinkIds: List<String>? = emptyList(),
) {
forEach { item ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ constructor(
defaultRepository.loadResource<Questionnaire>(questionnaireConfig.id)?.apply {
if (questionnaireConfig.isReadOnly() || questionnaireConfig.isEditable()) {
item.prepareQuestionsForReadingOrEditing(
readOnly = questionnaireConfig.isReadOnly(),
readOnly = questionnaireConfig.isReadOnly() || questionnaireConfig.isEditable(),
readOnlyLinkIds = questionnaireConfig.readOnlyLinkIds,
)
}
Expand Down

0 comments on commit 4ec121a

Please sign in to comment.