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

Call a webservice from excel

$
0
0
by erika alarcon.  

I need to get certain moodle reports and one option would be to call a webservice from excel.
Has anyone tried?


Re: Error message "Web server software (Apace/2.4.29 (Unix) OpenSSL/1.0.2k-fips PHP/7.2.16) is not supported, sorry."

$
0
0
by Kelvin Ma.  

[root@moodle ~]# systemctl status httpd
● httpd.service - (null)
Loaded: loaded (/etc/rc.d/init.d/httpd; bad; vendor preset: disabled)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)
[root@moodle ~]#

[root@moodle /]# service --status-all | grep running
/etc/init.d/httpd: line 95: lynx: command not found
SUCCESS! MySQL running (31999)
/etc/init.d/other_vsftp: line 37: syntax error near unexpected token `fi'
/etc/init.d/other_vsftp: line 37: ` fi'
Active: active (running) since Tue 2019-08-20 17:47:31 HKT; 1 months 1 days ago
Active: active (running) since Tue 2019-08-20 17:47:31 HKT; 1 months 1 days ago
vmware-guestd is not running
Active: active (running) since Tue 2019-08-20 17:47:31 HKT; 1 months 1 days ago
[root@moodle /]#

[root@moodle /]# netstat -tulpn | grep :443
tcp6 0 0 :::443 :::* LISTEN 3053/httpd
[root@moodle /]# netstat -tulpn | grep :80
tcp6 0 0 :::80 :::* LISTEN 3053/httpd
[root@moodle /]#

[root@moodle /]# whatis httpd
httpd: nothing appropriate.
[root@moodle /]#

We are not trying to run a loadbalancer.

The moodle is running normally. I don't understand why it shows the status of httpd is inactive.

Re: Error message "Web server software (Apace/2.4.29 (Unix) OpenSSL/1.0.2k-fips PHP/7.2.16) is not supported, sorry."

$
0
0
by Ken Task.  

All I can say is 'WOW!" ... that's one messed up server - from typical AMP stacks on CentOS.

Purpose of these forums isn't how to install/admin/ an AMP stack, but Moodle.   Really stretching the stated purpose of these forums - and free advice to boot - appreciated or not!

Some hints/clues for you (from what you have shared) ... just a few ...

Loaded: loaded (/etc/rc.d/init.d/httpd; bad; vendor preset: disabled)

Huh??!!!  bad vendor preset????!!!  Where in the world did you get httpd from - what repo?   Uhhhhh ... don't answer that ... or even try to ... don't wanna know!

/etc/init.d/httpd: line 95: lynx: command not found

Lynx is a text based browser!!!!  How did it get entered in the init.d of httpd ... the daemon for apache?  In CentOS 7 there is no /etc/init.d/httpd ... 7 doesn't use the old but the new (that's a hint)

[root@moodle /]# netstat -tulpn | grep :80 returning ...

tcp6 0 0 :::443 :::* LISTEN 3053/httpd ... port 3053

http://www.adminsub.net/tcp-udp-port-finder/3503

And see it's really a CentOS 7 Guest OS on VM-Ware?

You can backup moodle code and moodledata using tar and archive those backups to another location.

MySQL appears to be running so you can use mysqldump to get an sql dump of the moodle DB.   Then archive that off onto another location.

scp the backups off onto some other server.

Now the biggy ... 2 choices ...

Wipe out the VM Instance of CentOS 7 and start over with a fresh CentOS 7 this time keeping it simple.  This might be best as it could be you tried what many have tried and failed to do ... upgrade a CentOS 6 in place to a CentOS 7.  Reason I say that ... 'old mixed with new'.

OR - the more difficult road for you at present me thinks ...

Use yum and erase httpd, httpd-development and anything related ... which also might remove php drivers and php itself - dependencies.

Reboot server.   Basically rebuild an AMP stack.  Set that up with valid/working repos for things like PHP and test a static page ... don't forget your valid certs for https:// as well as a php info page.

Then restore your Moodle.

Too much for ya?   Fine ... one time offer ... I'll do it for $15,000.00 US ...

$10,000.00 up front payable via PayPal and the remainder due when server is up.  No work done until funds have been transferred - ie, the first $10,000.00 (that ought to price me out of the market, ya think?)

Opion: $5,000.00 US for direct Email support ... $2500.00 up front via PayPal.  Condition ... you will not argue with what I tell you to do!

(that ought to price me out of the support market also, ya think?)

OR ... role up sleeves and find a tutorial on how to install an AMP stack on CentOS 7 ... properly.

OR ... role up sleeves and find a tutorial on how to install an AMP stack on CentOS 7 ... properly.

No!  The repeat above is NOT a mistake! smile

A Google search for that will find several good tutorials on how to do that ... might have to make minor adjustments.

Not being mean nor cruel nor impolite ... just 100% honest in remote assessmet/free support exchange of public posted info via a forum that shouldn't be used for such.

'spirit of sharing', Ken

Re: Error message "Web server software (Apace/2.4.29 (Unix) OpenSSL/1.0.2k-fips PHP/7.2.16) is not supported, sorry."

$
0
0
by Kelvin Ma.  

Sorry, I really don't understand what you mean. The moodle is still working normally, just appears an error message once. What is AMP stack? I don't know what it is.

We can start apache because have the below symbolic link.
/etc/rc.d/init.d/httpd->/usr/local/apache2/bin/apachectl

My boss compiled source code to install Apache, not yum install. He thought that it was easiler to upgrade because the version of downloaded code is known.

I don't know how he do that because he prepared the LAMP platform for me. I just installed the Moodle. As the Moodle has been launched, it is difficult for us to do too much maintenance on the Moodle or platform.

What I want is just to avoid the re-occurrence of that error message.

Re: Error message "Web server software (Apace/2.4.29 (Unix) OpenSSL/1.0.2k-fips PHP/7.2.16) is not supported, sorry."

$
0
0
by Ken Task.  

AMP stack is LAMP ... without the Linux.

"My boss compiled source code to install Apache, not yum install. He thought that it was easiler to upgrade because the version of downloaded code is known."

Tell your boss he was wrong.  Back before repo's ... many/many/many moons ago, I compiled AMP stack.  Depending upon what issues there were as announced by CentOS ... which gets their info from the folks at Red Hat ... one could have to dive deep into deciding if a vulnerability marked/tagged as 'important' was significant enough to warrant re-compling a 'slice of the pie' ... in other words, just one of the three that make up AMP ... Apache as an example.

Recompling of just Apache could also mean re-compiling of PHP in some cases ... longer down time.

Let's say it's PHP that has a security issue ... happens fairly often ... and it has to be re-compiled ... same problem ... that might require re-compiling of Apache and MySQL as well.

".... easiler to upgrade because the version of downloaded code is known."

Even easier with repos. and yum ... and the version is known.

yum list httpd
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.den1.denvercolo.net
 * extras: repos.dfw.quadranet.com
 * updates: mirror.dal10.us.leaseweb.net
 * webtatic: us-east.repo.webtatic.com
Installed Packages
httpd.x86_64    2.4.6-90.el7.centos   @base

The real package manager on CentOS is still RPM - Red Hat Package Manager.   Now there is something you'd prefer not to learn.  On top of or in front of that now is YUM (Yellow Dog Package Manager) ... which began it's life on Mac's, believe it or not.   It's more 'intelligent' but it still uses RPM.   Yum figures out the 'dependencies'.

I know you might be too young for this ... remember on Windows DLL Hell?  Well, same kinda thing on Linux only it's 'dependencies' - libraries that are needed to run daemons/services/etc., etc.

Ask your boss ... if there were a zero day flaw in PHP and known to be in the wild, how quickly could your boss secure your server?

Me thinks your boss has given you pretty much mission impossible.

Ok ... enough ...can't suggest how to make the error go away - ask your Boss ... after all, he compiled the AMP stack.  And to make it go away, your boss can also hack core code.

Good Luck, Kelvin!

'spirit of sharing', Ken


Re: Error message "Web server software (Apace/2.4.29 (Unix) OpenSSL/1.0.2k-fips PHP/7.2.16) is not supported, sorry."

$
0
0
by Ken Task.  

Just one more ... resource for you if your boss insist on compiling AMP ... you will need to refer to often me thinks.

https://lists.centos.org/pipermail/centos-announce/

Here is September:

https://lists.centos.org/pipermail/centos-announce/2019-September/thread.html

https://lists.centos.org/pipermail/centos-announce/2019-September/023405.html

Here's one on Firewalled

https://lists.centos.org/pipermail/centos-announce/2019-September/023412.html

Unless you are still using iptables might want to acquire the update to firewalled.

I happen to like the new firewall as it has a zone for dropped ... easy to have your server inaccessible to a bot network - all services/all ports - or a particularly agreessive scanner which sucks your server of bandwidth/resource usage.  Let the researchers research ... just not at your server .... considering it's current issues, might want to consider using drop zone.

Ok, now am done! smile

'SoS', Ken

Re: error when adding external functions to a web service.

$
0
0
by Andrew Normore.  

Can confirm this hack has gotten me by.

MS excel

$
0
0
by Enerkey Roger.  

I also faced web services problem in my excel sheet. That time I was using ms office 2010 and next, I switched to 2016. But MS Excel Has Stopped Working Error and could not figure out this problem issue. I think excel users known about this excel error.


how to call Moodle web service in .net 3.5

$
0
0
by victor du.  

i try to call Moodle Servive in net 3.5/visual studio 2008 /c# , but always  get the error "An existing connection was forcibly closed by the remote host". is here someone know the reason . 


thanks



API to create activity in batch

$
0
0
by Ryan Chan.  

May anyone advise where there is Moodle API to create an activity in batch for all Moodle courses?

I want to create an activity in all Moodle courses using command line as Admin user, so that need not create the activity in all Moodle courses one by one manually.

Thanks!

Ryan

How to configure permission to assign course in moodle API?

$
0
0
by Mohamed Samir.  

moodle 3.6 enrol_manual_enrol_user not working every time !

{ "exception": "moodle_exception", "errorcode": "wsusercannotassign", "message": "You don't have the permission to assign this role (383) to this user (2) in this course(28)." }


Re: API to create activity in batch

BUG: core_course_create_courses ignores courseformatoptions parameters

$
0
0
by Dorel Manolescu.  

After upgrading to latest moodle 3.6.6 I noticed that the core core_course_create_courses ignores the courseformatoptions parameters in web-service call. Example when I create a singleactivity type of course and add the type of activity this is ignored and default type of activity defined at site level is created.

The change in the code that triggered the issue is:

  • file : course/format/lib.php
  • initial function: 797 protected function update_format_options($data, $sectionid = null)
  • code : $data = $this->validate_format_options((array)$data, $sectionid);

This function "validate_format_options" is clearly not designed to handle web-service parameters.

Please find attached postman collection which will help debug


https://tracker.moodle.org/browse/MDL-66854



Re: How to configure permission to assign course in moodle API?

$
0
0
by Dorel Manolescu.  

Hi
Assuming that the user 2 has permissions to assign that role (383) can you check the settings for allow role assignments for the role assigned to user 2.
Your role with id 383 should be in that list. Screen-shot attached.
Regards

Re: check mail before core_user_create_users

$
0
0
by Dorel Manolescu.  

Hi
admin/webservice/documentation.php
core_user_get_users_by_field
Arguments
field (Required)
the search field can be 'id' or 'idnumber' or 'username' or 'email'

Regards

Re: Event to update custom profile field

$
0
0
by Dorel Manolescu.  

Hi
Create your own plugin and use events api observers.
https://docs.moodle.org/dev/Event_2
Check the documentation under: ../report/eventlist/index.php
Course completed
\core\event\course_completed
Regards

Re: Adding activities to a course with web service

$
0
0
by Luca Bösch.  

Dear Andreas

Did you get to any solution?

Best,
Luca

Re: Adding activities to a course with web service

$
0
0
by Andreas Schenkel.  

No, I was Not able to find a Solution . Maybe moosh is a Way.

Re: Adding activities to a course with web service

$
0
0
by Luca Bösch.  

I neither can't let users, not want to myself, use CLI access, and hence MOOSH, on the main Moodle server to deal with the Files, Courses, and Users.

Thanks for your quick reply though!

Getting a web service token with SSO

$
0
0
by Gordon Alexander.  

HI

We have a web portal which uses the Moodle web services to get timely information from Moodle. To do this we need to get the web service token.

If the Moodle is not using SSO this is simple, just call /login/token.php.

If the Moodle is behind SSO we can redirect to /admin/tool/mobile/launch.php but this will not redirect back to our domain. It will only redirect back to a url scheme, for example, moodlemobile://token=????. This is fine if we are in the native app version of our product because we can catch the url scheme and extract the token from it. However this will not work on the web portal as the browser doesn't recognize the url scheme and the redirect doesn't contain our domain.

How can we get a web service token for our web portal? This is simple in both Canvas and Blackboard but appears to be impossible in Moodle.

Thanks

Gordon Alexander


Viewing all 2363 articles
Browse latest View live


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