-
Notifications
You must be signed in to change notification settings - Fork 499
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
Fix #3327: Create app layer mechanism for saving checkpoints. #3402
Fix #3327: Create app layer mechanism for saving checkpoints. #3402
Conversation
…/oppia/oppia-android into add-controller-for-checkpointing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the methods whose names can be a bit misleading in questionPlayerActivity
|
||
override fun deleteCurrentProgressAndStopSession() { | ||
// No progress is saved in training sessions. | ||
questionPlayerActivityPresenter.stopTrainingSession() | ||
} | ||
|
||
override fun deleteOldestProgressAndStopSession() { | ||
// This function is not needed because their is no progress that is being saved in training | ||
// sessions. | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These names can be a bit misleading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think my concern here is that the training session experience shouldn't even show the flow that results in progress being deleted (i.e. I'd expect the old dialog to show up & neither of these methods to get called).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user still sees the old dialog box with every thing is exactly the same as it was from the user's viewpoint.
But the code for this has changed since from explorations progress also has to be deleted.
Since all the existing dialog boxes have progress associated with them (saved, unsaved and databaseFull), so should I file a new issue that after milestone 1 the training session should have a new dialog box?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @MaskedCarrot. I had a few concerns left, but otherwise the PR LGTM.
app/src/main/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerActivity.kt
Outdated
Show resolved
Hide resolved
|
||
override fun deleteCurrentProgressAndStopSession() { | ||
// No progress is saved in training sessions. | ||
questionPlayerActivityPresenter.stopTrainingSession() | ||
} | ||
|
||
override fun deleteOldestProgressAndStopSession() { | ||
// This function is not needed because their is no progress that is being saved in training | ||
// sessions. | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think my concern here is that the training session experience shouldn't even show the flow that results in progress being deleted (i.e. I'd expect the old dialog to show up & neither of these methods to get called).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @MaskedCarrot! LGTM for reviewed files.
Given that past tests have passed, I'm fine with enabling auto-merge here since Gradle tests should be sufficient for the latest changes. |
Unassigning @BenHenning since they have already approved the PR. |
Hi @MaskedCarrot, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to merge this PR once the CI checks pass and you're happy with it. Thanks! |
Explanation
Fixes #3327
This PR is stacked on top of PR #3403
Checklist
Testing the changes made in this PR
Checkpointing is disabled by default until a mechanism to resume checkpoints is also implemented. However it can be enabled by changing the value of the variable isCheckpointingEnabled and shouldSavePartialProgresss to true in TopicLessonsFragment.
Since size limit imposed on checkpoint database is set to 2MB, therefore the ProgressDatabaseFull dialog won’t be visible until checkpoint database exceeds 2MB in size So to view the ProgressDatabaseFull dialog box, enable checkpointing and then set the size limit to 0 in ExplorationStorageModule.
Tests
Dialog boxes after this PR
This PR introduces the following three dialog boxes: