URL resource parameters in new window

URL resource parameters in new window

by Michael Jord -
Number of replies: 3

hello all,

I want to create a URL resource and have it pass a few URL variables 

it should include information such as the course id, the username, you get the idea

the problem is that the parameters are passed only when the appearance is set to automatic and not in any other case

if the URL is set to open in a new window, the new URL does not contain any parameters, even if they have been configured

we are running moodle 3.11.2, any help would be greatly appreciated!

Average of ratings: -
In reply to Michael Jord

Re: URL resource parameters in new window

by Eva Koperdakova -
Hello,
No answer here?
Are you trying to add activity or resouce type URL something like: https://moodle.org/mod/page/view.php?id=7080&forceview=1 (copied from first page of forums).

Because I am dealing with such a problem, only I am trying to link certain section of my course. The trouble is "&" character for parameter. The link is converted to format (I am adding spaces here):
https://moodle.org/mod/page/view.php?id=7080 & amp;forceview=1
thus the link is not working.
This affects new URL resources as well as saved ones. I recently upgraded from 3.9 to 4.1.
In reply to Eva Koperdakova

Re: URL resource parameters in new window

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Many years ago I created MDL-48726, "Custom menu items" do not support the "?" query string character along with " target="new."

I eventually ended up not needing it. It might be of interest to you.
In reply to Rick Jerz

Re: URL resource parameters in new window

by Eva Koperdakova -
I have discovered that URL resource link is corrupt in 4.1.4+ and is OK in 4.1.2, just like it was in 3.9.
Link is OK even in course overview.
Change between versions is in /moodle/mod/url/locallib.php