{"action":"created","issue":{"url":"https://api.github.com/repos/academic-moodle-cooperation/moodle-mod_publication/issues/13","repository_url":"https://api.github.com/repos/academic-moodle-cooperation/moodle-mod_publication","labels_url":"https://api.github.com/repos/academic-moodle-cooperation/moodle-mod_publication/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/academic-moodle-cooperation/moodle-mod_publication/issues/13/comments","events_url":"https://api.github.com/repos/academic-moodle-cooperation/moodle-mod_publication/issues/13/events","html_url":"https://github.com/academic-moodle-cooperation/moodle-mod_publication/issues/13","id":142295425,"number":13,"title":"No student files shown when a course is restored from a moodle backup","user":{"login":"markchaneyuk","id":8657036,"avatar_url":"https://avatars.githubusercontent.com/u/8657036?v=3","gravatar_id":"","url":"https://api.github.com/users/markchaneyuk","html_url":"https://github.com/markchaneyuk","followers_url":"https://api.github.com/users/markchaneyuk/followers","following_url":"https://api.github.com/users/markchaneyuk/following{/other_user}","gists_url":"https://api.github.com/users/markchaneyuk/gists{/gist_id}","starred_url":"https://api.github.com/users/markchaneyuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markchaneyuk/subscriptions","organizations_url":"https://api.github.com/users/markchaneyuk/orgs","repos_url":"https://api.github.com/users/markchaneyuk/repos","events_url":"https://api.github.com/users/markchaneyuk/events{/privacy}","received_events_url":"https://api.github.com/users/markchaneyuk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-21T09:31:14Z","updated_at":"2016-04-14T15:03:14Z","closed_at":null,"body":"We have done a backup of a course and restored this in another of our Moodles. In the original, two students (A & B) had uploaded files (2 each) and these files were all visible on mod/publication/view.php? page. The submissions showed in the _Last Modified_ column. The course was backed up and the backup file was restored on an identical Moodle(identical in code, environment but not necessarily settings or data). The students are visible in the restored course as whole and show up in the student folder ok. Logged in as a teacher the two students (A and B) are listed in the activity, as these are the only ones who submitted these are the only ones to show up. In the column _Last Modified_ no files are shown. If the _Download all Files as Zip_ is selected, then the files are present. This shows that the files are being backed up, and are being restored, but they are not being presented correctly. Let me know if you need anything else. Thanks. "},"comment":{"url":"https://api.github.com/repos/academic-moodle-cooperation/moodle-mod_publication/issues/comments/209988619","html_url":"https://github.com/academic-moodle-cooperation/moodle-mod_publication/issues/13#issuecomment-209988619","issue_url":"https://api.github.com/repos/academic-moodle-cooperation/moodle-mod_publication/issues/13","id":209988619,"user":{"login":"soniaarnanz","id":18466031,"avatar_url":"https://avatars.githubusercontent.com/u/18466031?v=3","gravatar_id":"","url":"https://api.github.com/users/soniaarnanz","html_url":"https://github.com/soniaarnanz","followers_url":"https://api.github.com/users/soniaarnanz/followers","following_url":"https://api.github.com/users/soniaarnanz/following{/other_user}","gists_url":"https://api.github.com/users/soniaarnanz/gists{/gist_id}","starred_url":"https://api.github.com/users/soniaarnanz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soniaarnanz/subscriptions","organizations_url":"https://api.github.com/users/soniaarnanz/orgs","repos_url":"https://api.github.com/users/soniaarnanz/repos","events_url":"https://api.github.com/users/soniaarnanz/events{/privacy}","received_events_url":"https://api.github.com/users/soniaarnanz/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T15:03:14Z","updated_at":"2016-04-14T15:03:14Z","body":"We think the problem is the field mdl_files.itemid. This field means to be the userid but this is copied and restoree with the original value. In the restore process this field should match with the correct userid.\r\nFor this reason the file is linked with the course and with the module but not with the user who uploaded the file.\r\nThanks"}}