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

Fixes #4470, #4471, #4472, #4473, #4474, #4708: Handle configuration change using on saved instance #4668

Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
9a7da9a
RawUserAnswer added
vrajdesai78 Oct 19, 2022
20280f1
Imports optimized
vrajdesai78 Oct 19, 2022
3625a63
Optimized import
vrajdesai78 Oct 19, 2022
6f64dcc
rawUserAnswer added to constructor of StateItemViewModel
vrajdesai78 Oct 21, 2022
002b500
Merge branch 'develop' of https://github.com/vrajdesai78/oppia-androi…
vrajdesai78 Oct 21, 2022
f4c93f6
Merge branch 'develop' of https://github.com/vrajdesai78/oppia-androi…
vrajdesai78 Oct 21, 2022
c4293c5
Platform parameter added
vrajdesai78 Oct 21, 2022
e8863a6
Optimized code
vrajdesai78 Oct 21, 2022
cf4f093
Kdoc added
vrajdesai78 Oct 24, 2022
1f0d530
added platformparameter in bazel
vrajdesai78 Oct 24, 2022
4de5907
Updated bazel
vrajdesai78 Oct 24, 2022
d9a79bf
Improved data pipeline and nit changes
vrajdesai78 Oct 25, 2022
dbd3d55
code optimized
vrajdesai78 Oct 25, 2022
e151b9a
Updated imageRegionSelectionInteractionViewModel
vrajdesai78 Oct 25, 2022
c47ef46
retained state in Selection Interaction
vrajdesai78 Oct 26, 2022
aa6bd6d
Made rawUserAnwer to non-null and other nit changes
vrajdesai78 Oct 27, 2022
b0706c0
optimized code
vrajdesai78 Oct 27, 2022
a99e9fb
Fixed null value of rawUserAnswer
vrajdesai78 Oct 27, 2022
79442b7
optimized imports
vrajdesai78 Oct 27, 2022
84457fa
DragAndDrop added
vrajdesai78 Oct 28, 2022
4d63aac
optimized code
vrajdesai78 Oct 28, 2022
313bb92
ImageRegion made working
vrajdesai78 Oct 28, 2022
59993af
Optimized code ImageRegionSelection
vrajdesai78 Oct 28, 2022
5a36788
Optimized code
vrajdesai78 Oct 28, 2022
de7aa69
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 Oct 29, 2022
c8587f9
Optimized code
vrajdesai78 Oct 29, 2022
a0c7f3e
Merge branch 'handle-configuration-change-using-onSavedInstance' of h…
vrajdesai78 Oct 29, 2022
959877c
Added tests for selection and drag and drop interaction
vrajdesai78 Oct 30, 2022
9d3d27c
optimized code
vrajdesai78 Oct 30, 2022
d271f85
Added proto to store dragAndDrop sort
vrajdesai78 Oct 31, 2022
6910fb7
Optimized code
vrajdesai78 Oct 31, 2022
3d4cc10
SelectionInteraction bug fixed of clearing selection
vrajdesai78 Nov 1, 2022
69a4181
Updated proto for DragAndDrop and added more tests
vrajdesai78 Nov 2, 2022
102da7b
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 Nov 2, 2022
db30ea2
Optimized code
vrajdesai78 Nov 3, 2022
a6d1cf7
Merge branch 'handle-configuration-change-using-onSavedInstance' of h…
vrajdesai78 Nov 3, 2022
c8ec8ee
Fixed static checks
vrajdesai78 Nov 3, 2022
031b5a5
Seperated text-based interactions
vrajdesai78 Nov 3, 2022
42987e6
Enabled platform parameter and optimized code
vrajdesai78 Nov 3, 2022
10a91bd
Added ToDo
vrajdesai78 Nov 3, 2022
427898b
Removed extra line
vrajdesai78 Nov 3, 2022
45bafdd
Fixed issue with DragAndDropSortInteraction
vrajdesai78 Nov 4, 2022
c56dd5b
Code optimized
vrajdesai78 Nov 4, 2022
4dc8b78
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 Nov 6, 2022
bae52d0
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 Nov 6, 2022
7c5f714
New tests added and handled edge cases
vrajdesai78 Nov 6, 2022
55e6605
Merge branch 'handle-configuration-change-using-onSavedInstance' of h…
vrajdesai78 Nov 6, 2022
69ef676
improved code
vrajdesai78 Nov 6, 2022
bb77a93
Nit changes and added KDoC
vrajdesai78 Nov 7, 2022
b0da173
Added new test to check responseHeader
vrajdesai78 Nov 7, 2022
23b5c69
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 Nov 7, 2022
47d8a44
optimized code
vrajdesai78 Nov 7, 2022
06a0b3d
Nit changes
vrajdesai78 Nov 7, 2022
0529d79
Code optimized
vrajdesai78 Nov 7, 2022
9a2aeca
Merge branch 'handle-configuration-change-using-onSavedInstance' of h…
vrajdesai78 Nov 7, 2022
13a6e18
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 Nov 8, 2022
bb94042
Updated tests and nit changes
vrajdesai78 Nov 8, 2022
5c227fd
Added KDocs
vrajdesai78 Nov 8, 2022
9936736
Merge branch 'handle-configuration-change-using-onSavedInstance' of h…
vrajdesai78 Nov 8, 2022
4be01c4
Nit changes and fixed issue with mathInputInteraction
vrajdesai78 Nov 9, 2022
afc35b6
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 Nov 9, 2022
fd0eb62
Updated comments
vrajdesai78 Nov 9, 2022
6d9e73a
Merge branch 'handle-configuration-change-using-onSavedInstance' of h…
vrajdesai78 Nov 9, 2022
4c1b677
removed extra space
vrajdesai78 Nov 9, 2022
2f8f8b2
Updated computer error
vrajdesai78 Nov 9, 2022
a5a2496
Removed test to check Real time error is disabled
vrajdesai78 Nov 9, 2022
175d1b2
Updated tests
vrajdesai78 Nov 9, 2022
54d6f47
Removed comment
vrajdesai78 Nov 9, 2022
679b30c
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 Nov 9, 2022
78ea425
Re-run CI checks
vrajdesai78 Nov 10, 2022
cca3fb2
Nit changes
vrajdesai78 Nov 10, 2022
d08a7cc
Fixed app crash error
vrajdesai78 Nov 10, 2022
bc0f45d
reverted back changes in tests
vrajdesai78 Nov 10, 2022
412c71c
Updated resetRawUserAnswer
vrajdesai78 Nov 10, 2022
79454cc
Merge to latest develop
vrajdesai78 Nov 10, 2022
ad91869
Fixed nit changes
vrajdesai78 Nov 10, 2022
f5acc86
.replace() used
vrajdesai78 Nov 11, 2022
99e087e
ToDo added
vrajdesai78 Nov 12, 2022
12495d5
added space
vrajdesai78 Nov 12, 2022
55c0d7b
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 Nov 12, 2022
d23e82d
removed math interaction tests
vrajdesai78 Nov 12, 2022
23e99e5
Imports optimized
vrajdesai78 Nov 12, 2022
e235b4b
Merge branch 'handle-configuration-change-using-onSavedInstance' of h…
vrajdesai78 Nov 12, 2022
802e0e1
Removed unnecessary import
vrajdesai78 Nov 12, 2022
9d5df29
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 Nov 12, 2022
d79221e
Added new test fixed submit time error issue
vrajdesai78 Nov 12, 2022
5c353ee
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 Nov 12, 2022
4725a77
Added new tests
vrajdesai78 Nov 13, 2022
cf93543
Merge branch 'handle-configuration-change-using-onSavedInstance' of h…
vrajdesai78 Nov 13, 2022
6b59e1a
Removed unncessary changes
vrajdesai78 Nov 13, 2022
343d46a
Fixed 100 characters limit
vrajdesai78 Nov 13, 2022
6fcffc9
updated test
vrajdesai78 Nov 13, 2022
a360f59
Re-run ci checks
vrajdesai78 Nov 13, 2022
650fdab
Removed animation
vrajdesai78 Nov 13, 2022
444406c
Optimized code
vrajdesai78 Nov 13, 2022
992c479
Reverted back changes for selection interaction
vrajdesai78 Nov 14, 2022
37f59fd
added coordinates param
vrajdesai78 Nov 14, 2022
ab533b6
Updated Kdoc
vrajdesai78 Nov 14, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import android.view.ViewGroup
import org.oppia.android.app.fragment.FragmentComponentImpl
import org.oppia.android.app.fragment.InjectableFragment
import org.oppia.android.app.model.HelpIndex
import org.oppia.android.app.model.RawUserAnswer
import org.oppia.android.app.model.UserAnswer
import org.oppia.android.app.player.state.answerhandling.InteractionAnswerErrorOrAvailabilityCheckReceiver
import org.oppia.android.app.player.state.answerhandling.InteractionAnswerHandler
Expand All @@ -19,7 +20,9 @@ import org.oppia.android.app.player.state.listener.PreviousResponsesHeaderClickL
import org.oppia.android.app.player.state.listener.ReturnToTopicNavigationButtonListener
import org.oppia.android.app.player.state.listener.ShowHintAvailabilityListener
import org.oppia.android.app.player.state.listener.SubmitNavigationButtonListener
import org.oppia.android.util.extensions.getProto
import org.oppia.android.util.extensions.getStringFromBundle
import org.oppia.android.util.extensions.putProto
import javax.inject.Inject

/** Fragment that represents the current state of an exploration. */
Expand Down Expand Up @@ -79,12 +82,17 @@ class StateFragment :
val storyId = arguments!!.getStringFromBundle(STATE_FRAGMENT_STORY_ID_ARGUMENT_KEY)!!
val explorationId =
arguments!!.getStringFromBundle(STATE_FRAGMENT_EXPLORATION_ID_ARGUMENT_KEY)!!
var rawUserAnswer: RawUserAnswer? = null
if (savedInstanceState != null) {
rawUserAnswer = savedInstanceState.getProto("Answer", RawUserAnswer.getDefaultInstance())
}
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
return stateFragmentPresenter.handleCreateView(
inflater,
container,
internalProfileId,
topicId,
storyId,
rawUserAnswer,
explorationId
)
}
Expand Down Expand Up @@ -129,6 +137,11 @@ class StateFragment :
stateFragmentPresenter.revealHint(hintIndex)
}

override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState)
outState.putProto("Answer", stateFragmentPresenter.handleOnSavedInstance())
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
}

fun revealSolution() = stateFragmentPresenter.revealSolution()

fun dismissConceptCard() = stateFragmentPresenter.dismissConceptCard()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.oppia.android.app.player.state

import android.content.Context
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand All @@ -24,6 +25,7 @@ import org.oppia.android.app.model.CheckpointState
import org.oppia.android.app.model.EphemeralState
import org.oppia.android.app.model.HelpIndex
import org.oppia.android.app.model.ProfileId
import org.oppia.android.app.model.RawUserAnswer
import org.oppia.android.app.model.State
import org.oppia.android.app.model.UserAnswer
import org.oppia.android.app.player.audio.AudioButtonListener
Expand All @@ -47,6 +49,8 @@ import org.oppia.android.util.data.DataProvider
import org.oppia.android.util.data.DataProviders.Companion.toLiveData
import org.oppia.android.util.gcsresource.DefaultResourceBucketName
import org.oppia.android.util.parser.html.ExplorationHtmlParserEntityType
import org.oppia.android.util.platformparameter.EnableInteractionConfigChangeStateRetention
import org.oppia.android.util.platformparameter.PlatformParameterValue
import org.oppia.android.util.system.OppiaClock
import javax.inject.Inject

Expand All @@ -71,6 +75,8 @@ class StateFragmentPresenter @Inject constructor(
private val storyProgressController: StoryProgressController,
private val oppiaLogger: OppiaLogger,
@DefaultResourceBucketName private val resourceBucketName: String,
@EnableInteractionConfigChangeStateRetention
private val isConfigChangeStateRetentionEnabled: PlatformParameterValue<Boolean>,
private val assemblerBuilderFactory: StatePlayerRecyclerViewAssembler.Builder.Factory,
private val splitScreenManager: SplitScreenManager,
private val oppiaClock: OppiaClock
Expand Down Expand Up @@ -105,6 +111,7 @@ class StateFragmentPresenter @Inject constructor(
internalProfileId: Int,
topicId: String,
storyId: String,
rawUserAnswer: RawUserAnswer?,
explorationId: String
): View? {
profileId = ProfileId.newBuilder().setInternalId(internalProfileId).build()
Expand Down Expand Up @@ -158,7 +165,7 @@ class StateFragmentPresenter @Inject constructor(
)
}

subscribeToCurrentState()
subscribeToCurrentState(rawUserAnswer)
return binding.root
}

Expand Down Expand Up @@ -278,25 +285,28 @@ class StateFragmentPresenter @Inject constructor(
return getAudioFragment() as? AudioUiManager
}

private fun subscribeToCurrentState() {
private fun subscribeToCurrentState(rawUserAnswer: RawUserAnswer?) {
ephemeralStateLiveData.observe(
fragment,
{ result ->
processEphemeralStateResult(result)
processEphemeralStateResult(result, rawUserAnswer)
}
)
}

private fun processEphemeralStateResult(result: AsyncResult<EphemeralState>) {
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
private fun processEphemeralStateResult(
result: AsyncResult<EphemeralState>,
rawUserAnswer: RawUserAnswer?
) {
when (result) {
is AsyncResult.Failure ->
oppiaLogger.e("StateFragment", "Failed to retrieve ephemeral state", result.error)
is AsyncResult.Pending -> {} // Display nothing until a valid result is available.
is AsyncResult.Success -> processEphemeralState(result.value)
is AsyncResult.Success -> processEphemeralState(result.value, rawUserAnswer)
}
}

private fun processEphemeralState(ephemeralState: EphemeralState) {
private fun processEphemeralState(ephemeralState: EphemeralState, rawUserAnswer: RawUserAnswer?) {
explorationCheckpointState = ephemeralState.checkpointState
val shouldSplit = splitScreenManager.shouldSplitScreen(ephemeralState.state.interaction.id)
if (shouldSplit) {
Expand All @@ -307,6 +317,8 @@ class StateFragmentPresenter @Inject constructor(
viewModel.centerGuidelinePercentage.set(1f)
}

Log.d("testAnswer", "Ephemeral State Called")
BenHenning marked this conversation as resolved.
Show resolved Hide resolved

val isInNewState =
::currentStateName.isInitialized && currentStateName != ephemeralState.state.name

Expand All @@ -318,6 +330,7 @@ class StateFragmentPresenter @Inject constructor(
val dataPair = recyclerViewAssembler.compute(
ephemeralState,
explorationId,
rawUserAnswer,
shouldSplit
)

Expand Down Expand Up @@ -451,6 +464,14 @@ class StateFragmentPresenter @Inject constructor(
/** Returns the checkpoint state for the current exploration. */
fun getExplorationCheckpointState() = explorationCheckpointState

fun handleOnSavedInstance(): RawUserAnswer {
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
return if (isConfigChangeStateRetentionEnabled.value) {
viewModel.getRawUserAnswer(recyclerViewAssembler::getPendingAnswerHandler)
} else {
RawUserAnswer.getDefaultInstance()
}
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
}

private fun markExplorationCompleted() {
storyProgressController.recordCompletedChapter(
profileId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import org.oppia.android.app.model.EphemeralState.StateTypeCase
import org.oppia.android.app.model.HelpIndex
import org.oppia.android.app.model.Interaction
import org.oppia.android.app.model.ProfileId
import org.oppia.android.app.model.RawUserAnswer
import org.oppia.android.app.model.StringList
import org.oppia.android.app.model.SubtitledHtml
import org.oppia.android.app.model.UserAnswer
Expand Down Expand Up @@ -195,6 +196,7 @@ class StatePlayerRecyclerViewAssembler private constructor(
fun compute(
ephemeralState: EphemeralState,
gcsEntityId: String,
rawUserAnswer: RawUserAnswer?,
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
isSplitView: Boolean
): Pair<List<StateItemViewModel>, List<StateItemViewModel>> {
this.isSplitView.set(isSplitView)
Expand Down Expand Up @@ -231,6 +233,7 @@ class StatePlayerRecyclerViewAssembler private constructor(
interaction,
hasPreviousState,
gcsEntityId,
rawUserAnswer,
ephemeralState.writtenTranslationContext
)
}
Expand Down Expand Up @@ -305,12 +308,14 @@ class StatePlayerRecyclerViewAssembler private constructor(
interaction: Interaction,
hasPreviousButton: Boolean,
gcsEntityId: String,
rawUserAnswer: RawUserAnswer?,
writtenTranslationContext: WrittenTranslationContext
) {
val interactionViewModelFactory = interactionViewModelFactoryMap.getValue(interaction.id)
pendingItemList += interactionViewModelFactory.create(
gcsEntityId,
hasConversationView,
rawUserAnswer,
interaction,
fragment as InteractionAnswerReceiver,
fragment as InteractionAnswerErrorOrAvailabilityCheckReceiver,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import androidx.databinding.ObservableField
import androidx.databinding.ObservableList
import androidx.lifecycle.ViewModel
import org.oppia.android.app.fragment.FragmentScope
import org.oppia.android.app.model.RawUserAnswer
import org.oppia.android.app.model.UserAnswer
import org.oppia.android.app.player.state.answerhandling.AnswerErrorCategory
import org.oppia.android.app.player.state.answerhandling.InteractionAnswerHandler
Expand Down Expand Up @@ -56,6 +57,16 @@ class StateViewModel @Inject constructor() : ObservableViewModel() {
) ?: UserAnswer.getDefaultInstance()
}

fun getRawUserAnswer(
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
retrieveAnswerHandler: (List<StateItemViewModel>) -> InteractionAnswerHandler?
): RawUserAnswer {
return getRawUserAnswerWithError(
retrieveAnswerHandler(
getAnswerItemList()
)
) ?: RawUserAnswer.getDefaultInstance()
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
}

private fun getPendingAnswerWithoutError(
answerHandler: InteractionAnswerHandler?
): UserAnswer? {
Expand All @@ -66,6 +77,12 @@ class StateViewModel @Inject constructor() : ObservableViewModel() {
}
}

private fun getRawUserAnswerWithError(
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
answerHandler: InteractionAnswerHandler?
): RawUserAnswer? {
return answerHandler?.getRawUserAnswer()
}

private fun getAnswerItemList(): List<StateItemViewModel> {
return if (isSplitView.get() == true) {
rightItemList
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.oppia.android.app.player.state.answerhandling

import org.oppia.android.app.model.RawUserAnswer
import org.oppia.android.app.model.UserAnswer

/**
Expand All @@ -26,6 +27,11 @@ interface InteractionAnswerHandler {
fun getPendingAnswer(): UserAnswer? {
return null
}

/** Return the last entered answer entered by user. */
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
fun getRawUserAnswer(): RawUserAnswer? {
return null
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package org.oppia.android.app.player.state.itemviewmodel
import androidx.fragment.app.Fragment
import org.oppia.android.app.model.Interaction
import org.oppia.android.app.model.InteractionObject
import org.oppia.android.app.model.RawUserAnswer
import org.oppia.android.app.model.UserAnswer
import org.oppia.android.app.model.WrittenTranslationContext
import org.oppia.android.app.player.state.answerhandling.InteractionAnswerErrorOrAvailabilityCheckReceiver
Expand All @@ -24,6 +25,7 @@ private const val DEFAULT_CONTINUE_INTERACTION_TEXT_ANSWER = "Please continue."
class ContinueInteractionViewModel private constructor(
private val interactionAnswerReceiver: InteractionAnswerReceiver,
val hasConversationView: Boolean,
rawUserAnswer: RawUserAnswer?,
val hasPreviousButton: Boolean,
val previousNavigationButtonListener: PreviousNavigationButtonListener,
val isSplitView: Boolean,
Expand All @@ -41,6 +43,10 @@ class ContinueInteractionViewModel private constructor(
this.writtenTranslationContext = [email protected]
}.build()

override fun getRawUserAnswer(): RawUserAnswer? {
return RawUserAnswer.getDefaultInstance()
}

fun handleButtonClicked() {
interactionAnswerReceiver.onAnswerReadyForSubmission(getPendingAnswer())
}
Expand All @@ -52,6 +58,7 @@ class ContinueInteractionViewModel private constructor(
override fun create(
entityId: String,
hasConversationView: Boolean,
rawUserAnswer: RawUserAnswer?,
interaction: Interaction,
interactionAnswerReceiver: InteractionAnswerReceiver,
answerErrorReceiver: InteractionAnswerErrorOrAvailabilityCheckReceiver,
Expand All @@ -62,6 +69,7 @@ class ContinueInteractionViewModel private constructor(
return ContinueInteractionViewModel(
interactionAnswerReceiver,
hasConversationView,
rawUserAnswer,
hasPreviousButton,
fragment as PreviousNavigationButtonListener,
isSplitView,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import org.oppia.android.app.model.Interaction
import org.oppia.android.app.model.InteractionObject
import org.oppia.android.app.model.ListOfSetsOfHtmlStrings
import org.oppia.android.app.model.ListOfSetsOfTranslatableHtmlContentIds
import org.oppia.android.app.model.RawUserAnswer
import org.oppia.android.app.model.SetOfTranslatableHtmlContentIds
import org.oppia.android.app.model.StringList
import org.oppia.android.app.model.SubtitledHtml
Expand All @@ -27,6 +28,7 @@ import javax.inject.Inject
class DragAndDropSortInteractionViewModel private constructor(
val entityId: String,
val hasConversationView: Boolean,
rawUserAnswer: RawUserAnswer?,
interaction: Interaction,
private val interactionAnswerErrorOrAvailabilityCheckReceiver: InteractionAnswerErrorOrAvailabilityCheckReceiver, // ktlint-disable max-line-length
val isSplitView: Boolean,
Expand Down Expand Up @@ -129,6 +131,10 @@ class DragAndDropSortInteractionViewModel private constructor(
this@DragAndDropSortInteractionViewModel.writtenTranslationContext
}.build()

override fun getRawUserAnswer(): RawUserAnswer {
return RawUserAnswer.getDefaultInstance()
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
}

/** Returns an HTML list containing all of the HTML string elements as items in the list. */
private fun convertItemsToAnswer(htmlItems: List<StringList>): ListOfSetsOfHtmlStrings {
return ListOfSetsOfHtmlStrings.newBuilder()
Expand Down Expand Up @@ -198,6 +204,7 @@ class DragAndDropSortInteractionViewModel private constructor(
override fun create(
entityId: String,
hasConversationView: Boolean,
rawUserAnswer: RawUserAnswer?,
interaction: Interaction,
interactionAnswerReceiver: InteractionAnswerReceiver,
answerErrorReceiver: InteractionAnswerErrorOrAvailabilityCheckReceiver,
Expand All @@ -208,6 +215,7 @@ class DragAndDropSortInteractionViewModel private constructor(
return DragAndDropSortInteractionViewModel(
entityId,
hasConversationView,
rawUserAnswer,
interaction,
answerErrorReceiver,
isSplitView,
Expand Down
Loading