send parameters using url

send parameters using url

by Hector Canto Marques -
Number of replies: 8

Hello everyone,


I have a question, Is it possible to click on a url created as an activity for moodle users and to send parameters like id user, id courseby post and not by get to the page that carries the url?



Average of ratings: -
In reply to Hector Canto Marques

Re: send parameters using url

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Taking a step back... what are you trying to achieve?
In reply to Howard Miller

Re: send parameters using url

by Hector Canto Marques -


The main problem is that our students can not see videos in our appmoodle because the privacy of vimeo prevents it, if I thought of using a web made by me that is accessed through a link and see a video depending on the id of the course From which access to the course, all this with a database where I relate each video with the id of the course, the problem is that if you share the link with someone and pass the course id through get, anyone could access the video, in Change if we send the course id by post, if someone accesses the web outside the virtual classroom, as it is not the previous post will not see any video

In reply to Hector Canto Marques

Re: send parameters using url

by Guillermo Madero -

Hi Hector,

Why not just change the Vimeo settings?

 

In reply to Guillermo Madero

Re: send parameters using url

by Hector Canto Marques -


The videos of my company are very precious and have a great value, we can not allow any page to put the iframe on your page and publish our videos, that's the reason

In reply to Hector Canto Marques

Re: send parameters using url

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

If you allow students to view Vimeo videos in Moodle - or anywhere - they can download them and re-purpose them. Whatever you think or have been told. 

If they really are "valuable" then they will do exactly that. If they are not then it doesn't matter anyway. There are plugins for Chrome and Firefox to do this - everybody knows about them. 

You may need to re-think your business model. Sorry - to be so direct but this is the reality.

If you really need to send additional parameters to Vimeo then you may end up having to develop a custom filter. There is a vimeo filter that is now unmaintained. It may provide a starting point though.

In reply to Hector Canto Marques

Re: send parameters using url

by Mark Sharp -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Clicking a link will always default to doing a GET request. The only way of changing that behaviour would be via javascript where, if you were using jquery you could use $.post. However, that's just an ajaxy thing, and won't take the user to that page, as would be the normal expected behaviour.

I would try to steer clear of things that break expected behaviour. Users find that confusing.

In reply to Mark Sharp

Re: send parameters using url

by Hector Canto Marques -

So that you understand what I want to do read my answer to the previous comment, if you think of another way to help me I would appreciate it very much, as for your answer I do not quite understand what I should do, where should I include the jquery / ajax code, in My web or moodle? If it is in moodle how can I add that code?


PD:  I'm sorry if I do not explain myself well I do not speak English much