Revision as of 09:12, 18 July 2010 by Eloy Lafuente (stronk7) (talk | contribs) (Reverted edits by Wongtham (Talk) to last version by Colin Fraser)

Jump to: navigation, search

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

This page is for editing Moodle Documentation (MoodleDocs). This is a similar but much more robust type of program than the standard Moodle wiki.

Edit tab

Every MoodleDoc page has an "edit" tab at the top . This link will let you edit the page you are viewing. Please try editing a page by using this sandbox link. We will cover more formatting and special MoodleDoc features below. The edit tool bar is easy to use.

Edit tool bar

Hold the mouse cursor over the edit tool bar to see what functions each icon will do. From left to right: Bold, Italics, Internal (page) link, external link, Level 2 heading, embedded image, media file link, mathematical formula, no wiki, signature and time stamp, horizontal line.

Show preview

In edit mode, the show preview button at the bottom of the page lets you see what the page will look like after your edit, before you actually save. We all make mistakes; this feature lets you catch them immediately. Using Show preview before saving also lets you try format changes and other edits without cluttering up the page history, and has a number of other advantages. Don't forget to save your edits after previewing, though!

Edit summary

Before saving the page, it's considered good practice to enter a very brief summary of your changes in the summary box below the edit-box.


Most formatting in MoodleDocs is usually done with MediaWiki markup - you don't have to learn HTML!

Bold and italics

Bolding and italicizing is done by surrounding a word or phrase with multiple apostrophes ('):

appears as italics. (2 apostrophes on both sides)
appears as bold. (3 apostrophes on both sides)
'''''bolded italics'''''
appears as bolded italics. (5 apostrophes on both sides)

Headings and subheadings

Headings and subheadings are an easy way to improve the organization of an article.

Headings can be created like this:

==Top level heading==
(2 equals signs)
(3 equals signs)
====Another level down====
(4 equals signs)

If an article has at least four headings, a table of contents will automatically be generated.


The simplest way of indenting is to place a colon (
) at the beginning of a line. The more colons you put, the further indented the text will be. A newline marks the end of the indented paragraph e.g.
This is aligned all the way to the left.
:This is indented slightly.
::This is indented more.

is shown as

This is aligned all the way to the left.
This is indented slightly.
This is indented more.


What it looks like What you type
  • Unordered lists are easy to do:
    • start every line with a star
      • more stars means deeper levels
  • A newline
  • in a list

marks the end of the list.

* Unordered Lists are easy to do:
** start every line with a star
*** more stars means deeper levels
*A newline
*in a list  
marks the end of the list.
  1. Numbered lists are also good
    1. very organized
    2. easy to follow
  2. A newline
  3. in a list

marks the end of the list.

# Numbered lists are also good
## very organized
## easy to follow
#A newline
#in a list  
marks the end of the list.
Descriptive lists:
first tag 
accompanying description
second tag 
more description
third tag 
surprise! more description
Descriptive lists:
; first tag : accompanying description
; second tag : more description
; third tag : surprise! more description

Preserving formatting

What it looks like What you type

Leading spaces are another way to preserve formatting.

Putting a space at the beginning of each line
stops the text from being reformatted. 
Leading spaces are another way to preserve formatting.

 Putting a space at the beginning of each line
 stops the text from being reformatted.

You can also use <pre> tags.

A "nowiki" tag on either side of text area, starts and stops wiki formatting within a line of text. For example, placing the tags here <nowiki> turns off linking [[Main Page]] </nowiki> and then starts the wiki formatting again. Here is the same link Main Page without the tags on either side.

The HTML edit tool bar has a nowiki icon.

PHP syntax higlighting

What it looks like What you type
$user = $DB->get_record('user', array('id'=>'1');
<code php>$user = $DB->get_record('user', array('id'=>'1');</code>


See the Mediawiki help for full details of the table syntax.

What it looks like What you type
A table:
header 1 header 2 header 3
row 1, cell 1 row 1, cell 2 row 1, cell 3
row 2, cell 1 row 2, cell 2 row 2, cell 3
A table:

{| class="nicetable"
! header 1
! header 2
! header 3
| row 1, cell 1
| row 1, cell 2
| row 1, cell 3
| row 2, cell 1
| row 2, cell 2
| row 2, cell 3

Note, the class="nicetable" is our local hack for Moodledocs. You can leave it out to get a table without borders.

You can also add in more attributes if you do not want to use class="nicetable"

 border="1" cellpadding="5" cellspacing="0" align="center"

Or perhaps you want a floating table.

 style="float: right;"

Like HTML, you can also have a combined use of "colspan" and "rowspan":

 | rowspan="2" | A
 | colspan="2" style="text-align: center;" | B

(from mediaWiki Help pages)

Links and Anchors

Links to other pages are the heart of a wiki and MoodleDocs.

Page links

To make a wiki page link, simply put the word in double square brackets, like this:
. Highlight text and using the "internal link" tool will do this as well.

If you want to use words other than the article title as the text of the link, you can do so by adding the pipe "|" divider followed by the alternative name or text.

For example, if you wanted to make a link to the Sandbox, but wanted it to say "my text" you would write it as:
[[Sandbox|my text]]...
It would appear as: my text... but would link to the sandbox.

There are some special internal link notations. For example [[#top]] will always jump to the top of the current page.

External links

The easiest way to make an external link is to simply type in the full URL for the page you want to link to e.g.

To make the link display something other than the URL, use one square bracket at each end. If you want to make a link to, type

This will display the link as a number in brackets, like this: [1]. There is also the external link tool which can also assist you.

If you want the link to appear with text that you specify, add an alternative title after the address separated by a space (not a pipe). So if you want the link to appear as Moodle, just type
[ Moodle] 

Video links

With the advent of YouTube, Google Video, and a host of other sites, it is very helpful to be able to link directly to the video from Moodle. All you have to do is provide the URL for the video in any HTML construction area in Moodle, such as "add a resource" or "add an activity" area. Simply click on the hyperlink icon and type in the URL for the video, or paste in the URL from the video site URL menu. You may want to try this link in order to view the video:[2]

You will note a menu box next to the video containing a URL and and Embed code. You can copy the URL from the menu box, or you can even provide the information for embedding the video by copying the code and embedding it on your Moodle page.

Categories links

A category is a type of index page, a page of links listed in alphabetical order. In page view mode, a list of categories that a page is linked to, appears at the bottom.

To put a page in a category, just type
, and put the name of the category between the colon and the brackets. To link directly to a category use
[[:Category:Teacher | teacher]]
, this will show as teacher, note the preceding ":", which is different to
[[Category:Teacher | teacher]]
. The second will put the current page in the teacher category as mentioned above. If you put a page in a category, it's usually a good idea to add a sort key to the category like so:
. This will result in the page being placed under "E" like "Eclipse" in the alphabetical link list where most users will look for it. You can also use MediaWiki's PAGENAME variable (= the article title without its namespace) as a sort key:

This page is linked to the single category "MoodleDocs".

Inter-language links

Simply type
[[es:Corresponding page title in Spanish]]
in the English Moodle Docs, or
[[en:Corresponding page title in English]]
in the Spanish Moodle Docs, at the bottom of the page, below the category link. Inter-language links will appear automatically in the "In other languages" block.

If for some reason you want to refer to a page in another language version in the running text, precede the language code by a colon. Thus, the reference in the preceeding paragraph was produced by the text [[:es:Portada|Spanish Moodle Docs]].

User-page links

User names can be linked to a user page. For example [[User:Helen Foster|Helen Foster]] will appear Helen Foster and link to the user's page. Comments by other users are generally left on the Users page comment tab.

Interwiki links


Manual Anchors

Other than automated anchors (see below) manual anchors can be inserted by using something this this:

<span id="anchor_one">'''My Anchor.'''</span>

Which if implemented will create an anchor My Anchor..

Inside the page I can now refer to this link as the link to My Anchor by using this:

[[#anchor_one|the link to My Anchor]]

If you want to have a link back to the top of a (long) page, just insert:

[[#top|Back to top of page]]

Page comments

The page comment tab is used for discussion about the page. Sometimes before making an edit on the page for the first time, it is a good idea to check the page comments. It can be formatted the same as a main page, thus can be used to show a draft of a proposed change.

Talk page contributions may be signed and dated by typing four tildes ~~~~. This will appear as Helen Foster 06:35, 19 February 2006 (WST), for example.

There's also a handy button for signing in the toolbar of the editing field: Signature Icon.png

Page history

The page history tab allows a way to look at changes between different edits. It is also possible to revert (roll back) an edit to a previous version. Usually this is left to the administrator, but you certainly can rollback your recent edits.

Watch and unwatch page

A watched page will appear on "my watchlist" when ever someone edits the page. There is a tab next to history which acts as a toggle between watch and unwatch. There is also at the bottom of the page in edit mode a "Watch this page" check off box.

See also