|
I'm in the process of implementing this feature this for my local install of MRBS. Are there any specific configuration options that you are looking for?
Attached is a copy of the modified files needed for the implementation
Config.inc.php - It has been modified to pull the settings from the mdl_config table settings.php - It has been extended to support the MRBS configuration options for the Site Identification and Calendar settings sections of the config.inc.php file lang\en_utf8\block_mrbs.php - The required language files. Stephen - Thanks for your work on this. I am in the midst of final exams and papers so I am a bit distracted. A quick answer to your question is that I wanted to make as much as possible available via settings.php as possible. Working toward having everything in settings.php. The most difficult thing will be to work out how to allow for periods to be created. An array is listed but I think we can dynamically have the user chose that if they want to enable the use of periods they choose the number of periods and then we can generate a list of descriptions and create the array to feed into mrbs. I'll look at what you have done once I finish up the semester. Peace - Anthony
Hi Stephen,
thank you for your work. I tested it with Moodle 1.9.1 Version. Here is the german UTF-8 File Tha Attached File is a copy og the modified files needed for implementation (german): lang\de_utf8\block_mrbs.php - The required language files. Jens mrbs/lang/de_utf8/block_mrbs.php
Version 18.05.2008: now without String-literal errors... new Version...24.05.2008
Thanks for the updated file, perfect timing as I will begin looking at this today. I'm going to have some breakfast first and then come back. Classes are done so I can concentrate a little more on Moodle. Peace - Anthony
Stephen - The settings stuff looks good. A couple of things I noticed during testing for further improvement. The first is that we really ought to use mdl_config_plugins rather than mdl_config. The second is that if debugging is turned to report all errors there are some undefined notices that prevent the block from displaying so we should also add to settings values for resolution, morningstarts, eveningends, morningstarts_min, and eveningends_min to avoid that problem. Otherwise, I think it all looks pretty sharp. Peace - Anthony
added if statement for non-period related settings to avoid error when resolution, morningstarts, eveningends, morningstarts_min, and eveningends_min not set.
Stephen,
I think we need to clean up the visibility such that if periods are enabled then resolution, morningstarts, eveningends, morningstarts_min, and eveningends_min are grayed out and when periods are disabled then they are able to be edited. Otherwise, folks have to save the change and wait for the page to reload. I think it will be clearer (and more Moodle-consistent) making them dependent upon the periods enabled box. Peace - Anthony Stephen - What do you think, since we are in here and working on this of adding the misc. settings (below) as well. I think some of these might be useful to folks. The exceptions would be $javascript_cursor and $show_plus_link (I don't think those would get much use). Similarly, we could include the mail settings (below). Ideally I would like to see the block use Moodle's mail settings (either sendmail or SMTP) as already configured within Moodle. Peace - Anthony
-
$show_plus_link = true; # Change to true to always show the
$highlight_method = "hybrid"; # One of "bgcolor", "class", "hybrid".
-
Anthony,
There shouldn't be an issue adding the other configuration options to the settings.php file. The question becomes however would adding all of the options be overwhelming for the average user. For example when I was working on adding the configuration options I had found that none of the categories in the admin menu had any more than 12 or so options. I would be wary that having the 30+ configuration options for the MRBS block could be overwhelming. (The list you posted above would add 20 items to the configuration screen) If there were a way to add sub categories under the mrbs block for each type of configuration (General, email, misc, etc) then it wouldn't be an issue. As to using mdl_config_plugins in place of mdl_config, I could not find anything that was using the settings.php files that actually used that table. The only part of moodle that seems to use mdl_config_plugins is the authentication plugins. (The authentication plugins are all configured with the config.html files) -Steve Hi,
I can understand both sides. Maybe a solution is to do it like in a moodle profile with a button hide advanced / show advanced. So let find us a solution as fast as possible, then i can do the next step with my information system add on on the mrbs block in moodle. I wait for your comment. Jens You did a very good work.
Admin works well. I have a problem, if I enrol as teacher over the ldap in moodle the booking system mrbs is not visible. The config.inc.php is not configuered for ldap. Should I do configure for ldap? Juerg - Thanks for testing the revised admin code. As I recall (sorry it has been a long time since I've had a chance to look at the MRBS code), MRBS simply uses a system level custom role like mrbs_scheduler, mrbs_viewer and mrbs_admin for privileges. I'm not that familiar with ldap other than in theory (but not in practice). Somehow you will need to use ldap to have that teacher given the system level role of an mrbs_scheduler. It is really not the config.inc.php that needs to use ldap as much as getting Moodle to recognize that that user has that system level role. Perhaps you can configure ldap to do this but since I have not worked with I am not sure how best to advise. Feel free to post a question on the forums about how to assign a system level role using ldap. Once you have that setup it should work. Alternatively, you can just manually go in and add that user to the mrbs_schedule role. Peace - Anthony
Stephen - I agree that adding all of the options would be a bit much. Perhaps we can add them all but create an advanced settings to keep it from being overwhelming for those just getting started. I'll continue to see what needs to be done to make use of mdl_config_plugins instead of mdl_config. I have committed the work done so far as a starting place. I will be working on
I'm going to mark this issue as resolved. Not all of the config.inc.php settings are changeable via the mrbs block's settings.php file; however, the major ones are. Advanced users will know to look in the config.inc.php file anyway; however, if we want to add them then folks can comment here and I will reopen this issue. Otherwise, I'm not going to worry about it. Peace - Anthony
The more I think about it, the more I would like for settings to be able to handle all of the possible configuration options even though it will make it a bit long to look it. I'll investigate how to make the page a little more manageable on the eyes by breaking them up somehow. I've simplified the config.inc.php file and removed items which I do not think are needed. Peace - Anthony
added some additional settings from config.inc.php and the needed strings in the language files
Anthony,
I've looked at the revised changes to the MRBS block and have one observation: The Settings "Entry type A" through "Entry type I" should most likely have a clearer "descriptive text" since it is not clear what the option actually does. My suggestion would be to change the language string from : $string['config_entry_type2'] = 'Entry type $a'; to $string['config_entry_type2'] = 'These event types appear on the \'Add Entry\' screen. Every entry type is assigned a different color by default. Entry types are displayed in the following order: \'Entry A\', \'Entry B\', \'Entry C\', etc'; -Steve Steve - I agree that makes it much more clear. I've committed the new language string. Thanks - Anthony
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I think it may be related to some setting in the config.inc.php file so I am including it here with this issue. Thanks to William Lu for reporting this.