URL for core_course_create_courses - moodle-api

What does a URL have to look like so that I can create courses using the Moodle web services?
Example:
Full name: EDV King
Short name: EDV_King
Category: none
The web services in Moodle are activated.
My url:
http://localhost/moodle/webservice/rest/server.php?wstoken=MyToken&wsfunction=core_course_create_courses&moodlewsrestformat=json&courses[0][fullname]='EDV_King'&courses[0][shortname] ='EDV_King'&courses[0][categeoryid] ='1'
Unfortunately does not work.
Where is the mistake?
Thank you all for your help!

here is the correct url:
http://localhost/moodle/webservice/rest/server.php?wstoken=MyToken&wsfunction=core_course_create_courses&moodlewsrestformat=json&courses[0][fullname]='EDV King'&courses[0][shortname] ='EDV_King'&courses[0][categoryid] =1
Nice Regards :-)

Related

Keyrock FIWARE method GET and POST

I have keyrock of fiware in my own laptop though docker.
When I do in my browser htp://localhost:8000 , this link redirect to a login website, so it's okay.
When I put htp://localhost:8000/sign_up this link redirect to a register website, so it's okay also.
But then thing is, If I want to do that though GET and POST, how can I do?
I installed Postman in my laptop but, when I put GET http://localhost:8000 everything is okay.
But when I put GET htp://localhost:8000/v3/users if I want list users, doesn't work.
the last I readed in this page : https://developer.openstack.org/api-ref/identity/v3/#users
Could you help me, please?
Thank you very much,
Best Regards.
As stated in the link you put in your question:
"A user with no assigned roles has no access to OpenStack resources."
The right port for your request is 5000 (keystone) instead of 8000 (horizon): http://localhost:5000/v3/users
So, to do what you want, you have to assign some specific role to the user you are using to access the list of users and, besides, I think you have to pass a valid token (X-Auth-Token header) in the request headers.
I hope it can help you.
I gave you a reply here that I think is a more detailed version of the same question. I hope this helps you. Otherwise, we can follow it in that question.
Best regards

Google Maps API V 3 Referer Configuration

hoping you are ok.
If you have the following URL:
http://jeanpaulruizvallejo.com//pruebas/personales/plantillas/alpha-01/templatesViewer.php?cdPlantilla=1
https://jeanpaulruizvallejo.com//pruebas/personales/plantillas/alpha-01/templatesViewer.php?cdPlantilla=1
How should you configure it in the Google APIs Console?
Have tryied several configurations but without success.
Any ideas are welcome.
Thanks.
ok, this seems to be working:
http://jeanpaulruizvallejo.com/pruebas/personales/plantillas/*
https://jeanpaulruizvallejo.com/pruebas/personales/plantillas/*
http://jeanpaulruizvallejo.com/pruebas/personales/plantillas/alpha-01/*
https://jeanpaulruizvallejo.com/pruebas/personales/plantillas/alpha-01/*
http://jeanpaulruizvallejo.com//pruebas/personales/plantillas/alpha-01/templatesViewer.php?cdPlantilla=*
https://jeanpaulruizvallejo.com//pruebas/personales/plantillas/alpha-01/templatesViewer.php?cdPlantilla=*
Thanks anyway :)

What is chunkLen in MMS MessageType's fields

I am developing the library that implements mms protocol fully. In Message Types, we know that all messages must be started with ChunckId( i.e. LinkMacToViewerPing ) . Could any one please tell me what is ChunckId and how can i fill it ?
Thanks in advance :)
Your subject says chunkLen but in the message body you say chunckId. Which one are you asking about?
If it's chunkLen, then take a look at http://msdn.microsoft.com/en-us/library/cc234813.aspx for a description of what it is and how to set it.

How can i know the geographic origin from a web page or URL?

i'm building a web crawler and i'm trying to figure out where is a web page from. I mean, i can check the domain (for example, .com.ar ar from Argentina) but there are other sites, that have other domains (.com, .net) that are argentinean too, an example of these is www.taringa.net. Is an Argentinean site but with a .net domain.
So how can i do it?
Thanks.
Geo-location by IP. Do a reverse
look-up on the IP address, and you can
get a geographical location. These
services cost money, and will only
tell you physically where the server
is hosted.
Do a whois on the domain. It will
tell you the where the website is
registered.
But remember,
There is no meaning to "where is a web page from". The web has no geographic boundaries. I can run a Spanish language site out of San Jose California, and register the domain contacts in Canada. You will have no way of knowing my site is aimed at Chilean users.
You can use a whois query on the command line - or make a request to whois.arin.net and whois.xxxx.xxx depending on the result. If I map www.taringa.net to an IP, I get this:
www.taringa.net. 300 IN A 190.210.132.53
and running whois on that:
whois 190.210.132.53
gives me a ton of output:
inetnum: 190.210.132/24
status: reallocated
owner: WIROOS SRL
ownerid: AR-WISR1-LACNIC
responsible: ALBERTO NAKAYAMA
address: GRAL MIGUEL DE AZCUENAGA, 71, 4 A
address: C1029AAA - BUENOS AIRES -
country: AR
phone: +54 011 30973059 [3059]
This should generally work for any ip.

Facebook API - how to handle profile without a vanity url?

I'm working on an AS3 Flash only facebook app - and I'm confused about how to download the users picture when a vanity url is not in use.
Once authorized - i'm able to access the basic information fine first_name, last_name (not profile pic tho).. but I do recieve the link which can come in 2 forms
1.with vanity url ie.
http://www.facebook.com/mynickname
2. without vanityurl ie.
http://www.facebook.com/profile.php?id=100000462568669
when 1. is in effect, I can access the remote profile picture fine via..
service.url = "http://graph.facebook.com/"+nickname+"?fields=picture";
but I don't know how to for case 2 - anyone seen this before?
Thanks
I believe the ID and vanity name are interchangeable.
http://graph.facebook.com/StevenLevy?fields=picture
is the same as
http://graph.facebook.com/534895623?fields=picture
Note: You may also be able to just use http://graph.facebook.com/534895623/picture if you're just looking for profile pictures.
After a question mark you have to use the ampersand (&) for other variables.
service.url = "http://graph.facebook.com/profile.php?id="+id+"&fields=picture";