Examer Tests View Model
class ExamerTestsViewModel( authenticationService: AuthenticationService, repository: Repository, testDetailsListType: TestDetailsListType) : ViewModel, TestsViewModel
Content copied to clipboard
A viewModel that can be used to in conjunction with a screen used to display a list of TestDetails items.
Parameters
authentication Service
the authentication service to be used.
repository
a reference to the repository that the viewModel will use to fetch the data.
test Details List Type
the type of TestDetailsListType that the viewModel would be responsible for. For example, if the viewModel is passed TestDetailsListType.SCHEDULED_TESTS all operations within the viewModel will be performed with respect to scheduled tests.
Constructors
Link copied to clipboard
fun ExamerTestsViewModel( authenticationService: AuthenticationService, repository: Repository, testDetailsListType: TestDetailsListType)
Content copied to clipboard
Functions
Link copied to clipboard
Link copied to clipboard
open override fun fetchWorkBookListForTestDetails( testDetails: TestDetails, onSuccess: (List<WorkBook>) -> Unit, onFailure: (Throwable) -> Unit?)
Content copied to clipboard
Used to fetch a list of workbooks for the specified test.
Link copied to clipboard
Used to mark the specified test as missed.
Link copied to clipboard
Used to refresh testDetailsList.
Link copied to clipboard
Properties
Link copied to clipboard
A state property that is holds a list of TestDetails.
Link copied to clipboard
A state property that holds that hold the current TestsViewModelUiState.