ExamerRepository

class ExamerRepository(    context: Context,     remoteDatabase: RemoteDatabase,     updateProfileUriDelegate: UpdateProfileUriDelegate) : Repository

A concrete implementation of Repository.

Constructors

Link copied to clipboard
fun ExamerRepository(    context: Context,     remoteDatabase: RemoteDatabase,     updateProfileUriDelegate: UpdateProfileUriDelegate)

Functions

Link copied to clipboard
open suspend override fun fetchActiveTestListForUser(user: ExamerUser): List<TestDetails>

Used to fetch a list of active tests for the specified user. An active test is any instance of TestDetails with TestDetails.testStatus set to Status.OPEN or Status.SCHEDULED. The returned list will contain both, tests which are open and tests which are scheduled.

Link copied to clipboard
open suspend override fun fetchPreviousTestListForUser(user: ExamerUser): List<TestDetails>

Used to fetch a list of previous tests for the specified user.

Link copied to clipboard
open suspend override fun fetchTestResults(user: ExamerUser, testDetailsId: String): TestResult

Used to fetch the TestResult of a single test with the specified testDetailsId for a specific user.

Link copied to clipboard
open suspend override fun fetchWorkBookList(user: ExamerUser, testDetails: TestDetails): Result<List<WorkBook>>

Used to fetch a list of WorkBooks associated with a specific TestDetails object, for the specified user. An instance of Result containing the list is returned.

Link copied to clipboard
open suspend override fun markTestAsCompleted(user: ExamerUser, testDetailId: String)

Used to mark a test with the associated testDetailId as complete.

Link copied to clipboard
open suspend override fun markTestAsMissed(user: ExamerUser, testDetailId: String)

Used to mark a test with the associated testDetailId as missed.

Link copied to clipboard
open suspend override fun saveProfilePictureForUser(user: ExamerUser, bitmap: Bitmap)

Used to the save the profile picture (represented as a Bitmap) for the specified user.

Link copied to clipboard
open suspend override fun saveUserAnswersForUser(    user: ExamerUser,     userAnswers: UserAnswers,     testDetailId: String)

Used to save the userAnswers associated with a particular test, with the specified testDetailId, for the specified user.