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: Difference between revisions

From MoodleDocs
No edit summary
Line 14: Line 14:
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 [http://download.moodle.org/ 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.  
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 [http://download.moodle.org/ 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. The next question then is should it be [[# Linux or Windows?
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. The next question then is should it be [[#Installation on a Windows or a Linux server | Linux or Windows]]?


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

Revision as of 00:57, 17 July 2009

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.

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

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

Not a lot really. It is handy to know these things and mostly these are seriously advanced skills. You can get by without knowing too much, initially. Over time though, 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 a lot of web sites around that will get you started with minimal cost. There are plenty of books as well but professional coaching and tertiary training in this country has become really expensive.

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

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. The next question then is should it be Linux or Windows?

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.

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

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 in either) 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://10.90.56.110';
 $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.

I have been asked to move an activity from one course to another course. How can I do that?

Firstly, the Teacher of the course can do this, it is not really a job the Administrator should have to do. The only time you need be involved is if there are different Teachers for the two courses.

To do this is actually simple, which is why Teachers can do it. In the course, the individual lesson can be backed up. Go to Course > Administration > Backup and with the list of checkboxes presented, uncheck anything you do not want to move. Select the Continue button to backup the files you want to move.

Moodle allows you to move files between folders in the same course and between courses. To move the backup zip file to another folder within the course, just use the Move dialogue. This is the same as it is for moving other files or images within the admin context. To move between courses requires a little more thought and make sure you know Category as well as both the short and full names of the destination course.

Once you have the files backed up in a zip file located in the Files area of your course:

  1. Select the Restore option.
  2. Moodle will say
 "You are about to start the restore process for:  
  backup-myfiles-20090716-0813.zip"
  1. Select "Yes"
  2. Which takes you to the first Course Restore page so click "Continue".
  3. The second Course Restore page asks you where you want to put the soon to be unzipped backup files.
  4. From the drop down combo box select "Restore course : Existing course, add data to it" option.
  5. Enter the Category, the short name and full name of the course and check the Target Role, it should read "Student" but not always.
  6. Select "Continue" - it will ask you again what the destination folder is, select that one and it will automatically go to the next page.
  7. Select the "Restore this course now" button.

Moodle will give you the message "Restore completed successfully" if it worked, click "Continue"

At this point you may need to rearrange the newly installed files, in the same way as always, or you may chose to leave them for the Teacher to place where they need to go.


See also