{"action":"closed","number":1190,"pull_request":{"url":"https://api.github.com/repos/sakaiproject/sakai/pulls/1190","id":48084639,"html_url":"https://github.com/sakaiproject/sakai/pull/1190","diff_url":"https://github.com/sakaiproject/sakai/pull/1190.diff","patch_url":"https://github.com/sakaiproject/sakai/pull/1190.patch","issue_url":"https://api.github.com/repos/sakaiproject/sakai/issues/1190","number":1190,"state":"closed","locked":false,"title":"SAK-29974: Nested citation lists with drag and drop","user":{"login":"nicholaswilson100","id":7457681,"avatar_url":"https://avatars.githubusercontent.com/u/7457681?v=3","gravatar_id":"","url":"https://api.github.com/users/nicholaswilson100","html_url":"https://github.com/nicholaswilson100","followers_url":"https://api.github.com/users/nicholaswilson100/followers","following_url":"https://api.github.com/users/nicholaswilson100/following{/other_user}","gists_url":"https://api.github.com/users/nicholaswilson100/gists{/gist_id}","starred_url":"https://api.github.com/users/nicholaswilson100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicholaswilson100/subscriptions","organizations_url":"https://api.github.com/users/nicholaswilson100/orgs","repos_url":"https://api.github.com/users/nicholaswilson100/repos","events_url":"https://api.github.com/users/nicholaswilson100/events{/privacy}","received_events_url":"https://api.github.com/users/nicholaswilson100/received_events","type":"User","site_admin":false},"body":"This is a new feature for Citation lists where you can create a section with a heading (and a section within that section, up to 3 levels) and drag and drop your citations into those sections, thereby building up a nested citation list (see screenshots in the Jira for examples).\r\n\r\nYou can drag and drop nested sections containing citations around and add a description to each section.The reading list title and an editable introduction is also displayed at the top of the nested citation list.   The resulting nested list is then shown as such in the student view.\r\n\r\nMost of the saving to the db is done via Ajax so that, for example, when you click 'Add Section', an Ajax request calls a method (usually in CitationActionHepler.java) which persists a CitationCollectionOrder representing a 'HEADING1' section.   \r\n\r\nLooking at the database side of things, the way that we decided to represent nested sections was in CITATION_COLLECTION_ORDER.  We are adding 2 new columns (SECTION_TYPE - which is of type ENUM and can have values 'HEADING1', 'HEADING2', 'HEADING3', 'CITATION' - and VALUE which has the title of the section).  The LOCATION column is used to store the nested structure.  \r\n\r\nFor example, we might have this in the db:\r\n\r\nCOLLECTION_ID | CITATION_ID | LOCATION | SECTION_TYPE | VALUE\r\n\r\nxxx                       |                        |        1          |  'HEADING1'     | 'Economics'                    \r\nxxx                       |                        |        2          |  'HEADING2'     | 'UK Banks'                    \r\nxxx                       |                        |        3          |  'HEADING3'     | 'Natwest'                    \r\nxxx                       |      aaa            |        4          |  'CITATION'      |                     \r\nxxx                       |       bbb           |        5          |  'CITATION'      |   \r\n\r\n                  \r\nThis would represent an h1 section with an h2 section in that and an h3 section in that and then 2 citations in that h3.    ","created_at":"2015-10-19T15:12:32Z","updated_at":"2015-11-09T11:51:10Z","closed_at":"2015-11-09T11:51:10Z","merged_at":null,"merge_commit_sha":"3f9b169db1afec6395523d19473256d9e90bb4b8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sakaiproject/sakai/pulls/1190/commits","review_comments_url":"https://api.github.com/repos/sakaiproject/sakai/pulls/1190/comments","review_comment_url":"https://api.github.com/repos/sakaiproject/sakai/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sakaiproject/sakai/issues/1190/comments","statuses_url":"https://api.github.com/repos/sakaiproject/sakai/statuses/54e2c2636d19bb7df396fd962c4d105259104865","head":{"label":"nicholaswilson100:SAK-29974","ref":"SAK-29974","sha":"54e2c2636d19bb7df396fd962c4d105259104865","user":{"login":"nicholaswilson100","id":7457681,"avatar_url":"https://avatars.githubusercontent.com/u/7457681?v=3","gravatar_id":"","url":"https://api.github.com/users/nicholaswilson100","html_url":"https://github.com/nicholaswilson100","followers_url":"https://api.github.com/users/nicholaswilson100/followers","following_url":"https://api.github.com/users/nicholaswilson100/following{/other_user}","gists_url":"https://api.github.com/users/nicholaswilson100/gists{/gist_id}","starred_url":"https://api.github.com/users/nicholaswilson100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicholaswilson100/subscriptions","organizations_url":"https://api.github.com/users/nicholaswilson100/orgs","repos_url":"https://api.github.com/users/nicholaswilson100/repos","events_url":"https://api.github.com/users/nicholaswilson100/events{/privacy}","received_events_url":"https://api.github.com/users/nicholaswilson100/received_events","type":"User","site_admin":false},"repo":{"id":31772707,"name":"sakai","full_name":"nicholaswilson100/sakai","owner":{"login":"nicholaswilson100","id":7457681,"avatar_url":"https://avatars.githubusercontent.com/u/7457681?v=3","gravatar_id":"","url":"https://api.github.com/users/nicholaswilson100","html_url":"https://github.com/nicholaswilson100","followers_url":"https://api.github.com/users/nicholaswilson100/followers","following_url":"https://api.github.com/users/nicholaswilson100/following{/other_user}","gists_url":"https://api.github.com/users/nicholaswilson100/gists{/gist_id}","starred_url":"https://api.github.com/users/nicholaswilson100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicholaswilson100/subscriptions","organizations_url":"https://api.github.com/users/nicholaswilson100/orgs","repos_url":"https://api.github.com/users/nicholaswilson100/repos","events_url":"https://api.github.com/users/nicholaswilson100/events{/privacy}","received_events_url":"https://api.github.com/users/nicholaswilson100/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nicholaswilson100/sakai","description":"Sakai is a freely available, feature-rich technology solution for learning, teaching, research and collaboration. Sakai is an open source software suite developed by a diverse and global adopter community.","fork":true,"url":"https://api.github.com/repos/nicholaswilson100/sakai","forks_url":"https://api.github.com/repos/nicholaswilson100/sakai/forks","keys_url":"https://api.github.com/repos/nicholaswilson100/sakai/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nicholaswilson100/sakai/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nicholaswilson100/sakai/teams","hooks_url":"https://api.github.com/repos/nicholaswilson100/sakai/hooks","issue_events_url":"https://api.github.com/repos/nicholaswilson100/sakai/issues/events{/number}","events_url":"https://api.github.com/repos/nicholaswilson100/sakai/events","assignees_url":"https://api.github.com/repos/nicholaswilson100/sakai/assignees{/user}","branches_url":"https://api.github.com/repos/nicholaswilson100/sakai/branches{/branch}","tags_url":"https://api.github.com/repos/nicholaswilson100/sakai/tags","blobs_url":"https://api.github.com/repos/nicholaswilson100/sakai/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nicholaswilson100/sakai/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nicholaswilson100/sakai/git/refs{/sha}","trees_url":"https://api.github.com/repos/nicholaswilson100/sakai/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nicholaswilson100/sakai/statuses/{sha}","languages_url":"https://api.github.com/repos/nicholaswilson100/sakai/languages","stargazers_url":"https://api.github.com/repos/nicholaswilson100/sakai/stargazers","contributors_url":"https://api.github.com/repos/nicholaswilson100/sakai/contributors","subscribers_url":"https://api.github.com/repos/nicholaswilson100/sakai/subscribers","subscription_url":"https://api.github.com/repos/nicholaswilson100/sakai/subscription","commits_url":"https://api.github.com/repos/nicholaswilson100/sakai/commits{/sha}","git_commits_url":"https://api.github.com/repos/nicholaswilson100/sakai/git/commits{/sha}","comments_url":"https://api.github.com/repos/nicholaswilson100/sakai/comments{/number}","issue_comment_url":"https://api.github.com/repos/nicholaswilson100/sakai/issues/comments{/number}","contents_url":"https://api.github.com/repos/nicholaswilson100/sakai/contents/{+path}","compare_url":"https://api.github.com/repos/nicholaswilson100/sakai/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nicholaswilson100/sakai/merges","archive_url":"https://api.github.com/repos/nicholaswilson100/sakai/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nicholaswilson100/sakai/downloads","issues_url":"https://api.github.com/repos/nicholaswilson100/sakai/issues{/number}","pulls_url":"https://api.github.com/repos/nicholaswilson100/sakai/pulls{/number}","milestones_url":"https://api.github.com/repos/nicholaswilson100/sakai/milestones{/number}","notifications_url":"https://api.github.com/repos/nicholaswilson100/sakai/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nicholaswilson100/sakai/labels{/name}","releases_url":"https://api.github.com/repos/nicholaswilson100/sakai/releases{/id}","created_at":"2015-03-06T14:24:32Z","updated_at":"2015-03-06T14:25:20Z","pushed_at":"2015-11-09T11:51:10Z","git_url":"git://github.com/nicholaswilson100/sakai.git","ssh_url":"git@github.com:nicholaswilson100/sakai.git","clone_url":"https://github.com/nicholaswilson100/sakai.git","svn_url":"https://github.com/nicholaswilson100/sakai","homepage":"https://www.sakaiproject.org","size":208615,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"sakaiproject:master","ref":"master","sha":"9ded79924d44ca1472535d9ed0a85b793267feeb","user":{"login":"sakaiproject","id":314726,"avatar_url":"https://avatars.githubusercontent.com/u/314726?v=3","gravatar_id":"","url":"https://api.github.com/users/sakaiproject","html_url":"https://github.com/sakaiproject","followers_url":"https://api.github.com/users/sakaiproject/followers","following_url":"https://api.github.com/users/sakaiproject/following{/other_user}","gists_url":"https://api.github.com/users/sakaiproject/gists{/gist_id}","starred_url":"https://api.github.com/users/sakaiproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakaiproject/subscriptions","organizations_url":"https://api.github.com/users/sakaiproject/orgs","repos_url":"https://api.github.com/users/sakaiproject/repos","events_url":"https://api.github.com/users/sakaiproject/events{/privacy}","received_events_url":"https://api.github.com/users/sakaiproject/received_events","type":"Organization","site_admin":false},"repo":{"id":28589709,"name":"sakai","full_name":"sakaiproject/sakai","owner":{"login":"sakaiproject","id":314726,"avatar_url":"https://avatars.githubusercontent.com/u/314726?v=3","gravatar_id":"","url":"https://api.github.com/users/sakaiproject","html_url":"https://github.com/sakaiproject","followers_url":"https://api.github.com/users/sakaiproject/followers","following_url":"https://api.github.com/users/sakaiproject/following{/other_user}","gists_url":"https://api.github.com/users/sakaiproject/gists{/gist_id}","starred_url":"https://api.github.com/users/sakaiproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakaiproject/subscriptions","organizations_url":"https://api.github.com/users/sakaiproject/orgs","repos_url":"https://api.github.com/users/sakaiproject/repos","events_url":"https://api.github.com/users/sakaiproject/events{/privacy}","received_events_url":"https://api.github.com/users/sakaiproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sakaiproject/sakai","description":"Sakai is a freely available, feature-rich technology solution for learning, teaching, research and collaboration. Sakai is an open source software suite developed by a diverse and global adopter community.","fork":false,"url":"https://api.github.com/repos/sakaiproject/sakai","forks_url":"https://api.github.com/repos/sakaiproject/sakai/forks","keys_url":"https://api.github.com/repos/sakaiproject/sakai/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sakaiproject/sakai/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sakaiproject/sakai/teams","hooks_url":"https://api.github.com/repos/sakaiproject/sakai/hooks","issue_events_url":"https://api.github.com/repos/sakaiproject/sakai/issues/events{/number}","events_url":"https://api.github.com/repos/sakaiproject/sakai/events","assignees_url":"https://api.github.com/repos/sakaiproject/sakai/assignees{/user}","branches_url":"https://api.github.com/repos/sakaiproject/sakai/branches{/branch}","tags_url":"https://api.github.com/repos/sakaiproject/sakai/tags","blobs_url":"https://api.github.com/repos/sakaiproject/sakai/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sakaiproject/sakai/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sakaiproject/sakai/git/refs{/sha}","trees_url":"https://api.github.com/repos/sakaiproject/sakai/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sakaiproject/sakai/statuses/{sha}","languages_url":"https://api.github.com/repos/sakaiproject/sakai/languages","stargazers_url":"https://api.github.com/repos/sakaiproject/sakai/stargazers","contributors_url":"https://api.github.com/repos/sakaiproject/sakai/contributors","subscribers_url":"https://api.github.com/repos/sakaiproject/sakai/subscribers","subscription_url":"https://api.github.com/repos/sakaiproject/sakai/subscription","commits_url":"https://api.github.com/repos/sakaiproject/sakai/commits{/sha}","git_commits_url":"https://api.github.com/repos/sakaiproject/sakai/git/commits{/sha}","comments_url":"https://api.github.com/repos/sakaiproject/sakai/comments{/number}","issue_comment_url":"https://api.github.com/repos/sakaiproject/sakai/issues/comments{/number}","contents_url":"https://api.github.com/repos/sakaiproject/sakai/contents/{+path}","compare_url":"https://api.github.com/repos/sakaiproject/sakai/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sakaiproject/sakai/merges","archive_url":"https://api.github.com/repos/sakaiproject/sakai/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sakaiproject/sakai/downloads","issues_url":"https://api.github.com/repos/sakaiproject/sakai/issues{/number}","pulls_url":"https://api.github.com/repos/sakaiproject/sakai/pulls{/number}","milestones_url":"https://api.github.com/repos/sakaiproject/sakai/milestones{/number}","notifications_url":"https://api.github.com/repos/sakaiproject/sakai/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sakaiproject/sakai/labels{/name}","releases_url":"https://api.github.com/repos/sakaiproject/sakai/releases{/id}","created_at":"2014-12-29T11:14:17Z","updated_at":"2015-11-07T19:32:49Z","pushed_at":"2015-11-09T10:01:20Z","git_url":"git://github.com/sakaiproject/sakai.git","ssh_url":"git@github.com:sakaiproject/sakai.git","clone_url":"https://github.com/sakaiproject/sakai.git","svn_url":"https://github.com/sakaiproject/sakai","homepage":"https://www.sakaiproject.org","size":276752,"stargazers_count":92,"watchers_count":92,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":156,"mirror_url":null,"open_issues_count":34,"forks":156,"open_issues":34,"watchers":92,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sakaiproject/sakai/pulls/1190"},"html":{"href":"https://github.com/sakaiproject/sakai/pull/1190"},"issue":{"href":"https://api.github.com/repos/sakaiproject/sakai/issues/1190"},"comments":{"href":"https://api.github.com/repos/sakaiproject/sakai/issues/1190/comments"},"review_comments":{"href":"https://api.github.com/repos/sakaiproject/sakai/pulls/1190/comments"},"review_comment":{"href":"https://api.github.com/repos/sakaiproject/sakai/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sakaiproject/sakai/pulls/1190/commits"},"statuses":{"href":"https://api.github.com/repos/sakaiproject/sakai/statuses/54e2c2636d19bb7df396fd962c4d105259104865"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":2,"review_comments":0,"commits":2,"additions":3589,"deletions":730,"changed_files":31}}