Replacing Surname with Last Name in Moodle 3.1.1+

This is a post recommending utilizing Moodle menus as opposed to writing your own code.  If you prefer to customize your site in a manner that upgrading becomes nigh on impossible, please, do so without leaving a comment or reading further.

New accountI had an amusing time reading the posts of folks who have hacked the PHP code, and brilliantly, they really can code elegantly, in various places to modify the sign in screen to replace “Surname” which is English (think across the water in either direction) with “Last Name” which is the US English version of what is required in that field.  Some of these hacks were worth seeing just to learn how simply one can change a great deal of code.  In addition, they were accurate and changed with various versions of Moodle. 

HOWEVER, for all of the versions I read there was also an answer in the Moodle documentation.  Maybe it is that the answer references Language Packs and that deters folks.  I will argue that making a change that uses Moodle in a standard format does make updating much easier and straightforward, and well, as you might imagine, also fixes other language issues.

If you are running a US site, in version 3.1.1+ (the documentation references v2.7 on)  one simply goes to Site Administration –> Language –> Language packs and installs the EN_US version of English and then sets it as the site default …

Today’s Lesson

error/invalidrestorefile Errors Trying to Restore a Course in Moodle

I am running Moodle 3.1 (Build: 20160609); however, none of that matters.  I had errors restoring files as I reset my system for the next academic year which I do immediately before they send me packing for the summer season. 

I got it to work last Friday but on Monday decided to start again from scratch and ran into the problem again and the forums simply didn’t help me.

Both last Friday and Monday, with a fresh install and database I had the eror ‘error/invalidrestorefile’ crop up when attempting to restore backups files from a Server File Repository I had created on the server.  I tried all the suggestions in the folder, but so many seemed to end with “that fixed it” when the resolution should not have.  

The trick to solving this is to see the patterns in the postings on http://moodle.org.  Most “magically” solved the problem and couldn’t really give developers any explanation.

It doesn’t restore from the respository, not with “Import a backup file”, it appears to run into the 2MB limit and yet returns ‘error/invalidfilerestore’.  I did grin at the person who deleted PDFs, delete what you will, when you are under 2MB it works.   UNLESS, you simply waltz into the Front Page Restore and ADD the file to the backup location.  Yup, on the page below I was selecting the “Import a backup file” location when I needed to click on “Manage course backup area” [it also works in “User private backup area”], then select the Moodle “copy” to copy the file from the Repository to the appropriate backup area and THEN it restores just fine.

Whew!  Somedays I should have more coffee and click less.

Moodle File Restore