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: fix parsing of auditAccessExpires for primary course #19

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 3 additions & 3 deletions Core/Core/Data/Model/Data_PrimaryEnrollment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public extension DataLayer {

// MARK: - Primary
struct ActiveEnrollment: Codable {
public let auditAccessExpires: Date?
public let auditAccessExpires: String?
public let created: String?
public let mode: String?
public let isActive: Bool?
Expand All @@ -53,7 +53,7 @@ public extension DataLayer {
}

public init(
auditAccessExpires: Date?,
auditAccessExpires: String?,
created: String?,
mode: String?,
isActive: Bool?,
Expand Down Expand Up @@ -214,7 +214,7 @@ public extension DataLayer.PrimaryEnrollment {
progressPossible: primary.progress?.totalAssignmentsCount ?? 0,
lastVisitedBlockID: primary.courseStatus?.lastVisitedBlockID,
resumeTitle: primary.courseStatus?.lastVisitedUnitDisplayName,
auditAccessExpires: primary.auditAccessExpires,
auditAccessExpires: primary.auditAccessExpires.flatMap { Date(iso8601: $0) },
startDisplay: primary.course?.startDisplay.flatMap { Date(iso8601: $0) },
startType: DisplayStartType(value: primary.course?.startType.rawValue)
)
Expand Down
Loading