Non-core contributed modules

A Vertical automated Flyout Menu of course topics and manual urls

Details

  • Type: New Feature New Feature
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Incomplete
  • Affects Version/s: 1.9
  • Fix Version/s: None
  • Component/s: Add a project here
  • Labels:
    None

Activity

Hide
Anthony Borrow added a comment -

Abrary - Thanks for taking the time to create an issue in the tracker and for uploading the code for the flyout menu editor block. In looking at the things, here are a few comments, questions, etc. for your consideration. Please know that all my comments are intended to be constructive to help improve the actual implementation of your code by other users.

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

Show
Anthony Borrow added a comment - Abrary - Thanks for taking the time to create an issue in the tracker and for uploading the code for the flyout menu editor block. In looking at the things, here are a few comments, questions, etc. for your consideration. Please know that all my comments are intended to be constructive to help improve the actual implementation of your code by other users. 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
Hide
Anthony Borrow added a comment -

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

Show
Anthony Borrow added a comment - 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
Hide
Abrar Ullah added a comment -

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

Show
Abrar Ullah added a comment - 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
Hide
Abrar Ullah added a comment -

I have changed the name and sorted out the variable declaration.

Show
Abrar Ullah added a comment - I have changed the name and sorted out the variable declaration.
Hide
Anthony Borrow added a comment -

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.
2) As for working with CVS once you setup a directory for CVS access you can then use CVS commands. If you are using an IDE like Eclipse or Netbeans it is automated in that you can use the IDE to update CVS (get the latest version from the CVS server) and then make changes on your local machine and upload those changes (commit them) to the CVS server. Do not be shy if you have questions with this process as I am happy to be of assistance.
3) Once we get the code uploaded to CVS then I will take a closer look to see what might be done to make things more flexible for the other course formats.

Again, please do not hesitate to let me know how I can support your efforts. Peace - Anthony

Show
Anthony Borrow added a comment - 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. 2) As for working with CVS once you setup a directory for CVS access you can then use CVS commands. If you are using an IDE like Eclipse or Netbeans it is automated in that you can use the IDE to update CVS (get the latest version from the CVS server) and then make changes on your local machine and upload those changes (commit them) to the CVS server. Do not be shy if you have questions with this process as I am happy to be of assistance. 3) Once we get the code uploaded to CVS then I will take a closer look to see what might be done to make things more flexible for the other course formats. Again, please do not hesitate to let me know how I can support your efforts. Peace - Anthony
Hide
Anthony Borrow added a comment -

Abrar - I am resolving this issue as incomplete as I am going back trying to clean up issues that appear to have been inactive for a while. I am not sure if you are still interested in having this code in contrib or not. If you are, just let me know and we can re-open the issue. Please do not hesitate to let me know if there is anything I can do to be supportive of your efforts and thanks for your contributions to the Moodle community. Peace - Anthony

Show
Anthony Borrow added a comment - Abrar - I am resolving this issue as incomplete as I am going back trying to clean up issues that appear to have been inactive for a while. I am not sure if you are still interested in having this code in contrib or not. If you are, just let me know and we can re-open the issue. Please do not hesitate to let me know if there is anything I can do to be supportive of your efforts and thanks for your contributions to the Moodle community. Peace - Anthony
Hide
Anthony Borrow added a comment -

Based on the M&P entry at http://moodle.org/mod/data/view.php?d=13&rid=2425, it looks like the code for this is being stored at http://www.pgmdewales.net/downloads/menu_flyout.zip. I am not sure if that code includes the changes I had suggested or not. I'll add a comment to the M&P entry referencing back to this issue so that folks can see the suggestions that were made. Peace - Anthony

Show
Anthony Borrow added a comment - Based on the M&P entry at http://moodle.org/mod/data/view.php?d=13&rid=2425, it looks like the code for this is being stored at http://www.pgmdewales.net/downloads/menu_flyout.zip. I am not sure if that code includes the changes I had suggested or not. I'll add a comment to the M&P entry referencing back to this issue so that folks can see the suggestions that were made. Peace - Anthony

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: