{"action":"created","issue":{"url":"https://api.github.com/repos/MaharaProject/moodle-assignsubmission_mahara/issues/14","labels_url":"https://api.github.com/repos/MaharaProject/moodle-assignsubmission_mahara/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/MaharaProject/moodle-assignsubmission_mahara/issues/14/comments","events_url":"https://api.github.com/repos/MaharaProject/moodle-assignsubmission_mahara/issues/14/events","html_url":"https://github.com/MaharaProject/moodle-assignsubmission_mahara/issues/14","id":107800890,"number":14,"title":"Multiple submissions of the same page to different assignments breaks previous secret URLs","user":{"login":"upats","id":7084108,"avatar_url":"https://avatars.githubusercontent.com/u/7084108?v=3","gravatar_id":"","url":"https://api.github.com/users/upats","html_url":"https://github.com/upats","followers_url":"https://api.github.com/users/upats/followers","following_url":"https://api.github.com/users/upats/following{/other_user}","gists_url":"https://api.github.com/users/upats/gists{/gist_id}","starred_url":"https://api.github.com/users/upats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/upats/subscriptions","organizations_url":"https://api.github.com/users/upats/orgs","repos_url":"https://api.github.com/users/upats/repos","events_url":"https://api.github.com/users/upats/events{/privacy}","received_events_url":"https://api.github.com/users/upats/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MaharaProject/moodle-assignsubmission_mahara/labels/duplicate","name":"duplicate","color":"cccccc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-22T20:58:23Z","updated_at":"2015-09-22T23:25:53Z","closed_at":"2015-09-22T23:25:53Z","body":"I just noticed this--I am not sure if it's something that's existed the whole time or if it is just surfacing now.\r\n\r\nWhen a student submits their mahara page to a moodle assignment, it generates the secret URL and everything is good.\r\nIf that student, in another course or the same course for a different assignment, submits the same page again, it breaks the secret URL that was previously generated.\r\nIt looks like in the DB, the mahara view_access table entry is being deleted but the Moodle database is still trying to use that old generated secret URL. This results in an \"Access Denied\" message when trying to view the less recently submitted page in Moodle.\r\n\r\nThe not-really-a-workaround workaround is to have the student resubmit their assignment that is giving the access denied message. This will refresh the stored secret URL and allow the teacher to view the page.\r\n\r\nI can think of two potential solutions, though I'm sure there are more:\r\n\r\n1. Keep re-using the same secretly-generated secret URL for a given Mahara page whenever that page is submitted to any assignment in Moodle. This would keep Secret URL sprawl from happening, since we would just re-use the same URL.\r\n\r\n2. (probably the easier solution) Create a brand new secret URL for each Mahara page, every time it is submitted. This would obviously start filling up the view_access table in Mahara on big mahoodle sites, so it's probably not the ideal solution, unless there's some sort of expiration time.\r\n\r\nThis is using the newest v. of the plugins and on Moodle 2.8.7"},"comment":{"url":"https://api.github.com/repos/MaharaProject/moodle-assignsubmission_mahara/issues/comments/142451778","html_url":"https://github.com/MaharaProject/moodle-assignsubmission_mahara/issues/14#issuecomment-142451778","issue_url":"https://api.github.com/repos/MaharaProject/moodle-assignsubmission_mahara/issues/14","id":142451778,"user":{"login":"agwells","id":265127,"avatar_url":"https://avatars.githubusercontent.com/u/265127?v=3","gravatar_id":"","url":"https://api.github.com/users/agwells","html_url":"https://github.com/agwells","followers_url":"https://api.github.com/users/agwells/followers","following_url":"https://api.github.com/users/agwells/following{/other_user}","gists_url":"https://api.github.com/users/agwells/gists{/gist_id}","starred_url":"https://api.github.com/users/agwells/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agwells/subscriptions","organizations_url":"https://api.github.com/users/agwells/orgs","repos_url":"https://api.github.com/users/agwells/repos","events_url":"https://api.github.com/users/agwells/events{/privacy}","received_events_url":"https://api.github.com/users/agwells/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T23:25:53Z","updated_at":"2015-09-22T23:25:53Z","body":"Hi upats,\r\n\r\nI think what you're describing is the same behavior I described in Issue 2: https://github.com/MaharaProject/moodle-assignsubmission_mahara/issues/2#issue-50483918\r\n\r\nSo, I'll mark this one as a duplicate.\r\n\r\nCheers,\r\nAaron"}}