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

From MoodleDocs
(→‎Formats of common internal links: change links to demo.moodle)
(switch links to demo.moodle)
Line 9: Line 9:
   
   
===Course===
===Course===
<nowiki>http://localhost/course/view.php?id=2</nowiki>  "Course New" opening page"   
<nowiki>http://demo.moodle.org/course/view.php?id=5</nowiki>  ""Moodle Features Demo" course.  


<nowiki>http://localhost/course/view.php?id=3</nowiki>  "Course Demo" opening page
<nowiki>http://demo.moodle.org/course/view.php?id=3</nowiki>  "Higher Education Film Studies Module" course.


===Activity===
===Activity===
*<nowiki>http://localhost/mod/lesson/view.php?id=4</nowiki>  "Course New, Lesson 1" opening page
*<nowiki>http://demo.moodle.org/mod/lesson/view.php?id=224</nowiki>  "Moodle Features Demo Course, Lesson: Lesson 1"


*<nowiki>http://localhost/mod/lesson/view.php?id=5</nowiki> "Course New, Lesson 2" opening page
*<nowiki>http://demo.moodle.org/mod/assignment/view.php?id=197</nowiki>   "Moodle Features Demo Course, Assignment: Upload a single file"


*<nowiki>http://localhost/mod/resource/view.php?id=77</nowiki> "Course New, Resource 1"
*<nowiki>http://demo.moodle.org/mod/forum/view.php?id=215</nowiki> "Moodle Features Demo Course, Forum: A standard forum for general use"
 
*<nowiki> http://localhost/mod/lesson/view.php?id=2</nowiki> "Course Demo, Lesson Demo" opening page


===Lesson page===
===Lesson page===
Line 48: Line 46:
*Find the page you want to link to and copy the address in the address 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.   
*Type the text you would like the reader to see.   
*Block (highlite) the text
*Block (highlight) the text
*Select the link tool (Globe - show icon)
*Select the link tool (Globe - show icon)
*Paste the address in the first line of the popup box
*Paste the address in the first line of the popup box

Revision as of 13:29, 2 February 2009

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.

The examples below were created in demo.moodle.org and used the Features Demo lesson in the examples.

Tip: One way to copy a location using most browsers is to right click on the object, then select the "copy location link". Then paste this address into the HTML link popup tool.

Course

http://demo.moodle.org/course/view.php?id=5 ""Moodle Features Demo" course.

http://demo.moodle.org/course/view.php?id=3 "Higher Education Film Studies Module" course.

Activity

  • http://demo.moodle.org/mod/lesson/view.php?id=224 "Moodle Features Demo Course, Lesson: Lesson 1"
  • http://demo.moodle.org/mod/assignment/view.php?id=197 "Moodle Features Demo Course, Assignment: Upload a single file"
  • http://demo.moodle.org/mod/forum/view.php?id=215 "Moodle Features Demo Course, Forum: A standard forum for general use"

Lesson page

The easiest way to determine a Lesson page's location is to use the edit tab and the collapsed view. Find the page and use the preview icon to view the page. The browser address bar will show the page location. Note id=224 is Lesson 1, id=225 is Lesson 2.

http://demo.moodle.org/mod/lesson/view.php?id=224 "Moodle Features Demo Course, Lesson 1" page 1 (Title: A Demonstration Lesson) The first page of the lesson.

http://demo.moodle.org/mod/lesson/view.php?id=224&pageid=106 "Moodle Features Demo Course, Lesson 1" page 1 (Title: A Demonstration Lesson) also the first page of the lesson.

http://demo.moodle.org/mod/lesson/view.php?id=224&pageid=113 "Moodle Features Demo Course, Lesson 1" page 8 (Title: Building lessons) a multiple choice question.

http://demo.moodle.org/mod/lesson/view.php?id=224&pageid=119 Moodle Features Demo Course, Lesson 1 page 14 (Title: Score the simple way) a branch page.

http://demo.moodle.org/mod/lesson/view.php?id=225&pageid=136 Moodle Features Demo Course, Lesson 2 page 3 (Title: Multianswer) a multianswer question page.


Resource links

Find the file using the course administration block and the files link.

http://demo.moodle.org/file.php/5/media/bonjour.mp3 An mp3 file located in Features Demo Course files>media. http://demo.moodle.org/file.php/5/images/moodle-logo.jpg An image file located in Features Demo Course files>images . http://demo.moodle.org/file.php/3/frank.gif An image file located in the Higher Education Film Studies Module course. http://demo.moodle.org/file.php/3/overview.doc An word document file located in the Higher Education Film Studies Module course.

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 (highlight) 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