Note: You are currently viewing documentation for Moodle 3.4. Up-to-date documentation for the latest stable version of Moodle is likely available here: Front page FAQ.

Front page FAQ: Difference between revisions

From MoodleDocs
Line 47: Line 47:


==Theme I want to use does not have a logo on it, how can I add my logo?==
==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:
Many of the themes included in a Standard version of Moodle have images, but just as many do not. If you can write PHP and understand HTML and CSS, then you may want to start at the [https://docs.moodle.org/dev/Themes_2.0 Themes 2.0] page. Many themes that use a logo image have an editable setting in the Settings page that appears on the Site Administration block.
 
  <nowiki><h1 class="headermain"><?php echo $heading ?></h1></nowiki>
 
and replace it with: 
 
  <nowiki><h1 class="headermain"><img src="<?php echo $CFG->themewww .'/'. current_theme() ?>/pix/logo.gif" alt="" /><?php echo $heading ?></h1></nowiki>
 
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:
 
  <nowiki><h1 class="headermain"><img src="<?php echo $CFG->themewww .'/'. current_theme() ?>/pix/small_logo.gif" alt="" /><?php echo $heading ?></h1></nowiki>
 
This works fine with "ocean blue" theme. (Thanks to DeWayne Demland and [[User:Mitsuhiro Yoshida|Mitsuhiro Yoshida]] for suggesting this)


==I have a lost a graphic and table on my Front Page when it is being viewed in guest mode in IE6, but it appears in Firefox==
==I have a lost a graphic and table on my Front Page when it is being viewed in guest mode in IE6, but it appears in Firefox==

Revision as of 12:38, 23 July 2011

The Front Page can be complex. It deals with Themes, it's own settings, many features used in a Course, Roles and Authentications. It is also the first page a site administrator will try to tweak and customize. Here are some common questions and answers that apply to Moodle 1.9.x. The themes structure in Moodle 2.0 is different so it is not expected the methods described below will work. When possible, appropriate changes will be made.

Changing the look of the Front Page in Moodle 2.0

Each block has a number of configuration settings that you can change. Each block is assigned to a "region" and this positioning is controlled in the

   ► Site pages ► Configuring a (name) block

page. There are a number of other settings you can use to configure the display of the Front page. Be careful, but do not be afraid to experiment, and you can easily create almost any look you like by using these configuration settings.

Why not use the Front Page Files area for restoring courses?

There are two excellent reasons you do not do this, the first is site/course security. It is easy to not delete the zip file you have restored, you get distracted, forget to do it, not realise that there is a problem. The Files area for the front page is not secure behind Moodle's native barriers, they are easily accessible to anyone who can work out to get there - which is almost anyone. So you may not be protecting your courses. The other issue is that a course backup can be interrupted by a lot of things and be faulty without anyone knowing it. If you restore in the Front Page, then you risk damaging your Front Page, which can break your site. It is easier to have a special course to allow Administrators and Teachers specifically to restore courses from.

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. The easiest is to use the Administration > Front Page > Front Page settings>>Include Topic setting.

  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.

NOTE: This has been tested in Moodle 2.0 and the same conditions apply, so it will work. It is strongly recommended that to do this, use a Label as the container for your table though. Seems to sit more easily in the Front Page.

How can I get a different look to my Front Page?

The Front Page document has a section on examples for achieving different looks with a standard moodle theme.

There you will see examples of 1 column, 2 columns, no center column created by moving or hiding blocks on a Front Page.

You are not limited here to one view for all users. Look at the Front Page settings. You can chose what non logged in people see in the center column, which maybe different than someone who has logged into your site. So you can place a message to welcome people, with some blocks but not show any courses. When someone logs in show them course categories or just their courses. You will find this under the settings Front Page and Front page items when logged in.

Experiment with different configurations or options, you might hit on one that is spectacular, or more likely, discover the configuration and theme to meet your needs.

The Theme structure of Moodle 2.0 is sufficiently different that these tips will not work. However, the controlling of these things is going to be far easier in the new themes than in previous versions. If you want to develop your own theme, which inherently implies you want to create your own site look, let alone a Front page, there is, already, a lot of documentation available as to how themes are constructed, and how they work. Currently the language is still too technical, so most of us will just not get it, but it is hoped that this situation will not continue for long.

How can I make News on Front page seen by only Teachers?

In v1.9, a modification to core code was, arguably, the most stable way of resolving this issue. For v 2.x, permissions can be reset to allow the viewing of news by anyone in a particular group or grouping. As well, the creation of a new Role can be used to allow some people to assume this capability. Perhaps you have Staff members who are not Teachers in a Course that need access to news as well, the v1.9 mod does not allow that so a new Role based on Student that specifically allows the viewing of News and Hidden Files may be more appropriate.

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

There are lots of ways. You will be working with Themes to make this change.

The simplest is to switch to the Formal White theme, that comes standard with Moodle. In this theme you can upload your own logo to, say, the Moodle root folder, perhaps by, ftp. If you are interested in developing themes, or just working on your own theme, start with this page], it begins to explain how themes work. You can always change the rest of the theme by adding in colour and such.

Editing theme settings for Moodle 2.0

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

Many of the themes included in a Standard version of Moodle have images, but just as many do not. If you can write PHP and understand HTML and CSS, then you may want to start at the Themes 2.0 page. Many themes that use a logo image have an editable setting in the Settings page that appears on the Site Administration block.

I have a lost a graphic and table on my Front Page when it is being viewed in guest mode in IE6, but it appears in Firefox

IE6 (7 and 8) has caused trouble for design of web pages and themes for years but most css problems can be easily fixed. Usually the problem is that if for example some image is too big to some div etc "box" IE6 throws the image to next row or outside screen and so on. The fix can be one tag change or one number change - or scaling the new content smaller so that it fits to given box - but the hard part is to find the cause of broken css. Apparently this is a flaw that is found in a number of releases of IE, and it has to do with the implementation of CSS rules by Microsoft in some releases of different versions.

If new css is needed for IE6 it can usually be added to theme styles_ie6.css file.

Better solution: Use Firefox. Thanks Mauno.

I want to limit the number of courses that appear on the Front Page

At this time, there is no easy way to do this, as such. In the Administration > Front Page > Front Page settings page, you can change the number of courses to be displayed on one page to a different number. Currently, the default is 20, but you can make it whatever you want. It is still messy, though. You can also, using the same Front Page Settings page, change what is displayed after login to show only categories - but this too, can get messy.

Perhaps the best way of resolving this issue is to replace the course and Category list on the Front Page with a HTML block that links off to the various category pages. This keeps your courses off the Front Page altogether.

There are a couple of ways to do this, you can have a list of Categories, in a table, or you can use a table full of icons, much the same as Moodle's front page. Depending on your number of Categories, say 11 different subject areas and one Administration area creates a table either four columns or four rows. For most people, the orderly nature of a balanced table implies an orderly site that is really welcome, particularly if the images linking to a Category are clear and the alt tag text says what it is linking to. For more information on how to do this, try the Front Page Moodle Doc.

See also