{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-app-ios/pulls/comments/80174260","id":80174260,"diff_hunk":"@@ -10,35 +10,65 @@ import UIKit\n \n class CourseUnknownBlockViewController: UIViewController, CourseBlockViewController {\n     \n-    typealias Environment = protocol<DataManagerProvider>\n+    typealias Environment = protocol<DataManagerProvider, OEXInterfaceProvider>\n     \n     let environment : Environment\n \n     let blockID : CourseBlockID?\n     let courseID : String\n-    let messageView : IconMessageView\n+    var messageView : IconMessageView?\n     \n     var loader : Stream<NSURL?>?\n     init(blockID : CourseBlockID?, courseID : String, environment : Environment) {\n         self.blockID = blockID\n         self.courseID = courseID\n         self.environment = environment\n         \n-        messageView = IconMessageView(icon: Icon.CourseUnknownContent, message: Strings.courseContentUnknown)\n-        \n         super.init(nibName: nil, bundle: nil)\n         \n+        let courseQuerier = environment.dataManager.courseDataManager.querierForCourseWithID(self.courseID)\n+        courseQuerier.blockWithID(blockID).extendLifetimeUntilFirstResult (\n+            success:\n+            { [weak self] block in\n+                if let video = block.type.asVideo where video.isYoutubeVideo{\n+                    self?.showYoutubeError(Strings.Video.viewOnYoutube, message: Strings.Video.onlyOnYoutube, icon: Icon.CourseModeVideo, videoUrl: video.videoURL)\n+                }\n+                else {\n+                    self?.showError()\n+                }\n+            },\n+            failure: {[weak self] _ in\n+                self?.showError()\n+            }\n+        )\n+    }\n+    \n+    private func showYoutubeError(buttonTitle: String, message: String, icon: Icon, videoUrl: String?) {","path":"Source/CourseUnknownBlockViewController.swift","position":41,"original_position":41,"commit_id":"f9bcaf3737a3dbc0988be32180c21659b4b454ad","original_commit_id":"f9bcaf3737a3dbc0988be32180c21659b4b454ad","user":{"login":"BenjiLee","id":7101723,"avatar_url":"https://avatars.githubusercontent.com/u/7101723?v=3","gravatar_id":"","url":"https://api.github.com/users/BenjiLee","html_url":"https://github.com/BenjiLee","followers_url":"https://api.github.com/users/BenjiLee/followers","following_url":"https://api.github.com/users/BenjiLee/following{/other_user}","gists_url":"https://api.github.com/users/BenjiLee/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjiLee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjiLee/subscriptions","organizations_url":"https://api.github.com/users/BenjiLee/orgs","repos_url":"https://api.github.com/users/BenjiLee/repos","events_url":"https://api.github.com/users/BenjiLee/events{/privacy}","received_events_url":"https://api.github.com/users/BenjiLee/received_events","type":"User","site_admin":false},"body":"I see that onlyOnWeb is also in the same category of \"unknown\". I guess renaming this file to something less \"unknown\"ish might be better.","created_at":"2016-09-23T02:53:43Z","updated_at":"2016-09-23T02:53:43Z","html_url":"https://github.com/edx/edx-app-ios/pull/803#discussion_r80174260","pull_request_url":"https://api.github.com/repos/edx/edx-app-ios/pulls/803","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-app-ios/pulls/comments/80174260"},"html":{"href":"https://github.com/edx/edx-app-ios/pull/803#discussion_r80174260"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-app-ios/pulls/803"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-app-ios/pulls/803","id":85937031,"html_url":"https://github.com/edx/edx-app-ios/pull/803","diff_url":"https://github.com/edx/edx-app-ios/pull/803.diff","patch_url":"https://github.com/edx/edx-app-ios/pull/803.patch","issue_url":"https://api.github.com/repos/edx/edx-app-ios/issues/803","number":803,"state":"open","locked":false,"title":"Youtube videos in courseware","user":{"login":"saeedbashir","id":5606473,"avatar_url":"https://avatars.githubusercontent.com/u/5606473?v=3","gravatar_id":"","url":"https://api.github.com/users/saeedbashir","html_url":"https://github.com/saeedbashir","followers_url":"https://api.github.com/users/saeedbashir/followers","following_url":"https://api.github.com/users/saeedbashir/following{/other_user}","gists_url":"https://api.github.com/users/saeedbashir/gists{/gist_id}","starred_url":"https://api.github.com/users/saeedbashir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saeedbashir/subscriptions","organizations_url":"https://api.github.com/users/saeedbashir/orgs","repos_url":"https://api.github.com/users/saeedbashir/repos","events_url":"https://api.github.com/users/saeedbashir/events{/privacy}","received_events_url":"https://api.github.com/users/saeedbashir/received_events","type":"User","site_admin":false},"body":"### Description\r\n\r\n[MA-2814](https://openedx.atlassian.net/browse/MA-2814)\r\n\r\nAdd a description of your changes here.\r\n\r\n### Notes\r\n\r\n### How to test this PR\r\n\r\n### Reviewers\r\nIf you've been tagged for review, please check your corresponding box once you've given the :+1:.\r\n- [ ] Code review: @BenjiLee \r\n- [ ] Code review: @danialzahid94 \r\n","created_at":"2016-09-20T09:09:19Z","updated_at":"2016-09-23T02:53:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88c37ab5cdee80915ebfb69be9ea2ac600194d42","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-app-ios/pulls/803/commits","review_comments_url":"https://api.github.com/repos/edx/edx-app-ios/pulls/803/comments","review_comment_url":"https://api.github.com/repos/edx/edx-app-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-app-ios/issues/803/comments","statuses_url":"https://api.github.com/repos/edx/edx-app-ios/statuses/f9bcaf3737a3dbc0988be32180c21659b4b454ad","head":{"label":"edx:saeed/MA-2814","ref":"saeed/MA-2814","sha":"f9bcaf3737a3dbc0988be32180c21659b4b454ad","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":29251733,"name":"edx-app-ios","full_name":"edx/edx-app-ios","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-app-ios","description":"","fork":false,"url":"https://api.github.com/repos/edx/edx-app-ios","forks_url":"https://api.github.com/repos/edx/edx-app-ios/forks","keys_url":"https://api.github.com/repos/edx/edx-app-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-app-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-app-ios/teams","hooks_url":"https://api.github.com/repos/edx/edx-app-ios/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-app-ios/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-app-ios/events","assignees_url":"https://api.github.com/repos/edx/edx-app-ios/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-app-ios/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-app-ios/tags","blobs_url":"https://api.github.com/repos/edx/edx-app-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-app-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-app-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-app-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-app-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-app-ios/languages","stargazers_url":"https://api.github.com/repos/edx/edx-app-ios/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-app-ios/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-app-ios/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-app-ios/subscription","commits_url":"https://api.github.com/repos/edx/edx-app-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-app-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-app-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-app-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-app-ios/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-app-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-app-ios/merges","archive_url":"https://api.github.com/repos/edx/edx-app-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-app-ios/downloads","issues_url":"https://api.github.com/repos/edx/edx-app-ios/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-app-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-app-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-app-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-app-ios/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-app-ios/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-app-ios/deployments","created_at":"2015-01-14T15:49:29Z","updated_at":"2016-09-10T07:21:10Z","pushed_at":"2016-09-22T06:59:42Z","git_url":"git://github.com/edx/edx-app-ios.git","ssh_url":"git@github.com:edx/edx-app-ios.git","clone_url":"https://github.com/edx/edx-app-ios.git","svn_url":"https://github.com/edx/edx-app-ios","homepage":null,"size":347975,"stargazers_count":74,"watchers_count":74,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":17,"forks":81,"open_issues":17,"watchers":74,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"a4ec26b3bb90a578678885cd541a93a0b6ab8afc","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":29251733,"name":"edx-app-ios","full_name":"edx/edx-app-ios","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-app-ios","description":"","fork":false,"url":"https://api.github.com/repos/edx/edx-app-ios","forks_url":"https://api.github.com/repos/edx/edx-app-ios/forks","keys_url":"https://api.github.com/repos/edx/edx-app-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-app-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-app-ios/teams","hooks_url":"https://api.github.com/repos/edx/edx-app-ios/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-app-ios/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-app-ios/events","assignees_url":"https://api.github.com/repos/edx/edx-app-ios/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-app-ios/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-app-ios/tags","blobs_url":"https://api.github.com/repos/edx/edx-app-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-app-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-app-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-app-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-app-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-app-ios/languages","stargazers_url":"https://api.github.com/repos/edx/edx-app-ios/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-app-ios/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-app-ios/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-app-ios/subscription","commits_url":"https://api.github.com/repos/edx/edx-app-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-app-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-app-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-app-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-app-ios/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-app-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-app-ios/merges","archive_url":"https://api.github.com/repos/edx/edx-app-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-app-ios/downloads","issues_url":"https://api.github.com/repos/edx/edx-app-ios/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-app-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-app-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-app-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-app-ios/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-app-ios/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-app-ios/deployments","created_at":"2015-01-14T15:49:29Z","updated_at":"2016-09-10T07:21:10Z","pushed_at":"2016-09-22T06:59:42Z","git_url":"git://github.com/edx/edx-app-ios.git","ssh_url":"git@github.com:edx/edx-app-ios.git","clone_url":"https://github.com/edx/edx-app-ios.git","svn_url":"https://github.com/edx/edx-app-ios","homepage":null,"size":347975,"stargazers_count":74,"watchers_count":74,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":17,"forks":81,"open_issues":17,"watchers":74,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-app-ios/pulls/803"},"html":{"href":"https://github.com/edx/edx-app-ios/pull/803"},"issue":{"href":"https://api.github.com/repos/edx/edx-app-ios/issues/803"},"comments":{"href":"https://api.github.com/repos/edx/edx-app-ios/issues/803/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-app-ios/pulls/803/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-app-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-app-ios/pulls/803/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-app-ios/statuses/f9bcaf3737a3dbc0988be32180c21659b4b454ad"}}}}
{"actor":{"display_login":"BenjiLee"}}