Quantcast
Channel: Web services
Viewing all 2361 articles
Browse latest View live

Re: Having trouble with web services in Moodle 2.9

$
0
0
by Luke Gerhardt.  

I'm having this same issue on a new Moodle server running 2.9.  I've enabled all the same things, followed all the steps you listed as well, and also the recommendation by Leo.

Has anything worked for you?  Is there something new that must be done under 2.9 to make this work?

All my testing so far has been done with Moodle's internal web service test client, FWIW.


session data refresh after grade post

$
0
0
by Abhi puri.  

Hi, we've written a web service using the Grade API, to send a grade update to moodle from an external system via a web service call. Everything is working fine from the perspective of the grade making it to the correct place etc. 

Now whats not working, is the downstream conditional activites do not unlock, until the user re logs-in to the system.

Is there a function /service we can call to make a logged in user refresh session data? a browser refresh doesn't seem to trigger it.

synchronize student info with another web app via web service

$
0
0
by saadat rahimi.  

Hi 

I'm developing moodle for an institute. This institute has a separate student registration application. Now they want to synchronize users on moodle with the users in their registration app in a way that there is no duplication between these two. 

So I want users to sign up using their email in the moodle and as they are signing up their info (email) should be checked with registration application database via web service and all the users that are registered in the local application should be recognized as users in moodle.

As far as I've understood, there should be two web services, one for each direction. But my question where can I start from and how?

Thanks

SCORM content & web service

$
0
0
by pratik patel.  

Hi All,

I have moodle installed and added SCORM content to course.

Now i want to get that SCORM content to another website using web service.

Can anybody tell how it will be done? Is it possible or not?

I have already tried lti_provider plugin but not getting anything.

Please let me know if anyone can help me with this..


I am tired searching solution for this but got nothing.


Thanks,

Re: SCORM content & web service

$
0
0
by Juan Leyva.  

Hi,

SCORM web services are under development, they will be integrated for 3.0

https://tracker.moodle.org/browse/MDL-29934 here you have a list of the SCORMS, they are all developed pending to be integrated (the one for retrieving the SCORM package is still pending)

Regards, Juan

Re: SCORM content & web service

$
0
0
by pratik patel.  

Hi Juan,

Thanks for the reply and information.

If it is not available yet so i need to redirect user to moodle course page.


For this can you please tell me can i make user login using web service? so user does not need to login again at moodle.


Thanks in advance .. waiting for your reply.

Web services test client Error

$
0
0
by Silambhu govind.  

hai friends,

pls help me i have to implement web services concept in my localhost moodle.

when test web service i got this error, pls help me ..






Your assistance highly appreciated. 

Re: SCORM content & web service

$
0
0
by Juan Leyva.  

Hi,

unfortunately you can't do SSO via Web Services, but if the user is already logged in a browser if you redirect the user to Moodle in the same browser it will be logged (since the cooki session is still valid)

Regars


Re: SCORM content & web service

$
0
0
by pratik patel.  

Hi Juan,

Thanks for the reply.


Then my requirement is not fulfilled by web service. User does not know how to handle Moodle how can i redirect to moodle??

Also webservice not giving SCORM content. I think it is not useful for me.


Thanks for your time.


Regards,

Pratik 

SOAP wsdl create new user with custom fields

$
0
0
by Roberto Martínez.  

Hi dear moodle-gurus:

I am recently trying to crate users using a SOAP call and a wsdl, but the thing is that I can't figure out how to create a new user with custom fields. If I create a new user without the custom fields it creates succesfully.


Here's what I've been doing:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http:XXXXXXXX/soap/server.php?wstoken=XXXXXX">

   <soapenv:Header/>

   <soapenv:Body>

      <ser:core_user_create_users soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

         <users xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">

             <Item soapenc:id="id1">

               <username xsi:type="xsd:string">holauseron</username>

               <password xsi:type="xsd:string">Description_1.</password>

               <firstname xsi:type="xsd:string">Juan</firstname>

               <lastname xsi:type="xsd:string">Perez</lastname>

               <email xsi:type="xsd:string">johnycasszzh1@example.com</email>

               <auth xsi:type="xsd:string">manual</auth>

            </Item>

         </users>

      </ser:core_user_create_users>

   </soapenv:Body>

</soapenv:Envelope> 

This call is successful but if I do this:

   <soapenv:Header/>
   <soapenv:Body>
      <ser:core_user_create_users soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <users xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
             <Item soapenc:id="id1">
               <username xsi:type="xsd:string">adiosuserin</username>
               <password xsi:type="xsd:string">Description_1.</password>
               <firstname xsi:type="xsd:string">Juan</firstname>
               <lastname xsi:type="xsd:string">Perez</lastname>
               <email xsi:type="xsd:string">junitodineroz@example.com</email>
               <auth xsi:type="xsd:string">manual</auth>
               <customfields xsi:type="xsd:list">
               <type xsi:type="xds:string">idasociado</type>
               <value xsi:type="xds:string">128157</value>
               <type xsi:type="xds:string">razonsocial</type>
               <value xsi:type="xds:string">GS1 MEXICO</value>
               <type xsi:type="x
               ds:string">ramoindustrial</type>
               <value xsi:type="xds:string">M1</value>
               <type xsi:type="xds:string">subtipo</type>
               <value xsi:type="xds:string">Servicio Membresía Única</value>
               <type xsi:type="xds:string">statusempresa</type>
               <value xsi:type="xds:string">Asociado</value>
               <type xsi:type="xds:string">entidadfederativa</type>
               <value xsi:type="xds:string">MEX</value>
               <type xsi:type="xds:string">idcontacto</type>
               <value xsi:type="xds:string">8142423</value>
               </customfields>

            </Item>
         </users>
      </ser:core_user_create_users>
   </soapenv:Body>
</soapenv:Envelope>

I get:


<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
         <faultcode>Receiver</faultcode>
         <faultstring>Invalid parameter value detected | ERRORCODE: invalidparameter</faultstring>
         <faultactor>invalidparameter</faultactor>
      </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

[help]how to use the webservice api:core_files_upload

$
0
0
by json king.  

Hi,i want to use the api:core_files_upload.but when i use it,moodle throw a execption as follow; 

<EXCEPTION class="moodle_exception">
<ERRORCODE>nofile</ERRORCODE>

I use a from to send the request ad fellow:
<form action="../webservice/rest/server.php"method="get">
<input type="hidden"name="wstoken"value="1825cdb79d6197f84f0fea45163ca7ca">
<input type="hidden"name="wsfunction"value="core_files_upload">
<input type="hidden"name="contextid"value="2">
<input type="hidden"name="component"value="user">
<input type="hidden"name="filearea"value="private">
<input type="hidden"name="itemid"value="0">
<input type="hidden"name="filepath"value="/">
<input type="hidden"name="filename"value="test.jpg">
<input type="hidden"name="filecontent"value="base64_encode">
<input type="hidden"name="contextlevel"value="user">
<input type="submit"value="Submit">
</form>
the test.jpg's path is the same as the html file.If the filepath is false,can you tell me what can I change it to make it work?
 I'm looking forward to your reply!

how to use the webservice api to get the instance id?

$
0
0
by json king.  

I am use the webservice api function(core_files_upload)to upload file.It has a filename "instanceid".which is the user id in mysql.Now i want to know is the webservice offer a api to get the instanceid ?If it has,what the function call?If it doesn't have,what should i do to got the instanceid?
I am looking forward to your reply.

Thank!

Re: [help]how to use the webservice api:core_files_upload

$
0
0
by Howard Miller.  

Moving to web services...

Re: how to use the webservice api to get the instance id?

$
0
0
by Howard Miller.  

Moving to web services forum...

create user via webservice with two custom fields

$
0
0
by Roberto Martínez.  

Ive been trying to upload users via web service using core_users_create_users but I can't upload more than one custom field any suggestions please? 

This works but when I add another custom field I get an error:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://xxxxxx/p/webservice/soap/server.php?wstoken=786469bd0ea7e012c8bdc93xxxx7a5f">

   <soapenv:Header/>

   <soapenv:Body>

      <ser:core_user_create_users soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

         <users xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">

             <Item soapenc:id="id1">

               <username xsi:type="xsd:string">gokusaiyaseis</username>

               <password xsi:type="xsd:string">Description_1.</password>

               <firstname xsi:type="xsd:string">Juan</firstname>

               <lastname xsi:type="xsd:string">Perez</lastname>

               <email xsi:type="xsd:string">gokurocksseis@example.com</email>

               <auth xsi:type="xsd:string">manual</auth>

               <customfields xsi:type="xsd:list">

               <customfields>

              <type xsi:type="xds:string">idasociado</type>

              <value xsi:type="xds:string">1285678</value>

               </customfields>

               </customfields>


            </Item>

         </users>

      </ser:core_user_create_users>

   </soapenv:Body>

</soapenv:Envelope>


Are almost all Web Services very difficult for an individual to get a username for and pay for?

$
0
0
by Ryan Atwood.  

Hi community,

In a day or 2 of research, I am finding that there are a lot of Web Services and REST services out there for many things like Kelley Blue Book, Amazon, etc. Probably more than I would have guessed and many that I'd like to try out and use.  However, it also appears to me that almost every one of these services requires a fee, username, and password to be able to use it (which then gets included in the SOAP envelope, etc.). 

Take Kelley Blue Book for example.  They have a really nice set of Web Services that I'd love to use for an app I'm doing at home for fun (family budget stuff).  However, it seems I cannot use this without paying some kind of fee.  

What is the worst is that it seems that the only way to get such a username/password for many of these services is find out what the fee is by emailing the support email address listed on the site (i.e. programmableweb.com) only no one ever seems to email me back.  I'm happy to pay a basic fee, but I'm kind of stuck and frustrated.

Am I way off course? Has this been your experience also? I would really love to get car prices and home repair/replacement costs from a web service or REST service ANYWHERE and am willing to pay, but alas....

Any ideas?

Thanks,

Ryan

Moodle login after remote authentication

$
0
0
by Jess Portnoy.  

Hello all,

I have my own SSO system which I'd like to connect to Moodle.
The flow I am interested in is:
0. user authenticates via SSO
1. user is automatically signed in to Moodle

I have looked into the webservices and was able to use that mechanism for creating a Moodle account but its not quite what I want..
is there a way to use webservices so that, post authentication using my own SSO, a token is passed to Moodle and the user is logged in?

Thanks,

Forum and assignemtn for course gives accessexception error

$
0
0
by Mac Shah.  

Hi, i follow as above all steps and its working for me ,

but while test with below webservice i got permission error


i have added function to all required capability but i am not able to do access below webservice

1)mod_forum_get_forums_by_courses

2)mod_assign_get_assignments


i had set all capability but its gives me error


{
    "exception": "webservice_access_exception",
    "errorcode": "accessexception",
    "message": "Access control exception"
}

Re: Moodle login after remote authentication

$
0
0
by Nathan Mcilree.  

I am not sure if the Web Services provide authentication services - I did a quick search through the functions under for "auth" or "log" and came back with nothing.

I guess the proper way to do this would be to develop an auth plugin. 

I implemented a slightly more hacky version for the company I work for which I will describe below in case it is of assistance.

Scenario
User logs onto our bespoke web platform , when they click across to MOODLE they are background authenticated at that point (or new account created if they do not have a local MOODLE account).

Process

  1. On login to our bespoke web platform cookie is assigned to user (this relies on shared sub domains - but other mechanisms could be substituted).
  2. When a user hits MOODLE config.php checks for this cookie - if present it makes note of page user was trying to go to and forwards user to custom background login page.
  3. Custom login page calls user details via our own web services using cookie as ID.
  4. User is loaded via a common id to both systems (we use id number as the shared field) using the MOODLE function :
    $user = get_complete_user_data('idnumber', $returned_id);
  5. If a result is returned then call MOODLE function
    complete_user_login($user);
  6. Following this the user is forwarded to the original page they were requesting.

This is a replacement for a previous even hackier authentication method where on login to our bespoke system the username would be saved in a database with a guid key and then the user forwarded to a specific MOODLE key which would retrieve the user details from aforementioned database, used to log user into MOODLE, and then return user to bespoke system.


Sorry if kind of track - but thought there might be a chance it is of use to you.



Get assignments for all students for all courses with webservice

$
0
0
by William Bustos.  

Hi,

I need get information for assignments with grades for all students for all courses through a webservice with REST, Is there any some plugin or API of this module or i have to develop this action?.

Many thanks.

Viewing all 2361 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>