Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Beginning Administration 1 FAQ.

Beginning Administration 1 FAQ

From MoodleDocs

There is always an element of frustration at the beginning of taking on a Moodle. For many of us, we are employed to do something else, but fall into this and while we have some knowledge or skills, we can often be stumped by the simple things. Not because we are not skilled, just we do not understand enough of the jargon surrounding Moodle to make it work for us. What many people have found is that they are pushing against a door that was never shut. Not a good analogy perhaps, but it does describe what can happen when we begin Administration of a Moodle.

Most of the questions and answers here can be located somewhere in the Forums, or the Moodle Docs, if you want to spend the time looking for them. All this FAQ does is concentrate the questions you may be asking in one place. Thanks to all the unknowing and unknown contributors.

 The only assumption here about what you should know is that you know how to create and edit courses and
 want to know more. 

This page has grown a bit quickly and is now over sized. So a second page has been added named Beginning Administration 2 FAQ. If what you want is not here, then please have a look there.

What do I really need to know about PHP and MySQL or networking to be a successful Administrator?

Not a lot. It is handy to know something about these things. Generally speaking these are advanced skills used by experienced Moodlers. Initially, you can get by without knowing too much. Over time, you may find that you are editing PHP pages more frequently, or directly accessing the database. If you are really interested in gaining those skills there are lots of free to low cost to professional certification paths to follow. There are web sites around that will get you started with minimal cost. There are plenty of books as well. Individualized professional coaching/mentoring/consulting or certified training in several areas is obviously more expensive.

What tools do I need to use in the Administration of my Moodle

Different environments will allow to you use some different tools, but essentially, you can get away with just a text editor. There are any number of text editors, but use one that can save the files in a UTF-8 format. Notepad++, TextPad are two that come to mind and there are a lot more. Windows Notepad is not necessarily helpful here, it can add in some additional characters that do not sit well inside some versions of Moodle.

I am running Windows 2008 Server and IIS, which download packs should I use?

There are a couple of installation packs you can download. Generally when Windows users are downloading for the first time we go directly to the Moodle packages for Windows page. This is a very handy installation package that uses the Xampp installer to set up Apache, MySQL and PHP with a minimum of fuss. This package is the best for the Windows OS on a home Moodle or a dedicated PC. It is easy to set up and to maintain. However, be aware that Xampp was not designed for a production site, so it can introduce some security issues.

If you are using your Server as the location for your Moodle, the Xampp installer may not be helpful. You would be much better off using the Standard Moodle Packages. While this is more work setting up, there are fewer opportunities for things to cancel each other out or cause errors in your network or in Moodle.

Installing anything, and Moodle is no exception, needs careful planning and clear strategies in place to achieve the desired outcomes. One suggestion is that Moodle should be installed on a dedicated machine, then as it becomes more popular, more heavily trafficked, another machine can be added. The Moodle can be mirrored and the load sharing properties of the NOS can be implemented. This strategy allows the system to grow at demand, organically, if you like while not compromising at any stage the security of the network itself. An alternative could be clustering machines, this is a considerably more cost effective solution to redundancy issues and just as effective as mirroring. The next question then is should it be Linux or Windows?

How do I set Moodle & Moodledata folder permisions in the server environment.

You should already have gone through the Installing Moodle guide and this should have provided you with some information. However, due to the manner in which Moodle has been created it tends to concentrate on the LAMP configuration.

The other question is how can I set permissions in IIS.

This discussion in the Using Moodle Forum about this topic could be really valuable for IIS users.

We are using Microsoft IIS, do we need Apache?

No. Moodle has been primarily developed in a LAMP environment, Linux, Apache, MySQL, PHP, but it will run in other environments. A WAMP (Win etc) environment will run PHP, so Moodle will run fine. The reason PHP was chosen was because it is a powerful cross-platform language. MySQL is a database package that uses SQL which is also a powerful cross-platform language. Moodle was written to be as generic as possible, so it would be able to run in any environment.

We have an older version of Moodle, but as a new Administrator, I want to upgrade to the latest version, but how?

Practice first before Upgrading a production site! There are risks in upgrading any software package. Also, as a new administrator, you may not completely understand what has been installed on your production Moodle site. A combination of upgrading a version 1.6 site to 1.9 that has 6 Contributed code modules added to it can be a complicated process.

The quickest way would be to backup your current database, install the latest version onto a separate computer and restore the backup to it. You can then test your new Moodle, easily and safely. When satisfied that it is working as it should, migrate the new Moodle to the server, replacing your old Moodle. Do the next new administrator a favor and document your process and changes you made.

One issue will be problems in the database. Some tables may have incrementally changed so restoring may become a lot more difficult than it should be. It may be less difficult in the long run to create a new site, then back up each course from the old site and restore each course to the new site. Or if you have a knowledge of SQL, you may be able to create your own SQL queries to rewrite the older tables and store the data in a format the new database can accept.

I have Ubuntu 8.04 server set up as LAMP server and used apt-get to install Moodle. MySQL is on another server, but Moodle won't work.

apt-get is an Advanced Packaging Tool that automates the installation process for many Linux distros. While it is an excellent tool under many circumstances, it is not perfect, so it may very well be the problem when setting up a Moodle where parts of it are located on different servers. Manual installations can be a bit more time consuming, but have a much greater chance of success. Having said that, check the config.php file and make sure that each path is pointing to the correct place e.g.

  $CFG->wwwroot = 'http://yourwebsiteURL';
  $CFG->dirroot = '/home/yourAccountName/public_html';
  $CFG->dataroot = '/http://yourMySQLServeraddress/path/moodledata';

I have a valid web address, but as I install, I am getting an error message telling me I do not.

Chances are that it is the config.php file that is pointing in the wrong direction. If you can use a text editor that can save in a UTF-8 format, open the config.php file and it may read something like:

 $CFG->wwwroot   = 'localhost';
 $CFG->dirroot   = 'var/www/Moodle/moodle';
 $CFG->dataroot  = 'var/www/Moodle/moodledata';
 

when it should look something like:

   $CFG->wwwroot = 'http://yourwebsiteURL';
   $CFG->dirroot = '/home/yourAccountName/public_html';
   $CFG->dataroot = '/home/yourAccountName/moodledata';
   

If you are being hosted then the provider may allow you access to something like CPanel in a Linux environment.

This will also repair the error message:

 The 'Data Directory' you specified could not be found or created. Either correct the path or create that directory manually.

Site migrated to new ISP, now can't login and getting the error message "Unfortunately, cookies are currently not enabled in your browser"

With all these kinds of errors the first thing to do is to check the config.php file. Make sure that the file is pointing to the right places. It should look something like:

  $CFG->wwwroot = 'http://yourwebsiteURL';
  $CFG->dirroot = '/home/yourAccountName/public_html';
  $CFG->dataroot = '/home/yourAccountName/moodledata';
  

Another possible cause of this problem is that sessions are not configured properly on the server. You can test this by calling the script http://yourserver/moodle/lib/session-test.php.

If your server is on shared hosting check that you have sufficient disk space quota. This will prevent new sessions being created and nobody will be able to login.

Carefully check the permissions in your 'moodledata' area. The web server needs to be able to write to the 'sessions' subdirectory.

Finally, check the bottom of the config.php file. Make sure there is nothing after the ?>, this means no characters, no spaces, no carriage returns.

I am getting a blank screen after installing to Windows Vista - What can I do next?

Installing on Windows Vista has created a number of problems, and it seems that Microsoft has been so intent on improving security that it is refusing to allow very much to happen at all. There is an installation page that can help you resolve most issues in Vista. Unfortunately, it is no guarantee of success.

I want to use a dedicated server for Moodle, but how reliable is Moodle together with EasyPHP?

If you are going to use a dedicated machine for your Moodle, good idea by the way, then there is no need for you to use EasyPHP at all. If your Moodle server is using XP Pro and a static IP address, then it is easier for you to download and install the Windows Installer Package.

This package uses the Xampp installer to automatically install and configure Apache Server, MySQL and PHP. Once installation is complete and setup and running, all you may need do is to edit the config.php file to show your IP address. Just as long as you use a text editor that can save in a UTF-8 format.

Unfortunately, the Xampp installer may reduce effective security, so be careful with it. If your site is going to be a full web site than use the standard download package. Unless your Students are whiz-kids, and really know their PHP and MySQL, the Windows package should be secure enough for your intranet.

My site renders fine in Firefox and Opera, but not IE7

Each browser has its flaws and one person may have a preference for one browser as opposed to another. Unfortunately, there is a bit of an issue with IE7 and now, by some reports, IE8. Some of the PHP and Javascript elements in Moodle are not rendered properly in IE7 so text can appear incredibly small. It has also been suggested the Java implementation in IE8 is not fully compliant and it may not render some LMS and SCORM packages properly. Certainly Microsoft's history indicates they much prefer to set their own standards rather than comply with someone else's. However, it is the increasing division of the Internet into non-compatible parts that is the bigger issue for the developers of any Web application, including Moodle.

There is a discussion Forum for users of Microsoft servers and IIS. Many of the discussions are technical, but there is some good information there.

I have a lot of Staff, how can I enter them as Users quickly?

You can set up a bulk upload of Users, irrespective of what their Role in the Moodle will be by using a flat file. It is simple to do, but like a lot of things with PHP, it must be exactly right or it does not work.

  1. Create a new file in a text editor
  2. Add fields in this order, and they must be separated by a comma, username, password, firstname, lastname, email
  3. Save the file in a UTF-8 format, this is apparently safer than other formats and use the file extension *.csv
  4. Go to Administration > Users > Accounts > Upload users
  5. Browse for the file and click "Upload Users".
 As an alternative, you can also use MS-Excell, saving the file as a cvs.

As the file is uploaded, Moodle will do validity checks on usernames, passwords and email addresses. Ensure that all fields have legal characters, no underscores or slashes.

For more information you can look at Upload users.

Can I issue fake email addresses for Users when I upload the User file?

There are many circumstances where you may not want to use real email addresses for Users. A generic fake email like thisname@myhome.org is acceptable in Moodle, as long as it follows the correct format for email addresses.

When I try to select some pages in the Admin block, I get a "Timed Out" message and the screen reverts to the login page

The best guess, would be that the installation process has gone a little wrong and it has not properly installed or configured the PHP engine. It is probably better to not waste time on trying to repair it but to reinstall.

Why am I just not getting how Permissions and Roles work?

Our understanding of permissions and Roles is usually based on what we have learned in our networking environment, we log in, we have a set of permission based on that log in and they determine what we can do in a single context. This "linear" explanation is based on what we see, not what really happens, of course.

In Moodle, permissions are also known as "capabilities" and they reside with the Role and can be dependent upon the users location/activity in Moodle. The log-in ID does not carry any traditional network permissions with it, but an initial Role. So stop worrying about trying to learn about permissions, concentrate on the Role and how they work. Once you have a solid grasp of that, then you can worry about setting permissions.

Roles are context based. The best advice is DO NOT assign any roles from the Front Page. If you assign a Role in the Front Page, that Role is assigned to every part of the site. A best practice is to only assign Roles within the context of a Course or a Block.

What different roles can apply to users as they log in and move around inside the Moodle?

Different Roles can apply depending on the page the User is in.

Before anyone logs in to the Moodle, sitting at the log in page, or public front page, depending how you have set your Moodle up, they should have the role of "Guest". It is possible to change this but be careful.

In Moodle, when anyone with a user name and password logs into the Moodle, they become an "Authenticated User". How they are authenticated is different from their Role.

For reasons explained below, you may want your Users to become "Students" while in the Front Page. (Be careful here, read on below before assigning roles.)

When they click to go to a Category page, they revert to an "Authenticated User". Once there, their User Name is scanned and their permissions are calculated and if they have permissions, they can have sufficient rights to be a "Teacher" or a "Course Creator" or even an "Administrator".

When they click to go to a Course, they may have the rights to be an "Administrator", a "Course Creator", a "Teacher" or a "Student" in that Course.

This does not mean they have any of those rights in any other page or Course.

How can I be sure I am assigning Roles correctly?

Assigning Roles should be based purely on the page, the context of the role you want each person to play in that page. Be aware though, If you create an Administrator role in a Category, that will apply across all sub-Categories and Courses in that Category. It will not apply to ANY other Category, sub-Categories or Courses. If someone is assigned the Role of "Teacher" at a Category level, that Role will apply in ALL sub-Categories and Courses in that Category.

The first question is "what do I want this person to be able to do?" For most people using the Moodle, the obvious Role will be that of Student. Others will need to be Course Creators or Teachers. Some Teachers will be Course Creators. Really, the first question should be "what do I want this person to be able to do HERE?"

Essentially, if you get it wrong, then your courses can be wrecked. The basic rules are simple, "Do not assign a role in the Front Page." and "Assign roles in the context of the course or page."

We do not have "Teachers" and "Students" we use "Mentors" and "Mentees" in some courses as well as "Facilitators" and "Clients" in others, can I change these names?

Renaming Roles

Yes you can. Since the introduction of Moodle 1.9, you can assign the titles of any role to what you want. At the bottom of the Course Settings Page is the Role Renaming dialog.

Just change the names of those roles you want to change and you can safely ignore the rest. To ensure your renaming of the Roles carries over into a backup, make sure you include User Data and it will be there when you Restore.

How can I change the look of my Front Page to include a HTML block in the centre column?

There are lots of different ways to do this but start at Administration > Front Page > Front Page settings.

The changing of Front Page settings.
Images inside a HTML table in a label.
  1. Go to Front Page and change each setting to None, None, None None. This Front Page means before log in so what do you want your visitors to see?
  2. Go to Front page items when logged in and change each setting to what you want, or None, None, None, None. This displays after log in.
  3. Go to Include a topic section and click this ON, a tick appears in the check box.
  4. Go to Save Changes and when saved, return to the Front Page.
  5. Click the "Turn editing on" button and you should see two drop-down combo boxes and a number of icons.
  6. Select the "Add a resource" and take your pick of either a Label or a Web Page. (Hint: The label is perhaps a better option here, but suit yourself.

At this point you can edit the label or web page any way you want. You are taken to the WYSIWYG editor so you can include any text or image you like. When done, save it and return to your Front Page and the changes you made should appear.

You can also make the blocks used on the Front Page position themselves on the left or the right and have a HTML label taking up the rest of the page. This is a two column option.

You can also have a single column option by deleting or hiding all your blocks and just use the HTML block.

You are not limited here either, if you want a message for welcoming people and still show the default Front Page or anything else, then the list of items in the Front Page and Front page items when logged in are accessible.

Experiment with different configurations or options, you might hit on one that is spectacular, or more likely, meets your needs better than any other option.

I want to use our own logo on our Moodle, how can I do that?

This is actually simple, but it requires a bit of planning. You will need to create the correct size logos, then determine the location and px (pixel) size of the Moodle logos used in your theme(s), then replace the old with the new in the Moodle file structure.

Firstly, you should know what theme(s) are used in your site and look at the image properties of the logos used in those themes. One way is to right click on the logo image and select properties. In the Formal White Moodle theme, on the front page, the header logo property shows http://demo.moodle.org/theme/formal_white/logo.jpg , a 400 px (wide) by 100 px (high) image. On the course page the header logo property shows http://demo.moodle.org/theme/formal_white/logo_small.jpg and it is a 200 px by 50 px image. There is also a logo in the footer http://demo.moodle.org/pix/moodlelogo.gif The size and file location depends upon the theme properties, different themes are, well, different.

The height of these files is VERY IMPORTANT. We recommend creating your logo images so they match the pixel width and height of the existing logo files.

Secondly, place those files in the correct location in your Moodle file structure. Use the path location as a clue. The easiest method is to rename your logo files to those used by the theme and copy them to the new location.. For example in the Formal White theme header, call your files logo.jpg and logo_small.jpg. Copy these files to /theme/formal_white/ folder. Did you notice the Formal White theme footer logo is located at http://demo.moodle.org/pix/moodlelogo.gif and has an html link to moodle.org?

Alternatively you can edit the theme's "header.html" or "footer.html" file. In the "header.html, find the php code

<img src="<?php echo $CFG->themewww.'/'.current_theme() ?>/pix/big_logo.gif" width="300"
height="100" alt="mycompany" title="mycompany" id="logo" />

and a few lines later:

<img src="<?php echo $CFG->themewww.'/'.current_theme() ?>/pix/small_logo.gif" width="210"
height="70" alt="mycompany" title="mycompany" id="logo" />

It is highly recommended that you change only the file name, not anything else.

Essentially you are creating a new theme by replacing the name of the image file that is your custom logo. If you are editing a standard Moodle's code, it is strongly recommended you first copy that theme (its folder) to your own theme folder. When you upgrade Moodle, the standard Moodle Themes may change and all your work will be lost.

Theme I want to use does not have a logo on it, how can I add my logo?

Create the logo file you want to use in the sizes mentioned above, usually in a gif format. Have two logos, one about 70% the size of the other. Again, using the "header.html" file, look for the line:

  <h1 class="headermain"><?php echo $heading ?></h1>

and replace it with:

  <h1 class="headermain"><img src="<?php echo $CFG->themewww .'/'. current_theme() ?>/pix/logo.gif" alt="" /><?php echo $heading ?></h1>

Remember this line appears twice, one for the front page then one for subsequent pages. You can limit the size of the file by adding, in the second line:

  <h1 class="headermain"><img src="<?php echo $CFG->themewww .'/'. current_theme() ?>/pix/small_logo.gif" alt="" /><?php echo $heading ?></h1>

This works fine with "ocean blue" theme. (Thanks to DeWayne Demland and Mitsuhiro Yoshida for suggesting this)

Help! My site broke - How do I fix it?

Moodle was made to be broken - seriously. Quite often these statements are made:

My site has suddenly broken, only the header will display on any page except for user login.
As soon as anyone is logged in, only the header shows.
The site was working perfectly but not now.

Or variations on that theme.

Why these things happen is usually you have done something or changed something or someone else has done it and the site falls over. You can spend hours trying to fix it, but in most cases it is just better to dump it and start again, a lot less time consuming.

  1. Completely delete your entire Moodle, everything must go.
  2. Reinstall Moodle using exactly the same settings you started with.
  3. Overwrite the database from your Site backup.

Alternatively, you can just restore from your Site backup.

This is why you must backup regularly. The bigger the database, the more frequent the backups required.

TIP: Keep two Moodles, one public and one private. Do things to the private Moodle and test them out. If it works then you can employ the same change in your public Moodle. If it doesn't then you have not damaged anything. It is much easier to deliberately break and repair or re-install your small private Moodle than to try and do it to a public Moodle.

I want to hide the Latest News Block from anyone not logged in.

This example will work for all blocks).

  1. Log in as an Administrator then turn editing on
  2. Click on the assign roles icon (usually the first icon and looks like Assignrolescmf01.gif one of these) in the header of the block to be hidden, in this case the Latest News block.
  3. This takes you to the Assign roles page so then click the "Override permissions" tab.
  4. Select the role "Guest".
  5. Reset the capability moodle/block:view to prevent.
  6. Click the "Save changes" button.

This should hide the block from everyone until they have logged in.

All students are enrolling in every course

This comes back to the contextual nature of Roles.

Make sure your users are not assigned to the student role at the site level. Check in site administration > users > permissions > assign system roles - there should be nobody in the student role Then go to users > permissions > user policies and check that the default user in Moodle is "authenticated user" and not student

And this is where it can all get so confusing. In the context of the SITE the default user needs to be "authenticated user".

So you have solved one problem, but then you notice that as soon as you have done that, the site news forum disappeared from the Front Page after a successful log in, even if you have forced all logged in users to be subscribed.

  1. Go to Administration > Front Page > Front Page settings.
  2. Go to Default frontpage role and select Student. This affects a number of things, but it does not mean everyone becomes a student in ALL courses, only a Student on the front page.

This changes your Front Page Role to Student but keep the default user as it is.

Roles in Moodle are contextual. In making these changes, ALL logged in users are "authenticated users" in the context of the SITE and at the same time ALL logged in users are "Students" in the context of the Front Page. Once they leave the Front Page, they revert to being "authenticated users" until they enter a page or a Course where they have been assigned a different role, Student, Teacher, Course Creator or Administrator.

The Staff at my School want to see what other Staff Members are doing. Can I set this up easily?

Yes, you can. In many instances a lot of Staff Members will want to look at what their colleagues are doing and make sure they are working within whatever academic parameters need to be met. While this may seem intrusive for a lot of teachers, it is is a very easy way of getting a cross-fertilization of ideas in cross-curricular studies.

As the number of courses grow, this can mean that Teachers "My courses" block can grow to a ridiculous length. To get around this issue, set up a fake user id that is enrolled in all courses. If all Staff know the User ID they can access other courses easily. To limit this though, you may consider using a different faked ID for each subject area or discipline or category and make that ID available only to those people delivering courses in that subject, discipline, or category.

I just migrated my Moodle to a server and now no-one can see it. What happened?

Usually the issue is a simple one and can be fixed with your text editor:

  1. Open your text editor and navigate to your config.php file in the Moodle root.
  2. Look for the line $CFG->wwwroot = 'http://localhost/';
  3. Change the "localhost" to your server IP address, e.g.$CFG->wwwroot = 'http://10.45.78.165/';
  4. Save and exit your file editor

This should now work. What it should also do is to update all your internal links, courses, images and everything to reflect the IP address.


See also