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

Fix #4064: Introduce admin controls UI for learner analytics monitoring in user studies #4271

Merged
merged 135 commits into from
May 6, 2022

Conversation

BenHenning
Copy link
Sponsor Member

@BenHenning BenHenning commented Mar 28, 2022

Explanation

Fixes #4064

TODO: Mention this is a rebase of #4262 to remove #2173 & its predecessors.

Essential Checklist

  • The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

For UI-specific PRs only

If your PR includes UI-related changes, then:

  • Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes
  • For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see RTL guide)
  • Add a video showing the full UX flow with a screen reader enabled (see accessibility guide)
  • Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing

Base automatically changed from learner-analytics-pt6-new-events-rebased to develop May 5, 2022 06:48
BenHenning added a commit that referenced this pull request May 5, 2022
## Explanation
Fix part of #4064

This PR integrates the constituent Dagger modules introduced in #4267 broadly in the app so that new logs can be easily added without changing a bunch of files (see #4270).

Some notes on the history of this PR:
- This PR is a rebase of #4258 to remove dependencies on #2173 (which has since been merged into developer) for a much cleaner history.
- This PR is pulling out elements from #4118, #4247, and #4248 which contained completed work by @Sarthak2601.
- This PR introduces new logging that didn't exist in the original PRs (#4118, #4247, and #4248)

This PR broadly adds all of the analytics event described in the TDD above (& its corresponding PRD), needed for an upcoming user study with the app. It *does* enable actual logging if analytics were to be enabled in the Android manifest (even though the UI side isn't implemented yet--that's planned for #4271).

## Essential Checklist
- [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
- [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation.
- [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide).
- [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)).
- [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop".
- [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)).

## For UI-specific PRs only
N/A -- This PR doesn't make UI changes, and existing flows shouldn't be affected.

Commits:

* strings for learner analytics

* platform parameter impl for learner analytics

* nit

* nit

* event action enum update

* addition of contexts

* nit

* controller level logging and contexts

* nit

* nit fixes.

* nit fixes.

* event bundle modifications

* sync status, logging identifiers, profile update, lifecycle owner

* ui impl: part 1 -- basic

* admin control strings

* strings correction

* strings correction

* device id correction

* exhaustive when fix.

* exhaustive when fix.

* todo formatting

* nits.

* nits.

* collapsed contexts, added spacing, added comments

* event action removal + nits

* tests + dev options event logs fixes post event action removal

* nits

* removal of method for event action formatted string

* nits, null context changes.

* nits

* reserved fixes and help index fix

* bazel imports

* bazel build fixes

* test fixes

* nit

* logging identifier controller, module + uuid wrapper, real impl

* logging identifier controller tests, fake uuid, tests

* sync status manager + fake

* logging methods, test setup

* profile management, tests

* sync status update.

* lifecycle observer

* Post-merge fixes + Bazel support.

* Lots of reorganizing & changes.

New tests and documentation have also been added. More broadly, this
changes the device ID computation, but actually breaks it so more work
will be needed in subsequent commits.

* Lint fixes.

* Post-merge fix (proper merge of maven_install).

* Lint fixes (includes post-merge cleanups).

* Lots of stuff.

Restructured a lot of the UI, addressed most failing static checks
(except KDocs and lint which will be in the follow-up commit), added
tests, fixed copying, and generally finished the UI.

Sync status seems broken, and it's not yet clear whether events are
actually being logged (I need to investigate this). Analytics are
disabled in local testing, so that might also be the reason for logs
being stuck in an uploading state.

* Documentation + lint fixes.

This also changes the contract of ClipboardController.

* Finish remaining planned tests.

* Move over changes from learner-analytics-proto.

* Manually pull in changes from 3d6c716.

Note that this is operating on a different base).

* Post-merge fixes.

These at least ensure that the app can build, but many tests will still
fail (which is fine seeing as much of this code is going to be split up
soon, anyway).

Rebase version: app build is no longer guaranteed.

* Lint fixes.

* Undo all learner analytics changes.

I'll be pulling in specific components in specific PRs to organize the
changes across 4 PRs.

Note that I took this approach to preserve the history from the earlier
commits. Those changes will still be included in this PR chain, just a
bit awkwardly (i.e. it'll look like I introduced them originally, but
that distinction is lost during the squash-and-merge, anyway).

* Manually pull in non-app module changes.

A bunch of work is still needed to finish these, and I'm still trying to
figure out whether I can de-couple the module changes to make reviewing
a bit nicer.

* Post-merge fixes.

All tests verified as building & passing.

* Add sync status for no connectivity case.

* Remove unnecessary sync manager.

* Copy over changes from #4263.

These are the domain changes needed for finishing learner analytics
support. Cleanup, documentation, and testing all still need to be
completed.

* Add domain changes for AudioPlayerController.

These originate from #4263.

* Add missing Javadoc from #4263.

* Add module deps for learner analytics components.

This ensures that the new domain components introduced in the previous
branch can be used throughout the app in both production and test
components.

* Post-merge fixes from different branch.

* Remove all UserIdProdModule references.

The module was removed during development in favor of a more integrated
approach to managing the logging-related IDs.

* Post-merge fix.

* Remove references to missing module per #4263.

* Add files changes from manual merges/cherry-picks.

* Add event log callsites.

* Add missing event log from #4263.

This one is for audio voiceover playing.

* Finish tests & documentation.

This also renames 'device ID' to be 'installation ID' for more
correctness.

* Lint fixes.

* Post-merge fixes.

* Lint fixes.

* Remove files incorrectly readded.

* Add follow-up tests to improve coverage.

* Post-merge & lint fixes.

* Implement tests to verify event logging.

These tests only verify event logging at the domain layer, though
technically these events will also be logged from UI-based user
interactions. Tests to verify that's the case will be added in #4271 as
not all aspects of logging are properly hooked up in the UI layer as of
this PR.

* Update domain's Gradle Mockito version to Bazel's.

* Add missing tests & needed behaviors.

Fix broken app test.

* Fix OS-specific issue in ClipboardController.

Co-authored-by: Sarthak Agarwal <agarwal.sarthak262012@gmail.com>
@BenHenning BenHenning changed the title [DO NOT MERGE] Learner analytics pt7 new UI [Blocked: #4270] [DO NOT MERGE] Learner analytics pt7 new UI May 5, 2022
@BenHenning BenHenning changed the title [DO NOT MERGE] Learner analytics pt7 new UI Introduce admin controls UI for learner analytics monitoring in user studies May 6, 2022
@BenHenning BenHenning marked this pull request as ready for review May 6, 2022 08:04
@BenHenning
Copy link
Sponsor Member Author

Note that any additional changes needed in this PR will be covered in #4345 as a fast-follow.

Furthermore, @anandwana001's and @rt4914's reviews are being deferred (#4344 and #4266 are tracking each, respectively). Note that this does result in no approvals, but I've gotten confirmation from @seanlip as another technical representative that this is reasonable given the circumstances of getting these changes in quickly for an upcoming release. I'll make sure this PR does get reviewed post-submission.

@BenHenning BenHenning changed the title Introduce admin controls UI for learner analytics monitoring in user studies Fix #4064: Introduce admin controls UI for learner analytics monitoring in user studies May 6, 2022
@BenHenning BenHenning merged commit 5f195af into develop May 6, 2022
@BenHenning BenHenning deleted the learner-analytics-pt7-new-ui-rebased branch May 6, 2022 08:49
Copy link
Contributor

@anandwana001 anandwana001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@rt4914 rt4914 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add basic learner analytics support
4 participants