Quantcast
Channel: Installing and upgrading help
Viewing all 47371 articles
Browse latest View live

Re: Moodle on macOS Server (some infos & some issues...)

$
0
0

by Matt T.  

It's pretty simple on Apache

https://www.digicert.com/ssl-certificate-installation-apache.htm

Generate private key, generate CSR (certificate signing request), send CSR to certificate authority and install it along with the certificate


Unfortunately it's tricky to use Let's Encrypt on non-Linux platforms (which essentially gives you certificates for free). Cheap ones available from RapidSSL, GoDaddy, Comodo, etc. though.


Re: Moodle on macOS Server (some infos & some issues...)

$
0
0

by Marcus Green.  

The nice thing about a Wiki is that if anyone doesn't like the way you write it they can always change it (or indeed lump it).  Go on write in your own voice, what could go wrong smile

Re: Upgrade failure going to 3.3.1+

$
0
0

by Matt T.  

Usually for upgrades of big production stacks I would recommend going to 3.2 first as an intermediary and do extensive testing before trying again to 3.3, and always use the CLI upgrader, don't use the web one if you have CLI access.

To isolate plugins, why not clone the environment, uninstall all plugins and run the upgrade? That would rule it out. 

However I'd recommend going through the steps in this thread to try and identify bad records and fix them. I'm afraid I'm not familiar enough with the core to guarantee it will still work. 

Take a full code/database dump/moodledata backup before you start doing anything (as I'm sure you did before trying the upgrade, right?)

https://moodle.org/mod/forum/discuss.php?d=199860


Re: Moodle on macOS Server (some infos & some issues...)

$
0
0

by Jocelyn Chappaz.  

as I said, my SSL is already working....  so I already did that.

and https does work nice with my NextCloud, on the same machine... or my phpbb forum... or... etc...


But, it does not work properly with my moodle... essentially if I force https in my config, the result is I can't connect in anyway (with the message telling only HTTPS connection are allowed..blah blah) in despite of the case all setting for https are done AND that I try to connect in HTTPS.


If don't force that, when I use https, the theme sometimes works... sometimes not... pictures aren't charged... sometimes they are...


So, there might be a setting somewhere that needs to be fixed... but is that in moodle ? (of course, I read and followed the doc about https...) is that is macOS ? in the server part ?? no clue for now.

Re: Moodle on macOS Server (some infos & some issues...)

$
0
0

by Jocelyn Chappaz.  

just did, yesterday night (-:


basically the same text from here, with more infos, more details, more links and some mistakes corrected....

Re: Migrating Oauth2 (LinkedIn) users to new core Oauth2

$
0
0

by Les Bell.  

Apologies for the delayed reply - the site has been busy, as have I, and I've been traveling, to boot.

SUCCESS!

The missing link was this:

"Please note that the value "googleoauth2" it's written along all your users which where tied to it, so you need to alter your mdl_user records (DO A BACKUP FIRST!) to reset the authentication method for your users: change in the column auth from googleoauth2 to oauth2. Maybe start changing only your user and note that you can do the same by opening the moodle interface for you user and changing in the advanced settings of the user profile the authentication method and you should be ok."

As you suggested, I tried it with my own account first and after some testing, I breathed a sigh of relief and have now changed all the old googleoauth2 entries - for the SQL neophytes among us, the statement to do this is

UPDATE mdl_user SET auth = 'oauth2' WHERE auth = 'googleoauth2';

I'm hoping that the confirmation emails go out OK and don't get caught in spam traps, etc.

Thanks for your help with this - now it's done I can sleep a bit more easily. ;)

--- Les

Re: Migrating Oauth2 (LinkedIn) users to new core Oauth2

$
0
0

by Les Bell.  

I'm just going through this at the moment - see my posts earlier in the thread, and since I was logged into MySQL anyway . . .

During my migration, I tested creating an account and logging in using a Google ID associated with my university email account. It created a row in mdl_user with the 'confirmed' column set to 0. While I was waiting for the confirmation email to turn up - it went into the spam folder - the account appeared in Site Administration -> Users -> Accounts -> Browse list of users with a "Confirm" link at the right end of the line, to allow manual confirmation.

When I got the email and went to the confirmation link, the 'confirmed' value went to 1.

I also looked at mdl_auth_oauth2_linked_login during this process - it has two columns called 'confirmtoken' and 'confirmtokenexpires', but they stayed blank right through the confirmation process, so I'm not sure how they're involved. Note, though, that this was for the creation of a new oauth2 user account, not migration of an existing googleoauth2 account.

So it might be as simple as

UPDATE mdl_user SET confirmed = 1 WHERE auth = 'oauth2';

Or it might not. ;)

I'm anxiously watching live logs to see if any of my users experience problems during the migration from googleoauth2 to oauth2, and if worse comes to worst, I might try the above statement as a way of "pre-authenticating" them to avoid any problems.

--- Les


Re: Moodle on macOS Server (some infos & some issues...)

$
0
0

by Matt T.  

in despite of the case all setting for https are done AND that I try to connect in HTTPS.

I don't understand this. What is the error message you get, precisely, when you visit https://yoursite and not http://yoursite

Have you changed $CFG->wwwroot in config.php to begin with https:// and not http://?

You shouldn't really enable force https until you can actually get your site working on https.

After that you need to set up a redirect in apache - so that http requests are redirected to https. You can do that a number of ways, but my preferred way is a rewrite in your apache vhost configuration files. Plenty of material available via google to learn how to do that. 

If you are using https://www.<mysite> the following redirects should be put put in place

http://<mysite> should be redirected to https://www.<mysite>

http://www.<mysite> should be redirected to https://www.<mysite>

https://<mysite> should be redirected to https://www.<mysite>


If you use http://<mysite> (without www) - the following redirects should be put in place

http://www.<mysite> should be redirected to https://<mysite>

https://www.<mysite> should be redirected to https://<mysite>

http://<mysite> should be redirected to https://<mysite>

Then you can turn on force https, so that for some reason your redirect fails, Moodle refuses to continue unless guaranteed a secure connection.


Finally (and this is done absolutely last and after you have taken a full database dump backup - you've been warned).  you should change all references on your site to http:// to https:// to avoid mixed content problems. You use the admin screen at <yoursite>/admin/tool/replace/index.php to do this.

Bonus points afterwards is to enable HSTS, but that should only be done after a few months of running stable. 


Moving the Moodle root directory

$
0
0

by Les Bell.  

Hi, all,

For some years, I've been running a web site with the home page and publicly-available content managed by Joomla, and a separate e-learning environment which is (obviously) Moodle. The Joomla site is installed in /var/www/html, while the Moodle code is installed in /var/www/html/classroom, so that all the Moodle URL's take the form of https://www.example.com/classroom/course/view.php?id=3, and so on.

But Moodle has improved over the years, to the point that I think I'm considering getting rid of the Joomla site and just running the whole site on Moodle. So I'd like to move Moodle from the classroom directory to the one above.

Now here's the rub: one of my courses has a large wiki that serves as the course notes, and I've cunningly added lots of feedback into quiz questions, so that they link back into the wiki for students to use for revision, etc. All those links in the quiz questions (and elsewhere) have the "/classroom/mod/wiki/view.php" path which will need to be edited into "/mod/wiki/view.php" and the wiki content itself might require the same treatment.

Configuration: CentOS 7.3, Moodle 3.3.1, PHP 5.6.31, MariaDB 5.5.52, all humming along nicely.

I can probably do this programatically - I'm a decent, albeit rusty, MySQL, Perl and PHP coder, but it's a bit of a high-wire act.

Has anybody else moved a Moodle installation and courses like this? And more to the point, is there an easier way of doing it - perhaps using Apache mod_rewrite or other techniques?

--- Les

Re: Moving the Moodle root directory

$
0
0

by Matt T.  

Presumably you've already changed $CFG->wwwroot.

Now, take a full database backup, and navigate to https://www.example.com/admin/tool/replace/index.php, completing the fields appropriately.

Search "for" would be https://www.example.com/classroom/

Search "to" would be https://www.example.com/

Do not skip the backup step. You were warned. 

Further information is available at https://docs.moodle.org/33/en/Moodle_migration. It's usually advisable to read that prior to a migration, although merely changing the URL isn't too substantial. 

Cheers
Matt

Re: Moving the Moodle root directory

$
0
0

by Les Bell.  

Thanks, Matt - I just came back here to mention I'd discovered the Search and Replace tool, and you beat me to it by a minute!

It looks like that will do the trick nicely - has anybody successfully used it to move a heavily-hyperlinked site like I'm describing?

Best,
--- Les

Re: Moving the Moodle root directory

$
0
0

by Matt T.  

has anybody successfully used it to move a heavily-hyperlinked site like I'm describing?

Yes, it was designed for this exact purpose. I've only used it once, when we brought in HTTPS many years ago. It was very successful.

Cheers

Matt

Re: Moving the Moodle root directory

$
0
0

by Les Bell.  

Great! Thanks, Matt - that's good to know. I've been looking at the code for the db_replace() function in adminlib.php, and I can't see any reason why it shouldn't take care of everything.

Now I just have to do a bit of theme customization and create some new content for the front page - blog articles, course outlines, etc. - and I'll be in business.

Best,
--- Les

Re: Moving the Moodle root directory

$
0
0

by Matt T.  

Yeah, it's best to steer clear of core database alterations without having solid knowledge of how the core is designed. db_replace() takes into consideration moodle's idiosyncrasies. As you probably saw, it skips some tables and runs a function in blocks (if they implement it).

It usually works flawlessly, but technically still in beta (hence why it's not in the admin tool tree). 

Afterwards, you can search the database for any remaining URLs, but exercise caution manipulating it.

Glad to have helped

Matt


Blank Screen when adding a moodle (3.1.7) activity to a course

$
0
0

by Björn Karpenstein.  

Hello Folks!

My System Configuration is the following:

  • Red Hat Enterprise Linux Server release 7.4 (Maipo) (AMAZON AWS EC2)
  • PHP 5.4.16,
  • Maria DB
  • Moodle 3.1.7 (installed with "sudo yum install moodle")

My Problem:

When i am pressing the Button "Add an activity or ressource" in the Course administration, the popup opens correctly to select the activity/ressource, but when i click the "Add"-Button i get a blank screen (Chrome says HTTP 500).:

http://domain/moodle/course/modedit.php?add=folder&type=&course=2&section=0&return=0&sr=0

My Question:

What can i do to get rid of the blank Screen and add activities/ressources


Re: Blank Screen when adding a moodle (3.1.7) activity to a course

$
0
0

by Björn Karpenstein.  

When i turn on Debugging i get the following error:

...moodle/course/modedit.php?add=folder&type=&course=2§ion=0&return=0&sr=0Fatal error: Call to undefined method tool_lp_course_competencies_form_element::tool_lp_course_competencies_form_element() in /usr/share/pear/HTML/QuickForm/element.php on line 375

My (weak) Solution:

When i turn off the Competencies under

Administration -> Site Administration -> Competencies -> Competencies Settings -> Enable competencies 

it works. 

If someone has a better solution please tell me.

Re: Blank Screen when adding a moodle (3.1.7) activity to a course

$
0
0

by Ken Task.  

Might have something to do with the way moodle was installed .. via yum.

I take it that's going to a repo maintained by Amazon?   Is it a Bitnami package installed by yum or some other package offered by whom?

Reason I suspect ... there are many many many others who have 3.1.7 installed via the 'normal' installations that have not reported the same problem.

This:

Fatal error: Call to undefined method tool_lp_course_competencies_form_element::tool_lp_course_competencies_form_element()

suggest something missing from the code for the version of Moodle maybe from where code was acquired.

https://docs.moodle.org/31/en/Installation_quick_guide

'spirit of sharing', Ken


database not accesible after install

$
0
0

by MindBody Transformation.  

Hi,

after I unpack the zip file and start the installation of moodle (locally on computer, using xampp), the blank screen appears. When i refresh the page, database is not accessible.

Tried everyithing - different versions of moodle and xampp, with installers, with zip packages, deleting the cache, changing opcache.enable settings, but nothing works.


pls help

Re: Moodle on macOS Server (some infos & some issues...)

$
0
0

by Jocelyn Chappaz.  

If I change nothing (no redirection or else) and I go to https://<mysite> => the login page shows up but no picture, no theme, no CSS is working. I can login and then I'm back to http://  automatically.


If I redirect my http:// to my https:// (which is easily done in the server App, in macOS server...).. the login page shows up but no picture, no theme, no CSS is working. I can login but then I got an error saying the page is not properly redirected.


If I change $CFG->wwwroot in config.php to begin with https:// and not http:// , I directly go, whatever page I try to use, to an error message saying only https:// connections are allowed. I can't login. Https:// redirection can be activated or not, it's the same. Of course, the very page with this error message, when https:// is activated, is green on every security level (no warning from firefox, like it's is used to do when the https:// is not properly set)



On the other side, my https://  redictection works without any pb, with NextCloud and my phpBB forum.




BTW, one thing that bothers me, on a theorical level, is the fact that one needs to change every instance in his/her database (which all risks involved by this action) to activate HTTPS... I'm not sure it's the best way to have everybody to secure their websites, which more and more necessary as times goes on... I'm hope a more friendly way will be added in the next versions...

Re: Moodle on macOS Server (some infos & some issues...)

$
0
0

by Matt T.  

please use chrome, press F12, click console tab and expand it out.


Try load the site over HTTPS, screenshot the devtools window and post it here. Specifically, screenshot any resources which appears as red as an error


Then, I tried to change all reference in my database using the tool provided in Moodle. That doesn't change anything. 

This step is done last, after HTTPS is working properly. 

is the fact that one needs to change every instance in his/her database (which all risks involved by this action) to activate HTTPS... I'm not sure it's the best way to have everybody to secure their websites

Not really. Core components will rely upon wwwroot when generating href links, so changing that suffices. Forums, etc. still suffer from the problem where people link directly to resources without reliance on environment variables. 

Even if you migrate such sites as forums etc., you need to (or should, rather) run a script to change references to the new URL in any user content, or you will be plagued with 404 errors. You are right it is a risky operation, but that's why you take a backup and extensively test the changes. 

If you use blocks, plugins etc. that directly link to content, that's not the responsibility of the core developers. The only other option would be enforcing the non-use of direct URLs, which would not be popular.

Viewing all 47371 articles
Browse latest View live


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