{"action":"created","comment":{"url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/comments/42582502","id":42582502,"diff_hunk":"@@ -0,0 +1,213 @@\n+/*\n+ Copyright (c) 2015, Oliver Schaefer.\n+ \n+ Redistribution and use in source and binary forms, with or without modification,\n+ are permitted provided that the following conditions are met:\n+ \n+ 1.  Redistributions of source code must retain the above copyright notice, this\n+ list of conditions and the following disclaimer.\n+ \n+ 2.  Redistributions in binary form must reproduce the above copyright notice,\n+ this list of conditions and the following disclaimer in the documentation and/or\n+ other materials provided with the distribution.\n+ \n+ 3.  Neither the name of the copyright holder(s) nor the names of any contributors\n+ may be used to endorse or promote products derived from this software without\n+ specific prior written permission. No license is granted to the trademarks of\n+ the copyright holders even if such marks are included in this software.\n+ \n+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+\n+#import \"ORKReviewStepViewController.h\"\n+#import \"ORKReviewStep.h\"\n+#import \"ORKStep_Private.h\"\n+#import \"ORKTaskViewController_Internal.h\"\n+#import \"ORKStepViewController_Internal.h\"\n+#import \"ORKSkin.h\"\n+#import \"ORKTableContainerView.h\"\n+#import \"ORKStepHeaderView_Internal.h\"\n+#import \"ORKNavigationContainerView_Internal.h\"\n+#import \"ORKChoiceViewCell.h\"\n+\n+\n+typedef NS_ENUM(NSInteger, ORKReviewSection) {\n+    ORKReviewSectionSpace1 = 0,\n+    ORKReviewSectionAnswer = 1,\n+    ORKReviewSectionSpace2 = 2,\n+    ORKReviewSectionCount\n+};\n+\n+@interface ORKReviewStepViewController () <UITableViewDataSource, UITableViewDelegate>\n+\n+@property (nonatomic, strong) ORKTableContainerView *tableContainer;\n+\n+@end\n+\n+@implementation ORKReviewStepViewController {\n+    ORKNavigationContainerView *_continueSkipView;\n+}\n+\n+#pragma clang diagnostic push\n+#pragma clang diagnostic ignored \"-Wobjc-designated-initializers\"\n+- (instancetype)initWithCoder:(NSCoder *)aDecoder {\n+    self = [super initWithCoder:aDecoder];\n+    return self;\n+}\n+#pragma clang diagnostic pop\n+ \n+- (instancetype)initWithReviewStep:(ORKReviewStep *)reviewStep steps:(nullable NSArray<ORKStep *>*)steps resultSource:(nullable id<ORKTaskResultSource>)resultSource {\n+    self = [self initWithStep:reviewStep];\n+    if (self && [self reviewStep]) {\n+        NSArray<ORKStep *> *stepsToFilter = [self reviewStep].steps != nil ? [self reviewStep].steps : steps;\n+        NSMutableArray<ORKStep *> *filteredSteps = [[NSMutableArray alloc] init];\n+        [stepsToFilter enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {\n+            BOOL includeStep = [obj isKindOfClass:[ORKQuestionStep class]] || [obj isKindOfClass:[ORKFormStep class]] || [obj isKindOfClass:[ORKInstructionStep class]];\n+            if (includeStep) {\n+                [filteredSteps addObject:obj];\n+            }\n+        }];\n+        _steps = [filteredSteps copy];\n+        _resultSource = [self reviewStep].resultSource != nil ? [self reviewStep].resultSource : resultSource;","path":"ResearchKit/Common/ORKReviewStepViewController.m","position":81,"original_position":81,"commit_id":"a581d582438d171c8765b632778d22ffea25195a","original_commit_id":"a581d582438d171c8765b632778d22ffea25195a","user":{"login":"oliverschaefer","id":13077832,"avatar_url":"https://avatars.githubusercontent.com/u/13077832?v=3","gravatar_id":"","url":"https://api.github.com/users/oliverschaefer","html_url":"https://github.com/oliverschaefer","followers_url":"https://api.github.com/users/oliverschaefer/followers","following_url":"https://api.github.com/users/oliverschaefer/following{/other_user}","gists_url":"https://api.github.com/users/oliverschaefer/gists{/gist_id}","starred_url":"https://api.github.com/users/oliverschaefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliverschaefer/subscriptions","organizations_url":"https://api.github.com/users/oliverschaefer/orgs","repos_url":"https://api.github.com/users/oliverschaefer/repos","events_url":"https://api.github.com/users/oliverschaefer/events{/privacy}","received_events_url":"https://api.github.com/users/oliverschaefer/received_events","type":"User","site_admin":false},"body":"The `isStandalone` property lives on `ORKReviewStepViewController`. We once had it on the step itself, but decided to move it, since no state should be on the model","created_at":"2015-10-21T04:32:41Z","updated_at":"2015-10-21T04:32:41Z","html_url":"https://github.com/ResearchKit/ResearchKit/pull/463#discussion_r42582502","pull_request_url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/463","_links":{"self":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/comments/42582502"},"html":{"href":"https://github.com/ResearchKit/ResearchKit/pull/463#discussion_r42582502"},"pull_request":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/463"}}},"pull_request":{"url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/463","id":45491868,"html_url":"https://github.com/ResearchKit/ResearchKit/pull/463","diff_url":"https://github.com/ResearchKit/ResearchKit/pull/463.diff","patch_url":"https://github.com/ResearchKit/ResearchKit/pull/463.patch","issue_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/463","number":463,"state":"open","locked":false,"title":"Review Step: API Design v1.2","user":{"login":"oliverschaefer","id":13077832,"avatar_url":"https://avatars.githubusercontent.com/u/13077832?v=3","gravatar_id":"","url":"https://api.github.com/users/oliverschaefer","html_url":"https://github.com/oliverschaefer","followers_url":"https://api.github.com/users/oliverschaefer/followers","following_url":"https://api.github.com/users/oliverschaefer/following{/other_user}","gists_url":"https://api.github.com/users/oliverschaefer/gists{/gist_id}","starred_url":"https://api.github.com/users/oliverschaefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliverschaefer/subscriptions","organizations_url":"https://api.github.com/users/oliverschaefer/orgs","repos_url":"https://api.github.com/users/oliverschaefer/repos","events_url":"https://api.github.com/users/oliverschaefer/events{/privacy}","received_events_url":"https://api.github.com/users/oliverschaefer/received_events","type":"User","site_admin":false},"body":"This PR deals with issue #89 ","created_at":"2015-09-20T07:47:19Z","updated_at":"2015-10-21T04:32:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad3f53df07d7d701696dd9d3907334458f43ec6b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/463/commits","review_comments_url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/463/comments","review_comment_url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/463/comments","statuses_url":"https://api.github.com/repos/ResearchKit/ResearchKit/statuses/a581d582438d171c8765b632778d22ffea25195a","head":{"label":"oliverschaefer:master","ref":"master","sha":"a581d582438d171c8765b632778d22ffea25195a","user":{"login":"oliverschaefer","id":13077832,"avatar_url":"https://avatars.githubusercontent.com/u/13077832?v=3","gravatar_id":"","url":"https://api.github.com/users/oliverschaefer","html_url":"https://github.com/oliverschaefer","followers_url":"https://api.github.com/users/oliverschaefer/followers","following_url":"https://api.github.com/users/oliverschaefer/following{/other_user}","gists_url":"https://api.github.com/users/oliverschaefer/gists{/gist_id}","starred_url":"https://api.github.com/users/oliverschaefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliverschaefer/subscriptions","organizations_url":"https://api.github.com/users/oliverschaefer/orgs","repos_url":"https://api.github.com/users/oliverschaefer/repos","events_url":"https://api.github.com/users/oliverschaefer/events{/privacy}","received_events_url":"https://api.github.com/users/oliverschaefer/received_events","type":"User","site_admin":false},"repo":{"id":42804804,"name":"ResearchKit","full_name":"oliverschaefer/ResearchKit","owner":{"login":"oliverschaefer","id":13077832,"avatar_url":"https://avatars.githubusercontent.com/u/13077832?v=3","gravatar_id":"","url":"https://api.github.com/users/oliverschaefer","html_url":"https://github.com/oliverschaefer","followers_url":"https://api.github.com/users/oliverschaefer/followers","following_url":"https://api.github.com/users/oliverschaefer/following{/other_user}","gists_url":"https://api.github.com/users/oliverschaefer/gists{/gist_id}","starred_url":"https://api.github.com/users/oliverschaefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliverschaefer/subscriptions","organizations_url":"https://api.github.com/users/oliverschaefer/orgs","repos_url":"https://api.github.com/users/oliverschaefer/repos","events_url":"https://api.github.com/users/oliverschaefer/events{/privacy}","received_events_url":"https://api.github.com/users/oliverschaefer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oliverschaefer/ResearchKit","description":"ResearchKit is an open source software framework that makes it easy to create apps for medical research or for other research projects.","fork":true,"url":"https://api.github.com/repos/oliverschaefer/ResearchKit","forks_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/forks","keys_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/teams","hooks_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/hooks","issue_events_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/issues/events{/number}","events_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/events","assignees_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/assignees{/user}","branches_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/branches{/branch}","tags_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/tags","blobs_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/statuses/{sha}","languages_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/languages","stargazers_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/stargazers","contributors_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/contributors","subscribers_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/subscribers","subscription_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/subscription","commits_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/contents/{+path}","compare_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/merges","archive_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/downloads","issues_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/issues{/number}","pulls_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/pulls{/number}","milestones_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/milestones{/number}","notifications_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/labels{/name}","releases_url":"https://api.github.com/repos/oliverschaefer/ResearchKit/releases{/id}","created_at":"2015-09-20T07:38:42Z","updated_at":"2015-09-20T07:38:44Z","pushed_at":"2015-10-18T21:01:06Z","git_url":"git://github.com/oliverschaefer/ResearchKit.git","ssh_url":"git@github.com:oliverschaefer/ResearchKit.git","clone_url":"https://github.com/oliverschaefer/ResearchKit.git","svn_url":"https://github.com/oliverschaefer/ResearchKit","homepage":"","size":18967,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ResearchKit:master","ref":"master","sha":"9fbabf8f3bbbcd2cf264fb1475d698ae2842e968","user":{"login":"ResearchKit","id":11183179,"avatar_url":"https://avatars.githubusercontent.com/u/11183179?v=3","gravatar_id":"","url":"https://api.github.com/users/ResearchKit","html_url":"https://github.com/ResearchKit","followers_url":"https://api.github.com/users/ResearchKit/followers","following_url":"https://api.github.com/users/ResearchKit/following{/other_user}","gists_url":"https://api.github.com/users/ResearchKit/gists{/gist_id}","starred_url":"https://api.github.com/users/ResearchKit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ResearchKit/subscriptions","organizations_url":"https://api.github.com/users/ResearchKit/orgs","repos_url":"https://api.github.com/users/ResearchKit/repos","events_url":"https://api.github.com/users/ResearchKit/events{/privacy}","received_events_url":"https://api.github.com/users/ResearchKit/received_events","type":"Organization","site_admin":false},"repo":{"id":31979038,"name":"ResearchKit","full_name":"ResearchKit/ResearchKit","owner":{"login":"ResearchKit","id":11183179,"avatar_url":"https://avatars.githubusercontent.com/u/11183179?v=3","gravatar_id":"","url":"https://api.github.com/users/ResearchKit","html_url":"https://github.com/ResearchKit","followers_url":"https://api.github.com/users/ResearchKit/followers","following_url":"https://api.github.com/users/ResearchKit/following{/other_user}","gists_url":"https://api.github.com/users/ResearchKit/gists{/gist_id}","starred_url":"https://api.github.com/users/ResearchKit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ResearchKit/subscriptions","organizations_url":"https://api.github.com/users/ResearchKit/orgs","repos_url":"https://api.github.com/users/ResearchKit/repos","events_url":"https://api.github.com/users/ResearchKit/events{/privacy}","received_events_url":"https://api.github.com/users/ResearchKit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ResearchKit/ResearchKit","description":"ResearchKit is an open source software framework that makes it easy to create apps for medical research or for other research projects.","fork":false,"url":"https://api.github.com/repos/ResearchKit/ResearchKit","forks_url":"https://api.github.com/repos/ResearchKit/ResearchKit/forks","keys_url":"https://api.github.com/repos/ResearchKit/ResearchKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ResearchKit/ResearchKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ResearchKit/ResearchKit/teams","hooks_url":"https://api.github.com/repos/ResearchKit/ResearchKit/hooks","issue_events_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/events{/number}","events_url":"https://api.github.com/repos/ResearchKit/ResearchKit/events","assignees_url":"https://api.github.com/repos/ResearchKit/ResearchKit/assignees{/user}","branches_url":"https://api.github.com/repos/ResearchKit/ResearchKit/branches{/branch}","tags_url":"https://api.github.com/repos/ResearchKit/ResearchKit/tags","blobs_url":"https://api.github.com/repos/ResearchKit/ResearchKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ResearchKit/ResearchKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ResearchKit/ResearchKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/ResearchKit/ResearchKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ResearchKit/ResearchKit/statuses/{sha}","languages_url":"https://api.github.com/repos/ResearchKit/ResearchKit/languages","stargazers_url":"https://api.github.com/repos/ResearchKit/ResearchKit/stargazers","contributors_url":"https://api.github.com/repos/ResearchKit/ResearchKit/contributors","subscribers_url":"https://api.github.com/repos/ResearchKit/ResearchKit/subscribers","subscription_url":"https://api.github.com/repos/ResearchKit/ResearchKit/subscription","commits_url":"https://api.github.com/repos/ResearchKit/ResearchKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/ResearchKit/ResearchKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/ResearchKit/ResearchKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/ResearchKit/ResearchKit/contents/{+path}","compare_url":"https://api.github.com/repos/ResearchKit/ResearchKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ResearchKit/ResearchKit/merges","archive_url":"https://api.github.com/repos/ResearchKit/ResearchKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ResearchKit/ResearchKit/downloads","issues_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues{/number}","pulls_url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls{/number}","milestones_url":"https://api.github.com/repos/ResearchKit/ResearchKit/milestones{/number}","notifications_url":"https://api.github.com/repos/ResearchKit/ResearchKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ResearchKit/ResearchKit/labels{/name}","releases_url":"https://api.github.com/repos/ResearchKit/ResearchKit/releases{/id}","created_at":"2015-03-10T20:05:32Z","updated_at":"2015-10-21T02:57:42Z","pushed_at":"2015-10-21T02:48:58Z","git_url":"git://github.com/ResearchKit/ResearchKit.git","ssh_url":"git@github.com:ResearchKit/ResearchKit.git","clone_url":"https://github.com/ResearchKit/ResearchKit.git","svn_url":"https://github.com/ResearchKit/ResearchKit","homepage":"","size":30351,"stargazers_count":4042,"watchers_count":4042,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":574,"mirror_url":null,"open_issues_count":72,"forks":574,"open_issues":72,"watchers":4042,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/463"},"html":{"href":"https://github.com/ResearchKit/ResearchKit/pull/463"},"issue":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/463"},"comments":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/463/comments"},"review_comments":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/463/comments"},"review_comment":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/463/commits"},"statuses":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/statuses/a581d582438d171c8765b632778d22ffea25195a"}}}}