bonnett11 Posted September 21, 2015 Posted September 21, 2015 Hello, I updated the Ubuntu server from 12.04 to 14.04.2 during the summer holidays. Now when students have submitted assignments the teachers cannot see them. It shows that there are submitted assignments, but then says "Nothing to display" (see photos) But the teachers can see older submitted assignments from the last school year. I have check the all the databases in MyPhPAdmin and I can't find anything wrong with them. We are running moodle 1.9 (I know it's a older version). Thanks in advance for any help. Ross
Achandler Posted September 21, 2015 Posted September 21, 2015 (edited) Sounds like a write permissions on the server itself, with 1.9 I think they still appear within the Moodledata folder then the course ID number etc. I woild start looking there. The database entry will be fine, but the document won't exist I suspect. Edited September 21, 2015 by Achandler Typos
bonnett11 Posted September 21, 2015 Author Posted September 21, 2015 Thanks for the quick reply. I have checked Moodledata and I think you are right, the documents do not exist. Do you know of a fix for this as Linux is not my strong suit? Thanks again.
Achandler Posted September 21, 2015 Posted September 21, 2015 Make sure the owner is set as apache, I think its apache in Ubuntu too: chown -R apache:apache /YOURMOODLEDATADIRECTORY/ Then set the permissions: find . -type f -exec chmod 644 {} \; find . -type d -exec chmod 755 {} \; Should set the permissions on the folder to be correct.
bonnett11 Posted September 21, 2015 Author Posted September 21, 2015 Hi Achandler, Still no luck. From what I can tell it looks like /var/moodledata has the correct permissions. The user apache doesn't exist, I followed the setup guide to find out what permissions I needed. Any more suggestions? Thanks
Achandler Posted September 21, 2015 Posted September 21, 2015 Who "owns" the /var/moodledata folder? Have you tried simply uploading a file to the same course you have the issue on, it will help check the permissions.
bonnett11 Posted September 21, 2015 Author Posted September 21, 2015 At the moment the permissions are set to '777' which is from what I can tell allows everyone to read/write to the moodledata folder. I have tried uploading a file and I still get nothing. We are having the problem on more then 1 course. Only the courses that staff have created for this school year. Thanks
Achandler Posted September 21, 2015 Posted September 21, 2015 try changing the owner to www-data first, best to get the permissions correct and work from there. We have a CentOS server here, so its slightly different to Ubuntu with some things. chown -R www-data:www-data /YOURMOODLEDATADIRECTORY/ I think thats correct for Ubuntu. Then redo the permissions as shown above because they need to be corrected anyway. Then test it, if that doesn't work then it could be a number of other factors.
bonnett11 Posted September 21, 2015 Author Posted September 21, 2015 I have tried that 'sudo chown -R www-data:www-data /var/moodledata' and still having no luck. I have also done 'sudo chown -R www-data /var/moodledata' and that doesn't make any difference. The assignment shows up as a student to show it has been submitted, but i can't find any file on moodledata nor see any assignments that have been submitted as a teacher. So as far as I can tell the permissions on the files/folders are correct, i hope.
Achandler Posted September 21, 2015 Posted September 21, 2015 It won't make a difference as such, but it should mean if you check the properties of the folders, you will see that the owner and owener group are now www-data and not anything else. If www-data doesn't own or the group its in can't write to the folders then that could be the problem. The next change, again not fully sure with Ubuntu, but SELinux in 14.04 and not in 12.04? As this cna stop files being saved especially in the /var/ folder, you can change it to be permissive or even off to allow you to test if this is blocking it. Do you get no errors at all when you try to upload things through Moodle?
secretlife Posted October 1, 2015 Posted October 1, 2015 Sorry I didn't spot this earlier but it could possibly be related to one of these https://tracker.moodle.org/browse/MDL-26284 and https://tracker.moodle.org/browse/MDL-27638
bonnett11 Posted October 2, 2015 Author Posted October 2, 2015 Hi, Thanks for the reply. I did manage to get this fixed in the end. For some reason (still not sure why) but every course that was created this school year would have an SQL query that gave back an error. I change it to the SQL query that all the other courses use and it worked fine. Thanks
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now