I suggest contacting support at Softaculous.
Re: error upgrade Moodle 4.3 to Moodle 4.4.
Re: error upgrade Moodle 4.3 to Moodle 4.4.
In case you can't find the link to Softac support:
Softac Support
https://softaculous.deskuss.com/
And also suggest, when they fix it, ask what they had to do to fix it and report back here. That's the least Softac could do to 'give back' since they are profiting from their proprietary installers/updaters.
'SoS', Ken
Redirect Loop Moodle 4.0.3
Using Moodle 4.0.3 and server is hosted on local docker container.
After the Admin Creation page /user/editadvanced.php?id=2
the client gets stuck in a redirect loop between
/admin/index.php?sessionstarted=1&lang=en
and
/admin/index.php?cache=1
anyone have any idea on how to troubleshoot this?
Same build worked fine a day before, but after remaking the docker container(multiple times) this issue keeps persisting.
How to prevent roles from download courses and upload them to another Moodle site
am looking at ways to prevent user roles from downloading courses and uploading them to another Moodle site. ChatGPT gave me this answer (short one here), I have disabled these options. Will this work?
Customize Role Permissions: Moodle allows administrators to customize role permissions extensively. To prevent certain roles from downloading courses, you can adjust the capabilities associated with the backup and restore process. Specifically, you would need to revoke the capabilities related to course backup (such as moodle/backup:backupcourse
) and restore (such as moodle/restore:restorecourse
). These capabilities control the ability to create backups of courses and restore them, which are necessary for downloading and uploading courses between Moodle sites.
Re: How to prevent roles from download courses and upload them to another Moodle site
If you take those capabilities away from the Teacher role, they will no longer be able to create backups.
Re: How to prevent roles from download courses and upload them to another Moodle site
Re: How to prevent roles from download courses and upload them to another Moodle site
Ok, Howard has confirmed.
Now a little 'Devils Advocate' ... who is now responsible for making course backups? You as SuperAdmin or those in a Manager role?
Ooops ... better do same for Manager role as well.
That leaves You as SuperAdmin! You, am going to assume, will turn to automated backups. Problem solved?
My 2 additional cents!
'SoS', Ken
Re: How to prevent roles from download courses and upload them to another Moodle site
Course backups would be only be Site admin
Yes, I have removed the access for every user
Re: Ang: Error "ddldependencyerror" during upgrade from 4.2.1+ to 4.3+.
Nicholai: Did you manage to resolve this? This reply lists all the tables which are added by Moodle 4.3. The installer expects these tables not to be present in a Moodle 4.2 site so try deleting these if they exist (back up your database before deleting anything!).
Re: Redirect Loop Moodle 4.0.3
Re: How to prevent roles from download courses and upload them to another Moodle site
Have a question ... do persons with teacher role build the courses? If they do, do they not have some rights to a course ownership?
The following might be worth a read:
https://www.authorsalliance.org/2021/06/22/faq-copyright-ownership-online-course-materials/
Just thinking outloud and providing food for thought here!
'SoS', Ken
upgrading moodle 4.0.5 - unicode problem
Evening
Tried to upgrade a plugin, and in the process tripped over with unicode and got this error - and get taken to this page any time we click on "site admin" (direct urls work fine)
It is required that you store all your data in Unicode format (UTF-8). New installations must be performed into databases that have their default character set as Unicode. If you are upgrading, you should perform the UTF-8 migration process (see the Admin page).
So have done a bit of googling and spent a few hours on a rabbit hole, and found these two threads, which I think will between them will be the answer (did try the moodle doc but it didn't really have in-depth enough instruction for my knowledge level - and thank you to those who started and contributed on these threads, they have been really helpful)
- https://moodle.org/mod/forum/discuss.php?d=405701#p1638382
- https://moodle.org/mod/forum/discuss.php?d=424985
I got as far as this instruction:
Once you have the above settings in place run:
php admin/cli/mysql_collation.php --collation=utf8mb4_unicode_ci
And now am stuck - it keeps returning a syntax error and won't run. I've tried:
php admin/cli/mysql_collation.php --collation=utf8mb4_unicode_ci
$ php admin/cli/mysql_collation.php --collation=utf8mb4_unicode_ci
<php admin/cli/mysql_collation.php --collation=utf8mb4_unicode_ci>
And quite a few other starting combinations... been at it for a couple of hours - googling/researching/then trying - nothing seems to work.
I've been into https://dev.mysql.com/doc/ but not been able to find anything that says what the code should start with.
Any pointers would be very much appreciated!
We've got MariaDB 10.6.17, and am accessing it and (attempting to) run it through phpMyAdmin. Moodle 4.0.5. If you need any other environment info let me know will dig it out.
Thank you
Ang: Re: Ang: Error "ddldependencyerror" during upgrade from 4.2.1+ to 4.3+.
No, not yet. My issue is I'm not sure how to do the task with my tools at hand.
I'm using Cpanel, so it was basically a 1-click install from the start. I can't seem to find a CLI for entering commands.
So my best guess so far is, that I need to do this in phpMyAdmin, I just haven't come up with a plan for this.
Which I guess is my question. How to do this procedure without a CLI?
Re: upgrading moodle 4.0.5 - unicode problem
Moodle 4.0.x can run under PHP versions 7.3 minimum but no higher than 8.0
If your Moodle is 4.0.2 or higher.
There are actually 2 executable php's in Linux. One for the web and one from
command line. To check what version of php-cli which is require to run admin/cli/ scripts
cd /path/to/moodlecode/
php -v
You should see a php-cli response and note the version of php.
You also need to use the following command to see what version of PHP is found:
which php
The PHP version for your moodle code could be found in cPanel's MultiPHP ... per domain or folder. Make sure it's no higher than 8.0. Evidence of php version could be in an .htacess file at the root of your moodle code. Heed the comment in the .htacess file.
When it comes to the DB ... the script you are trying to run will use
the DB user in your config.php file. If the DB user doesn't have privileges to
alter the database, that script will fail.
You might need to ask your help desk what the superuser is for your DB's
and run the script as that user - can alter the DB then.
The database has to have character set utfmb4 and collation of utf8mb4_unicode_ci. So do all the tables in the database. As well as all the columns of those tables. PHPMyAdmin is not normally set to run under superuser credentials (like root).
'SoS', Ken
Re: upgrading moodle 4.0.5 - unicode problem
>>I've checked the config file, and looks like I'm not accessing as the DB user - that may explain a lot! I can get access though (I think).
php -v

I had a bit more of a root around in phpMyAdmin, and found this info about collation/character sets in the server/variables, not sure if it's useful. There is a button to edit - tempting as buttons are, I've viewed but not done anything within there, as I'm guessing it's not as simple as changing it here!

Re: upgrading moodle 4.0.5 - unicode problem
And now am stuck - it keeps returning a syntax error and won't run.
But what's the exact error? Or are you trying to run these commands in phpMyAdmin? They need to be run at the server's command line (aka Terminal or SSH).
If you cannot run these commands you can instead follow these steps to make the changes from phpMyAdmin. Note step 4: you must repeat the process for every page of tables in your Moodle database. And note step 5: you must edit your config.php
file and change this if necessary.
If you're still stuck, please share what you're trying and what the results are. Screenshots may help us better understand what you see.
Re: upgrading moodle 4.0.5 - unicode problem
The
cd /path/to/moodlecode/
php -v
I suggested cannot be used with phpmyadmin. Must be used from terminal or ssh shell of your server.
The /path/to/moodlecode/ isn't real and meant to be something you change according to your server setup. Example, on my servers I have moodle code in
/var/www/html/moodle/
So if I were to issue the cd command on my server it would be:
cd /var/www/html/moodle/ [enter key]
then issue:
php -v [enter key]
Your screeen shot of phpmyadmin variables shows server default settings.
Note most are latin an swedish which is normal because MySQL was created by users in that country. MariaDB is software created by a former employee/founder of MySQL so that is the same.
You need assitance from your hosting provider in how to use phpmyadmin to change character set to utf8mb4 and collation to utf8mb4_unicode_ci for the database used for moodle.
Which is the other question ... with whom do you host? (provider name) and what package did you lease? (cheapo shared hosting doesn't give you the freedom to change things). Good hosting providers to have a knowledge base or how-2 tutorials for their customers which may not be publically available for all to see.
'SoS', Ken
Re: upgrading moodle 4.0.5 - unicode problem
>Or are you trying to run these commands in phpMyAdmin? They need to be run at the server's command line (aka Terminal or SSH)
>> yes, I was trying to run the commands in phpMyAdmin - I think the missing piece for me was your response here, that they need to be run at the server's command line. I had no idea - or what Terminal/SSH was - didn't see that on any of the threads/instructions I came across, and having so little knowledge to start with didn't know what I was missing! Pretty certain that we do not have access to this and am raising a ticket with our host.
(Just for info, the syntax error was "Unexpected beginning of statement" - because I was running it in phpMyAdmin)
Thank you for the link - I will see where we get with our host, and if we're not able to get those commands run in Terminal/SSH, will revert to those instructions.
Really appreciate your help, thank you, will keep you posted on how we progress with resolving
Re: upgrading moodle 4.0.5 - unicode problem
I saw the info about MySQL being created by users in Sweden somewhere on my rabbit hole last night - interesting stuff
We're raising a ticket with our host (Krystal) to see if either (a) they can implement or (b) can give us access - and will rummage in their support section.
Not sure if it's shared - think we upgraded a while back to a higher tier
Thanks again, and will keep you posted on progress...
Re: Ang: Re: Ang: Error "ddldependencyerror" during upgrade from 4.2.1+ to 4.3+.
This error occurs because the database has some tables for the Moodle new version present before the upgrade has run, typically because a previous upgrade attempt has not been fully rolled back to the old version.
The best way to resolve this – assuming you have a backup of your 4.2.6 site taken immediately before the upgrade attempt – is to: 1) backup the Moodle database (as a precaution), 2) drop (delete) the Moodle database, 3) create a new empty Moodle database, 4) restore the 4.2.6 backup into the empty database, and 5) try the upgrade to 4.3 again.
If you don't have such a backup you can probably resolve this with the following SQL statements:
ALTER TABLE mdl_communication DROP COLUMN contextid;
DROP TABLE mdl_communication_customlink;
DROP TABLE mdl_matrix_room;
DROP TABLE mdl_tool_mfa;
DROP TABLE mdl_tool_mfa_auth;
DROP TABLE mdl_tool_mfa_secrets;
In phpMyAdmin with your Moodle database selected switch to the SQL tab, paste the above statements and click Go:
Back up your database before doing this.
If you are still having problems please provide screenshots of any error messages.