oktech webservices in moodle 2.2

oktech webservices in moodle 2.2

by Nelson Gomez -
Number of replies: 17

Good afternoon,
I installed moodle 2.2.1 on the server (the root), likewise, have placed in the WSPPfolder in the root of the installation.

Once logged in moodle, I address notifications and not write anything to process the installation of webservices.

Please help ...

Average of ratings: -
In reply to Nelson Gomez

Re: oktech webservices in moodle 2.2

by Patrick Pollet -

@Nelson,

   OKTech can run standalone just after copying wspp at the proper place like you did ; but if you plan to use it under the official 2.x infrastructure (recommended) you MUST copy the folder oktech located in wspp/moodle2integration/oktech  directory into Moodle's local directory before going to Notifications.

See https://github.com/patrickpollet/moodlews/wiki/Using-oktech-ws-with-moodle-2.0-official-web-service-infrastructure

Cheers.

 

In reply to Patrick Pollet

Re: oktech webservices in moodle 2.2

by Nelson Gomez -

Patrick thank you very much for your reply.
I have in the root all files for moodle 2.2.1

I have placed the folders there and oktech WSPP.
but I will notificciones and still do not see anything to start
facility.

That may be happening there?

In addition to moodle 1.9 configuere many things in the archives
moodlewsdl among others.

But also note that there moodlewsdl2
These correspond to the version 2?

Be why, as I have not configured with the other, ie
as I did for Moodle 1.9, not aparacen in notifications?

I need your help please, because I aparace the notificiones.

Will you need to have something special installed on the server, for
example php extensions for this current version?

 

IMPORTANT: 

0) IMPORTANT : First make sure that the Moodle 2.0 official Web Service
is up and running
on your Moodle server and that you succeded in some testing operations.

I'M JUST INSTALL THIS VERSION, THIS IS NOT RUNNING WELL WEBSERVICES

Friend might be going?

In reply to Nelson Gomez

Re: oktech webservices in moodle 2.2

by Nelson Gomez -

Patrick,

I used the oktech webservices to Moodle 1.9 and I work well.
I can use the same I have for webservices 1.9 on 2.2.1?
I appreciate your answers ..

In reply to Nelson Gomez

Re: oktech webservices in moodle 2.2

by Patrick Pollet -

Nelson,

   Yes, OK Tech still runs under Moodle 2.x for most operations excepted those about file system access.

It is now recommended to use OK Tech under Moodle 2.x infrastructure for login, function calls and parameter passing (see docs in github) ; thus, when the official Moodle 2.x WS will increase its number of supported operations, the corresponding OK Tech will  gradually become deprecated and I could start enjoy my retirment wink

Cheers.

In reply to Patrick Pollet

Re: oktech webservices in moodle 2.2

by Nelson Gomez -

Patrick apologizes for the inconvenience but I am going on the following:

I have my project of moodle in the root, ie all the folders and files
within the project are:
public_html
within the WSPP and he is also the folder oktech

Then I go to notifications and nothing appears to run the webservices.

structure:
public_html
|
| - WSPP
| - oktech
| "Here are all the files in moodle as admin, auth, backup, blog
among others.

in notifications only I get a message like this:
Enabling the PHP setting display_errors is not recommended on production sites
Because Some error messages may reveal sensitive information About Your
server.

And more nothing, but nothing appears to install the Web service oktech

What could be happening?
Help me please ...

In reply to Nelson Gomez

Re: oktech webservices in moodle 2.2

by Nathan Humphrey -

Hi Nelson,

 

I'm also really interested in trying this service to streamline user admin etc.

Did you copy the contents of wspp/moodle2integration/oktech into "local" folder in Moodle root?

This worked for me after I discovered "moodle2integration" folder (quite by chance).

I have the service installed. 

The functions list out under the menu

Site Admin -> plugins -> webservices -> external services

(Click "functions")

However, I cannot work out how to run the functions.

Are there any web guides on this part?

The README "wspp/moodle2integration/README" seems to provide some strong hints about using wget from command line.  I tried this and receive no output.

 

At this stage I just want to try some basic functions from PHP command line.

 

Would really appreciate any guidance with this useful resource.

Thanks,

Nathan

In reply to Nathan Humphrey

Re: oktech webservices in moodle 2.2

by Patrick Pollet -

Ok Nathan, if you see in administration screens  the functions oktech_xxx that were added to the official core_xxx or moodle_xxxx functions, you have succeeded step 1 wink

Now you have to setup the Web Service as described here http://docs.moodle.org/20/en/How_to_create_and_enable_a_web_service (create services, add functions, enable protocols, generate tokens ...)  and start the testing.

 You can test either is REST mode using wget command line or a simple browser or you may choose to write a command line PHP client using the sample codes as models see  http://docs.moodle.org/dev/Creating_a_web_service_client#Demo_client_examples and especially the github link https://github.com/moodlehq/sample-ws-clients that gives you some nice models PHP code in REST,SOAP or XMLRPC

Finally if you choose to write PHP client using the SOAP protocol (which I recommend since coding is the easiest ...) you may find this little script useful http://tracker.moodle.org/browse/CONTRIB-3472 ; it will generate for all known operations the 'skeleton' of the required argument (arrays, array of arrays ...)  ; just copy and paste into your code and 'fill the blanks' using the comments generated on each line to know wether the value iss required or not, has a default...

Cheers.

 

Edit : I do hope that in a near future, Moodle 2.x WS will be easier to use by having a correct WSDL automatically generated like OK Tech dooes when run in 'standalone mode' ; see  http://tracker.moodle.org/browse/MDL-28988 

In reply to Patrick Pollet

Re: oktech webservices in moodle 2.2

by Nelson Gomez -
Patrick apologizes for the inconvenience but I am going on the following:

I have my project of moodle in the root, ie all the folders and files
within the project are:
public_html
within the WSPP and he is also the folder oktech

Then I go to notifications and nothing appears to run the webservices.

structure:
public_html
|
| - WSPP
| - oktech
| "Here are all the files in moodle as admin, auth, backupblog
among others.

in notifications only I get a message like this:
Enabling the PHP setting display_errors is not recommended on production sites
Because Some error messages may reveal sensitive information About Your
server.

And more nothing, but nothing appears to install the Web service oktech

What could be happening?
Help me please ...
In reply to Nelson Gomez

Re: oktech webservices in moodle 2.2

by Patrick Pollet -

the folder oktech MUST be inside the local directory and not at the same level as admin, auth, backup ...

local                                                    
|-- oktech                                     
|   |-- db                                     
|   |   |-- services.php                       
|   |-- externallib.php                        
|   |-- oktech_classeslib.php                  
|   |-- version.php                                                                         
|-- readme.txt
`-- wspp
    |-- db
    |   `-- install.xml
    |-- lang
    |   |-- en
    |   |   `-- local_wspp.php
    |   `-- fr
    |       `-- local_wspp.php
    |-- settings.php
    `-- version.php

 

BTW why wspp appears in upper case ?

In reply to Patrick Pollet

Re: oktech webservices in moodle 2.2

by Nelson Gomez -
Good night patrick

WSPP I wrote in all caps but if you are in lowercase.

See attached image for as I have just put in the server.

otherwise I detail:
moodledataI think the same server for running moodle
oktechit went up to the main root.
public_htmlhere are all the files for moodle 2.2.1
WSPPit went up to the main root.

Note 1enable webservices in moodle, I went to advanced features and enable thecheckbox.

Note 2: The folder I uploaded to WSPP server has ma things that I've diagrammed in the previous message.
have the same files as:
admin, auth, MoodleWS, moodlewsdl, moodlewsdl2, service_pp, service_pp2, among others.

Based on everything I have written and also in the attached image, it must be so?
Attachment Captura.JPG
In reply to Nelson Gomez

Re: oktech webservices in moodle 2.2

by Nathan Humphrey -

Hi Nelson,

Looking at the structure above, it seems that your Moodle installation (or what I suppose can be called Moodle root) is "public_html". 

I see Moodle folders within the folder "public_html" - for example: "admin", "course" etc

If this is correct then I believe the folders "wspp" and "oktech" should be place in "public_html/local" folder

As it stands, they appear to be below the Moodle root directory.

Please try to move them to "public_html/local" instead.

I could be wrong but worth a try.


Regards,

Nathan

In reply to Patrick Pollet

Re: oktech webservices in moodle 2.2

by Nathan Humphrey -

Hi Patrick,

 

Thank you very much for the documentation.

That will make for pleasant Sunday reading.

 

Regards,

Nathan

In reply to Nathan Humphrey

Re: oktech webservices in moodle 2.2

by Nelson Gomez -

Hello friend I hope you are well.

I tell you,
as I am doing, install moodle
once installed, upload the folder and oktech WSPP (this takes it from
moodle2integration)

being something like this:
public_html
|
| - WSPP
| - Oktech
| "Here are all the files in moodle as admin, auth, backup, blog
Among Others.

Then I go to moodle
Site adminstration> Advanced features> I enable "Enable Web Services"

Then I go to notifications and nothing comes nothing.

only the following message:

Enabling the PHP setting display_errors is not recommended on production sites
Because Some error messages may reveal sensitive information About Your
server.
The cron.php maintenance script has not run for at least Been 24 hours.

Please help, I need your great support.

In reply to Patrick Pollet

Re: oktech webservices in moodle 2.2

by Nathan Humphrey -

Hi Patrick,

thanks for the link! 

I think that answers my question further down the threads.

I'll try it out.

 

Nathan

In reply to Nathan Humphrey

Re: oktech webservices in moodle 2.2

by Nelson Gomez -

Nathan Hello good day.

Achieved and the service is installed and everything else, thank god.

Tell from what you patrick planteastes to test the service,
you able to?

If satisfactory, what steps seguistes?

I hope your answers ...

In reply to Patrick Pollet

Re: oktech webservices in moodle 2.2

by Nelson Gomez -

Patrick achieved in good time and install the Web service through the notiticaciones:

I did the following:
A. - Install everything through notifications.
2. - Enable [Enable Web Services]
3. - Enable protocols [soap, amf, rest, xmlrpc]
4. - In outsourcing appears [WS oktech | local_oktech]
5. - Add another external service name [demows | Authorised users] allowing the useradministrator "with which I go to moodle"
. - Add to himself all the functions present in the list.
6. - I went to [Web service test client] and probe method through simple, SOAP, and function moodle_user_create_users and it worked.

important:
Upload the folder which has files WSPP as:
MoodleWS
moodlewsdl
service_pp
wsdl_pp
among others ...

The same you use for Moodle 1.9 (ME worked perfect)

HERE COMES THE PROBLEM:

ATTEMPT TO TRY THE SAME CODE (C #) which implemented MOODLE FORPREVIOUS VERSION AND THE CREDENTIALS OF THE ADMINISTRATOR AND NO I DO NOT WORK.

. - STEPS THAT I NEED?
. - SHOULD I SET UP?
 
PLEASE HELP ...

In reply to Patrick Pollet

Re: oktech webservices in moodle 2.2

by Nelson Gomez -

Good morning Patrick Pollet.

  1. Patrick I can install oktech in moodle 2.4.8?
  2. How is the procedure for install the webservices?
  3. Where i can download it file (oktech)?

I hope you answer please.

Nelson Gomez