{"action":"created","issue":{"url":"https://api.github.com/repos/aspc/mainsite/issues/53","labels_url":"https://api.github.com/repos/aspc/mainsite/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/aspc/mainsite/issues/53/comments","events_url":"https://api.github.com/repos/aspc/mainsite/issues/53/events","html_url":"https://github.com/aspc/mainsite/pull/53","id":117978292,"number":53,"title":"Increases leniency of instructor lookups in /courses; fixes #52.","user":{"login":"mattdahl","id":4806093,"avatar_url":"https://avatars.githubusercontent.com/u/4806093?v=3","gravatar_id":"","url":"https://api.github.com/users/mattdahl","html_url":"https://github.com/mattdahl","followers_url":"https://api.github.com/users/mattdahl/followers","following_url":"https://api.github.com/users/mattdahl/following{/other_user}","gists_url":"https://api.github.com/users/mattdahl/gists{/gist_id}","starred_url":"https://api.github.com/users/mattdahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattdahl/subscriptions","organizations_url":"https://api.github.com/users/mattdahl/orgs","repos_url":"https://api.github.com/users/mattdahl/repos","events_url":"https://api.github.com/users/mattdahl/events{/privacy}","received_events_url":"https://api.github.com/users/mattdahl/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-20T07:08:52Z","updated_at":"2015-11-20T07:55:09Z","closed_at":"2015-11-20T07:23:28Z","pull_request":{"url":"https://api.github.com/repos/aspc/mainsite/pulls/53","html_url":"https://github.com/aspc/mainsite/pull/53","diff_url":"https://github.com/aspc/mainsite/pull/53.diff","patch_url":"https://github.com/aspc/mainsite/pull/53.patch"},"body":"Re: #52. The fundamental problem is that the course API returns instructor data as the following XML: `<Name>Clinton, Hillary</Name>`. So our `Instructor` objects just represent the name as a single string, instead of two fields for first and last name. Before, the the user would have to search only by last name (e.g. \"Clinton\"), or match the *exact* string that we have for the professor (e.g. \"Clinton, Hillary\"). Now, the user can search like before but \"Hillary Clinton\" will also return the desired results.\r\n\r\nNot 100% sure on the regex here - not my area of specialty. My logic is that `(?!-)` is a lookahead for hyphen characters to explicitly exclude them (to account for last names with hyphens), and then `\\W+` captures any non-word characters (e.g. spaces or commas). I then pass that to `re.split()` to split on."},"comment":{"url":"https://api.github.com/repos/aspc/mainsite/issues/comments/158315190","html_url":"https://github.com/aspc/mainsite/pull/53#issuecomment-158315190","issue_url":"https://api.github.com/repos/aspc/mainsite/issues/53","id":158315190,"user":{"login":"theworldbright","id":6329898,"avatar_url":"https://avatars.githubusercontent.com/u/6329898?v=3","gravatar_id":"","url":"https://api.github.com/users/theworldbright","html_url":"https://github.com/theworldbright","followers_url":"https://api.github.com/users/theworldbright/followers","following_url":"https://api.github.com/users/theworldbright/following{/other_user}","gists_url":"https://api.github.com/users/theworldbright/gists{/gist_id}","starred_url":"https://api.github.com/users/theworldbright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theworldbright/subscriptions","organizations_url":"https://api.github.com/users/theworldbright/orgs","repos_url":"https://api.github.com/users/theworldbright/repos","events_url":"https://api.github.com/users/theworldbright/events{/privacy}","received_events_url":"https://api.github.com/users/theworldbright/received_events","type":"User","site_admin":false},"created_at":"2015-11-20T07:55:09Z","updated_at":"2015-11-20T07:55:09Z","body":"I loaded the current terms courses onto staging. \"Mark Allen\", whom Patrick originally tried searching for is returning a match. I've done a couple other tests and it is looking good. If someone else can give me a confirmation, we can push this onto the mainsite. @aspc/digital-media-and-programming-group "}}