Restoring a course from 1.9.X to 2.2 wont take new settings

Restoring a course from 1.9.X to 2.2 wont take new settings

by Mr. Marc -
Number of replies: 8

We see our forum post max size set to 8M and assignment also set to 8M so when we backup and restore a class from 1.9.x to 2.2 this is what we see and we want the new max size to be 16M and instead of having to make a mysql statement to increase the max size we thought we could include forced settings for the db   values to the restore process to change those setting to the new max size?  I'm I wrong in thinking that this isnt  the case in Moodle 2.2? Or is something holding those valuse because we dont have someing in our new moodle set right to override the old values?

thank you for your reply.

Average of ratings: -
In reply to Mr. Marc

Re: Restoring a course from 1.9.X to 2.2 wont take new settings

by Ken Task -
Picture of Particularly helpful Moodlers

When first installing 2.2 MDL, the default is 1 Meg.  However, after setting the appropriate items in php.ini related to max uploading, the settings for all Assignments found in Site Admin -> Plugins -> Activity Modules -> Assignment Max size pick list should show the new max set in php.ini.

There is a course upload limit on Assignments Upload.
100 Meg. by default.

Courses won't automagically adjust to any new settings in php.ini.
Course Admin menu, Edit settings: Maximum upload size

There is also a setting in Admin Menu -> Courses -> Course Default settings for maximum upload size.  That sets the max for the Assignments mod in all courses.  That would apply to all new courses.

In the unzipped folder of a backup 1.9's, there is a moodle.xml file.
Contained therein one will/should find line like:
<MAXBYTES>367001600</MAXBYTES>

Using a byte converter to find the appropriate value, one might be able to change that before re-constructing the zip and restoring.

Have not tried that, BTW.

'spirit of sharing', Ken

In reply to Ken Task

Re: Restoring a course from 1.9.X to 2.2 wont take new settings

by Mr. Marc -

Ken, i have tried all the others  you have listed but nothing has worked but thank you ken I will give that last one a try tomorrow and let you know that works?

 

here is what i have done so far

and set the max course max upload size to 17M and assignment size also.

CONFIGURATION

https://xxxx.xxxxx.edu/moodle/admin/phpinfo.php  says

post_max_size        17825792    17825792

upload_max_filesize    17825792    17825792


all of the .htaccess are set to

LimitRequestBody 17825792
php_value upload_max_filesize 17825792
php_value post_max_size 17825792

php.ini are set to

upload_max_filesize = 17825792
post_max_size = 17825792

and the php.conf file is set to

LimitRequestBody 17825792

In reply to Ken Task

Re: Restoring a course from 1.9.X to 2.2 wont take new settings

by Mr. Marc -

Ken I thought this would work too,There is also a setting in Admin Menu -> Courses -> Course Default settings for maximum upload size.  That sets the max for the Assignments mod in all courses.  That would apply to all new courses.

But when i llok at the database or try to upload a file it has the old value for data set point at 8M.

I tried this morning to find the <MAXBYTES>367001600</MAXBYTES> but didnt find it can i add it in if it is missing ?

 

In reply to Mr. Marc

Re: Restoring a course from 1.9.X to 2.2 wont take new settings

by Ken Task -
Picture of Particularly helpful Moodlers

Am assuming you have full run of the server and that it's not remotely hosted on a shared system.  If on the latter, hosting provider might have restrictions which you cannot override (part of the purchased plan).

What does mdl_config table of the DB have:

select * from `mdl_config` where `name` like "%maxbytes%"

should show assignment and forum maxbytes values

As far as adding maxbytes line to the moodle.xml file, what I shared was an example.  You change the value to match that of the other settings.  When you searched the xml file did you search for <MAXBYTES> or the whole phrase including the value?

An old course, which a 1.9.x restore would be, might show the value that was originally default (8M).  Did you look at the pick list to see if there are larger values above the 8M?

I've not added tags to xml files so can't tell you if it would be successful nor not.  Where the tag is place is important I think.

In looking at a couple of 1.9 backups:
    <MOODLE_RELEASE>1.9.11 (Build: 20110221)</MOODLE_RELEASE>
    <BACKUP_VERSION>2008030301</BACKUP_VERSION>
    <BACKUP_RELEASE>1.9.4</BACKUP_RELEASE>

Found maxbytes in the following:
<COURSE>
    <HEADER>
      <MAXBYTES>5242880</MAXBYTES>
There were other tags above and below.

In another backup of another course:
    <MOODLE_RELEASE>1.9.12 (Build: 20110510)</MOODLE_RELEASE>
    <BACKUP_VERSION>2008030300</BACKUP_VERSION>
    <BACKUP_RELEASE>1.9</BACKUP_RELEASE>

Found maxbytes in the following:
<COURSE>
    <HEADER>
      <MAXBYTES>20971520</MAXBYTES>

What does the 'header' of your xml file show?

 <MOODLE_RELEASE> and <BACKUP_RELEASE>

If you'd like and if you can make a no user backup of the course, you're welcome to accquire an account on a sandbox Moodle I run and I could inspect the whole process.

'spirit of sharing', Ken

In reply to Ken Task

Re: Restoring a course from 1.9.X to 2.2 wont take new settings

by Mr. Marc -

Yes ken I have free run of our server it is self hosted

>What does mdl_config table of the DB have:
>select * from `mdl_config` where `name` like "%maxbytes%"
>should show assignment and forum maxbytes values

it shows 8388608  i would like to make it 17825792

I did find the <MAXBYTES> in the moodle.xml and did change it but when I restored it on the 2.2 server everything was back to the 8388608???????

thank you for your reply.

In reply to Ken Task

Re: Restoring a course from 1.9.X to 2.2 wont take new settings

by Mr. Marc -

Ken i tried the moodle.xml and changed the maxbytes to double number according to a conversion chart, but it didnt work.

In reply to Mr. Marc

Re: Restoring a course from 1.9.X to 2.2 wont take new settings

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I am sure you have probably checked this but if you are restoring from within an existing course on the new site, have you checked the upload limit on that specific course (course admin/settings).  Setting it to be default will only affect new courses and not any that are already set up.

In reply to Emma Richardson

Re: Restoring a course from 1.9.X to 2.2 wont take new settings

by Mr. Marc -

Emma, that is a great idea, but that didnt chage the max upload of a assignment or the max forum acctachment.