{"action":"created","comment":{"url":"https://api.github.com/repos/expertiza/expertiza/pulls/comments/26456356","id":26456356,"diff_hunk":"@@ -1,21 +1,59 @@\n require 'rails_helper'\n include LogInHelper\n \n-feature 'Users' do\n-  before(:each) do\n+feature 'Method 1: Instructor search a user' do\n+  before(:all) do","path":"spec/features/users_spec.rb","position":7,"original_position":7,"commit_id":"0eb5b38d8c08568b7c22cd606a7883e3b46b7711","original_commit_id":"0eb5b38d8c08568b7c22cd606a7883e3b46b7711","user":{"login":"Winbobob","id":7702035,"avatar_url":"https://avatars.githubusercontent.com/u/7702035?v=3","gravatar_id":"","url":"https://api.github.com/users/Winbobob","html_url":"https://github.com/Winbobob","followers_url":"https://api.github.com/users/Winbobob/followers","following_url":"https://api.github.com/users/Winbobob/following{/other_user}","gists_url":"https://api.github.com/users/Winbobob/gists{/gist_id}","starred_url":"https://api.github.com/users/Winbobob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Winbobob/subscriptions","organizations_url":"https://api.github.com/users/Winbobob/orgs","repos_url":"https://api.github.com/users/Winbobob/repos","events_url":"https://api.github.com/users/Winbobob/events{/privacy}","received_events_url":"https://api.github.com/users/Winbobob/received_events","type":"User","site_admin":false},"body":"If #504 issue can be fixed, we can use ```before(:each)``` instead of ```before(:all)```. Now we cannot run ```student.save``` twice, because it will generate new users twice and occur an error describe in #504.","created_at":"2015-03-16T02:07:05Z","updated_at":"2015-03-16T02:07:05Z","html_url":"https://github.com/expertiza/expertiza/pull/505#discussion_r26456356","pull_request_url":"https://api.github.com/repos/expertiza/expertiza/pulls/505","_links":{"self":{"href":"https://api.github.com/repos/expertiza/expertiza/pulls/comments/26456356"},"html":{"href":"https://github.com/expertiza/expertiza/pull/505#discussion_r26456356"},"pull_request":{"href":"https://api.github.com/repos/expertiza/expertiza/pulls/505"}}},"pull_request":{"url":"https://api.github.com/repos/expertiza/expertiza/pulls/505","id":31212381,"html_url":"https://github.com/expertiza/expertiza/pull/505","diff_url":"https://github.com/expertiza/expertiza/pull/505.diff","patch_url":"https://github.com/expertiza/expertiza/pull/505.patch","issue_url":"https://api.github.com/repos/expertiza/expertiza/issues/505","number":505,"state":"open","locked":false,"title":"E1506: Refactoring, testing and new features related to “users”","user":{"login":"Winbobob","id":7702035,"avatar_url":"https://avatars.githubusercontent.com/u/7702035?v=3","gravatar_id":"","url":"https://api.github.com/users/Winbobob","html_url":"https://github.com/Winbobob","followers_url":"https://api.github.com/users/Winbobob/followers","following_url":"https://api.github.com/users/Winbobob/following{/other_user}","gists_url":"https://api.github.com/users/Winbobob/gists{/gist_id}","starred_url":"https://api.github.com/users/Winbobob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Winbobob/subscriptions","organizations_url":"https://api.github.com/users/Winbobob/orgs","repos_url":"https://api.github.com/users/Winbobob/repos","events_url":"https://api.github.com/users/Winbobob/events{/privacy}","received_events_url":"https://api.github.com/users/Winbobob/received_events","type":"User","site_admin":false},"body":"<b>What needed to be done:</b>\r\nClasses involved: users_controller.rb\r\n-   Find the un-called methods if any and delete them. <b>[done]</b>\r\n-  Change the Rails 2 syntax to Rails 4 style.\r\n-  Refactor users_controller.rb\r\n  -  Change the white space for the second harf of this file, starts at “def edit”. <b>[done]</b>\r\n  -  Separate the “paginate_list” method into two methods. The search method should be in model and the paginating method should be in the controller.  <b>[done]</b>\r\n-   New feature: delete users\r\n  - A user can be deleted if (s)he has not participated in an assignment. <b>[done]</b>\r\n  - If the user is participating in an assignment, the system will ask, “User is participating in k assignments.  Delete as a participant in these assignment(s)?”  <b>[done]</b>\r\n - If the user has submitted or reviewed in any of these assignments, the system will say the user cannot be deleted, but offer to rename the user account to <current_account_name>_hidden.\r\n   -  rename (javascript calling update method in users_controller.rb) <b>[done]</b>\r\n    - different users have different delete methods.  <b>[Not yet]</b>\r\n - If the person trying to delete does not want to rename the account, the system will just say that the user can’t be deleted. <b>[done]</b>\r\n -  Write tests (with Rspec) for this feature.<b>[Not yet]</b>\r\n-  Testing feature: search for users\r\n -  In rails 4 branch, admins can search for the users with 1) users’ login names 2) users’ last or first names and 3) users’ emails. Please write tests (with Rspec) for this feature <b>[done]</b>\r\n","created_at":"2015-03-16T01:46:42Z","updated_at":"2015-03-16T02:07:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b9ec30ffd8650c41df3d96b7864343a84f4aedc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/expertiza/expertiza/pulls/505/commits","review_comments_url":"https://api.github.com/repos/expertiza/expertiza/pulls/505/comments","review_comment_url":"https://api.github.com/repos/expertiza/expertiza/pulls/comments{/number}","comments_url":"https://api.github.com/repos/expertiza/expertiza/issues/505/comments","statuses_url":"https://api.github.com/repos/expertiza/expertiza/statuses/0eb5b38d8c08568b7c22cd606a7883e3b46b7711","head":{"label":"CSC517-Proj2-E1506:rails4","ref":"rails4","sha":"0eb5b38d8c08568b7c22cd606a7883e3b46b7711","user":{"login":"CSC517-Proj2-E1506","id":11046758,"avatar_url":"https://avatars.githubusercontent.com/u/11046758?v=3","gravatar_id":"","url":"https://api.github.com/users/CSC517-Proj2-E1506","html_url":"https://github.com/CSC517-Proj2-E1506","followers_url":"https://api.github.com/users/CSC517-Proj2-E1506/followers","following_url":"https://api.github.com/users/CSC517-Proj2-E1506/following{/other_user}","gists_url":"https://api.github.com/users/CSC517-Proj2-E1506/gists{/gist_id}","starred_url":"https://api.github.com/users/CSC517-Proj2-E1506/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CSC517-Proj2-E1506/subscriptions","organizations_url":"https://api.github.com/users/CSC517-Proj2-E1506/orgs","repos_url":"https://api.github.com/users/CSC517-Proj2-E1506/repos","events_url":"https://api.github.com/users/CSC517-Proj2-E1506/events{/privacy}","received_events_url":"https://api.github.com/users/CSC517-Proj2-E1506/received_events","type":"Organization","site_admin":false},"repo":{"id":30924424,"name":"expertiza","full_name":"CSC517-Proj2-E1506/expertiza","owner":{"login":"CSC517-Proj2-E1506","id":11046758,"avatar_url":"https://avatars.githubusercontent.com/u/11046758?v=3","gravatar_id":"","url":"https://api.github.com/users/CSC517-Proj2-E1506","html_url":"https://github.com/CSC517-Proj2-E1506","followers_url":"https://api.github.com/users/CSC517-Proj2-E1506/followers","following_url":"https://api.github.com/users/CSC517-Proj2-E1506/following{/other_user}","gists_url":"https://api.github.com/users/CSC517-Proj2-E1506/gists{/gist_id}","starred_url":"https://api.github.com/users/CSC517-Proj2-E1506/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CSC517-Proj2-E1506/subscriptions","organizations_url":"https://api.github.com/users/CSC517-Proj2-E1506/orgs","repos_url":"https://api.github.com/users/CSC517-Proj2-E1506/repos","events_url":"https://api.github.com/users/CSC517-Proj2-E1506/events{/privacy}","received_events_url":"https://api.github.com/users/CSC517-Proj2-E1506/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CSC517-Proj2-E1506/expertiza","description":"Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc).  The Expertiza project is supported by the National Science Foundation.","fork":true,"url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza","forks_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/forks","keys_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/teams","hooks_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/hooks","issue_events_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/issues/events{/number}","events_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/events","assignees_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/assignees{/user}","branches_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/branches{/branch}","tags_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/tags","blobs_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/git/refs{/sha}","trees_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/statuses/{sha}","languages_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/languages","stargazers_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/stargazers","contributors_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/contributors","subscribers_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/subscribers","subscription_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/subscription","commits_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/commits{/sha}","git_commits_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/git/commits{/sha}","comments_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/comments{/number}","issue_comment_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/issues/comments{/number}","contents_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/contents/{+path}","compare_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/merges","archive_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/downloads","issues_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/issues{/number}","pulls_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/pulls{/number}","milestones_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/milestones{/number}","notifications_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/labels{/name}","releases_url":"https://api.github.com/repos/CSC517-Proj2-E1506/expertiza/releases{/id}","created_at":"2015-02-17T15:58:57Z","updated_at":"2015-03-16T01:12:59Z","pushed_at":"2015-03-16T01:12:59Z","git_url":"git://github.com/CSC517-Proj2-E1506/expertiza.git","ssh_url":"git@github.com:CSC517-Proj2-E1506/expertiza.git","clone_url":"https://github.com/CSC517-Proj2-E1506/expertiza.git","svn_url":"https://github.com/CSC517-Proj2-E1506/expertiza","homepage":"http://wikis.lib.ncsu.edu/index.php/Expertiza","size":33790,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"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":"rails4"}},"base":{"label":"expertiza:rails4","ref":"rails4","sha":"8709e1c536b75bc64cd0e16bc8767e83f17a4dd7","user":{"login":"expertiza","id":427458,"avatar_url":"https://avatars.githubusercontent.com/u/427458?v=3","gravatar_id":"","url":"https://api.github.com/users/expertiza","html_url":"https://github.com/expertiza","followers_url":"https://api.github.com/users/expertiza/followers","following_url":"https://api.github.com/users/expertiza/following{/other_user}","gists_url":"https://api.github.com/users/expertiza/gists{/gist_id}","starred_url":"https://api.github.com/users/expertiza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/expertiza/subscriptions","organizations_url":"https://api.github.com/users/expertiza/orgs","repos_url":"https://api.github.com/users/expertiza/repos","events_url":"https://api.github.com/users/expertiza/events{/privacy}","received_events_url":"https://api.github.com/users/expertiza/received_events","type":"Organization","site_admin":false},"repo":{"id":962564,"name":"expertiza","full_name":"expertiza/expertiza","owner":{"login":"expertiza","id":427458,"avatar_url":"https://avatars.githubusercontent.com/u/427458?v=3","gravatar_id":"","url":"https://api.github.com/users/expertiza","html_url":"https://github.com/expertiza","followers_url":"https://api.github.com/users/expertiza/followers","following_url":"https://api.github.com/users/expertiza/following{/other_user}","gists_url":"https://api.github.com/users/expertiza/gists{/gist_id}","starred_url":"https://api.github.com/users/expertiza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/expertiza/subscriptions","organizations_url":"https://api.github.com/users/expertiza/orgs","repos_url":"https://api.github.com/users/expertiza/repos","events_url":"https://api.github.com/users/expertiza/events{/privacy}","received_events_url":"https://api.github.com/users/expertiza/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/expertiza/expertiza","description":"Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc).  The Expertiza project is supported by the National Science Foundation.","fork":false,"url":"https://api.github.com/repos/expertiza/expertiza","forks_url":"https://api.github.com/repos/expertiza/expertiza/forks","keys_url":"https://api.github.com/repos/expertiza/expertiza/keys{/key_id}","collaborators_url":"https://api.github.com/repos/expertiza/expertiza/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/expertiza/expertiza/teams","hooks_url":"https://api.github.com/repos/expertiza/expertiza/hooks","issue_events_url":"https://api.github.com/repos/expertiza/expertiza/issues/events{/number}","events_url":"https://api.github.com/repos/expertiza/expertiza/events","assignees_url":"https://api.github.com/repos/expertiza/expertiza/assignees{/user}","branches_url":"https://api.github.com/repos/expertiza/expertiza/branches{/branch}","tags_url":"https://api.github.com/repos/expertiza/expertiza/tags","blobs_url":"https://api.github.com/repos/expertiza/expertiza/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/expertiza/expertiza/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/expertiza/expertiza/git/refs{/sha}","trees_url":"https://api.github.com/repos/expertiza/expertiza/git/trees{/sha}","statuses_url":"https://api.github.com/repos/expertiza/expertiza/statuses/{sha}","languages_url":"https://api.github.com/repos/expertiza/expertiza/languages","stargazers_url":"https://api.github.com/repos/expertiza/expertiza/stargazers","contributors_url":"https://api.github.com/repos/expertiza/expertiza/contributors","subscribers_url":"https://api.github.com/repos/expertiza/expertiza/subscribers","subscription_url":"https://api.github.com/repos/expertiza/expertiza/subscription","commits_url":"https://api.github.com/repos/expertiza/expertiza/commits{/sha}","git_commits_url":"https://api.github.com/repos/expertiza/expertiza/git/commits{/sha}","comments_url":"https://api.github.com/repos/expertiza/expertiza/comments{/number}","issue_comment_url":"https://api.github.com/repos/expertiza/expertiza/issues/comments{/number}","contents_url":"https://api.github.com/repos/expertiza/expertiza/contents/{+path}","compare_url":"https://api.github.com/repos/expertiza/expertiza/compare/{base}...{head}","merges_url":"https://api.github.com/repos/expertiza/expertiza/merges","archive_url":"https://api.github.com/repos/expertiza/expertiza/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/expertiza/expertiza/downloads","issues_url":"https://api.github.com/repos/expertiza/expertiza/issues{/number}","pulls_url":"https://api.github.com/repos/expertiza/expertiza/pulls{/number}","milestones_url":"https://api.github.com/repos/expertiza/expertiza/milestones{/number}","notifications_url":"https://api.github.com/repos/expertiza/expertiza/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/expertiza/expertiza/labels{/name}","releases_url":"https://api.github.com/repos/expertiza/expertiza/releases{/id}","created_at":"2010-10-05T03:37:29Z","updated_at":"2015-03-12T23:42:06Z","pushed_at":"2015-03-12T23:42:06Z","git_url":"git://github.com/expertiza/expertiza.git","ssh_url":"git@github.com:expertiza/expertiza.git","clone_url":"https://github.com/expertiza/expertiza.git","svn_url":"https://github.com/expertiza/expertiza","homepage":"http://wikis.lib.ncsu.edu/index.php/Expertiza","size":52450,"stargazers_count":99,"watchers_count":99,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":284,"mirror_url":null,"open_issues_count":172,"forks":284,"open_issues":172,"watchers":99,"default_branch":"rails4"}},"_links":{"self":{"href":"https://api.github.com/repos/expertiza/expertiza/pulls/505"},"html":{"href":"https://github.com/expertiza/expertiza/pull/505"},"issue":{"href":"https://api.github.com/repos/expertiza/expertiza/issues/505"},"comments":{"href":"https://api.github.com/repos/expertiza/expertiza/issues/505/comments"},"review_comments":{"href":"https://api.github.com/repos/expertiza/expertiza/pulls/505/comments"},"review_comment":{"href":"https://api.github.com/repos/expertiza/expertiza/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/expertiza/expertiza/pulls/505/commits"},"statuses":{"href":"https://api.github.com/repos/expertiza/expertiza/statuses/0eb5b38d8c08568b7c22cd606a7883e3b46b7711"}}}}