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

Students can see "Add an activity or resource" after upgrading 3.11+

$
0
0
by Jose Luis Martin Jimenez.  

Hello.

Two people have just commented in the spanish forums (https://moodle.org/course/view.php?id=11) the same problem: students can see the link "Add an activity or resource" in every section of their courses, after Moodle has been upgraded to version 3.11+.


Then, I have upgraded mi localhost Moodle to test the issue and I've confirmed this problem. I think it must be a bug of the version.

When students clics on that link they can see the selection window, but empty.

Thanks !


Re: Students can see "Add an activity or resource" after upgrading 3.11+

Re: Students can see "Add an activity or resource" after upgrading 3.11+

How to Add user fields to Signup page

$
0
0
by Gagan Kapoor.  

Hello,

When I check in Moodle under site Administration>Plugins>Authentication there are several user fields but when I see the moodle sign up page i see only few of these fields. Besides standard fields in the sign up page I want to add phone No. field to be added to the sign up form.

Some articles suggest creating a new user profile fields but My question is when there are several field options are given in the Authentication like ID Number Web page, ICQ, Phone No., Institution, Departments etc, then there must be some settings to open them to be added in the sign up page. can anyone explain how to open those pre made fields in the moodle and make them compulsory for sign up.

I think for addtional things we sould create user profile fields.

Please help

Regards

Gagan Kapoor

gagankapoorclasses@gmail.com

Re: h5P new version - upgrade issue

$
0
0
by Heather P.  

Hi
After a large delay, I have finally got a grip on the database. The select statement provided by Leon indicates that I had one null row.
The update statement worked beautifully and now the whole upgrade runs smoothly.
Your help is much appreciated.
Thanks

Ang: Migration Ubuntu 16.04 to 20.04

$
0
0
by Michael Weinreich Jensen.  

So for anybody else struggling. Pulling out sql with phpadmin did not work right also zipping folders (data and moodle) might have giving me some problems.
But using rsync and sql dump worked.
Be aware that you do need to create an empty database with the right sql name as the dump on the new server.
Also if running SSL you need to configure a bit in the default apache config, and also enable the default SSL page (/etc/apache2/sites-available/) after you have run installation of Lets encrypt.

Re: How to Add user fields to Signup page

$
0
0
by Giovanni Vosloo.  

Hi Gagan,

The page you are referring to is to control data that has already been added to the profile, so it allows you to "lock" the data and not allowing the user to change it, there is no option to add those to the signup page.

The alternative is to create your own fields and make them required or perhaps if you have the users on VCS or perhaps even integrating with LDAP to update user details.

Re: Ang: Migration Ubuntu 16.04 to 20.04

$
0
0
by Visvanath Ratnaweera.  

Yes, it makes sense to read the documentation -> https://moodle.org/mod/forum/discuss.php?d=423332#p1705523.
wink

> Pulling out sql with phpadmin did not work right
> But using ... sql dump worked.
https://docs.moodle.org/311/en/Moodle_migration#Backup_the_Moodle_database_on_the_old_server
https://docs.moodle.org/311/en/Moodle_migration#Restore_the_database_backup_to_the_new_server

> zipping folders (data and moodle) might have giving me some problems.
> But using rsync ... worked.
https://docs.moodle.org/311/en/Moodle_migration#Copy_moodledata_from_the_old_server_to_the_new_server (see the link to rsync)

Ang: Re: Ang: Migration Ubuntu 16.04 to 20.04

$
0
0
by Michael Weinreich Jensen.  

Yes! still there where a bit of google'ing for the page not loading do to the apache2 configs (this part is not mentioned) but importent to get a new server running with SSL. ;)

Re: moodle 3.11 security check - documentation now available

Fatal error during Moodle upgrade

$
0
0
by John Chan.  

We are using CentOS 7.4 and PHP 7.2 and are upgrading Moodle from 3.6.1 to 3.8.9

The upgrade process takes more than 8 hours but still cannot finish. It prompts the below error message:

Notice: Trying to get property 'forced_plugin_settings' of non-object in /var/www/html/moodle/lib/moodlelib.php on line 1477

Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/html/moodle/lib/moodlelib.php on line 1477

Notice: Trying to get property 'dirroot' of non-object in /var/www/html/moodle/cache/classes/factory.php on line 476

Warning: require_once(/cache/classes/dummystore.php): failed to open stream: No such file or directory in /var/www/html/moodle/cache/classes/factory.php on line 476

Fatal error: require_once(): Failed opening required '/cache/classes/dummystore.php' (include_path='/var/www/html/moodle/lib/pear:.:/var/www/html/moodle/php/lib/php') in /var/www/html/moodle/cache/classes/factory.php on line 476

Fatal error: Uncaught Error: Call to a member function is_transaction_started() on null in /var/www/html/moodle/lib/classes/shutdown_manager.php:137 Stack trace: #0 [internal function]: core_shutdown_manager::shutdown_handler() #1 {main} thrown in  in /var/www/html/moodle/lib/classes/shutdown_manager.php on line 137

Please advise how to fix this problem. Thanks a lot!

Re: Different setting for e-mail test and e-mail confirmation?

$
0
0
by Iwan Awaludin.  

self registration mail failed to send e-mail. just like that moodle cannot recognized the smtp e-mail.

Re: How to Add user fields to Signup page

Re: Fatal error during Moodle upgrade

$
0
0
by Leon Stringer.  

Can you tell us more about the steps you are using to upgrading Moodle? The first fatal error appears to follow from:

Notice: Trying to get property 'dirroot' of non-object in /var/www/html/moodle/cache/classes/factory.php on line 476

This suggests that $CFG has not been initialised (non-object). How does your config.php start? It should say:

<?php  // Moodle configuration file

unset($CFG);
global $CFG;
$CFG = new stdClass();

The $CFG = new stdClass() line above makes $CFG an object, and $CFG is global – shared by all Moodle's PHP files. So if it's a non-object at some point then something has gone wrong.

Re: Fatal error during Moodle upgrade

$
0
0
by John Chan.  

I mainly followed the below website to perform the upgrade.
https://docs.moodle.org/38/en/Upgrading
Instead of using linux command "cp -pr", I uploaded the plugin codes with WinSCP.
Afterwards, I copied the original config.php back to /var/www/html/moodle.
I used the below security permission:
chown -R root /path/to/moodle 
chmod -R 0755 /path/to/moodle
And also, change the permission of executable files to 0644. Set ACL for user: daemon to have rwx

The config.php is something like the below:
unset($CFG); // Ignore this line
global $CFG; // This is necessary here for PHPUnit execution
$CFG = new stdClass();
$CFG->dbtype = 'mysqli'; // 'pgsql', 'mariadb', 'mysqli', 'sqlsrv' or 'oci'
$CFG->dblibrary = 'native'; // 'native' only at the moment
$CFG->dbhost = 'localhost'; // eg 'localhost' or 'db.isp.com' or IP
$CFG->dbname = 'moodledb'; // database name, eg moodle
$CFG->dbuser = 'xxxxx'; // your database username
$CFG->dbpass = 'yyyyy'; // your database password
$CFG->prefix = 'mdl_'; // prefix to use for all table names
$CFG->dboptions = array(
    'dbpersist' => false,       
    'dbsocket'  => false,     
    'dbport'    => '',       
    'dbhandlesoptions' => false,               
    'dbcollation' => 'utf8mb4_unicode_ci',                              
     );
$CFG->wwwroot = 'https://moodle.xxxx.edu';
$CFG->dataroot = '/var/www/html/moodledata';
The original config.php of our Moodle before upgrade does not include the statement of "CFG->dirroot". However, it has been working fine from time to time.
I wonder if I should add the below statement before performing the Moodle upgrade. I noticed that config-dist.php does not include this statement.
$CFG->dirroot = '/var/www/html/moodle';
Please advise. Thank you very much.


Re: Fatal error during Moodle upgrade

$
0
0
by Leon Stringer.  

$CFG->dirroot is set automatically so you don't need to add this to config.php. The last lines of config.php should be:


require_once(__DIR__ . '/lib/setup.php');
 
// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems! 

The above call to lib/setup.php then sets $CFG->dirroot:

$CFG->dirroot = dirname(__DIR__);

Regarding the upgrade steps: are you using the command line or browser? I've upgraded sites which with databases larger than 100 GB and they took much less than eight hours. For an upgrade like this you should use the command line. If you are, can you share the output before the error so we can see how far this gets?

Also: can you tell us how big the Moodle database is?

Re: Fatal error during Moodle upgrade

$
0
0
by John Chan.  

The statement require_once(__DIR__ . '/lib/setup.php'); is correct. I haven't changed anything.
Forgot to mention that it is just a dummy UAT site. I am using browser to perform the upgrade. Our database is only about 1GB. It looks abnormal that it takes more than 8 hours while the upgrade is still not yet finished.

Re: Fatal error during Moodle upgrade

$
0
0
by Leon Stringer.  

If you're using the browser then almost certainly a timeout is being exceeded causing this problem.

I would advise using the command line to upgrade the site. On CentOS the command (which should be run as root) is probably:

sudo -u apache php /var/www/html/moodle/admin/cli/upgrade.php

I'd expect it to take no more than a few minutes.

Re: Fatal error during Moodle upgrade

$
0
0
by Ken Task.  

Pardon intrusion ...

What does 'dbhandlesoptions' => false do?

Have searched config-dist.php in all versions of 2.x and 3.x and see no such setting.

There is only a tracker ... and that was for 3.2.

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

'SoS', Ken

Re: Course internal ID - Can it start from a specific number?

$
0
0
by Randy Thornton.  

The answer is yes, you can do this in the database. For tables with auto incrementing columns, you can use the auto_increment_offset value to specifically set the starting point number. It's a MySQL global and session variable, defaulting to 1.

This is commonly used in situations where you are replicating databases and need to avoid a collision of auto incrementing columns. For instance server one may have a table with have an offset of 1 and increment of 2, and a second server two may have it set to an offset of 2 and an increment of 2 - and so the servers will have the following patterns: 1,3,5,7,9 for server one and 2,4,6,8,10 for server two. A practical use of this in Moodle would be with something like managing multiple logs, where you want to replicate the logs from several Moodle servers to a single table on another server, retaining the original ids.

See: https://dev.mysql.com/doc/refman/8.0/en/replication-options-source.html and https://www.percona.com/blog/2011/01/12/conflict-avoidance-with-auto_increment_incremen-and-auto_increment_offset/

Of course, the offset marks the starting number only.  So you want to make sure that the second one starts with a number higher than the first one is every going to reach. And the maximum offset number is 65535.
Viewing all 46868 articles
Browse latest View live


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