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

Peer review new model version #1026

Merged
merged 1 commit into from
Aug 5, 2021
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
4 changes: 3 additions & 1 deletion Stepic.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2274,6 +2274,7 @@
2C09313321CCFE47002B605D /* Model_course_lesson_fields_v31.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model_course_lesson_fields_v31.xcdatamodel; sourceTree = "<group>"; };
2C09313421CD4BDD002B605D /* VideoStoredFileManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoStoredFileManager.swift; sourceTree = "<group>"; };
2C09313621D00B8D002B605D /* VideoDownloadingService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoDownloadingService.swift; sourceTree = "<group>"; };
2C093E0B26BBE4C700E4D575 /* Model_peer_review_step_session_v86.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model_peer_review_step_session_v86.xcdatamodel; sourceTree = "<group>"; };
2C096582236C555D005B771A /* NSAttributedString+TrimmingCharacters.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSAttributedString+TrimmingCharacters.swift"; sourceTree = "<group>"; };
2C0A109C268B1412001D4023 /* Date+Region.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Date+Region.swift"; sourceTree = "<group>"; };
2C0A109E268B1949001D4023 /* Model_course_benefit_by_month_v83.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model_course_benefit_by_month_v83.xcdatamodel; sourceTree = "<group>"; };
Expand Down Expand Up @@ -13816,6 +13817,7 @@
08D1EF6E1BB5618700BE84E6 /* Model.xcdatamodeld */ = {
isa = XCVersionGroup;
children = (
2C093E0B26BBE4C700E4D575 /* Model_peer_review_step_session_v86.xcdatamodel */,
2C29ED57269EF1D000729A97 /* Model_course_beneficiaries_v85.xcdatamodel */,
2C921A36269C7A4800029A1E /* Model_course_benefit_by_month_refunds_v84.xcdatamodel */,
2C0A109E268B1949001D4023 /* Model_course_benefit_by_month_v83.xcdatamodel */,
Expand Down Expand Up @@ -13903,7 +13905,7 @@
0802AC531C7222B200C4F3E6 /* Model_v2.xcdatamodel */,
08D1EF6F1BB5618700BE84E6 /* Model.xcdatamodel */,
);
currentVersion = 2C29ED57269EF1D000729A97 /* Model_course_beneficiaries_v85.xcdatamodel */;
currentVersion = 2C093E0B26BBE4C700E4D575 /* Model_peer_review_step_session_v86.xcdatamodel */;
path = Model.xcdatamodeld;
sourceTree = "<group>";
versionGroupType = wrapper.xcdatamodel;
Expand Down
10 changes: 10 additions & 0 deletions Stepic/Legacy/Model/Entities/Step/Step+CoreDataProperties.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ extension Step {
@NSManaged var managedPassedBy: NSNumber?
@NSManaged var managedCorrectRatio: NSNumber?
@NSManaged var managedIsEnabled: NSNumber?
@NSManaged var managedSessionId: NSNumber?
@NSManaged var managedInstructionId: NSNumber?
@NSManaged var managedInstructionType: String?
@NSManaged var managedNeedsPlan: String?
Expand Down Expand Up @@ -225,6 +226,15 @@ extension Step {
}
}

var sessionID: Int? {
get {
self.managedSessionId?.intValue
}
set {
self.managedSessionId = newValue as NSNumber?
}
}

var instructionID: Int? {
get {
self.managedInstructionId?.intValue
Expand Down
3 changes: 3 additions & 0 deletions Stepic/Legacy/Model/Entities/Step/Step.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ final class Step: NSManagedObject, ManagedObject, IDFetchable {
self.progressID = json[JSONKey.progress.rawValue].stringValue
self.hasSubmissionRestrictions = json[JSONKey.hasSubmissionsRestrictions.rawValue].boolValue
self.isEnabled = json[JSONKey.isEnabled.rawValue].bool ?? true
self.sessionID = json[JSONKey.session.rawValue].int
self.instructionID = json[JSONKey.instruction.rawValue].int
self.instructionType = json[JSONKey.instructionType.rawValue].string
self.needsPlan = json[JSONKey.needsPlan.rawValue].string
Expand Down Expand Up @@ -85,6 +86,7 @@ final class Step: NSManagedObject, ManagedObject, IDFetchable {
if self.correctRatio != object.correctRatio { return false }
if self.canEdit != object.canEdit { return false }
if self.isEnabled != object.isEnabled { return false }
if self.sessionID != object.sessionID { return false }
if self.instructionID != object.instructionID { return false }
if self.needsPlan != object.needsPlan { return false }

Expand Down Expand Up @@ -143,6 +145,7 @@ final class Step: NSManagedObject, ManagedObject, IDFetchable {
case discussionProxy = "discussion_proxy"
case discussionThreads = "discussion_threads"
case isEnabled = "is_enabled"
case session
case instruction
case instructionType = "instruction_type"
case needsPlan = "needs_plan"
Expand Down
2 changes: 1 addition & 1 deletion Stepic/Legacy/Model/Model.xcdatamodeld/.xccurrentversion
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>_XCCurrentVersionName</key>
<string>Model_course_beneficiaries_v85.xcdatamodel</string>
<string>Model_peer_review_step_session_v86.xcdatamodel</string>
</dict>
</plist>
Loading