{"action":"created","comment":{"url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/comments/80822542","pull_request_review_id":1850298,"id":80822542,"diff_hunk":"@@ -31,17 +31,31 @@ def semester_feed(enrollment_terms, transcript_terms)\n           semester[:hasEnrollmentData] = true\n           semester[:summaryFromTranscript] = (semester[:timeBucket] == 'past')\n           semester[:classes] = map_enrollments(enrollment_terms[term_key]).compact\n+          semester[:no_enrolled_classes] = check_enrolled_classes(enrollment_terms[term_key])\n           merge_grades(semester, transcript_terms[term_key])\n         else\n           semester[:hasEnrollmentData] = false\n           semester[:summaryFromTranscript] = true\n+          semester[:no_enrolled_classes] = true\n           semester[:classes] = map_transcripts transcript_terms[term_key][:courses]\n           semester[:notation] = translate_notation transcript_terms[term_key][:notations]\n         end\n         semester unless semester[:classes].empty?\n       end\n     end\n \n+    def check_enrolled_classes(enrollment_term)\n+      no_enrolled_classes = true\n+      enrollment_term.map do |course|\n+        if course[:role] == 'Student'\n+          course[:sections].each do |section|\n+            no_enrolled_classes = false if !section[:waitlisted]\n+          end\n+        end\n+      end\n+      return no_enrolled_classes\n+    end","path":"app/models/my_academics/semesters.rb","position":27,"original_position":27,"commit_id":"fd86dc0a47522db58eb8697f00504a03408b4c89","original_commit_id":"fd86dc0a47522db58eb8697f00504a03408b4c89","user":{"login":"tiffanyqi","id":6607768,"avatar_url":"https://avatars.githubusercontent.com/u/6607768?v=3","gravatar_id":"","url":"https://api.github.com/users/tiffanyqi","html_url":"https://github.com/tiffanyqi","followers_url":"https://api.github.com/users/tiffanyqi/followers","following_url":"https://api.github.com/users/tiffanyqi/following{/other_user}","gists_url":"https://api.github.com/users/tiffanyqi/gists{/gist_id}","starred_url":"https://api.github.com/users/tiffanyqi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiffanyqi/subscriptions","organizations_url":"https://api.github.com/users/tiffanyqi/orgs","repos_url":"https://api.github.com/users/tiffanyqi/repos","events_url":"https://api.github.com/users/tiffanyqi/events{/privacy}","received_events_url":"https://api.github.com/users/tiffanyqi/received_events","type":"User","site_admin":false},"body":"Would it be clearer to use `enrollment_term.each` instead of `map` ? I'm not sure how to use `.find` in this context, since it is looping through the `enrollment_term`, `course`, and `section` before it can state whether or not `has_enrolled_classes` is true.","created_at":"2016-09-28T00:14:12Z","updated_at":"2016-09-28T00:14:13Z","html_url":"https://github.com/ets-berkeley-edu/calcentral/pull/5905#discussion_r80822542","pull_request_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/5905","_links":{"self":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/comments/80822542"},"html":{"href":"https://github.com/ets-berkeley-edu/calcentral/pull/5905#discussion_r80822542"},"pull_request":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/5905"}}},"pull_request":{"url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/5905","id":87028098,"html_url":"https://github.com/ets-berkeley-edu/calcentral/pull/5905","diff_url":"https://github.com/ets-berkeley-edu/calcentral/pull/5905.diff","patch_url":"https://github.com/ets-berkeley-edu/calcentral/pull/5905.patch","issue_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/5905","number":5905,"state":"open","locked":false,"title":"SISRP-23155 Empty semester card if user has only waitlisted courses","user":{"login":"tiffanyqi","id":6607768,"avatar_url":"https://avatars.githubusercontent.com/u/6607768?v=3","gravatar_id":"","url":"https://api.github.com/users/tiffanyqi","html_url":"https://github.com/tiffanyqi","followers_url":"https://api.github.com/users/tiffanyqi/followers","following_url":"https://api.github.com/users/tiffanyqi/following{/other_user}","gists_url":"https://api.github.com/users/tiffanyqi/gists{/gist_id}","starred_url":"https://api.github.com/users/tiffanyqi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiffanyqi/subscriptions","organizations_url":"https://api.github.com/users/tiffanyqi/orgs","repos_url":"https://api.github.com/users/tiffanyqi/repos","events_url":"https://api.github.com/users/tiffanyqi/events{/privacy}","received_events_url":"https://api.github.com/users/tiffanyqi/received_events","type":"User","site_admin":false},"body":"https://jira.berkeley.edu/browse/SISRP-23155","created_at":"2016-09-27T23:01:38Z","updated_at":"2016-09-28T00:14:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3243d865cf1ed70de718d439c71fdfd021344177","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/5905/commits","review_comments_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/5905/comments","review_comment_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/5905/comments","statuses_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/statuses/fd86dc0a47522db58eb8697f00504a03408b4c89","head":{"label":"tiffanyqi:SISRP-23155","ref":"SISRP-23155","sha":"fd86dc0a47522db58eb8697f00504a03408b4c89","user":{"login":"tiffanyqi","id":6607768,"avatar_url":"https://avatars.githubusercontent.com/u/6607768?v=3","gravatar_id":"","url":"https://api.github.com/users/tiffanyqi","html_url":"https://github.com/tiffanyqi","followers_url":"https://api.github.com/users/tiffanyqi/followers","following_url":"https://api.github.com/users/tiffanyqi/following{/other_user}","gists_url":"https://api.github.com/users/tiffanyqi/gists{/gist_id}","starred_url":"https://api.github.com/users/tiffanyqi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiffanyqi/subscriptions","organizations_url":"https://api.github.com/users/tiffanyqi/orgs","repos_url":"https://api.github.com/users/tiffanyqi/repos","events_url":"https://api.github.com/users/tiffanyqi/events{/privacy}","received_events_url":"https://api.github.com/users/tiffanyqi/received_events","type":"User","site_admin":false},"repo":{"id":62251668,"name":"calcentral","full_name":"tiffanyqi/calcentral","owner":{"login":"tiffanyqi","id":6607768,"avatar_url":"https://avatars.githubusercontent.com/u/6607768?v=3","gravatar_id":"","url":"https://api.github.com/users/tiffanyqi","html_url":"https://github.com/tiffanyqi","followers_url":"https://api.github.com/users/tiffanyqi/followers","following_url":"https://api.github.com/users/tiffanyqi/following{/other_user}","gists_url":"https://api.github.com/users/tiffanyqi/gists{/gist_id}","starred_url":"https://api.github.com/users/tiffanyqi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiffanyqi/subscriptions","organizations_url":"https://api.github.com/users/tiffanyqi/orgs","repos_url":"https://api.github.com/users/tiffanyqi/repos","events_url":"https://api.github.com/users/tiffanyqi/events{/privacy}","received_events_url":"https://api.github.com/users/tiffanyqi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tiffanyqi/calcentral","description":null,"fork":true,"url":"https://api.github.com/repos/tiffanyqi/calcentral","forks_url":"https://api.github.com/repos/tiffanyqi/calcentral/forks","keys_url":"https://api.github.com/repos/tiffanyqi/calcentral/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tiffanyqi/calcentral/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tiffanyqi/calcentral/teams","hooks_url":"https://api.github.com/repos/tiffanyqi/calcentral/hooks","issue_events_url":"https://api.github.com/repos/tiffanyqi/calcentral/issues/events{/number}","events_url":"https://api.github.com/repos/tiffanyqi/calcentral/events","assignees_url":"https://api.github.com/repos/tiffanyqi/calcentral/assignees{/user}","branches_url":"https://api.github.com/repos/tiffanyqi/calcentral/branches{/branch}","tags_url":"https://api.github.com/repos/tiffanyqi/calcentral/tags","blobs_url":"https://api.github.com/repos/tiffanyqi/calcentral/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tiffanyqi/calcentral/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tiffanyqi/calcentral/git/refs{/sha}","trees_url":"https://api.github.com/repos/tiffanyqi/calcentral/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tiffanyqi/calcentral/statuses/{sha}","languages_url":"https://api.github.com/repos/tiffanyqi/calcentral/languages","stargazers_url":"https://api.github.com/repos/tiffanyqi/calcentral/stargazers","contributors_url":"https://api.github.com/repos/tiffanyqi/calcentral/contributors","subscribers_url":"https://api.github.com/repos/tiffanyqi/calcentral/subscribers","subscription_url":"https://api.github.com/repos/tiffanyqi/calcentral/subscription","commits_url":"https://api.github.com/repos/tiffanyqi/calcentral/commits{/sha}","git_commits_url":"https://api.github.com/repos/tiffanyqi/calcentral/git/commits{/sha}","comments_url":"https://api.github.com/repos/tiffanyqi/calcentral/comments{/number}","issue_comment_url":"https://api.github.com/repos/tiffanyqi/calcentral/issues/comments{/number}","contents_url":"https://api.github.com/repos/tiffanyqi/calcentral/contents/{+path}","compare_url":"https://api.github.com/repos/tiffanyqi/calcentral/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tiffanyqi/calcentral/merges","archive_url":"https://api.github.com/repos/tiffanyqi/calcentral/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tiffanyqi/calcentral/downloads","issues_url":"https://api.github.com/repos/tiffanyqi/calcentral/issues{/number}","pulls_url":"https://api.github.com/repos/tiffanyqi/calcentral/pulls{/number}","milestones_url":"https://api.github.com/repos/tiffanyqi/calcentral/milestones{/number}","notifications_url":"https://api.github.com/repos/tiffanyqi/calcentral/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tiffanyqi/calcentral/labels{/name}","releases_url":"https://api.github.com/repos/tiffanyqi/calcentral/releases{/id}","deployments_url":"https://api.github.com/repos/tiffanyqi/calcentral/deployments","created_at":"2016-06-29T19:17:51Z","updated_at":"2016-06-29T19:17:55Z","pushed_at":"2016-09-27T23:01:09Z","git_url":"git://github.com/tiffanyqi/calcentral.git","ssh_url":"git@github.com:tiffanyqi/calcentral.git","clone_url":"https://github.com/tiffanyqi/calcentral.git","svn_url":"https://github.com/tiffanyqi/calcentral","homepage":"https://calcentral.berkeley.edu","size":26617,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"ets-berkeley-edu:master","ref":"master","sha":"a5aa6005e43d069a9b9f9c6fee180b5595f60c77","user":{"login":"ets-berkeley-edu","id":283538,"avatar_url":"https://avatars.githubusercontent.com/u/283538?v=3","gravatar_id":"","url":"https://api.github.com/users/ets-berkeley-edu","html_url":"https://github.com/ets-berkeley-edu","followers_url":"https://api.github.com/users/ets-berkeley-edu/followers","following_url":"https://api.github.com/users/ets-berkeley-edu/following{/other_user}","gists_url":"https://api.github.com/users/ets-berkeley-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/ets-berkeley-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ets-berkeley-edu/subscriptions","organizations_url":"https://api.github.com/users/ets-berkeley-edu/orgs","repos_url":"https://api.github.com/users/ets-berkeley-edu/repos","events_url":"https://api.github.com/users/ets-berkeley-edu/events{/privacy}","received_events_url":"https://api.github.com/users/ets-berkeley-edu/received_events","type":"Organization","site_admin":false},"repo":{"id":5483921,"name":"calcentral","full_name":"ets-berkeley-edu/calcentral","owner":{"login":"ets-berkeley-edu","id":283538,"avatar_url":"https://avatars.githubusercontent.com/u/283538?v=3","gravatar_id":"","url":"https://api.github.com/users/ets-berkeley-edu","html_url":"https://github.com/ets-berkeley-edu","followers_url":"https://api.github.com/users/ets-berkeley-edu/followers","following_url":"https://api.github.com/users/ets-berkeley-edu/following{/other_user}","gists_url":"https://api.github.com/users/ets-berkeley-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/ets-berkeley-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ets-berkeley-edu/subscriptions","organizations_url":"https://api.github.com/users/ets-berkeley-edu/orgs","repos_url":"https://api.github.com/users/ets-berkeley-edu/repos","events_url":"https://api.github.com/users/ets-berkeley-edu/events{/privacy}","received_events_url":"https://api.github.com/users/ets-berkeley-edu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ets-berkeley-edu/calcentral","description":"","fork":false,"url":"https://api.github.com/repos/ets-berkeley-edu/calcentral","forks_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/forks","keys_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/teams","hooks_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/hooks","issue_events_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/events{/number}","events_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/events","assignees_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/assignees{/user}","branches_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/branches{/branch}","tags_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/tags","blobs_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/refs{/sha}","trees_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/statuses/{sha}","languages_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/languages","stargazers_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/stargazers","contributors_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/contributors","subscribers_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/subscribers","subscription_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/subscription","commits_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/commits{/sha}","git_commits_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/commits{/sha}","comments_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/comments{/number}","issue_comment_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/comments{/number}","contents_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/contents/{+path}","compare_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/merges","archive_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/downloads","issues_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues{/number}","pulls_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls{/number}","milestones_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/milestones{/number}","notifications_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/labels{/name}","releases_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/releases{/id}","deployments_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/deployments","created_at":"2012-08-20T16:45:39Z","updated_at":"2016-08-21T03:04:47Z","pushed_at":"2016-09-28T00:05:20Z","git_url":"git://github.com/ets-berkeley-edu/calcentral.git","ssh_url":"git@github.com:ets-berkeley-edu/calcentral.git","clone_url":"https://github.com/ets-berkeley-edu/calcentral.git","svn_url":"https://github.com/ets-berkeley-edu/calcentral","homepage":"https://calcentral.berkeley.edu","size":30311,"stargazers_count":66,"watchers_count":66,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":65,"mirror_url":null,"open_issues_count":5,"forks":65,"open_issues":5,"watchers":66,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/5905"},"html":{"href":"https://github.com/ets-berkeley-edu/calcentral/pull/5905"},"issue":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/5905"},"comments":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/5905/comments"},"review_comments":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/5905/comments"},"review_comment":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/5905/commits"},"statuses":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/statuses/fd86dc0a47522db58eb8697f00504a03408b4c89"}}}}
{"actor":{"display_login":"tiffanyqi"}}