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

Blocks FAQ

From MoodleDocs
Revision as of 17:08, 30 November 2010 by Helen Foster (talk | contribs) (What's new with blocks in Moodle 2.0?)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Blocks appear throughout the Moodle and while they are usually no problem, sometimes Users want to change them or add new blocks.


How do I hide front page blocks from non-logged-in users?

  1. Click the "Turn editing on" button at the top-right of the front page. (You need to be logged in as an administrator.)
  2. Access the assign roles page via the assign roles icon (a face and mask) in the header of the block to be hidden.
  3. Click the "Override permissions" tab.
  4. Select the guest role.
  5. Set the capability moodle/block:view to prevent.
  6. Click the "Save changes" button.

How do I make a front page block visible to teachers but not students?

In Moodle 1.9 it is possible to control who sees block on the front page. The following applies to any specified group of people, not just teachers and students.

  1. Ensure you have hidden your block from non-logged in users as above
  2. In site administration>users>permissions>define roles, create a new role such as "front page block viewer"
  3. Click the "Turn editing on" button on your front page
  4. Click the "assign roles " icon on your block.
  5. Click the blue words of your new role. They link to the assign roles page. Choose who you want to allow to see this block (such as your teachers) by moving them from the right hand box to the left.
  6. Click the "Override permissions" tab
  7. For your new role, press the "allow" button to allow them to view this block
  8. For the authenticated user, press the "prevent" button to prevent them seeing this block
  9. Click the "Save changes"button.

How can I reset the default block layout?

The default block layout can be set as "sticky" blocks via Administration > Appearance > Sticky blocks (in 1.6 to 1.8) or Administration > Modules > Blocks > Sticky blocks (in 1.9 onwards).

An alternative method is to edit config.php. See Block layout for more details.

I am having trouble with adding blocks now and do not know why

Occasionally you may want to upgrade PHP or install a later version of Apache or IIS or something else. When this happens, some compatibility issues can arise. For example, the blocks problem can occur if you install PHP v5.3.0, but if you install the PHP v5.2.9 add-on it works fine.

Top

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. This takes you to the Assign roles page.
  3. 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.

I hid the administration menu from the blocks page and now I have no way of showing any module blocks because I can't get to the admin menu to show anything.

Log into your Moodle as normal and then type this:

 (http://www.mysitename.org/)admin/blocks.php

into the address bar. This will take you directly to the blocks page and you will be able to reset any hidden block.

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

This could be caused by many things. The best guess, would be that the installation process made some mistakes. For example, a MySQL, PHP or Apache setting or combination of settings were not configured correctly for the site. If it is a new site, it is probably better to not waste time on trying to find out which line in a config file needs to be changed, but first try and reinstall. Check your browser, is it IE7 or 8. Unfortunately, some releases of IE have trouble rendering Moodle styles easily, the complexity of a page may cause an error in IE and the internal error handlers just toss you back to the login page.

How can I change a Block item name from a list inside a block?

You can change an item name in the Administration ► Language ► Language editing > Editing words and phrases tab. Select the 'moodle.php' file then search for the words you need to alter.

How do I download a block from one site to another using FTP?

FTP (File Transfer Protocol)is a separate software program that most administrators have already have downloaded and used for other downloading purposes. Check with your system administrator for instructions. You will also need a logon name and password to transfer files to your Moodle site

What's new with blocks in Moodle 2.0?

See Blocks 2.0.

Top

See also