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

[Feature Request]: Introduce support for multiple classrooms (GSoC'24 4.2) #5344

Open
BenHenning opened this issue Feb 17, 2024 · 3 comments
Assignees
Labels
enhancement End user-perceivable enhancements.

Comments

@BenHenning
Copy link
Sponsor Member

BenHenning commented Feb 17, 2024

Is your feature request related to a problem? Please describe.

The app is currently limited to only showing basic numeracy lessons, and the broader team plans to introduce lessons of other types (such as financial literacy, science, and more).

Describe the solution you'd like

Suggested Milestones

  • Milestone 1: Introduce new UIs for classroom selection.
    • Deliverable 1: Introduce new feature flag for the multiple classrooms feature.
    • Deliverable 2: Update the model & domain layer to support the definition of classrooms, and specify a classroom per-topic.
    • Deliverable 3: Introduce a ClassroomController.
    • Deliverable 4: Introduce a new activity & related fragments/views/tests for a new classroom selection landing page (recommendations section should be faked out for now).
    • Deliverable 5: Update 'recently played' topic cards to include classroom information.
  • Milestone 2:
    • Deliverable 1: Update the asset download script (#4885) to support classrooms.
    • Deliverable 2: Implement new recommendations logic & UI support for the classroom selection
    • Deliverable 3: Gated by the feature flag, hook up the new classroom selection page to replace the existing home activity upon profile login.
    • Deliverable 4: Ensure the existing event logs are captured in the new screen and related tests in preparation for removal.
    • Deliverable 5: Test, iterate, and work with the tech lead to finalize and launch the feature.
    • Deliverable 6: Audit home activity/fragment & recommendation tests to ensure the new utilities cover the same behaviors. Remove the old home activity/fragment.
Technical hints / guidance

Top-level components needed for supporting multiple classrooms in the app

  • ClassroomListActivity.kt + presenter & layout: Top-level activity that has a row of available classrooms which is displayed as a carousel to facilitate addition of future classrooms.
    • The list of topics will be filtered based on the selected classroom.
    • The classrooms carousel shoud be sticky at the top when the topic list is scrolled.
    • When the home screen is resumed, the last classroom selection will be retained.
  • ClassroomListFragment.kt + presenter & layout: Top-level fragment for the available classrooms. The classrooms are displayed in a carousel(custom view as per existing patterns, see the "last played stories" carousel).
  • ClassroomController.kt: The new controller for providing classroom context and state.
  • TopicListController.kt: Existing controller that will be updated to no longer surface getTopicList since this is now implemented in ClassroomController. Existing use cases and tests will need to be migrated over to ClassroomController. For the home screen, suggest defaulting to the "math" classroom so that existing functionality is maintained.
  • FeatureFlagConstants.kt: Where the new feature flag for enabling multiple classrooms will be defined.
  • ProfileChooserFragmentPresenter.kt: Updated to navigate the user to ClassroomListActivity.kt instead of HomeActivity when the new feature flag is enabled.
  • Much of the classes under app/src/main/java/org/oppia/android/app/home: These will need to be moved to a new classroom package and generalized such that they can be used by both the home activity/fragment and new classroom views.
  • The rest of the classes under home/ (including HomeFragment & HomeActivity): These will be deleted at the end of the project in favor of the new structure. The home package will actually be completely removed.

Some key technical notes

  • All new components require new corresponding test files. All updated components will need their tests updated based on the changes to those components. Presenters and view models are typically exempted from testing, and are exempted from test file presence check via script/assets/test_file_exemptions.textproto.
  • All references to HomeActivity/Fragment will need to be updated throughout the codebase. This may require documentation and/or test updates.
  • Existing layout files will need to be updated, as needed, to support the different card tile changes.
  • The new activities & fragments aren't explicitly spec'd out since they are mostly boilerplate. Existing classes should be analyzed for a reference on spec'ing these out in the proposal.
  • New test textproto files should be added to demonstrate multiple classrooms in the base developer version of the app.
  • Existing exploration-related event logs should be updated to contain classroomId

Suggested files to add/change

ClassroomController.kt:

class ClassroomController {
  fun getClassroomList(profileId: ProfileId): DataProvider<List<ClassroomSummary>>
  fun getTopicList(profileId: ProfileId, classroomId: String): DataProvider<TopicList>
}

TODO: Others will be added soon.

Describe alternatives you've considered

No response

Additional context

This is the high-level tracking issue corresponding to https://github.com/oppia/oppia/wiki/Google-Summer-of-Code-2024#42-multiple-classrooms-support.

@BenHenning BenHenning added enhancement End user-perceivable enhancements. triage needed labels Feb 17, 2024
@oppia oppia locked and limited conversation to collaborators Feb 17, 2024
@BenHenning
Copy link
Sponsor Member Author

NB: This issue is locked to ensure that it only contains updates for requirements. If you have questions regarding this project, please use its corresponding discussion category: https://github.com/oppia/oppia-android/discussions/categories/gsoc-q-a-4-2-multiple-classrooms-support.

@BenHenning
Copy link
Sponsor Member Author

NB: The main issue comment has been updated to include the technical details directly rather than a link to a Gist (so that we can easily change this if needed). Please note that there are some small changes to the requirements to better align with the PRD for the feature (as some key UX confusions were cleared up that influenced the original technical design).

@theMr17
Copy link
Collaborator

theMr17 commented May 18, 2024

Milestone 1

⬜ PR 1.1

Introduce a new feature flag for the multiple classrooms feature.

Starting Date Creation Date Merge Date
27-05-2024 27-05-2024 28-05-2024
Tasks Due Dates
Introduce feature flag in FeatureFlagConstants.kt file. 27-05-2024
Add dagger providers for the new feature flag. 27-05-2024

⬜ PR 1.2

Update the model & domain layer to support the definition of classrooms, and specify a classroom per-topic.

Starting Date Creation Date Merge Date
28-05-2024 31-05-2024 03-06-2024
Tasks Due Dates
Add ClassroomSummary & ClassroomIdList objects to topic.proto file. 29-05-2024
Update topic related objects to include classroomId & classroomTitle fields. 30-05-2024
Create test data json & textproto files for classrooms. 31-05-2024

⬜ PR 1.3

Introduce ClassroomController and modify TopicListController & ProfileManagmentController.

Starting Date Creation Date Merge Date
04-06-2024 10-06-2024 14-06-2024
Tasks Due Dates
Introduce ClassroomController to surface getClassroomList function. 04-06-2024
Add tests for getClassroomList function. 05-06-2024
Migrate getTopicList from TopicListController to ClassroomController. 07-06-2024
Migrate tests for getTopicList function. 08-06-2024
Modify ProfileManagementController to track last selected classroom. 09-06-2024
Add tests for new functions in ProfileManagementController. 10-06-2024

⬜ PR 1.4

Introduce a new activity & related fragments/views/tests for a new classroom list page.

Starting Date Creation Date Merge Date
11-06-2024 21-06-2024 25-06-2024
Tasks Due Dates
Create ClassroomListActivity, ClassroomListFragment & ClassroomListViewModel. 12-06-2024
Gate the new ClassroomListActivity. 13-06-2024
Add tests to verify the gating. 14-06-2024
Introduce Jetpack Compose Dependencies. 16-06-2024
Implement the Sticky Header and other elements of the ComposeView. 17-06-2024
Implement the Topic List UI. 19-06-2024
Add tests for the Sticky Header and other elements of the ComposeView. 20-06-2024
Add tests for the Topic List UI. 21-06-2024

Milestone 2

⬜ PR 2.1

Update 'recently played' topic cards to include classroom information and update tests.

Starting Date Creation Date Merge Date
08-07-2024 11-07-2024 15-07-2024
Tasks Due Dates
Update topic cards UI. 09-07-2024
Update tests for the UI changes. 11-07-2024

⬜ PR 2.2

Implement new recommendations logic & UI support for the classroom selection and add tests.

Starting Date Creation Date Merge Date
13-07-2024 18-07-2024 20-07-2024
Tasks Due Dates
Update the recommendation logic to include classroom information. 16-07-2024
Update tests for the logic changes. 18-07-2024

⬜ PR 2.3

Ensure the existing event logs are captured in the new screen and related tests in preparation for removal & implement new event log.

Starting Date Creation Date Merge Date
21-07-2024 25-07-2024 28-07-2024
Tasks Due Dates
Ensure that the existing event logs are captured in the new screen. 21-07-2024
Add classroomId field in ExplorationContext object and update related tests. 22-07-2024
Implement logging of start_exploration event. 23-07-2024
Add tests to verify the behaviour of the new event. 25-07-2024

⬜ Task 2.4

Test, iterate, and work with the tech lead to finalize and launch the feature.

Starting Date Completion Date
29-07-2024 04-08-2024

⬜ PR 2.5

Audit home activity/fragment & recommendation tests to ensure the new utilities cover the same behaviors. Remove the old home activity/fragment.

Starting Date Creation Date Merge Date
02-08-2024 06-08-2024 09-08-2024
Tasks Due Dates
Verify that the new utilities cover the same behaviour. 04-08-2024
Enable the ENABLE_MULTIPLE_CLASSROOMS feature flag. 06-07-2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement End user-perceivable enhancements.
Development

No branches or pull requests

4 participants