Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Stop using legacy course API video_outline (#1258)
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedbashir committed Apr 3, 2019
1 parent 564f5f0 commit 30a2506
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 4 additions & 3 deletions Source/OEXInterface+Swift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ import Foundation

extension OEXInterface {
@objc public func formatEnrollmentURL(with config : OEXConfig, url : NSMutableString) -> NSMutableString {
let userPath = "/api/mobile/v1/users"
guard let username = OEXSession.shared()?.currentUser?.username else {
url.appendFormat("%@/%@%@", URL_USER_DETAILS, "test", URL_COURSE_ENROLLMENTS)
url.appendFormat("%@/%@%@", userPath, "test", URL_COURSE_ENROLLMENTS)
return url
}

if let orgCode = config.organizationCode() {
url.appendFormat("%@/%@%@?org=%@", URL_USER_DETAILS, username, URL_COURSE_ENROLLMENTS, orgCode)
url.appendFormat("%@/%@%@?org=%@", userPath, username, URL_COURSE_ENROLLMENTS, orgCode)
} else {
url.appendFormat("%@/%@%@", URL_USER_DETAILS, username, URL_COURSE_ENROLLMENTS)
url.appendFormat("%@/%@%@", userPath, username, URL_COURSE_ENROLLMENTS)
}

return url
Expand Down
4 changes: 0 additions & 4 deletions Source/OEXInterface.m
Original file line number Diff line number Diff line change
Expand Up @@ -746,10 +746,6 @@ - (void)processData:(NSData*)data forType:(NSString*)URLString usingOfflineCache
}

[self downloadWithRequestString:imageDownloadURL forceUpdate:force];

//course subsection
NSString* courseVideoDetails = course.video_outline;
[self downloadWithRequestString:courseVideoDetails forceUpdate:force];
}
}

Expand Down

0 comments on commit 30a2506

Please sign in to comment.