Courses and course formats

 
 
Picture of Peter Eckstein
tab format not working
 

I'm running Moodle 2.5+ (not the latest version that just dropped). I installed the FN -Tabs Course Format using the update module that is in administrative settings. I uploaded it from the Zip file.  It appeared as an option, but when I go to edit the actual tabs, by using the little editing wheel to the side, I am directed to this site:  http://mydomain/moodle/course/format/fntabs/tabsettings.php?id=3

and get this message:  500-INTERNAL SERVER ERROR.

I don't know code but if someone can help me I'd appreciate it.  Could it be that the plugin only works with the newest moodle version? If so, how do I uninstall this plugin?

Thanks,

 

Peter

 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Dear Peter,

Ok, I can get the Moodle 2.5 version of the format to work on M2.5.2 (version 2013051402.01 release 2.5.2+ (Build: 20130913)) when changing the tab settings (http://chloe/moodle25/course/format/fntabs/tabsettings.php?id=20).

A 500 error is usually a syntax error, so as I'm not getting it with the M2.5 version of the code from https://moodle.org/plugins/pluginversion.php?id=3970 therefore I would guess it could be how the files were uploaded to the web server, perhaps not in UTF8 form.   Try a local installation and see if it works there then that will tell you.  Then let me know how you upload and I'll see what I can do to find an alternative for your particular situation.

The format's version.php file says it needs version 2013051400 which I believe is the branching date of the original M2.5 so you should be fine with your version of M2.5.

If you want to safely remove the format, then under 'Site Administration' -> 'Plugins' -> 'Plugins Overview' you should find it in the list with the option to 'Uninstall'.  Use that and follow the instructions it gives.

Cheers,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Dear Gareth,

Thanks for responding.  What I've done is uninstalled it from my moodle. I'm sort of a newbie when it comes to site admin so I'm learning. I'm wondering if I should download it again and try it one more time. I installed it from the zip (following the prompts). If I were to extract the files from the Zip folder first, I'm not sure which files I should upload or if that would make a difference. I guess I could install moodle on my computer (and not the server) and see what happens with a local install. 

I'll let you know.  Thanks.

Peter

 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Dear Peter,

No problem.

To install the other way to see if that makes a difference:

  1. Put Moodle in 'Maintenance Mode' (docs.moodle.org/en/admin/setting/maintenancemode) so that there are no users using it bar you as the administrator
  2. Extract the 'zip' file.  That should give you a folder called 'fntabs' containing some files.
  3. Move the entire folder to the '/course/formats/' folder so that you have '/course/format/fntabs/the files'.
  4. Go back to Moodle and go to 'Site administration' -> 'Notifications' and follow the prompts.
  5. Take Moodle out of 'Maintenance Mode'.

To try Moodle locally to practice at the top of download.moodle.org there are some 'special installer packages' one for Windows and another for Mac to use.

Cheers,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Thanks Gareth,

 

I'm going to try this and let you know how it works.

 

Thanks again,

 

Peter

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Hey Gareth,

It worked!  I had to install filezilla (an ftp upload utility) onto my machine so that i could upload the fntabs folder (My server doesn't let me upload folders, just individual files). Once I followed the prompts everything was fine.

Question - would you suggest I use this method for all plugins, or should i try to use the internal moodle upload tool?

Thanks so much for your help!

Peter

 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Hi Peter,

An excellent question.  The new internal Moodle upload tool is new and perhaps having some teething problems.  Which reminds me that a few others have had issues and found that they had to change the permissions to '755 for folders and 644 for files' within the format's folder - which is odd as this should be the default.  I think there needs to be more testing / feedback before I can raise an issue.  Sorry I did not think of that as a thing to try, I plain forgot.

Filezilla is an excellent tool and would have done the permissions properly as they were set at the other end.  I would suggest that if upload keeps failing, then use Filezilla but also post here to let me know if you'd be so kind.

Cheers,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Hi Gareth,

I shall do that - no problem. And thanks so much for your help.

Peter

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Hi Gareth,

I used the zip upload utility in Moodle to install the grid format (which I believe you developed).  Again - when I went to edit something (Move section onto grid) I got the "error 500" message. I'm going to delete the folder with the grid from my server and upload it the way i did for the tab plugin tomorrow - unless you want to explore this issue more - I have no problem being the guinea pig - this way I get to learn more! 

Let me know what you want to do.

Peter

 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Hi Peter,

Thanks for the offer and I accept!  Ok, can we try the file permission possible solution please smile.  So....

In FileZilla can you take two screen shots of the remote grid folder as shown by the images plugin_installer_issue_1.png and plugin_installer_issue_2.png in the next two posts and put them here.  Then try setting permissions as shown by plugin_installer_issue_3.png and plugin_installer_issue_4.png and see if that fixes it.  If it does not then can you follow the other way that worked and repeat the screen shots as shown by plugin_installer_issue_1.png and plugin_installer_issue_2.png.

Don't worry if plugin_installer_issue_3.png and plugin_installer_issue_4.png does not work as it could be an owner thing.  Perhaps try with that other file manager you mentioned.

That should tell me if my hunch is right and provide evidence for a tracker issue.

Thanks,

Gareth

 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

plugin_installer_issue_1.png....


 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

plugin_installer_issue_2.png....


 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

plugin_installer_issue_3.png....


 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

plugin_installer_issue_4.png....


 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Hi,

 

It's been a crazy day - i got the screenshots and then work got in the way smile.Of course the screenshots are too big so i gotta make them smaller and then I have to figure out how to do the next steps. I'll get back to you soon.

 

 

Thanks,

Peter

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Here are the 2 screenshots.

Question:  before I reset those permissions, can you explain what it is I'll be doing?  I"m guessing it's not irrevocable and only impacts the grid directory in the course/format directory, but I'd love to understand it a tad better.

Take care,

 

Peter



 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Hi Peter,

I can just about make out the screen shots.  Could you re-post them in separate replies so that you get the full 100k per image please.

Ok smile - the actions are only operating on the 'grid' folder.  Sorry if that is not clear in my screen shots.

By the looks of things the owner and group number identifiers are the same, so we are ok on that point and therefore will be fine when we change 'user/group/others' in the permissions.  Hence the same order for the octal numbers of '755' and '644' we will apply, the '7' and '6' being for 'user' and the '5' and '4' for 'group' and 'others'.  Please Google 'Unix file permissions' for a better explanation, such as http://en.wikipedia.org/wiki/Filesystem_permissions (Unix bits) and http://en.wikipedia.org/wiki/Chmod as we are effectively running 'chmod' through 'FileZilla'.

My hunch is that because we are getting a '500 Server Error' and the permissions of the 'grid' folder and files are currently set that 'group' and 'others' can write to the files that this is causing an issue with the Apache security functionality.  But this is only a hunch and I would need to investigate further.  So by changing the permissions of the files and folders such that only the user can write to them.  I don't know so much (yet) about Apache server configuration (without installing it on my Raspberry Pi - get one to learn on if you don't have one already) I cannot be sure if Apache uses the same user / group as the files / folders currently have.  Anyway either way with others writing or Apache must see them as read only, then I think that is the issue.

Applying '755' and '644' recursively to the 'directories' / 'files' of the 'grid' folder will bring them into line with the existing formats.  Please take care to use the right 'radio' button as I've shown in my screen shots and only select the 'grid' folder when you do.  It should not make a difference though to affect the other folders in the 'format' folder in the same way though.

Cheers,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Here's one


 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Here's two.  I'll get to the next part soon.

Peter


 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Hi Peter,

Thanks, any chance of making them bigger whilst still sticking to the 100K limit?

Thanks,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

how's this part 1?


 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

and part 2......


 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Awesome, thanks Peter smile

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Hi Gareth,

 

I'm sending you a screenshot of what the original file attributes of the grid folder are. I apologize for asking  a silly question:  as you can see, the attributes (what is checked and the numbers (ocular?)) are different then image number 3 that you sent me.  Do you want me to change them to number 3 AND number 4?  Just asking.  


 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Hi David,

Thanks.

They are 'Octal' numbers as in 'base 8' in maths.

The original value is '777'.

So, can you click on 'Apply to directories only' and tick 'Recurse into subdirectories' then set the numeric value to 755 - this will mean that user tick boxes will stay at 'read - write - execute' and group and others will only have 'read - execute' ticked.  Click on 'OK'.

Then repeat for the grid folder again setting 'Apply to files only' and tick 'Recurse into subdirectories' then set the numeric value to 644 - this will mean that user tick boxes will be 'read - write' ticked and group and others will only have 'read' ticked.  Click on 'OK'.

Cheers,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Hi, so when I tried it at 755 I got the same 500 error.  When I changed it to 644 I got a 403-forbidden error.

I didn't uninstall the plug in and try installing it the way I successfully did the tab one - I figured you'd want to mull over the different error messages before I did anything. 

Peter

 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Hi Peter,

Just checking that you did not apply 644 to the folders?  If so then would explain the 403.  Did you do a 755 for the folders and a 644 for the files recursively?

Cheers,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

oops - I misread your instructions. I just redid it as you just reexplained and got a 500 error for the 644 setting.

 

Sorry about that.

So.........now what?

 

Peter

 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Dear Peter,

Ok.  Odd.  So we know that the auto install does not work but the zip upload does.  That setting the folders to 755 and the files to 644 does not work.  Can you grab screen shots in FileZilla of the grid folder and it's contents and post in as big a resolution as 100K per image will allow please.

Ok, the next hunch is that the means of auto-upload is in the wrong format, possibly UTF-8 with the Byte Order Mark which would cause an issue.  So, can you download the remote 'grid' format that does not work, zip it up and see if it will post here?  Or compare file sizes at the byte level with a downloaded and extracted zip version.  Could you post the 'renderer.php' file from the non-working remote please?

Then with all the evidence in place, delete the remote failed folder and perform the upload from zip that works, check that it does then create screen shots of the folder and its contents with the permissions as before.

I appreciate this is a lot of work, but somehow need to keep 'binary chopping' until we can work out what is wrong.

Cheers,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Hi Gareth,

Do you want screenshots of every sub-folder and it's contents in the grid directory?  

 

Peter

 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Hi Peter,

No thanks, just the same two as before.

Ta,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

here's one


 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Hi Peter,

Thank you smile

It looks like you've done the '644' recursively on the files but not the '755' (as it's currently '777') recursively on the folders.  Please could you try that and see if it works (please refer to my previous instructions about setting the correct radio button).  So you should end up with the 'grid' and sub folders with a permission of '755' and the files with '644'.

Cheers,

Gareth

 

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

I did do the 755 on the folders. It didn't work.  Do you need me to send you a screenshot of that?  

 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Hi Peter,

No thank you.  I was just checking that it did not work when both '755' and '644' are set as your screen shots show '777' and '644'.

Cheers,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

here's two


 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Hi Gareth,

So...I downloaded and zipped the fntabs folder that doesn't work, but I can't upload it - it's too big (the zip version).  How would you like me to proceed?

 

Peter

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

I wonder if it would work if uploaded it into my dropbox and shared the link with you.  Would that work?

 

Peter

 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Hi Peter,

Thanks, I think Dropbox would work.  Or perhaps Google Drive as I've just started to use that to share zip stuff.

Just to be extra sure as my brain is slightly loosing the plot - "I was just checking that it did not work when both '755' and '644' are set as your screen shots show '777' and '644'."? smile

Cheers,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

So...I just changed file permissions to 755 recursive and to directories only (to double check) and went to check if it worked, and lo and behold it does now.  I swear I followed your instructions before and I got the error 500 message. Below is the screenshot of the grid under 755.

So........? 

Peter 


 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Thanks Peter,

This means that the solution is directories to '755' and files to '644' and that the current code sets it at '777' and '666' causing the 500 error which means that it is testable and verifiable when proposing a fix - which is the next step! smile

But now have something to put in the tracker.

Thanks,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Hi Gareth,

Just wanted you to know that I have a moodle course on a different server and I wanted to set up Grid format there.  I used the embedded installer from moodle and when I tried to set up a grid on my course I got the 500 error message.  I deleted the grid from site and server, downloaded a new version to my machine, unzipped it and uploaded it onto my server (as I did for the tab format above) and now it seems to be working.  Just thought you'd want to know.

Take care,

Peter

 
Average of ratings:Useful (1)
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Hi Peter,

I started to look at the code but now need some more information.  Please would you be so kind as to tell me what the permissions are on the dataroot folder i.e. the value of '$CFG->dataroot' in Moodle's 'config.php' file.  Just to confirm a suspicion?

Thanks,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Not sure exactly what you meant - tell me if this is what you wanted.


 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Dear Peter,

Unfortunately not sad.

In the 'config.php' file there is a line which has ''$CFG->dataroot' it's value is a 'folder' it is that 'folder' I would like to know the permissions of.  That is because I think that the permissions of that folder are set to '777' and '666' and that the code in the copy process from temporary area to 'moodle' code area is causing the issue.

Thanks,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Hi, So....I think we've hit the limits of my knowledge (again). How do I access that line of code?  I've never played with php files or any of that stuff.  If you tell me how to do it, I can give it a shot.

Peter

 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Hi Peter,

Oh, it's just a text file, so just download it and open in Notepad.

Cheers,

Gareth

 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Hi Peter,

I have raised MDL-42110.

Cheers,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

one more silly question:  you're talking about the config file in moodle or in formats/grid?

 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Hi Peter,

The moodle config.php file.

Cheers,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Hi Gareth,

I tried to download moodle/config.php using filezilla and didn't succeed, getting the following message:  "failed to open /config.php for writing" and then "file transfer failed.  I"m attaching a screenshot that you can hopefully read.

So....

 

Peter


 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Hi Peter,

Thanks for the screen shot.  But it's the file permissions of the 'moodledata' folder that is created on installation that I need please.  If you could remember what that is, navigate to it and do a screen shot of it and it's contents at the first level please.

Thanks,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

I thought you wanted the moodle config.php file.  If it's the moodledata file, I think (I hope) this is what you want.  I'm sorry I'm slow on the uptake

 

peter


 
Average of ratings: -
Gareth J Barnard
Re: tab format not working
Group DevelopersGroup Particularly helpful Moodlers

Dear Peter,

Thank you smile - The fact it's '755' is interesting.  I think sometimes I'm too technical and don't explain things properly.

Information for thought.

Thanks again,

Gareth

 
Average of ratings: -
Picture of Peter Eckstein
Re: tab format not working
 

Hi,

Nah - maybe I misunderstood.

Let me know if there is anything else you need me to do.

 

Peter

 
Average of ratings: -