very low priority discussion

very low priority discussion

by Daniele Cordella -
Number of replies: 3
Picture of Core developers Picture of Plugin developers
Is here someone so lovely to explain me how are supposed to be used the parameters of the "link to a file or web site" of, for istance, the "main menu" block?
If I choose a parameter like course-id=2 and then I fill the location field with http://myServer/moodle/mod/resource/view.php
my link doesn't point to my course id=2.

How am I supposed to use them?
(I am using Moodle 1.6)

Thank you in advance.
Average of ratings: -
In reply to Daniele Cordella

Re: very low priority discussion

by David Scotson -

The parameters are mostly intended to send people to differnt links depending on who, and where, you are within Moodle.

For example, you could link to Google and pass the current user's surname as a parameter. This means every (logged in) user will see a different search result based on their name. That would look like this:

http://www.google.com/search

parameter: Surname, variable name:q

http://www.google.com/search?q=Cordella

More usefully you could take them to a map of their location:

http://maps.google.com/maps

parameter: City/town, variable name: q

http://maps.google.com/maps?q=London

In the case of course-id, if you choose id as the parameter then for the front page '1' will be added, paired with whatever parameter name you choose. This is unlikely to be useful on the front page where you would be better just copying the URL, but perhaps you have all your notes or exams on a seperate web server with urls like:

http://www.example.com/notes?course=econo101

you would be able to make a course template that could be dulplicated many times and automatically changes where the link points to whenever someone changes the course details.