-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: Sync Course Dates to Calendar #228
Conversation
course/src/main/java/org/openedx/course/presentation/calendarsync/CalendarUtils.kt
Outdated
Show resolved
Hide resolved
course/src/main/java/org/openedx/course/presentation/calendarsync/CalendarUtils.kt
Outdated
Show resolved
Hide resolved
@HamzaIsrar12 It would be better to update the pop-up messages for the following 2 cases:
Case: Add Calendar You can edit or remove your course dates at any time from your calendar or settings. CTAs: Cancel | Add Case: Remove Calendar Additional info: |
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.
Cases are working fine as expected but some code improvements can be made.
app/src/main/java/org/openedx/app/data/storage/PreferencesManager.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/openedx/app/data/storage/PreferencesManager.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/org/openedx/core/system/notifier/CourseCalenderSyncEvent.kt
Outdated
Show resolved
Hide resolved
...main/java/org/openedx/course/presentation/calendarsync/CourseContainerCalendarSyncUIState.kt
Outdated
Show resolved
Hide resolved
course/src/main/java/org/openedx/course/presentation/calendarsync/DialogProperties.kt
Outdated
Show resolved
Hide resolved
course/src/main/java/org/openedx/course/presentation/container/CourseContainerFragment.kt
Outdated
Show resolved
Hide resolved
course/src/main/java/org/openedx/course/presentation/container/CourseContainerFragment.kt
Outdated
Show resolved
Hide resolved
...main/java/org/openedx/course/presentation/calendarsync/CourseContainerCalendarSyncUIState.kt
Outdated
Show resolved
Hide resolved
@HamzaIsrar12, Could you please provide documentation on configuring the CourseEnrollments "config" on the LMS? |
Hamza is out sick today. @omerhabib26 or @farhan-arshad-dev can either one of you help here? |
Waffle flags/config on LMS Django Admin:
|
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.
Some minor nits
core/src/main/java/org/openedx/core/data/model/CalendarSyncConfig.kt
Outdated
Show resolved
Hide resolved
course/src/main/java/org/openedx/course/presentation/calendarsync/CalendarSyncDialog.kt
Outdated
Show resolved
Hide resolved
course/src/main/java/org/openedx/course/presentation/calendarsync/CalendarSyncDialog.kt
Outdated
Show resolved
Hide resolved
course/src/main/java/org/openedx/course/presentation/calendarsync/CalendarManager.kt
Outdated
Show resolved
Hide resolved
course/src/main/java/org/openedx/course/presentation/calendarsync/CalendarManager.kt
Outdated
Show resolved
Hide resolved
if (calendarSyncUIState.isCalendarSyncEnabled) { | ||
item { | ||
CalendarSyncCard( | ||
modifier = Modifier.padding(bottom = 16.dp), |
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.
still pending
course/src/main/java/org/openedx/course/presentation/dates/CourseDatesFragment.kt
Outdated
Show resolved
Hide resolved
course/src/main/java/org/openedx/course/presentation/container/CourseContainerViewModel.kt
Outdated
Show resolved
Hide resolved
course/src/main/java/org/openedx/course/presentation/container/CourseContainerViewModel.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/org/openedx/core/data/model/CourseEnrollments.kt
Outdated
Show resolved
Hide resolved
course/src/main/java/org/openedx/course/presentation/calendarsync/CalendarManager.kt
Outdated
Show resolved
Hide resolved
course/src/main/java/org/openedx/course/presentation/calendarsync/CalendarManager.kt
Outdated
Show resolved
Hide resolved
course/src/main/java/org/openedx/course/presentation/calendarsync/CalendarManager.kt
Outdated
Show resolved
Hide resolved
948a47a
to
efa1c5e
Compare
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.
LGTM 👍
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.
just one question about commented code
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.
LGTM
Calendar Sync Integration: - Integrated "Sync to Calendar" switch on Course Dates tab. - Dynamically show/hide switch based on Remote config. - Added user permission prompt for calendar access. - Added confirmation alert for initial course additions. - Included course dates as events in the local app calendar. - Added AlertDialog Loader for event creation/update. - Implemented Calendar preference for streamlined alert management. - Added user prompt for updating or removing the calendar. - Added a prompt for out-of-sync calendar situations. - Update calendar events on 'Shift Due Dates' CTA. Remote Config for Calendar Feature: - Retrieve remote config from LMS within the enrollments API. Store the configuration in CorePreferences, ensuring it is updated with each enrollments API call. - The CalendarSync Config now manages specific values pertinent to the Calendar Sync integration on both the Course Home and Dates tab. Fixes: LEARNER-9801
dcc8d5e
efa1c5e
to
dcc8d5e
Compare
Description
Learner-9801 | Issue-105
Calendar Sync Integration
Sync to Calendar
switch on the Course Dates tab.Remote Config for Calendar Feature
Retrieve the remote config from Django Admin within the
enrollments
API. Store the configuration in CorePreferences, ensuring it is updated with each enrollment API call.The CalendarSync Config now manages specific values pertinent to the Calendar Sync integration on both the Course Home and Dates tab.
Waffle flags/config on LMS Django Admin:
mobile_api_admin
.Note
The backend team is working to fix some issues with Remote Config, in the meanwhile please enable the feature locally by passing default values to data model AppConfig.
Screenshots
Demo
Calendar.Sync.webm