{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-app-ios/pulls/comments/50476927","id":50476927,"diff_hunk":"@@ -292,15 +292,33 @@ class DiscussionResponsesViewController: UIViewController, UITableViewDataSource\n             \n             paginationController = TablePaginationController (paginator: paginator, tableView: self.tableView)\n             \n-            self.loadContent()\n+            loadEndorsedResponses()\n         }\n     }\n     \n-    func loadContent() {\n+    private func loadEndorsedResponses() {\n+        if let thread = thread {\n+            // its assumption always there shoud be 1 page for endorsed responses\n+            let apiRequest = DiscussionAPI.getResponses(thread.threadID, threadType: .Question, endorsedOnly: true, pageNumber: 1)\n+            \n+            self.environment.networkManager.taskForRequest(apiRequest) {[weak self] result in\n+                if let responses = result.data {\n+                    self?.populatResponses(responses, removeAll: false)\n+                    self?.loadContent()\n+                }\n+                else {\n+                    // if there is no endorsed question\n+                    self?.loadContent()","path":"Source/DiscussionResponsesViewController.swift","position":22,"original_position":22,"commit_id":"a02d2f4e7b106041e1c9e4a1efe5bd5cfc83ee5c","original_commit_id":"a02d2f4e7b106041e1c9e4a1efe5bd5cfc83ee5c","user":{"login":"aleffert","id":114396,"avatar_url":"https://avatars.githubusercontent.com/u/114396?v=3","gravatar_id":"","url":"https://api.github.com/users/aleffert","html_url":"https://github.com/aleffert","followers_url":"https://api.github.com/users/aleffert/followers","following_url":"https://api.github.com/users/aleffert/following{/other_user}","gists_url":"https://api.github.com/users/aleffert/gists{/gist_id}","starred_url":"https://api.github.com/users/aleffert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleffert/subscriptions","organizations_url":"https://api.github.com/users/aleffert/orgs","repos_url":"https://api.github.com/users/aleffert/repos","events_url":"https://api.github.com/users/aleffert/events{/privacy}","received_events_url":"https://api.github.com/users/aleffert/received_events","type":"User","site_admin":false},"body":"since we do this in either case, why not just move it outside the ``if``","created_at":"2016-01-21T22:43:00Z","updated_at":"2016-01-21T22:43:00Z","html_url":"https://github.com/edx/edx-app-ios/pull/649#discussion_r50476927","pull_request_url":"https://api.github.com/repos/edx/edx-app-ios/pulls/649","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-app-ios/pulls/comments/50476927"},"html":{"href":"https://github.com/edx/edx-app-ios/pull/649#discussion_r50476927"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-app-ios/pulls/649"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-app-ios/pulls/649","id":56740774,"html_url":"https://github.com/edx/edx-app-ios/pull/649","diff_url":"https://github.com/edx/edx-app-ios/pull/649.diff","patch_url":"https://github.com/edx/edx-app-ios/pull/649.patch","issue_url":"https://api.github.com/repos/edx/edx-app-ios/issues/649","number":649,"state":"open","locked":false,"title":"Endorsed Responses/Answers functionality is not working","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":"https://openedx.atlassian.net/browse/MA-1962","created_at":"2016-01-21T12:09:39Z","updated_at":"2016-01-21T22:43:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"932468b670543c71c90453294d98171cc3f759d4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-app-ios/pulls/649/commits","review_comments_url":"https://api.github.com/repos/edx/edx-app-ios/pulls/649/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/649/comments","statuses_url":"https://api.github.com/repos/edx/edx-app-ios/statuses/a02d2f4e7b106041e1c9e4a1efe5bd5cfc83ee5c","head":{"label":"edx:saeed/MA-1962","ref":"saeed/MA-1962","sha":"a02d2f4e7b106041e1c9e4a1efe5bd5cfc83ee5c","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}","created_at":"2015-01-14T15:49:29Z","updated_at":"2016-01-21T02:44:29Z","pushed_at":"2016-01-21T21:58:30Z","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":305052,"stargazers_count":43,"watchers_count":43,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":9,"forks":57,"open_issues":9,"watchers":43,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"dbae7847f0385a1fa8fa4bc26572f9da70d4232e","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}","created_at":"2015-01-14T15:49:29Z","updated_at":"2016-01-21T02:44:29Z","pushed_at":"2016-01-21T21:58:30Z","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":305052,"stargazers_count":43,"watchers_count":43,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":9,"forks":57,"open_issues":9,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-app-ios/pulls/649"},"html":{"href":"https://github.com/edx/edx-app-ios/pull/649"},"issue":{"href":"https://api.github.com/repos/edx/edx-app-ios/issues/649"},"comments":{"href":"https://api.github.com/repos/edx/edx-app-ios/issues/649/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-app-ios/pulls/649/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/649/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-app-ios/statuses/a02d2f4e7b106041e1c9e4a1efe5bd5cfc83ee5c"}}}}