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

feat: Ability to shift courses dates if deadlines have been missed #288

Merged
merged 15 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Core/Core/Extensions/DateExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ public extension Date {
case 2...6:
return timeAgoDisplay()
case -1:
return CoreLocalization.CourseDates.tomorrow
return CoreLocalization.tomorrow
case 1:
return CoreLocalization.CourseDates.yesterday
return CoreLocalization.yesterday
default:
if day > 6 || day < -6 {
return dateFormatterString
Expand Down
1 change: 1 addition & 0 deletions Core/Core/Extensions/Notification.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ public extension Notification.Name {
static let onNewVersionAvaliable = Notification.Name("onNewVersionAvaliable")
static let webviewReloadNotification = Notification.Name("webviewReloadNotification")
static let onBlockCompletion = Notification.Name.init("onBlockCompletion")
static let shiftCourseDates = Notification.Name("shiftCourseDates")
}
26 changes: 4 additions & 22 deletions Core/Core/SwiftGen/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ public enum CoreLocalization {
public static let done = CoreLocalization.tr("Localizable", "DONE", fallback: "Done")
/// The user canceled the sign-in flow.
public static let socialSignCanceled = CoreLocalization.tr("Localizable", "SOCIAL_SIGN_CANCELED", fallback: "The user canceled the sign-in flow.")
/// Tomorrow
public static let tomorrow = CoreLocalization.tr("Localizable", "TOMORROW", fallback: "Tomorrow")
/// Yesterday
public static let yesterday = CoreLocalization.tr("Localizable", "YESTERDAY", fallback: "Yesterday")
public enum Alert {
/// ACCEPT
public static let accept = CoreLocalization.tr("Localizable", "ALERT.ACCEPT", fallback: "ACCEPT")
Expand Down Expand Up @@ -60,28 +64,6 @@ public enum CoreLocalization {
/// Section “
public static let section = CoreLocalization.tr("Localizable", "COURSEWARE.SECTION", fallback: "Section “")
}
public enum CourseDates {
/// Completed
public static let completed = CoreLocalization.tr("Localizable", "COURSE_DATES.COMPLETED", fallback: "Completed")
/// Due next
public static let dueNext = CoreLocalization.tr("Localizable", "COURSE_DATES.DUE_NEXT", fallback: "Due next")
/// Item Hidden
public static let itemHidden = CoreLocalization.tr("Localizable", "COURSE_DATES.ITEM_HIDDEN", fallback: "Item Hidden")
/// Items Hidden
public static let itemsHidden = CoreLocalization.tr("Localizable", "COURSE_DATES.ITEMS_HIDDEN", fallback: "Items Hidden")
/// Past due
public static let pastDue = CoreLocalization.tr("Localizable", "COURSE_DATES.PAST_DUE", fallback: "Past due")
/// Today
public static let today = CoreLocalization.tr("Localizable", "COURSE_DATES.TODAY", fallback: "Today")
/// Tomorrow
public static let tomorrow = CoreLocalization.tr("Localizable", "COURSE_DATES.TOMORROW", fallback: "Tomorrow")
/// Unreleased
public static let unreleased = CoreLocalization.tr("Localizable", "COURSE_DATES.UNRELEASED", fallback: "Unreleased")
/// Verified Only
public static let verifiedOnly = CoreLocalization.tr("Localizable", "COURSE_DATES.VERIFIED_ONLY", fallback: "Verified Only")
/// Yesterday
public static let yesterday = CoreLocalization.tr("Localizable", "COURSE_DATES.YESTERDAY", fallback: "Yesterday")
}
public enum Date {
/// Ended
public static let ended = CoreLocalization.tr("Localizable", "DATE.ENDED", fallback: "Ended")
Expand Down
14 changes: 3 additions & 11 deletions Core/Core/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,10 @@
"REVIEW.BUTTON.RATE_US" = "Rate Us";
"REVIEW.EMAIL.TITLE" = "Select email client:";

"COURSE_DATES.TODAY" = "Today";
"COURSE_DATES.COMPLETED" = "Completed";
"COURSE_DATES.PAST_DUE" = "Past due";
"COURSE_DATES.DUE_NEXT" = "Due next";
"COURSE_DATES.UNRELEASED" = "Unreleased";
"COURSE_DATES.VERIFIED_ONLY" = "Verified Only";
"COURSE_DATES.TOMORROW" = "Tomorrow";
"COURSE_DATES.YESTERDAY" = "Yesterday";
"COURSE_DATES.ITEMS_HIDDEN" = "Items Hidden";
"COURSE_DATES.ITEM_HIDDEN" = "Item Hidden";

"SOCIAL_SIGN_CANCELED" = "The user canceled the sign-in flow.";

"SIGN_IN.LOG_IN_BTN" = "Sign in";
"SIGN_IN.REGISTER_BTN" = "Register";

"TOMORROW" = "Tomorrow";
"YESTERDAY" = "Yesterday";
14 changes: 3 additions & 11 deletions Core/Core/uk.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,11 @@
"REVIEW.BUTTON.RATE_US" = "Оцінити нас";
"REVIEW.EMAIL.TITLE" = "Виберіть поштового клієнта:";

"COURSE_DATES.TODAY" = "Today";
"COURSE_DATES.COMPLETED" = "Completed";
"COURSE_DATES.PAST_DUE" = "Past due";
"COURSE_DATES.DUE_NEXT" = "Due next";
"COURSE_DATES.UNRELEASED" = "Unreleased";
"COURSE_DATES.VERIFIED_ONLY" = "Verified Only";
"COURSE_DATES.TOMORROW" = "Tomorrow";
"COURSE_DATES.YESTERDAY" = "Yesterday";
"COURSE_DATES.ITEMS_HIDDEN" = "Items Hidden";
"COURSE_DATES.ITEM_HIDDEN" = "Item Hidden";

"SOCIAL_SIGN_CANCELED" = "The user canceled the sign-in flow.";
"AUTHORIZATION_FAILED" = "Authorization failed.";

"SIGN_IN.LOG_IN_BTN" = "Увійти";
"SIGN_IN.REGISTER_BTN" = "Реєстрація";

"TOMORROW" = "Tomorrow";
"YESTERDAY" = "Yesterday";
40 changes: 27 additions & 13 deletions Course/Course.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,17 @@
197FB8EA8F92F00A8F383D82 /* Pods_App_Course.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5E795BD160CDA7D9C120DE6 /* Pods_App_Course.framework */; };
975F475E2B6151FD00E5B031 /* CourseDatesMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 975F475D2B6151FD00E5B031 /* CourseDatesMock.swift */; };
975F47602B615DA700E5B031 /* CourseStructureMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 975F475F2B615DA700E5B031 /* CourseStructureMock.swift */; };
97CA95252B875EE200A9EDEA /* DatesShiftedSuccessView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CA95242B875EE200A9EDEA /* DatesShiftedSuccessView.swift */; };
97E7DF0F2B7C852A00A2A09B /* DatesStatusInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E7DF0E2B7C852A00A2A09B /* DatesStatusInfoView.swift */; };
B8F50317B6B830A0E520C954 /* Pods_App_Course_CourseTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50E59D2B81E12610964282C5 /* Pods_App_Course_CourseTests.framework */; };
BAD9CA2D2B2736BB00DE790A /* LessonLineProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAD9CA2C2B2736BB00DE790A /* LessonLineProgressView.swift */; };
BA58CF5D2B3D804D005B102E /* CourseStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA58CF5C2B3D804D005B102E /* CourseStorage.swift */; };
BA58CF612B471041005B102E /* VideoDownloadQualityBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA58CF602B471041005B102E /* VideoDownloadQualityBarView.swift */; };
BA58CF642B471363005B102E /* VideoDownloadQualityContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA58CF632B471363005B102E /* VideoDownloadQualityContainerView.swift */; };
BAAD62C82AFD00EE000E6103 /* CourseStructureNestedListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAAD62C72AFD00EE000E6103 /* CourseStructureNestedListView.swift */; };
BAC0E0D82B32EF03006B68A9 /* DownloadsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAC0E0D72B32EF03006B68A9 /* DownloadsView.swift */; };
BAC0E0DB2B32F0AE006B68A9 /* CourseVideoDownloadBarViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAC0E0DA2B32F0AE006B68A9 /* CourseVideoDownloadBarViewModel.swift */; };
BAC0E0DE2B32F0F3006B68A9 /* DownloadsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAC0E0DD2B32F0F3006B68A9 /* DownloadsViewModel.swift */; };
BAD9CA2D2B2736BB00DE790A /* LessonLineProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAD9CA2C2B2736BB00DE790A /* LessonLineProgressView.swift */; };
BAD9CA442B2C87A200DE790A /* CourseStructureView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAD9CA432B2C87A200DE790A /* CourseStructureView.swift */; };
BAD9CA4A2B2C88E000DE790A /* CourseVideoDownloadBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAD9CA492B2C88E000DE790A /* CourseVideoDownloadBarView.swift */; };
DB205BFB2AE81B1200136EC2 /* CourseDateViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB205BFA2AE81B1200136EC2 /* CourseDateViewModelTests.swift */; };
Expand Down Expand Up @@ -169,19 +171,21 @@
831B08139890634968EDD44D /* Pods-App-Course-CourseTests.debugstage.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-Course-CourseTests.debugstage.xcconfig"; path = "Target Support Files/Pods-App-Course-CourseTests/Pods-App-Course-CourseTests.debugstage.xcconfig"; sourceTree = "<group>"; };
975F475D2B6151FD00E5B031 /* CourseDatesMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseDatesMock.swift; sourceTree = "<group>"; };
975F475F2B615DA700E5B031 /* CourseStructureMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseStructureMock.swift; sourceTree = "<group>"; };
97CA95242B875EE200A9EDEA /* DatesShiftedSuccessView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatesShiftedSuccessView.swift; sourceTree = "<group>"; };
97E7DF0E2B7C852A00A2A09B /* DatesStatusInfoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatesStatusInfoView.swift; sourceTree = "<group>"; };
99AEF08FD75F1509863D3302 /* Pods-App-CourseDetails.debugprod.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-CourseDetails.debugprod.xcconfig"; path = "Target Support Files/Pods-App-CourseDetails/Pods-App-CourseDetails.debugprod.xcconfig"; sourceTree = "<group>"; };
9B5D3D31A9CFA08B6C4347BD /* Pods-App-CourseDetails.releasedev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-CourseDetails.releasedev.xcconfig"; path = "Target Support Files/Pods-App-CourseDetails/Pods-App-CourseDetails.releasedev.xcconfig"; sourceTree = "<group>"; };
A47C63D9EB0D866F303D4588 /* Pods-App-Course.releasestage.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-Course.releasestage.xcconfig"; path = "Target Support Files/Pods-App-Course/Pods-App-Course.releasestage.xcconfig"; sourceTree = "<group>"; };
ADC2A1B8183A674705F5F7E2 /* Pods-App-Course.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-Course.debug.xcconfig"; path = "Target Support Files/Pods-App-Course/Pods-App-Course.debug.xcconfig"; sourceTree = "<group>"; };
B196A14555D0E006995A5683 /* Pods-App-CourseDetails.releaseprod.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-CourseDetails.releaseprod.xcconfig"; path = "Target Support Files/Pods-App-CourseDetails/Pods-App-CourseDetails.releaseprod.xcconfig"; sourceTree = "<group>"; };
BAD9CA2C2B2736BB00DE790A /* LessonLineProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LessonLineProgressView.swift; sourceTree = "<group>"; };
BA58CF5C2B3D804D005B102E /* CourseStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseStorage.swift; sourceTree = "<group>"; };
BA58CF602B471041005B102E /* VideoDownloadQualityBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoDownloadQualityBarView.swift; sourceTree = "<group>"; };
BA58CF632B471363005B102E /* VideoDownloadQualityContainerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoDownloadQualityContainerView.swift; sourceTree = "<group>"; };
BAAD62C72AFD00EE000E6103 /* CourseStructureNestedListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseStructureNestedListView.swift; sourceTree = "<group>"; };
BAC0E0D72B32EF03006B68A9 /* DownloadsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DownloadsView.swift; sourceTree = "<group>"; };
BAC0E0DA2B32F0AE006B68A9 /* CourseVideoDownloadBarViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseVideoDownloadBarViewModel.swift; sourceTree = "<group>"; };
BAC0E0DD2B32F0F3006B68A9 /* DownloadsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DownloadsViewModel.swift; sourceTree = "<group>"; };
BAD9CA2C2B2736BB00DE790A /* LessonLineProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LessonLineProgressView.swift; sourceTree = "<group>"; };
BAD9CA432B2C87A200DE790A /* CourseStructureView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseStructureView.swift; sourceTree = "<group>"; };
BAD9CA492B2C88E000DE790A /* CourseVideoDownloadBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseVideoDownloadBarView.swift; sourceTree = "<group>"; };
DB205BFA2AE81B1200136EC2 /* CourseDateViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseDateViewModelTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -284,6 +288,7 @@
02B6B3B828E1D12900232911 /* Data */,
02B6B3B528E1D10700232911 /* Domain */,
02EAE2CA28E1F0A700529644 /* Presentation */,
97CA95212B875EA200A9EDEA /* Views */,
02B6B3B428E1C49400232911 /* Localizable.strings */,
);
path = Course;
Expand Down Expand Up @@ -474,6 +479,23 @@
path = Unit;
sourceTree = "<group>";
};
975F475C2B61517A00E5B031 /* Mock */ = {
isa = PBXGroup;
children = (
975F475D2B6151FD00E5B031 /* CourseDatesMock.swift */,
975F475F2B615DA700E5B031 /* CourseStructureMock.swift */,
);
path = Mock;
sourceTree = "<group>";
};
97CA95212B875EA200A9EDEA /* Views */ = {
isa = PBXGroup;
children = (
97CA95242B875EE200A9EDEA /* DatesShiftedSuccessView.swift */,
);
path = Views;
sourceTree = "<group>";
};
BA58CF622B471047005B102E /* VideoDownloadQualityBarView */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -527,15 +549,6 @@
BA58CF622B471047005B102E /* VideoDownloadQualityBarView */,
);
path = Subviews;
sourceTree = "<group>";
};
975F475C2B61517A00E5B031 /* Mock */ = {
isa = PBXGroup;
children = (
975F475D2B6151FD00E5B031 /* CourseDatesMock.swift */,
975F475F2B615DA700E5B031 /* CourseStructureMock.swift */,
);
path = Mock;
sourceTree = "<group>";
};
D52670044E8768425E23C627 /* Pods */ = {
Expand Down Expand Up @@ -572,6 +585,7 @@
isa = PBXGroup;
children = (
DB7D6EAB2ADFCAC40036BB13 /* CourseDatesView.swift */,
97E7DF0E2B7C852A00A2A09B /* DatesStatusInfoView.swift */,
DB7D6EAD2ADFCB4A0036BB13 /* CourseDatesViewModel.swift */,
);
path = Dates;
Expand Down Expand Up @@ -826,11 +840,11 @@
02F0144F28F46474002E513D /* CourseContainerView.swift in Sources */,
BAAD62C82AFD00EE000E6103 /* CourseStructureNestedListView.swift in Sources */,
02A8076829474831007F53AB /* CourseVerticalView.swift in Sources */,
97E7DF0F2B7C852A00A2A09B /* DatesStatusInfoView.swift in Sources */,
0231124D28EDA804002588FB /* CourseUnitView.swift in Sources */,
027020FC28E7362100F54332 /* Data_CourseOutlineResponse.swift in Sources */,
DB7D6EB02ADFDA0E0036BB13 /* CourseDates.swift in Sources */,
BAD9CA2D2B2736BB00DE790A /* LessonLineProgressView.swift in Sources */,
02E685C028E4B629000AE015 /* CourseDetailsViewModel.swift in Sources */,
060E8BCA2B5FD68C0080C952 /* UnitStack.swift in Sources */,
0295C889299BBE8200ABE571 /* CourseNavigationView.swift in Sources */,
06FD7EDF2B1F29F3008D632B /* CourseVerticalImageView.swift in Sources */,
Expand All @@ -846,8 +860,8 @@
022C64D829ACEC48000F532B /* HandoutsView.swift in Sources */,
02454CA82A2619890043052A /* DiscussionView.swift in Sources */,
0265B4B728E2141D00E6EAFD /* Strings.swift in Sources */,
02B6B3C128E1DBA100232911 /* Data_CourseDetailsResponse.swift in Sources */,
BAC0E0D82B32EF03006B68A9 /* DownloadsView.swift in Sources */,
97CA95252B875EE200A9EDEA /* DatesShiftedSuccessView.swift in Sources */,
DB7D6EAC2ADFCAC50036BB13 /* CourseDatesView.swift in Sources */,
0766DFCC299AA7A600EBEF6A /* YouTubeVideoPlayer.swift in Sources */,
022F8E162A1DFBC6008EFAB9 /* YouTubeVideoPlayerViewModel.swift in Sources */,
Expand Down
Loading
Loading