|
Abrary - One other thought that I had was that folks frequently use the chronological course format rather than the topic format. I think ideally since Moodle's underlying section management is the same that we might be able to make this work for all course formats. I'll have to look more closely at the code to see what it is doing but I think one feature request I would have might be to have the block work with all course formats. Does that sound reasonable or feasible? I am just waking up so it is totally possible that I am overlooking some thing really obvious. Peace - Anthony
Hi Anthony,
1) We take it step by step, the first one to go for is to change the block name to flyout_menus , I have no problem doing that, I would wonder whether that has to be just the name in language file or we need to change the folder name and database table name as well? 2) About the variable declaration, I reckon that has to be done and I will do that. Can you please advise me on how to perform changes on the version uploaded to CVS server, do I need to change on my local machine and upload it later or it has to be done on the server, sorry If am not being helpful, but I am trying find time during my office hours. 3) About multiple course format, that is still a problem and has to be addressed. I have used topic_id and courseid as fields in the database table to store the section information. and use them as parameters in the menu links. If you think there is a way to making it flexiable for all courses, please advise me on that and i follow the line. Many thanks for your time. Abrar I have changed the name and sorted out the variable declaration.
Abrar - I am not sure why I was adding a "y" to the end of your name. I can only guess that my eyes saw the initial capital and just assumed I was writing Anthony. In any case, thanks for the updated files and for the prompt response. You sound like most of the rest of us that are involved with Moodle. We all have other things we are working on but enjoy doing what we can with Moodle. We all do our best and that is enough.
1) I think that in renaming we would do best to rename tables, language files, etc. That way it is consistent and we do not have to think about it. Again, please do not hesitate to let me know how I can support your efforts. Peace - Anthony |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
1) I wonder if we might benefit from renaming your block flyout_menus. The reason I think that might be a better name is that it is both more specific but also as menus grow in popularity there may be multiple menu editing blocks and renaming may help to avoid some confusion.
2) I noticed when I created a new instance of the menu_editor block on the frontpage that I received the following PHP Notice:
Notice: Undefined variable: menumembersoptions in /home/arborrow/Moodle/code/19stable/blocks/menu_editor/block_menu_editor.php on line 111
and similarly,
Notice: Undefined variable: menumembersoptions in /home/arborrow/Moodle/code/19stable/blocks/menu_editor/block_menu_editor.php on line 152
For testing purposes, I recommend setting Moodle debugging to show all reasonable PHP notices and errors (not developer mode). These types of notices are usually pretty easy to fix by either initializing the variable or checking for a value.
For example for line 111 you could use:
if (!empty($menumembersoptions )) { $menumembersoptions =str_replace('<ul></ul>','',$menumembersoptions); }
I have a slight preference for initializing the variable because then you can take care of any and all with a single line and you save a little performance by not having a bunch of extra if statements. I will continue to test and comment here but if you could let me know what you think about the renaming let me know. Hopefully it is pretty easy to do but if you need help to get it done quickly or have reasons why you would rather not rename it just let me know.
Peace - Anthony