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
Revision as of 08:04, 16 July 2009 by Colin Fraser (talk | contribs)

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 if you want to spend the time looking for them. Thanks to all the unknowing and unknown contributors.


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. 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. The log-in ID does not carry any permissions with it, only a 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, so you should only assign Roles within the context of a Course or a Block. If you assign a Role in the Front Page, that Role is assigned to every part of the site. The best advice is that you DO NOT assign any roles from the Front Page.

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.

  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 are not limited here, 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.

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 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.

Log in as an Administrator then turn editing on

  1. Click on the assign roles icon (usually the first icon) in the header of the block to be hidden, in this case the Latest News block (but this should work for all blocks).
  2. This takes you to the Assign roles page so then click the "Override permissions" tab.
  3. Select the role "Guest".
  4. Reset the capability moodle/block:view to prevent.
  5. Click the "Save changes" button.

This should hide the [block from everyone until they have logged in. You can apply this to all blocks.

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 the role of Student.

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.

Installation on a Windows or a Linux server

This item will cause some problems for a good many people. The Windows version of Moodle is workable, but for a seriously working Moodle site, the advantage lies firmly with Linux. The simple truth is that it is easier to mirror and load share using Linux than Windows. Building and learning how to use Moodle is easier in Windows, although that is arguable, but in the longer term, a Linux based installation is far stronger and a much better learning environment for any Administrator. It is suggested that if you can, set up a Moodle in both environments, Ubuntu, SuseLinux and Debian are now relatively easy to install and configure, and in Windows, (XP seems more stable than Vista, as long as you stay away from Home versions) and test these statements for yourself. - My opinion only, debate in a forum is most welcome.

I upgraded Ubuntu from 8.10 to 9.04 and have lost my Moodle - where did it go?

In this situation, usually, you will get the Apache "It works" message but when you try to access the Moodle, it will come back with an error message telling you it cannot locate the Moodle. You can try to locate the Moodle yourself, and update the various files, like config.php:

 unset($CFG);
 $CFG->dbtype = 'mysql';
 $CFG->dbhost = 'localhost';
 $CFG->dbname = 'moodle';
 $CFG->dbuser = 'moodleuser';
 $CFG->dbpass = 'xxxx';
 $CFG->prefix = 'mdl_';
 $CFG->dbpersist = "false";
 $CFG->wwwroot = 'http://my URL';
 $CFG->dirroot = '/var/www/moodle';
 $CFG->dataroot = '/var/moodledata';
 $CFG->directorypermissions = 00777;
 $CFG->admin = 'admin';
 require_once("$CFG->dirroot/lib/setup.php")

Reedit and change wwwroot to to what your IP address is, even if it has not changed, re-enter the path.

Check the actual location and make sure the dirroot and dataroot are also correct. Try it and if it works, then you have successfully re-configured the Moodle, but do not count on it. This method seems pretty hit and miss.

It may be faster and safer to just reinstall the Moodle, so make sure you have a backup prepared to go if needed.

I have just taken over a Moodle and now can't log in to it as Admin and others get the message "Your session has timed out. Please login again.".

You should already know the version of Moodle you are using, (if you are not sure then go to Notifications and in the bottom left corner of the centre block you will see the Version + (build number)).

If you are using v1.6, you may want to consider dropping the site entirely. Reinstalling a newer version should solve the essential problem. v1.6 experimented with cookieless sessions which work by appending a session id to either every url or to hidden form fields in html pages. This allowed php to track every session and record it. The problem is that that data is stored in the moodledata folder, and that takes up space which eventually takes up so much room the server will object and deny people access. To immediately solve this problem enter the /moodledata/sessions folder and delete all the "session" files.

If this is the problem, then you may be getting messages from your ISP telling you that you are now over quota, so you need to reduce the amount of filespace that your Moodle is occupying.

If you are already using a later version of Moodle, then you should be communicating with your ISP to see what the problem may be. Alternatively, you may be able to access the log files, in which case you may be able to query each element of the Moodle. It is also recommended that you constantly update your Moodle site. You can start considering this option using CVS files.


See also