Moodle Plugins directory: Columns format | Moodle.org

Columns format
Course formats ::: format_columns
Maintained by
Gareth J Barnard
Part of set Seeking new maintainer.
Topic based course format with the ability to arrange the topics in columns except 0.
Latest release:
46 sites
3 downloads
11 fans
Current versions available: 8
This plugin is up for adoption, please see 'Plugins adoption programme'.
Topic based course format with the ability to arrange the topics in columns except 0.Useful links
Contributors
Gareth J Barnard (Lead maintainer)
Please login to view contributors details and/or to contact them
It's been driving me potty how I can make use of both get_config and set_config in my code, be user friendly and efficient. I can use them in my configuration file, but I do have to test of their existence, the result of which is thrown away (inefficient) as I then get the value again elsewhere in the code. i.e. get_config, if not exist, set_config, then in another file 'get_config'. Then if the user wants to change the defaults, then they now need to change them in the file and remove the respective database rows. Also, this means more database read's etc, rather than a straightforward language constant.
Or, can I use standard PHP constants -> http://php.net/manual/en/language.constants.php <- instead?
Cheers,
Gareth
As for using get_config and set_config - that is certainly less of a show stopper for me and more of a recommendation to keep $CFG from becoming overly bloated. I'll look at the update and give you some more feedback later today. Peace - Anthony
Thanks
Cheers,
Gareth
Yes it is. It is just a matter of adding the code to do this. I've recently devised and implemented the required code in Collapsed Topics for Moodle 2.4, so it is just a matter of spending a few hours transposing the code and testing.
What version of Moodle are you using?
Cheers,
Gareth
We seem to have a bug in Moodle 2.4.4 Official release.
We actually have 7 Moodle instances running from a single code base, 6 are fine but one is reporting the follwoing error:
Debug info: Argument 2 passed to has_capability() must be an instance of context, null given, called in [dirroot]/course/format/columns/renderer.php on line 264 and defined
Error code: codingerror
Stack trace:
line 406 of /lib/setuplib.php: coding_exception thrown
line 355 of /lib/accesslib.php: call to default_error_handler()
line 264 of /course/format/columns/renderer.php: call to has_capability()
line 555 of /course/format/columns/renderer.php: call to format_columns_renderer->section_header()
line 116 of /course/format/columns/format.php: call to format_columns_renderer->print_multiple_section_page()
line 276 of /course/view.php: call to require()
Clearly there must be some issue in the database for that instance.
Other course formats are all fine (we have grid, collapsable topics and one column installed too).
It doesnt seem to matter which course / category we apply this format to, they all throw that exception, but again, only in one instance.
Thank you for spotting that. It's a bug which only manifests itself when editing is on. I will publish an updated version hopefully within the next 24 hours. In the mean time if you edit the file 'renderer.php' and move line 298 which should contain '$context = context_course::instance($course->id);' to line 261 then that should fix the issue for you.
Cheers,
Gareth
Thanks for looking at that so quickly!
I installed the latest version of the plugin (released today) and it resolved the issue.
Thanks! Jez
Is there a way I can implement this within your Essentials theme? I have found the config.php page where I can alter the "//Main Course page" manually.
Most members of staff really like the three column layout which is a default however some want their course to be a two column layout. Is this possible using this Plugin?
Thanks in advance
Carl