URL resource parameters in new window

URL resource parameters in new window

- Michael Jord の投稿
返信数: 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!

Michael Jord への返信

Re: URL resource parameters in new window

- 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.
Eva Koperdakova への返信

Re: URL resource parameters in new window

- Rick Jerz の投稿
画像 Particularly helpful Moodlers 画像 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.
Rick Jerz への返信

Re: URL resource parameters in new window

- 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