From 30a2506a68220a9e4c986d9967229bacbd6cdfe7 Mon Sep 17 00:00:00 2001 From: Saeed Bashir Date: Wed, 3 Apr 2019 15:36:52 +0500 Subject: [PATCH] Stop using legacy course API video_outline (#1258) --- Source/OEXInterface+Swift.swift | 7 ++++--- Source/OEXInterface.m | 4 ---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Source/OEXInterface+Swift.swift b/Source/OEXInterface+Swift.swift index 31e11154fc..93904965ba 100644 --- a/Source/OEXInterface+Swift.swift +++ b/Source/OEXInterface+Swift.swift @@ -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 diff --git a/Source/OEXInterface.m b/Source/OEXInterface.m index 7d4c25318d..6bbea4ebb2 100644 --- a/Source/OEXInterface.m +++ b/Source/OEXInterface.m @@ -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]; } }