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: course dates #137

Merged
merged 11 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
14 changes: 12 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/*
xcuserdata/
*.xcuserdata/*
/OpenEdX.xcodeproj/xcuserdata/
/OpenEdX.xcworkspace/xcuserdata/
/OpenEdX.xcworkspace/xcshareddata/swiftpm/Package.resolved
Expand All @@ -25,6 +26,15 @@ DerivedData/
*.perspectivev3
!default.perspectivev3

*.xcodeproj/*
**/xcuserdata/
**/*.xcuserdata/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcodeproj/project.xcworkspace/
!*.xcworkspace/contents.xcworkspacedata
**/xcshareddata/WorkspaceSettings.xcsettings

## Obj-C/Swift specific
*.hmap

Expand Down Expand Up @@ -100,4 +110,4 @@ iOSInjectionProject/
xcode-frameworks

vendor/
.bundle/
.bundle/
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"pins" : [
{
"identity" : "youtubeplayerkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SvenTiigi/YouTubePlayerKit",
"state" : {
"revision" : "1fe4c8b07a61d50c2fd276e1d9c8087583c7638a",
"version" : "1.5.3"
}
}
],
"version" : 2
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"pins" : [
{
"identity" : "youtubeplayerkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SvenTiigi/YouTubePlayerKit",
"state" : {
"revision" : "1fe4c8b07a61d50c2fd276e1d9c8087583c7638a",
"version" : "1.5.3"
}
}
],
"version" : 2
}
5 changes: 5 additions & 0 deletions Core/Core/Extensions/DateExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public enum DateStringStyle {
case monthYear
case lastPost
case iso8601
case shortWeekdayMonthDayYear
}

public extension Date {
Expand Down Expand Up @@ -102,6 +103,8 @@ public extension Date {
dateFormatter.dateFormat = CoreLocalization.DateFormat.mmmDdYyyy
case .iso8601:
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"
case .shortWeekdayMonthDayYear:
dateFormatter.dateFormat = "EEE, MMM d, yyyy"
}

let date = dateFormatter.string(from: self)
Expand Down Expand Up @@ -130,6 +133,8 @@ public extension Date {
}
case .iso8601:
return date
case .shortWeekdayMonthDayYear:
return date
}
}
}
14 changes: 14 additions & 0 deletions Core/Core/SwiftGen/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,20 @@ 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")
/// 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")
/// 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")
}
public enum Date {
/// Ended
public static let ended = CoreLocalization.tr("Localizable", "DATE.ENDED", fallback: "Ended")
Expand Down
7 changes: 7 additions & 0 deletions Core/Core/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,10 @@

"WEBVIEW.ALERT.OK" = "Ok";
"WEBVIEW.ALERT.CANCEL" = "Cancel";

"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";
7 changes: 7 additions & 0 deletions Core/Core/uk.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,10 @@

"WEBVIEW.ALERT.OK" = "Так";
"WEBVIEW.ALERT.CANCEL" = "Скасувати";

"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";
28 changes: 28 additions & 0 deletions Course/Course.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
0766DFD0299AB29000EBEF6A /* PlayerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0766DFCF299AB29000EBEF6A /* PlayerViewController.swift */; };
197FB8EA8F92F00A8F383D82 /* Pods_App_Course.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5E795BD160CDA7D9C120DE6 /* Pods_App_Course.framework */; };
B8F50317B6B830A0E520C954 /* Pods_App_Course_CourseTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50E59D2B81E12610964282C5 /* Pods_App_Course_CourseTests.framework */; };
DB205BFB2AE81B1200136EC2 /* CourseDateViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB205BFA2AE81B1200136EC2 /* CourseDateViewModelTests.swift */; };
DB7D6EAC2ADFCAC50036BB13 /* CourseDatesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB7D6EAB2ADFCAC40036BB13 /* CourseDatesView.swift */; };
DB7D6EAE2ADFCB4A0036BB13 /* CourseDatesViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB7D6EAD2ADFCB4A0036BB13 /* CourseDatesViewModel.swift */; };
DB7D6EB02ADFDA0E0036BB13 /* CourseDates.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB7D6EAF2ADFDA0E0036BB13 /* CourseDates.swift */; };
DB7D6EB22ADFE9510036BB13 /* Data_CourseDates.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB7D6EB12ADFE9510036BB13 /* Data_CourseDates.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -150,6 +155,11 @@
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>"; };
DB205BFA2AE81B1200136EC2 /* CourseDateViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseDateViewModelTests.swift; sourceTree = "<group>"; };
DB7D6EAB2ADFCAC40036BB13 /* CourseDatesView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CourseDatesView.swift; sourceTree = "<group>"; };
DB7D6EAD2ADFCB4A0036BB13 /* CourseDatesViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseDatesViewModel.swift; sourceTree = "<group>"; };
DB7D6EAF2ADFDA0E0036BB13 /* CourseDates.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseDates.swift; sourceTree = "<group>"; };
DB7D6EB12ADFE9510036BB13 /* Data_CourseDates.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Data_CourseDates.swift; sourceTree = "<group>"; };
DBE05972CB5115D4535C6B8A /* Pods-App-Course-CourseTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-Course-CourseTests.debug.xcconfig"; path = "Target Support Files/Pods-App-Course-CourseTests/Pods-App-Course-CourseTests.debug.xcconfig"; sourceTree = "<group>"; };
E5E795BD160CDA7D9C120DE6 /* Pods_App_Course.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App_Course.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E6BDAE887ED8A46860B3F6D3 /* Pods-App-Course-CourseTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-Course-CourseTests.release.xcconfig"; path = "Target Support Files/Pods-App-Course-CourseTests/Pods-App-Course-CourseTests.release.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -291,6 +301,7 @@
027020FB28E7362100F54332 /* Data_CourseOutlineResponse.swift */,
022C64DB29ACFDEE000F532B /* Data_HandoutsResponse.swift */,
022C64DF29ADEA9B000F532B /* Data_UpdatesResponse.swift */,
DB7D6EB12ADFE9510036BB13 /* Data_CourseDates.swift */,
);
path = Model;
sourceTree = "<group>";
Expand Down Expand Up @@ -319,6 +330,7 @@
02EAE2CA28E1F0A700529644 /* Presentation */ = {
isa = PBXGroup;
children = (
DB7D6EAA2ADFCAA00036BB13 /* Dates */,
070019A828F6F33600D5FC78 /* Container */,
070019A628F6F2CB00D5FC78 /* Details */,
070019A728F6F2D600D5FC78 /* Outline */,
Expand All @@ -337,6 +349,7 @@
02B6B3C228E1DCD100232911 /* CourseDetails.swift */,
0276D75C29DDA3F80004CDF8 /* ResumeBlock.swift */,
022C64E129ADEB83000F532B /* CourseUpdate.swift */,
DB7D6EAF2ADFDA0E0036BB13 /* CourseDates.swift */,
);
path = Model;
sourceTree = "<group>";
Expand Down Expand Up @@ -428,6 +441,7 @@
children = (
0262148E29AE17C4008BD75A /* HandoutsViewModelTests.swift */,
0295B1D8297E6DF8003B0C65 /* CourseUnitViewModelTests.swift */,
DB205BFA2AE81B1200136EC2 /* CourseDateViewModelTests.swift */,
);
path = Unit;
sourceTree = "<group>";
Expand Down Expand Up @@ -462,6 +476,15 @@
path = ../Pods;
sourceTree = "<group>";
};
DB7D6EAA2ADFCAA00036BB13 /* Dates */ = {
isa = PBXGroup;
children = (
DB7D6EAB2ADFCAC40036BB13 /* CourseDatesView.swift */,
DB7D6EAD2ADFCB4A0036BB13 /* CourseDatesViewModel.swift */,
);
path = Dates;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
Expand Down Expand Up @@ -664,6 +687,7 @@
02F78AEB29E6BCA20038DE30 /* VideoPlayerViewModelTests.swift in Sources */,
023812E7297AC8EB0087098F /* CourseDetailsViewModelTests.swift in Sources */,
023812F3297AC9ED0087098F /* CourseMock.generated.swift in Sources */,
DB205BFB2AE81B1200136EC2 /* CourseDateViewModelTests.swift in Sources */,
022EA8CB297AD63B0014A8F7 /* CourseContainerViewModelTests.swift in Sources */,
0262148F29AE17C4008BD75A /* HandoutsViewModelTests.swift in Sources */,
);
Expand All @@ -685,6 +709,7 @@
02B6B3BC28E1D14F00232911 /* CourseRepository.swift in Sources */,
02280F60294B50030032823A /* CoursePersistenceProtocol.swift in Sources */,
02454CAA2A2619B40043052A /* LessonProgressView.swift in Sources */,
DB7D6EB22ADFE9510036BB13 /* Data_CourseDates.swift in Sources */,
02280F5E294B4FDA0032823A /* CourseCoreModel.xcdatamodeld in Sources */,
0766DFCE299AB26D00EBEF6A /* EncodedVideoPlayer.swift in Sources */,
0276D75B29DDA3890004CDF8 /* Data_ResumeBlock.swift in Sources */,
Expand All @@ -700,8 +725,10 @@
02A8076829474831007F53AB /* CourseVerticalView.swift in Sources */,
0231124D28EDA804002588FB /* CourseUnitView.swift in Sources */,
027020FC28E7362100F54332 /* Data_CourseOutlineResponse.swift in Sources */,
DB7D6EB02ADFDA0E0036BB13 /* CourseDates.swift in Sources */,
02E685C028E4B629000AE015 /* CourseDetailsViewModel.swift in Sources */,
0295C889299BBE8200ABE571 /* CourseNavigationView.swift in Sources */,
DB7D6EAE2ADFCB4A0036BB13 /* CourseDatesViewModel.swift in Sources */,
02F066E829DC71750073E13B /* SubtittlesView.swift in Sources */,
022C64E229ADEB83000F532B /* CourseUpdate.swift in Sources */,
02454CA62A26196C0043052A /* UnknownView.swift in Sources */,
Expand All @@ -711,6 +738,7 @@
02454CA82A2619890043052A /* DiscussionView.swift in Sources */,
0265B4B728E2141D00E6EAFD /* Strings.swift in Sources */,
02B6B3C128E1DBA100232911 /* Data_CourseDetailsResponse.swift in Sources */,
DB7D6EAC2ADFCAC50036BB13 /* CourseDatesView.swift in Sources */,
0766DFCC299AA7A600EBEF6A /* YouTubeVideoPlayer.swift in Sources */,
022F8E162A1DFBC6008EFAB9 /* YouTubeVideoPlayerViewModel.swift in Sources */,
02E685BE28E4B60A000AE015 /* CourseDetailsView.swift in Sources */,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Loading