{"action":"created","comment":{"url":"https://api.github.com/repos/ubc/ubcpi/pulls/comments/39166264","id":39166264,"diff_hunk":"@@ -0,0 +1,248 @@\n+IMAGE_ATTRIBUTES = {'position': 'image_position', 'show_image_fields': 'show_image_fields', 'alt': 'image_alt'}\n+\n+\n+class UpdateFromXmlError(Exception):\n+    \"\"\"\n+    Error occurred while deserializing the OpenAssessment XBlock content from XML.\n+    \"\"\"\n+    pass\n+\n+\n+class ValidationError(UpdateFromXmlError):\n+    \"\"\"\n+    The XML definition is not semantically valid.\n+    \"\"\"\n+    pass\n+\n+\n+def _safe_get_text(element):\n+    \"\"\"\n+    Retrieve the text from the element, safely handling empty elements.\n+\n+    Args:\n+        element (lxml.etree.Element): The XML element.\n+\n+    Returns:\n+        unicode\n+    \"\"\"\n+    return unicode(element.text) if element.text is not None else u\"\"","path":"ubcpi/serialize.py","position":28,"original_position":28,"commit_id":"856b186ea87c5a6e805502aa6af715be26ada74f","original_commit_id":"48176d4fb6f92e455456fafb872694741a8fb1ab","user":{"login":"nedbat","id":23789,"avatar_url":"https://avatars.githubusercontent.com/u/23789?v=3","gravatar_id":"","url":"https://api.github.com/users/nedbat","html_url":"https://github.com/nedbat","followers_url":"https://api.github.com/users/nedbat/followers","following_url":"https://api.github.com/users/nedbat/following{/other_user}","gists_url":"https://api.github.com/users/nedbat/gists{/gist_id}","starred_url":"https://api.github.com/users/nedbat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nedbat/subscriptions","organizations_url":"https://api.github.com/users/nedbat/orgs","repos_url":"https://api.github.com/users/nedbat/repos","events_url":"https://api.github.com/users/nedbat/events{/privacy}","received_events_url":"https://api.github.com/users/nedbat/received_events","type":"User","site_admin":false},"body":"Yes, it does seem that way.","created_at":"2015-09-10T14:30:32Z","updated_at":"2015-09-10T14:30:32Z","html_url":"https://github.com/ubc/ubcpi/pull/27#discussion_r39166264","pull_request_url":"https://api.github.com/repos/ubc/ubcpi/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/ubc/ubcpi/pulls/comments/39166264"},"html":{"href":"https://github.com/ubc/ubcpi/pull/27#discussion_r39166264"},"pull_request":{"href":"https://api.github.com/repos/ubc/ubcpi/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/ubc/ubcpi/pulls/27","id":43791274,"html_url":"https://github.com/ubc/ubcpi/pull/27","diff_url":"https://github.com/ubc/ubcpi/pull/27.diff","patch_url":"https://github.com/ubc/ubcpi/pull/27.patch","issue_url":"https://api.github.com/repos/ubc/ubcpi/issues/27","number":27,"state":"open","locked":false,"title":"For Edx Review","user":{"login":"xcompass","id":465548,"avatar_url":"https://avatars.githubusercontent.com/u/465548?v=3","gravatar_id":"","url":"https://api.github.com/users/xcompass","html_url":"https://github.com/xcompass","followers_url":"https://api.github.com/users/xcompass/followers","following_url":"https://api.github.com/users/xcompass/following{/other_user}","gists_url":"https://api.github.com/users/xcompass/gists{/gist_id}","starred_url":"https://api.github.com/users/xcompass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xcompass/subscriptions","organizations_url":"https://api.github.com/users/xcompass/orgs","repos_url":"https://api.github.com/users/xcompass/repos","events_url":"https://api.github.com/users/xcompass/events{/privacy}","received_events_url":"https://api.github.com/users/xcompass/received_events","type":"User","site_admin":false},"body":"For an exported test course: https://s3.amazonaws.com/edx-uploads-std/UBCPI_TestCourse.tar.gz","created_at":"2015-08-31T18:02:21Z","updated_at":"2015-09-10T14:30:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0beee9f511b981ba56023ab5d8d121133c239d7d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ubc/ubcpi/pulls/27/commits","review_comments_url":"https://api.github.com/repos/ubc/ubcpi/pulls/27/comments","review_comment_url":"https://api.github.com/repos/ubc/ubcpi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ubc/ubcpi/issues/27/comments","statuses_url":"https://api.github.com/repos/ubc/ubcpi/statuses/856b186ea87c5a6e805502aa6af715be26ada74f","head":{"label":"ubc:master","ref":"master","sha":"856b186ea87c5a6e805502aa6af715be26ada74f","user":{"login":"ubc","id":1396118,"avatar_url":"https://avatars.githubusercontent.com/u/1396118?v=3","gravatar_id":"","url":"https://api.github.com/users/ubc","html_url":"https://github.com/ubc","followers_url":"https://api.github.com/users/ubc/followers","following_url":"https://api.github.com/users/ubc/following{/other_user}","gists_url":"https://api.github.com/users/ubc/gists{/gist_id}","starred_url":"https://api.github.com/users/ubc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubc/subscriptions","organizations_url":"https://api.github.com/users/ubc/orgs","repos_url":"https://api.github.com/users/ubc/repos","events_url":"https://api.github.com/users/ubc/events{/privacy}","received_events_url":"https://api.github.com/users/ubc/received_events","type":"Organization","site_admin":false},"repo":{"id":30939095,"name":"ubcpi","full_name":"ubc/ubcpi","owner":{"login":"ubc","id":1396118,"avatar_url":"https://avatars.githubusercontent.com/u/1396118?v=3","gravatar_id":"","url":"https://api.github.com/users/ubc","html_url":"https://github.com/ubc","followers_url":"https://api.github.com/users/ubc/followers","following_url":"https://api.github.com/users/ubc/following{/other_user}","gists_url":"https://api.github.com/users/ubc/gists{/gist_id}","starred_url":"https://api.github.com/users/ubc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubc/subscriptions","organizations_url":"https://api.github.com/users/ubc/orgs","repos_url":"https://api.github.com/users/ubc/repos","events_url":"https://api.github.com/users/ubc/events{/privacy}","received_events_url":"https://api.github.com/users/ubc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ubc/ubcpi","description":"Peer Instruction XBlock","fork":false,"url":"https://api.github.com/repos/ubc/ubcpi","forks_url":"https://api.github.com/repos/ubc/ubcpi/forks","keys_url":"https://api.github.com/repos/ubc/ubcpi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubc/ubcpi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubc/ubcpi/teams","hooks_url":"https://api.github.com/repos/ubc/ubcpi/hooks","issue_events_url":"https://api.github.com/repos/ubc/ubcpi/issues/events{/number}","events_url":"https://api.github.com/repos/ubc/ubcpi/events","assignees_url":"https://api.github.com/repos/ubc/ubcpi/assignees{/user}","branches_url":"https://api.github.com/repos/ubc/ubcpi/branches{/branch}","tags_url":"https://api.github.com/repos/ubc/ubcpi/tags","blobs_url":"https://api.github.com/repos/ubc/ubcpi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubc/ubcpi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubc/ubcpi/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubc/ubcpi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubc/ubcpi/statuses/{sha}","languages_url":"https://api.github.com/repos/ubc/ubcpi/languages","stargazers_url":"https://api.github.com/repos/ubc/ubcpi/stargazers","contributors_url":"https://api.github.com/repos/ubc/ubcpi/contributors","subscribers_url":"https://api.github.com/repos/ubc/ubcpi/subscribers","subscription_url":"https://api.github.com/repos/ubc/ubcpi/subscription","commits_url":"https://api.github.com/repos/ubc/ubcpi/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubc/ubcpi/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubc/ubcpi/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubc/ubcpi/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubc/ubcpi/contents/{+path}","compare_url":"https://api.github.com/repos/ubc/ubcpi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubc/ubcpi/merges","archive_url":"https://api.github.com/repos/ubc/ubcpi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubc/ubcpi/downloads","issues_url":"https://api.github.com/repos/ubc/ubcpi/issues{/number}","pulls_url":"https://api.github.com/repos/ubc/ubcpi/pulls{/number}","milestones_url":"https://api.github.com/repos/ubc/ubcpi/milestones{/number}","notifications_url":"https://api.github.com/repos/ubc/ubcpi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubc/ubcpi/labels{/name}","releases_url":"https://api.github.com/repos/ubc/ubcpi/releases{/id}","created_at":"2015-02-17T21:37:02Z","updated_at":"2015-09-10T11:14:02Z","pushed_at":"2015-09-10T05:28:25Z","git_url":"git://github.com/ubc/ubcpi.git","ssh_url":"git@github.com:ubc/ubcpi.git","clone_url":"https://github.com/ubc/ubcpi.git","svn_url":"https://github.com/ubc/ubcpi","homepage":null,"size":1292,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":2,"default_branch":"master"}},"base":{"label":"ubc:init","ref":"init","sha":"731496e08215a895c5e808db08a46b7889fbf290","user":{"login":"ubc","id":1396118,"avatar_url":"https://avatars.githubusercontent.com/u/1396118?v=3","gravatar_id":"","url":"https://api.github.com/users/ubc","html_url":"https://github.com/ubc","followers_url":"https://api.github.com/users/ubc/followers","following_url":"https://api.github.com/users/ubc/following{/other_user}","gists_url":"https://api.github.com/users/ubc/gists{/gist_id}","starred_url":"https://api.github.com/users/ubc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubc/subscriptions","organizations_url":"https://api.github.com/users/ubc/orgs","repos_url":"https://api.github.com/users/ubc/repos","events_url":"https://api.github.com/users/ubc/events{/privacy}","received_events_url":"https://api.github.com/users/ubc/received_events","type":"Organization","site_admin":false},"repo":{"id":30939095,"name":"ubcpi","full_name":"ubc/ubcpi","owner":{"login":"ubc","id":1396118,"avatar_url":"https://avatars.githubusercontent.com/u/1396118?v=3","gravatar_id":"","url":"https://api.github.com/users/ubc","html_url":"https://github.com/ubc","followers_url":"https://api.github.com/users/ubc/followers","following_url":"https://api.github.com/users/ubc/following{/other_user}","gists_url":"https://api.github.com/users/ubc/gists{/gist_id}","starred_url":"https://api.github.com/users/ubc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubc/subscriptions","organizations_url":"https://api.github.com/users/ubc/orgs","repos_url":"https://api.github.com/users/ubc/repos","events_url":"https://api.github.com/users/ubc/events{/privacy}","received_events_url":"https://api.github.com/users/ubc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ubc/ubcpi","description":"Peer Instruction XBlock","fork":false,"url":"https://api.github.com/repos/ubc/ubcpi","forks_url":"https://api.github.com/repos/ubc/ubcpi/forks","keys_url":"https://api.github.com/repos/ubc/ubcpi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubc/ubcpi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubc/ubcpi/teams","hooks_url":"https://api.github.com/repos/ubc/ubcpi/hooks","issue_events_url":"https://api.github.com/repos/ubc/ubcpi/issues/events{/number}","events_url":"https://api.github.com/repos/ubc/ubcpi/events","assignees_url":"https://api.github.com/repos/ubc/ubcpi/assignees{/user}","branches_url":"https://api.github.com/repos/ubc/ubcpi/branches{/branch}","tags_url":"https://api.github.com/repos/ubc/ubcpi/tags","blobs_url":"https://api.github.com/repos/ubc/ubcpi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubc/ubcpi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubc/ubcpi/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubc/ubcpi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubc/ubcpi/statuses/{sha}","languages_url":"https://api.github.com/repos/ubc/ubcpi/languages","stargazers_url":"https://api.github.com/repos/ubc/ubcpi/stargazers","contributors_url":"https://api.github.com/repos/ubc/ubcpi/contributors","subscribers_url":"https://api.github.com/repos/ubc/ubcpi/subscribers","subscription_url":"https://api.github.com/repos/ubc/ubcpi/subscription","commits_url":"https://api.github.com/repos/ubc/ubcpi/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubc/ubcpi/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubc/ubcpi/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubc/ubcpi/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubc/ubcpi/contents/{+path}","compare_url":"https://api.github.com/repos/ubc/ubcpi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubc/ubcpi/merges","archive_url":"https://api.github.com/repos/ubc/ubcpi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubc/ubcpi/downloads","issues_url":"https://api.github.com/repos/ubc/ubcpi/issues{/number}","pulls_url":"https://api.github.com/repos/ubc/ubcpi/pulls{/number}","milestones_url":"https://api.github.com/repos/ubc/ubcpi/milestones{/number}","notifications_url":"https://api.github.com/repos/ubc/ubcpi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubc/ubcpi/labels{/name}","releases_url":"https://api.github.com/repos/ubc/ubcpi/releases{/id}","created_at":"2015-02-17T21:37:02Z","updated_at":"2015-09-10T11:14:02Z","pushed_at":"2015-09-10T05:28:25Z","git_url":"git://github.com/ubc/ubcpi.git","ssh_url":"git@github.com:ubc/ubcpi.git","clone_url":"https://github.com/ubc/ubcpi.git","svn_url":"https://github.com/ubc/ubcpi","homepage":null,"size":1292,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ubc/ubcpi/pulls/27"},"html":{"href":"https://github.com/ubc/ubcpi/pull/27"},"issue":{"href":"https://api.github.com/repos/ubc/ubcpi/issues/27"},"comments":{"href":"https://api.github.com/repos/ubc/ubcpi/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/ubc/ubcpi/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/ubc/ubcpi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ubc/ubcpi/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/ubc/ubcpi/statuses/856b186ea87c5a6e805502aa6af715be26ada74f"}}}}