Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-4743

Use default value of layoutcolumnorientation if not set

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.2, 2.6
    • Fix Version/s: 2.5.3, 2.6
    • Component/s: Course format: Topcoll
    • Labels:
      None

      Description

      If layoutcolumnorientation is not set properly (course has been restored from Moodle 2.3 or otherwise, in which case it's set to 0 in the DB), use the default value when rendering the course.

      Steps to reproduce the issue:
      1. Have a topcoll course with 2 columns layout in Moodle 2.3.
      2. Backup the course and restore in Moodle 2.5.
      3. View the course and observe it's displayed in 1 column layout. See that in the DB, course_format_options table, the 'layoutcolumnorientation' field value for the course is 0.
      4. Click Edit course settings, do not change anything, just Save.
      5. View the course and observe it's displayed in 2 column layout now.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            gb2048 Gareth J Barnard added a comment - - edited

            Hi Kirill,

            Thank you for reporting the issue, but unfortunately I am unable to replicate. There is code already in place to deal with the situation as the method 'course_format_options()' in 'lib.php' is called during the restore process to set the default value, as can be seen by the following log (php.log) as produced by annotated version from https://github.com/gjb2048/moodle-format_topcoll/tree/CONTRIB-4743_MOODLE_25:

            [08-Nov-2013 11:25:02 UTC] course_format_options($foreditform = ): Array
            (
                [numsections] => Array
                    (
                        [default] => 10
                        [type] => int
                    )
             
                [hiddensections] => Array
                    (
                        [default] => 0
                        [type] => int
                    )
             
                [coursedisplay] => Array
                    (
                        [default] => 0
                        [type] => int
                    )
             
                [displayinstructions] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [layoutelement] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [layoutstructure] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [layoutcolumns] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [layoutcolumnorientation] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [togglealignment] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [toggleiconposition] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [toggleiconset] => Array
                    (
                        [default] => arrow
                        [type] => alpha
                    )
             
                [toggleallhover] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [toggleforegroundcolour] => Array
                    (
                        [default] => #000000
                        [type] => alphanum
                    )
             
                [togglebackgroundcolour] => Array
                    (
                        [default] => #e2e2f2
                        [type] => alphanum
                    )
             
                [togglebackgroundhovercolour] => Array
                    (
                        [default] => #eeeeff
                        [type] => alphanum
                    )
             
            )
             
            [08-Nov-2013 11:25:02 UTC] process_topcoll($data): stdClass Object
            (
                [layoutelement] => 7
                [layoutstructure] => 2
                [layoutcolumns] => 2
                [tgfgcolour] => FFF9F4
                [tgbgcolour] => E56C00
                [tgbghvrcolour] => FFAB1E
                [courseid] => 5
            )
             
            [08-Nov-2013 11:25:02 UTC] course_format_options($foreditform = ): Array
            (
                [numsections] => Array
                    (
                        [default] => 10
                        [type] => int
                    )
             
                [hiddensections] => Array
                    (
                        [default] => 0
                        [type] => int
                    )
             
                [coursedisplay] => Array
                    (
                        [default] => 0
                        [type] => int
                    )
             
                [displayinstructions] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [layoutelement] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [layoutstructure] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [layoutcolumns] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [layoutcolumnorientation] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [togglealignment] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [toggleiconposition] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [toggleiconset] => Array
                    (
                        [default] => arrow
                        [type] => alpha
                    )
             
                [toggleallhover] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [toggleforegroundcolour] => Array
                    (
                        [default] => #000000
                        [type] => alphanum
                    )
             
                [togglebackgroundcolour] => Array
                    (
                        [default] => #e2e2f2
                        [type] => alphanum
                    )
             
                [togglebackgroundhovercolour] => Array
                    (
                        [default] => #eeeeff
                        [type] => alphanum
                    )
             
            )
             
            [08-Nov-2013 11:25:02 UTC] restore_topcoll_setting: Array
            (
                [layoutelement] => 7
                [layoutstructure] => 2
                [layoutcolumns] => 2
                [toggleforegroundcolour] => FFF9F4
                [togglebackgroundcolour] => E56C00
                [togglebackgroundhovercolour] => FFAB1E
            )
             
            [08-Nov-2013 11:25:04 UTC] processing file aliases queue
            [08-Nov-2013 11:25:04 UTC] setting controller status to 1000
            [08-Nov-2013 11:25:04 UTC] saving controller to db
            [08-Nov-2013 11:25:08 UTC] course_format_options($foreditform = ): Array
            (
                [numsections] => Array
                    (
                        [default] => 10
                        [type] => int
                    )
             
                [hiddensections] => Array
                    (
                        [default] => 0
                        [type] => int
                    )
             
                [coursedisplay] => Array
                    (
                        [default] => 0
                        [type] => int
                    )
             
                [displayinstructions] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [layoutelement] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [layoutstructure] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [layoutcolumns] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [layoutcolumnorientation] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [togglealignment] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [toggleiconposition] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [toggleiconset] => Array
                    (
                        [default] => arrow
                        [type] => alpha
                    )
             
                [toggleallhover] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [toggleforegroundcolour] => Array
                    (
                        [default] => #000000
                        [type] => alphanum
                    )
             
                [togglebackgroundcolour] => Array
                    (
                        [default] => #e2e2f2
                        [type] => alphanum
                    )
             
                [togglebackgroundhovercolour] => Array
                    (
                        [default] => #eeeeff
                        [type] => alphanum
                    )
             
            )
             
            [08-Nov-2013 11:25:08 UTC] course_format_options($foreditform = ): Array
            (
                [numsections] => Array
                    (
                        [default] => 10
                        [type] => int
                    )
             
                [hiddensections] => Array
                    (
                        [default] => 0
                        [type] => int
                    )
             
                [coursedisplay] => Array
                    (
                        [default] => 0
                        [type] => int
                    )
             
                [displayinstructions] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [layoutelement] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [layoutstructure] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [layoutcolumns] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [layoutcolumnorientation] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [togglealignment] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [toggleiconposition] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [toggleiconset] => Array
                    (
                        [default] => arrow
                        [type] => alpha
                    )
             
                [toggleallhover] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [toggleforegroundcolour] => Array
                    (
                        [default] => #000000
                        [type] => alphanum
                    )
             
                [togglebackgroundcolour] => Array
                    (
                        [default] => #e2e2f2
                        [type] => alphanum
                    )
             
                [togglebackgroundhovercolour] => Array
                    (
                        [default] => #eeeeff
                        [type] => alphanum
                    )
             
            )
             
            [08-Nov-2013 11:25:08 UTC] course_format_options($foreditform = ): Array
            (
                [numsections] => Array
                    (
                        [default] => 10
                        [type] => int
                    )
             
                [hiddensections] => Array
                    (
                        [default] => 0
                        [type] => int
                    )
             
                [coursedisplay] => Array
                    (
                        [default] => 0
                        [type] => int
                    )
             
                [displayinstructions] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [layoutelement] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [layoutstructure] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [layoutcolumns] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [layoutcolumnorientation] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [togglealignment] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [toggleiconposition] => Array
                    (
                        [default] => 1
                        [type] => int
                    )
             
                [toggleiconset] => Array
                    (
                        [default] => arrow
                        [type] => alpha
                    )
             
                [toggleallhover] => Array
                    (
                        [default] => 2
                        [type] => int
                    )
             
                [toggleforegroundcolour] => Array
                    (
                        [default] => #000000
                        [type] => alphanum
                    )
             
                [togglebackgroundcolour] => Array
                    (
                        [default] => #e2e2f2
                        [type] => alphanum
                    )
             
                [togglebackgroundhovercolour] => Array
                    (
                        [default] => #eeeeff
                        [type] => alphanum
                    )
             
            )
            

            And thus I suspect that there is an issue with your installation not establishing the settings in settings.php correctly (which could be another issue) and thus the defaults in the table 'config_plugins' are wrong - hence the '0' value for the 'layoutcolumnorientation' field. Please could you supply the output from the table with a query like "SELECT * FROM `moodle25`.`mdl25_config_plugins` where plugin like 'format_topcoll'". And the test M2.3 course backup file.

            In the attempt to replicate process, I had a course with two columns (vertical) in M2.3, backed it up and restored in M2.5. I observed that the course was still in two columns but was correctly horizontally aligned - all without going into the settings for the course.

            As a point of note, I think that although the fix in theory and concept is valid, it is in the wrong place. In the interests of efficiency it should not be in the renderer as that is used every single time the page is rendered and this is a 'rare' event and thus needs to be handled elsewhere. I know there is one bit of logic that breaks this and I want to remove it. Optimisation is a big thing at the moment in Moodle and every small little thing needs to be done to help it.

            Cheers,

            Gareth

            Show
            gb2048 Gareth J Barnard added a comment - - edited Hi Kirill, Thank you for reporting the issue, but unfortunately I am unable to replicate. There is code already in place to deal with the situation as the method 'course_format_options()' in 'lib.php' is called during the restore process to set the default value, as can be seen by the following log (php.log) as produced by annotated version from https://github.com/gjb2048/moodle-format_topcoll/tree/CONTRIB-4743_MOODLE_25: [08-Nov-2013 11:25:02 UTC] course_format_options($foreditform = ): Array ( [numsections] => Array ( [default] => 10 [type] => int )   [hiddensections] => Array ( [default] => 0 [type] => int )   [coursedisplay] => Array ( [default] => 0 [type] => int )   [displayinstructions] => Array ( [default] => 2 [type] => int )   [layoutelement] => Array ( [default] => 1 [type] => int )   [layoutstructure] => Array ( [default] => 1 [type] => int )   [layoutcolumns] => Array ( [default] => 1 [type] => int )   [layoutcolumnorientation] => Array ( [default] => 2 [type] => int )   [togglealignment] => Array ( [default] => 2 [type] => int )   [toggleiconposition] => Array ( [default] => 1 [type] => int )   [toggleiconset] => Array ( [default] => arrow [type] => alpha )   [toggleallhover] => Array ( [default] => 2 [type] => int )   [toggleforegroundcolour] => Array ( [default] => #000000 [type] => alphanum )   [togglebackgroundcolour] => Array ( [default] => #e2e2f2 [type] => alphanum )   [togglebackgroundhovercolour] => Array ( [default] => #eeeeff [type] => alphanum )   )   [08-Nov-2013 11:25:02 UTC] process_topcoll($data): stdClass Object ( [layoutelement] => 7 [layoutstructure] => 2 [layoutcolumns] => 2 [tgfgcolour] => FFF9F4 [tgbgcolour] => E56C00 [tgbghvrcolour] => FFAB1E [courseid] => 5 )   [08-Nov-2013 11:25:02 UTC] course_format_options($foreditform = ): Array ( [numsections] => Array ( [default] => 10 [type] => int )   [hiddensections] => Array ( [default] => 0 [type] => int )   [coursedisplay] => Array ( [default] => 0 [type] => int )   [displayinstructions] => Array ( [default] => 2 [type] => int )   [layoutelement] => Array ( [default] => 1 [type] => int )   [layoutstructure] => Array ( [default] => 1 [type] => int )   [layoutcolumns] => Array ( [default] => 1 [type] => int )   [layoutcolumnorientation] => Array ( [default] => 2 [type] => int )   [togglealignment] => Array ( [default] => 2 [type] => int )   [toggleiconposition] => Array ( [default] => 1 [type] => int )   [toggleiconset] => Array ( [default] => arrow [type] => alpha )   [toggleallhover] => Array ( [default] => 2 [type] => int )   [toggleforegroundcolour] => Array ( [default] => #000000 [type] => alphanum )   [togglebackgroundcolour] => Array ( [default] => #e2e2f2 [type] => alphanum )   [togglebackgroundhovercolour] => Array ( [default] => #eeeeff [type] => alphanum )   )   [08-Nov-2013 11:25:02 UTC] restore_topcoll_setting: Array ( [layoutelement] => 7 [layoutstructure] => 2 [layoutcolumns] => 2 [toggleforegroundcolour] => FFF9F4 [togglebackgroundcolour] => E56C00 [togglebackgroundhovercolour] => FFAB1E )   [08-Nov-2013 11:25:04 UTC] processing file aliases queue [08-Nov-2013 11:25:04 UTC] setting controller status to 1000 [08-Nov-2013 11:25:04 UTC] saving controller to db [08-Nov-2013 11:25:08 UTC] course_format_options($foreditform = ): Array ( [numsections] => Array ( [default] => 10 [type] => int )   [hiddensections] => Array ( [default] => 0 [type] => int )   [coursedisplay] => Array ( [default] => 0 [type] => int )   [displayinstructions] => Array ( [default] => 2 [type] => int )   [layoutelement] => Array ( [default] => 1 [type] => int )   [layoutstructure] => Array ( [default] => 1 [type] => int )   [layoutcolumns] => Array ( [default] => 1 [type] => int )   [layoutcolumnorientation] => Array ( [default] => 2 [type] => int )   [togglealignment] => Array ( [default] => 2 [type] => int )   [toggleiconposition] => Array ( [default] => 1 [type] => int )   [toggleiconset] => Array ( [default] => arrow [type] => alpha )   [toggleallhover] => Array ( [default] => 2 [type] => int )   [toggleforegroundcolour] => Array ( [default] => #000000 [type] => alphanum )   [togglebackgroundcolour] => Array ( [default] => #e2e2f2 [type] => alphanum )   [togglebackgroundhovercolour] => Array ( [default] => #eeeeff [type] => alphanum )   )   [08-Nov-2013 11:25:08 UTC] course_format_options($foreditform = ): Array ( [numsections] => Array ( [default] => 10 [type] => int )   [hiddensections] => Array ( [default] => 0 [type] => int )   [coursedisplay] => Array ( [default] => 0 [type] => int )   [displayinstructions] => Array ( [default] => 2 [type] => int )   [layoutelement] => Array ( [default] => 1 [type] => int )   [layoutstructure] => Array ( [default] => 1 [type] => int )   [layoutcolumns] => Array ( [default] => 1 [type] => int )   [layoutcolumnorientation] => Array ( [default] => 2 [type] => int )   [togglealignment] => Array ( [default] => 2 [type] => int )   [toggleiconposition] => Array ( [default] => 1 [type] => int )   [toggleiconset] => Array ( [default] => arrow [type] => alpha )   [toggleallhover] => Array ( [default] => 2 [type] => int )   [toggleforegroundcolour] => Array ( [default] => #000000 [type] => alphanum )   [togglebackgroundcolour] => Array ( [default] => #e2e2f2 [type] => alphanum )   [togglebackgroundhovercolour] => Array ( [default] => #eeeeff [type] => alphanum )   )   [08-Nov-2013 11:25:08 UTC] course_format_options($foreditform = ): Array ( [numsections] => Array ( [default] => 10 [type] => int )   [hiddensections] => Array ( [default] => 0 [type] => int )   [coursedisplay] => Array ( [default] => 0 [type] => int )   [displayinstructions] => Array ( [default] => 2 [type] => int )   [layoutelement] => Array ( [default] => 1 [type] => int )   [layoutstructure] => Array ( [default] => 1 [type] => int )   [layoutcolumns] => Array ( [default] => 1 [type] => int )   [layoutcolumnorientation] => Array ( [default] => 2 [type] => int )   [togglealignment] => Array ( [default] => 2 [type] => int )   [toggleiconposition] => Array ( [default] => 1 [type] => int )   [toggleiconset] => Array ( [default] => arrow [type] => alpha )   [toggleallhover] => Array ( [default] => 2 [type] => int )   [toggleforegroundcolour] => Array ( [default] => #000000 [type] => alphanum )   [togglebackgroundcolour] => Array ( [default] => #e2e2f2 [type] => alphanum )   [togglebackgroundhovercolour] => Array ( [default] => #eeeeff [type] => alphanum )   ) And thus I suspect that there is an issue with your installation not establishing the settings in settings.php correctly (which could be another issue) and thus the defaults in the table 'config_plugins' are wrong - hence the '0' value for the 'layoutcolumnorientation' field. Please could you supply the output from the table with a query like "SELECT * FROM `moodle25`.`mdl25_config_plugins` where plugin like 'format_topcoll'". And the test M2.3 course backup file. In the attempt to replicate process, I had a course with two columns (vertical) in M2.3, backed it up and restored in M2.5. I observed that the course was still in two columns but was correctly horizontally aligned - all without going into the settings for the course. As a point of note, I think that although the fix in theory and concept is valid, it is in the wrong place. In the interests of efficiency it should not be in the renderer as that is used every single time the page is rendered and this is a 'rare' event and thus needs to be handled elsewhere. I know there is one bit of logic that breaks this and I want to remove it. Optimisation is a big thing at the moment in Moodle and every small little thing needs to be done to help it. Cheers, Gareth
            Hide
            badblock Kirill Astashov added a comment - - edited

            Hi Gareth,

            I investigated the issue further and must confess that the description of the issue is misleading. The actual issue is that we are testing upgrade of Moodle 2.3 to Moodle 2.5 with simultaneous upgrade of the format_topcoll plugin.

            In Moodle 2.3, the format_topcoll plugin installed is of the following version:
            $plugin->version = 2012101800;
            $plugin->release = '2.3.9.1';

            Upgraded to the following version in Moodle 2.5.2:
            $plugin->version = 2013081900;
            $plugin->release = '2.5.3.2';

            Now that the test version of Moodle got upgraded, courses do not seem to maintain their 2-column format option.
            I believe this is happening because their "layoutcolumnorientation" setting was set to 0 on upgrade, which does not make sense (or wasn't set to anything at all, thus making the setting default to 0).

            Show
            badblock Kirill Astashov added a comment - - edited Hi Gareth, I investigated the issue further and must confess that the description of the issue is misleading. The actual issue is that we are testing upgrade of Moodle 2.3 to Moodle 2.5 with simultaneous upgrade of the format_topcoll plugin. In Moodle 2.3, the format_topcoll plugin installed is of the following version: $plugin->version = 2012101800; $plugin->release = '2.3.9.1'; Upgraded to the following version in Moodle 2.5.2: $plugin->version = 2013081900; $plugin->release = '2.5.3.2'; Now that the test version of Moodle got upgraded, courses do not seem to maintain their 2-column format option. I believe this is happening because their "layoutcolumnorientation" setting was set to 0 on upgrade, which does not make sense (or wasn't set to anything at all, thus making the setting default to 0).
            Hide
            gb2048 Gareth J Barnard added a comment - - edited

            Hi Kirill,

            Ok, fair enough, I've replicated the issue:

            [11-Nov-2013 11:51:13 UTC] upgrade.php: stdClass Object
            (
                [id] => 1
                [courseid] => 2
                [layoutelement] => 1
                [layoutstructure] => 1
                [layoutcolumns] => 2
                [tgfgcolour] => 000000
                [tgbgcolour] => e2e2f2
                [tgbghvrcolour] => eeeeff
            )
             
            [11-Nov-2013 11:51:13 UTC] restore_topcoll_setting: Array
            (
                [layoutelement] => 1
                [layoutstructure] => 1
                [layoutcolumns] => 2
                [toggleforegroundcolour] => 000000
                [togglebackgroundcolour] => e2e2f2
                [togglebackgroundhovercolour] => eeeeff
            )
             
            [11-Nov-2013 11:51:13 UTC] course_format_options: Array
            (
                [numsections] => Array
                    (
                        [default] => 10
                        [type] => int
                    )
             
                [hiddensections] => Array
                    (
                        [default] => 0
                        [type] => int
                    )
             
                [coursedisplay] => Array
                    (
                        [default] => 
                        [type] => int
                    )
             
                [layoutelement] => Array
                    (
                        [default] => 
                        [type] => int
                    )
             
                [layoutstructure] => Array
                    (
                        [default] => 
                        [type] => int
                    )
             
                [layoutcolumns] => Array
                    (
                        [default] => 
                        [type] => int
                    )
             
                [layoutcolumnorientation] => Array
                    (
                        [default] => 
                        [type] => int
                    )
             
                [togglealignment] => Array
                    (
                        [default] => 
                        [type] => int
                    )
             
                [toggleiconposition] => Array
                    (
                        [default] => 
                        [type] => int
                    )
             
                [toggleiconset] => Array
                    (
                        [default] => 
                        [type] => alpha
                    )
             
                [toggleallhover] => Array
                    (
                        [default] => 
                        [type] => int
                    )
             
                [toggleforegroundcolour] => Array
                    (
                        [default] => 
                        [type] => alphanum
                    )
             
                [togglebackgroundcolour] => Array
                    (
                        [default] => 
                        [type] => alphanum
                    )
             
                [togglebackgroundhovercolour] => Array
                    (
                        [default] => 
                        [type] => alphanum
                    )
             
            )
            

            And it appears that the problem is down to 'upgrade.php' calling 'restore_topcoll_setting()' before the new settings have been applied by the upgrade process. Please see https://github.com/gjb2048/moodle-format_topcoll/tree/CONTRIB-4743_M25_2_error_log for code on how to produce the error log. Again, the correct solution is not to perform a check every single time the course is rendered for a 'freak' event but to deal with it at the time the issue occurs. I'm currently thinking of one.

            It also appears that every single other new setting is missing too.

            Cheers,

            Gareth

            Show
            gb2048 Gareth J Barnard added a comment - - edited Hi Kirill, Ok, fair enough, I've replicated the issue: [11-Nov-2013 11:51:13 UTC] upgrade.php: stdClass Object ( [id] => 1 [courseid] => 2 [layoutelement] => 1 [layoutstructure] => 1 [layoutcolumns] => 2 [tgfgcolour] => 000000 [tgbgcolour] => e2e2f2 [tgbghvrcolour] => eeeeff )   [11-Nov-2013 11:51:13 UTC] restore_topcoll_setting: Array ( [layoutelement] => 1 [layoutstructure] => 1 [layoutcolumns] => 2 [toggleforegroundcolour] => 000000 [togglebackgroundcolour] => e2e2f2 [togglebackgroundhovercolour] => eeeeff )   [11-Nov-2013 11:51:13 UTC] course_format_options: Array ( [numsections] => Array ( [default] => 10 [type] => int )   [hiddensections] => Array ( [default] => 0 [type] => int )   [coursedisplay] => Array ( [default] => [type] => int )   [layoutelement] => Array ( [default] => [type] => int )   [layoutstructure] => Array ( [default] => [type] => int )   [layoutcolumns] => Array ( [default] => [type] => int )   [layoutcolumnorientation] => Array ( [default] => [type] => int )   [togglealignment] => Array ( [default] => [type] => int )   [toggleiconposition] => Array ( [default] => [type] => int )   [toggleiconset] => Array ( [default] => [type] => alpha )   [toggleallhover] => Array ( [default] => [type] => int )   [toggleforegroundcolour] => Array ( [default] => [type] => alphanum )   [togglebackgroundcolour] => Array ( [default] => [type] => alphanum )   [togglebackgroundhovercolour] => Array ( [default] => [type] => alphanum )   ) And it appears that the problem is down to 'upgrade.php' calling 'restore_topcoll_setting()' before the new settings have been applied by the upgrade process. Please see https://github.com/gjb2048/moodle-format_topcoll/tree/CONTRIB-4743_M25_2_error_log for code on how to produce the error log. Again, the correct solution is not to perform a check every single time the course is rendered for a 'freak' event but to deal with it at the time the issue occurs. I'm currently thinking of one. It also appears that every single other new setting is missing too. Cheers, Gareth
            Hide
            gb2048 Gareth J Barnard added a comment - - edited

            I think that this https://github.com/gjb2048/moodle-format_topcoll/compare/MOODLE_25...CONTRIB-4743_M25_2 is the solution. Thanks for spotting the typo.

            Show
            gb2048 Gareth J Barnard added a comment - - edited I think that this https://github.com/gjb2048/moodle-format_topcoll/compare/MOODLE_25...CONTRIB-4743_M25_2 is the solution. Thanks for spotting the typo.
            Hide
            gb2048 Gareth J Barnard added a comment -
            Show
            gb2048 Gareth J Barnard added a comment - Now merged into stable - see code here https://github.com/gjb2048/moodle-format_topcoll/blob/MOODLE_25/lib.php#L988 .
            Hide
            gb2048 Gareth J Barnard added a comment -

            Details of fix and where to get the code on: https://moodle.org/mod/forum/discuss.php?d=243285

            Show
            gb2048 Gareth J Barnard added a comment - Details of fix and where to get the code on: https://moodle.org/mod/forum/discuss.php?d=243285

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Nov/13