{"action":"created","comment":{"url":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/comments/33767390","id":33767390,"diff_hunk":"@@ -282,6 +310,43 @@\n     description \"Description for factory-generated General question.\"\n     max_grade 1\n     staff_comments \"Staff comment for factory-generated General question.\"\n+\n+    trait :auto_grading_exact do\n+      auto_graded true\n+      auto_grading_type :exact\n+      ignore do\n+        option_count 2\n+      end\n+      after(:build) do |question, evaluator|\n+        evaluator.option_count.times do\n+          question.auto_grading_exact_options << build(:auto_grading_exact_option)\n+        end\n+      end\n+    end\n+\n+    trait :auto_grading_keyword do\n+      auto_graded true\n+      auto_grading_type :keyword\n+      ignore do\n+        option_count 2\n+      end\n+      after(:build) do |question, evaluator|\n+        evaluator.option_count.times do\n+          question.auto_grading_keyword_options << build(:auto_grading_keyword_option)\n+        end\n+      end\n+    end\n+  end\n+\n+  factory :auto_grading_exact_option, class: Assessment::AutoGradingExactOption do\n+    correct true\n+    answer 'Some answer'","path":"spec/factories.rb","position":123,"original_position":123,"commit_id":"8bc9effc39ac64581332d7184b1c551aadcadc91","original_commit_id":"8bc9effc39ac64581332d7184b1c551aadcadc91","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-07-02T11:04:26Z","updated_at":"2015-07-02T11:04:26Z","html_url":"https://github.com/Coursemology/coursemology.org/pull/428#discussion_r33767390","pull_request_url":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/428","_links":{"self":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/comments/33767390"},"html":{"href":"https://github.com/Coursemology/coursemology.org/pull/428#discussion_r33767390"},"pull_request":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/428"}}},"pull_request":{"url":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/428","id":39071104,"html_url":"https://github.com/Coursemology/coursemology.org/pull/428","diff_url":"https://github.com/Coursemology/coursemology.org/pull/428.diff","patch_url":"https://github.com/Coursemology/coursemology.org/pull/428.patch","issue_url":"https://api.github.com/repos/Coursemology/coursemology.org/issues/428","number":428,"state":"open","locked":false,"title":"Auto-grading with keyword answers","user":{"login":"dariusf","id":4328341,"avatar_url":"https://avatars.githubusercontent.com/u/4328341?v=3","gravatar_id":"","url":"https://api.github.com/users/dariusf","html_url":"https://github.com/dariusf","followers_url":"https://api.github.com/users/dariusf/followers","following_url":"https://api.github.com/users/dariusf/following{/other_user}","gists_url":"https://api.github.com/users/dariusf/gists{/gist_id}","starred_url":"https://api.github.com/users/dariusf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dariusf/subscriptions","organizations_url":"https://api.github.com/users/dariusf/orgs","repos_url":"https://api.github.com/users/dariusf/repos","events_url":"https://api.github.com/users/dariusf/events{/privacy}","received_events_url":"https://api.github.com/users/dariusf/received_events","type":"User","site_admin":false},"body":"Implements feature 4 in Shuqun's feature requests. Depends on #427.\r\n\r\n- On creating an assessment question, a UI for adding variable numbers of keyword-score pairs will be shown.\r\n- When the question is graded, the keyword-score pairs for it are shown. The keywords will also be highlighted in the submitted solution, and a grade will be filled in based on how many keywords are present.","created_at":"2015-07-02T11:04:16Z","updated_at":"2015-07-02T11:04:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"141fcaa3299cfa8d5c5c83d4cfe261ac5f4efd85","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/428/commits","review_comments_url":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/428/comments","review_comment_url":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Coursemology/coursemology.org/issues/428/comments","statuses_url":"https://api.github.com/repos/Coursemology/coursemology.org/statuses/8bc9effc39ac64581332d7184b1c551aadcadc91","head":{"label":"Coursemology:dariusf/keyword-auto-grading","ref":"dariusf/keyword-auto-grading","sha":"8bc9effc39ac64581332d7184b1c551aadcadc91","user":{"login":"Coursemology","id":4427741,"avatar_url":"https://avatars.githubusercontent.com/u/4427741?v=3","gravatar_id":"","url":"https://api.github.com/users/Coursemology","html_url":"https://github.com/Coursemology","followers_url":"https://api.github.com/users/Coursemology/followers","following_url":"https://api.github.com/users/Coursemology/following{/other_user}","gists_url":"https://api.github.com/users/Coursemology/gists{/gist_id}","starred_url":"https://api.github.com/users/Coursemology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coursemology/subscriptions","organizations_url":"https://api.github.com/users/Coursemology/orgs","repos_url":"https://api.github.com/users/Coursemology/repos","events_url":"https://api.github.com/users/Coursemology/events{/privacy}","received_events_url":"https://api.github.com/users/Coursemology/received_events","type":"Organization","site_admin":false},"repo":{"id":10055153,"name":"coursemology.org","full_name":"Coursemology/coursemology.org","owner":{"login":"Coursemology","id":4427741,"avatar_url":"https://avatars.githubusercontent.com/u/4427741?v=3","gravatar_id":"","url":"https://api.github.com/users/Coursemology","html_url":"https://github.com/Coursemology","followers_url":"https://api.github.com/users/Coursemology/followers","following_url":"https://api.github.com/users/Coursemology/following{/other_user}","gists_url":"https://api.github.com/users/Coursemology/gists{/gist_id}","starred_url":"https://api.github.com/users/Coursemology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coursemology/subscriptions","organizations_url":"https://api.github.com/users/Coursemology/orgs","repos_url":"https://api.github.com/users/Coursemology/repos","events_url":"https://api.github.com/users/Coursemology/events{/privacy}","received_events_url":"https://api.github.com/users/Coursemology/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Coursemology/coursemology.org","description":"","fork":false,"url":"https://api.github.com/repos/Coursemology/coursemology.org","forks_url":"https://api.github.com/repos/Coursemology/coursemology.org/forks","keys_url":"https://api.github.com/repos/Coursemology/coursemology.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Coursemology/coursemology.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Coursemology/coursemology.org/teams","hooks_url":"https://api.github.com/repos/Coursemology/coursemology.org/hooks","issue_events_url":"https://api.github.com/repos/Coursemology/coursemology.org/issues/events{/number}","events_url":"https://api.github.com/repos/Coursemology/coursemology.org/events","assignees_url":"https://api.github.com/repos/Coursemology/coursemology.org/assignees{/user}","branches_url":"https://api.github.com/repos/Coursemology/coursemology.org/branches{/branch}","tags_url":"https://api.github.com/repos/Coursemology/coursemology.org/tags","blobs_url":"https://api.github.com/repos/Coursemology/coursemology.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Coursemology/coursemology.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Coursemology/coursemology.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/Coursemology/coursemology.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Coursemology/coursemology.org/statuses/{sha}","languages_url":"https://api.github.com/repos/Coursemology/coursemology.org/languages","stargazers_url":"https://api.github.com/repos/Coursemology/coursemology.org/stargazers","contributors_url":"https://api.github.com/repos/Coursemology/coursemology.org/contributors","subscribers_url":"https://api.github.com/repos/Coursemology/coursemology.org/subscribers","subscription_url":"https://api.github.com/repos/Coursemology/coursemology.org/subscription","commits_url":"https://api.github.com/repos/Coursemology/coursemology.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/Coursemology/coursemology.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/Coursemology/coursemology.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/Coursemology/coursemology.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/Coursemology/coursemology.org/contents/{+path}","compare_url":"https://api.github.com/repos/Coursemology/coursemology.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Coursemology/coursemology.org/merges","archive_url":"https://api.github.com/repos/Coursemology/coursemology.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Coursemology/coursemology.org/downloads","issues_url":"https://api.github.com/repos/Coursemology/coursemology.org/issues{/number}","pulls_url":"https://api.github.com/repos/Coursemology/coursemology.org/pulls{/number}","milestones_url":"https://api.github.com/repos/Coursemology/coursemology.org/milestones{/number}","notifications_url":"https://api.github.com/repos/Coursemology/coursemology.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Coursemology/coursemology.org/labels{/name}","releases_url":"https://api.github.com/repos/Coursemology/coursemology.org/releases{/id}","created_at":"2013-05-14T13:04:30Z","updated_at":"2015-06-17T05:53:50Z","pushed_at":"2015-07-02T11:04:16Z","git_url":"git://github.com/Coursemology/coursemology.org.git","ssh_url":"git@github.com:Coursemology/coursemology.org.git","clone_url":"https://github.com/Coursemology/coursemology.org.git","svn_url":"https://github.com/Coursemology/coursemology.org","homepage":"coursemology.org","size":38541,"stargazers_count":33,"watchers_count":33,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":100,"forks":29,"open_issues":100,"watchers":33,"default_branch":"development"}},"base":{"label":"Coursemology:development","ref":"development","sha":"ea42dc6f9b48ffd903a358ecf1cb9a12db003c16","user":{"login":"Coursemology","id":4427741,"avatar_url":"https://avatars.githubusercontent.com/u/4427741?v=3","gravatar_id":"","url":"https://api.github.com/users/Coursemology","html_url":"https://github.com/Coursemology","followers_url":"https://api.github.com/users/Coursemology/followers","following_url":"https://api.github.com/users/Coursemology/following{/other_user}","gists_url":"https://api.github.com/users/Coursemology/gists{/gist_id}","starred_url":"https://api.github.com/users/Coursemology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coursemology/subscriptions","organizations_url":"https://api.github.com/users/Coursemology/orgs","repos_url":"https://api.github.com/users/Coursemology/repos","events_url":"https://api.github.com/users/Coursemology/events{/privacy}","received_events_url":"https://api.github.com/users/Coursemology/received_events","type":"Organization","site_admin":false},"repo":{"id":10055153,"name":"coursemology.org","full_name":"Coursemology/coursemology.org","owner":{"login":"Coursemology","id":4427741,"avatar_url":"https://avatars.githubusercontent.com/u/4427741?v=3","gravatar_id":"","url":"https://api.github.com/users/Coursemology","html_url":"https://github.com/Coursemology","followers_url":"https://api.github.com/users/Coursemology/followers","following_url":"https://api.github.com/users/Coursemology/following{/other_user}","gists_url":"https://api.github.com/users/Coursemology/gists{/gist_id}","starred_url":"https://api.github.com/users/Coursemology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coursemology/subscriptions","organizations_url":"https://api.github.com/users/Coursemology/orgs","repos_url":"https://api.github.com/users/Coursemology/repos","events_url":"https://api.github.com/users/Coursemology/events{/privacy}","received_events_url":"https://api.github.com/users/Coursemology/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Coursemology/coursemology.org","description":"","fork":false,"url":"https://api.github.com/repos/Coursemology/coursemology.org","forks_url":"https://api.github.com/repos/Coursemology/coursemology.org/forks","keys_url":"https://api.github.com/repos/Coursemology/coursemology.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Coursemology/coursemology.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Coursemology/coursemology.org/teams","hooks_url":"https://api.github.com/repos/Coursemology/coursemology.org/hooks","issue_events_url":"https://api.github.com/repos/Coursemology/coursemology.org/issues/events{/number}","events_url":"https://api.github.com/repos/Coursemology/coursemology.org/events","assignees_url":"https://api.github.com/repos/Coursemology/coursemology.org/assignees{/user}","branches_url":"https://api.github.com/repos/Coursemology/coursemology.org/branches{/branch}","tags_url":"https://api.github.com/repos/Coursemology/coursemology.org/tags","blobs_url":"https://api.github.com/repos/Coursemology/coursemology.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Coursemology/coursemology.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Coursemology/coursemology.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/Coursemology/coursemology.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Coursemology/coursemology.org/statuses/{sha}","languages_url":"https://api.github.com/repos/Coursemology/coursemology.org/languages","stargazers_url":"https://api.github.com/repos/Coursemology/coursemology.org/stargazers","contributors_url":"https://api.github.com/repos/Coursemology/coursemology.org/contributors","subscribers_url":"https://api.github.com/repos/Coursemology/coursemology.org/subscribers","subscription_url":"https://api.github.com/repos/Coursemology/coursemology.org/subscription","commits_url":"https://api.github.com/repos/Coursemology/coursemology.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/Coursemology/coursemology.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/Coursemology/coursemology.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/Coursemology/coursemology.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/Coursemology/coursemology.org/contents/{+path}","compare_url":"https://api.github.com/repos/Coursemology/coursemology.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Coursemology/coursemology.org/merges","archive_url":"https://api.github.com/repos/Coursemology/coursemology.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Coursemology/coursemology.org/downloads","issues_url":"https://api.github.com/repos/Coursemology/coursemology.org/issues{/number}","pulls_url":"https://api.github.com/repos/Coursemology/coursemology.org/pulls{/number}","milestones_url":"https://api.github.com/repos/Coursemology/coursemology.org/milestones{/number}","notifications_url":"https://api.github.com/repos/Coursemology/coursemology.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Coursemology/coursemology.org/labels{/name}","releases_url":"https://api.github.com/repos/Coursemology/coursemology.org/releases{/id}","created_at":"2013-05-14T13:04:30Z","updated_at":"2015-06-17T05:53:50Z","pushed_at":"2015-07-02T11:04:16Z","git_url":"git://github.com/Coursemology/coursemology.org.git","ssh_url":"git@github.com:Coursemology/coursemology.org.git","clone_url":"https://github.com/Coursemology/coursemology.org.git","svn_url":"https://github.com/Coursemology/coursemology.org","homepage":"coursemology.org","size":38541,"stargazers_count":33,"watchers_count":33,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":100,"forks":29,"open_issues":100,"watchers":33,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/428"},"html":{"href":"https://github.com/Coursemology/coursemology.org/pull/428"},"issue":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/issues/428"},"comments":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/issues/428/comments"},"review_comments":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/428/comments"},"review_comment":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/428/commits"},"statuses":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/statuses/8bc9effc39ac64581332d7184b1c551aadcadc91"}}}}