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

HTML linking

From MoodleDocs
Revision as of 13:18, 30 December 2008 by chris collman (talk | contribs) (→‎Internal Linking ideas: Grade book linking)

Creative Moodlers have come up with some ways to use HTML linking to navigate within a Moodle site. This page will give some examples.

Formats of common internal links

Essentially the Moodle id is a unique number associated with a datatable record. Moodle calls up the right module in view mode and then points that towards an object(database record) that is identified with an id. It is important to pay close attention to the address bar when logged in as a non-student/guest and as a student/guest. Here are some examples.

I have two courses that I have worked on over the same period of time. The are on a localhost, stand alone Moodle 1.7. One is what I call "Course New" with several lessons and resources. The other only is a copy of the Moodle Course demo Lesson in Section 7.

Course

http://localhost/course/view.php?id=2 "Course New" opening page"

http://localhost/course/view.php?id=3 "Course Demo" opening page

Activity

  • http://localhost/mod/lesson/view.php?id=4 "Course New, Lesson 1" opening page
  • http://localhost/mod/lesson/view.php?id=5 "Course New, Lesson 2" opening page
  • http://localhost/mod/resource/view.php?id=77 "Course New, Resource 1"
  • http://localhost/mod/lesson/view.php?id=2 "Course Demo, Lesson Demo" opening page

Lesson page

http://localhost/mod/lesson/view.php?id=2&pageid=15 "Course Demo, Lesson Demo" page 15

To be continued.

How to create a link

For the purpose of example, I will use the content area of a branch table. What is important is that it has the standard Moodle HTML edit bar.

  • Find the page you want to link to and copy the address in the address bar
  • Type the text you would like the reader to see.
  • Block (highlite) the text
  • Select the link tool (Globe - show icon)
  • Paste the address in the first line of the popup box
  • Optional-enter the arrow text
  • Save the popup tool.
  • Words should now indicate they are linked.

Repeat as needed.

How to link with a HTML edit bar

Page_content for more information

Ed link.gif

HTML Link Insert moodleorg.JPG

<a href="http://moodle.org">HERE</a>

How to link without a HTML edit bar

The easy way is to put in the link somewhere that has an HTML edit bar, then go to text mode, copy the code and then paste it. This will usually work for pictures and most links.

Internal Linking ideas

  • There was the Library (aka Course) of Lessons and resources idea. Essentially set up a course as an open library, use topics to loosely organize activities and resources. Use links from within other courses for standard refreshers or what ever. Paste them in a wiki, in a lesson (content area, answer, teacher response), you get the idea.
  • Category "course short cut" or a course redirect. Put a course in one category, that redirects the student to the real course in another category. Simple, put an HTML link in the course title to the other course's home page.
  • The use of links to create an index of lesson pages in the content area, instead of branch table jumps. This gives endless possibilities of groupings and directions to send students.
  • Or master site matrix created on one or more resource pages using links that direct to courses, activities, resources on the Moodle site.
  • Create a series resources pages, copy the browser link addresses to paste into the next and back hyperlink. Perhaps use a "link to file" or web address resource to open a second window in the course to start the series of linked pages.
  • Use internal linking and hidden topics to visually shorten a course page for a student. See the Course homepage Tips and tricks section.


  • Allow students to see their grades once they reach a certain page in an activity (for example a Lesson page). Use the Switch Role to switch to Student. Move your mouse over the link to "Grades" and copy the link location. The link to a user report will look like this
http://demo.moodle.org/grade/report/user/index.php?id=5