Moodle plugins directory: Insert module at cursor | Moodle.org
Insert module at cursor
General plugins (Local) ::: local_tdmmodatcursor
Maintained by Luke Carrier
Enables editing teachers to add activities and resources above the activity below the cursor
Latest release:
1 sites
1 downloads
Current versions available: 1
This plugin is an extension to the Moodle course editing functionality. It enables editing teachers to add activities and resources above the activity the cursor is hovering over.
Contributors
Luke Carrier (Lead maintainer)
Please login to view contributors details and/or to contact them
Many thanks for sharing this plugin with the Moodle community. Please review the validation results and fix all of the issues mentioned. These changes are typically pretty easy to make but if you have any questions just let us know.
Maturity information ($plugin->maturity) not found in version.php
Release notes not found (searched for files README, README.*)
I noticed that the recommended boilerplate was not used in the version.php file. The boilerplate is recommended at the beginning of each file and makes explicit the GPL license. You may want to review http://docs.moodle.org/dev/Coding_style#Files to learn more about the boilerplate comments.
For now, I am going to mark this plugin as needing more work until we get these issues resolved. Thanks for your patience with the review and approval process. Peace - Anthony
I noticed that the recommended boilerplate was not used in the version.php file. The boilerplate is recommended at the beginning of each file and makes explicit the GPL license. You may want to review http://docs.moodle.org/dev/Coding_style#Files to learn more about the boilerplate comments.
In the string 'addtype', was there any reason for not using the standard {$a} placeholder? My experience says that our translators are more familiar with that than with custom implementations like yours 'Add {type}'.
You may consider removing the Building section from your README.md file as it provides no added value to the users installing your plugin and may actually quite confuse them.
Your solution based on $SESSION->local_tdmmodatcursor_addabove may lead to an unexpected behaviour if the user is editing the same course in multiple browser windows in parallel. The observer then moves any newly created course module, whichever comes first. I admit it's not really typical use case though.
Note that you may consider fixing your YUI3 module namespace so that it uses 'M' as the root object name instead of your current 'Moodle' to make your style consistent with our javascript guidelines.
Finally let me say it was a pleasure for me to see such a well designed, structured and written plugin again. It is a nice illustration of how following the recommended coding practises (new events API, shifter etc) can help to produce a clean and elegant solutions. I believe many teacher will find your enhancement very useful. Good luck with.
Said that, consider the runway free. Welcome to Plugins directory!
I gave the course editing problem some more thought and have fixed issues that would arise when editing two courses simultaneously. Because we don't know the course module's ID when we set up the $SESSION data ready for the observer, I can't see a way of resolving this without making changes to or duplicating modedit.php. I'll definitely give this some more thought, though.
Shifter is the main reason I lay out the repositories the way I do. I have some other plugins which target older versions of Moodle which don't handle YUI modules in the Shifter locations, and I didn't want to worry about checking in pre-compiled modules. I could drop it for this repository, given that it targets 2.6+. I'll definitely consider this in the future.
Thanks again!
I am using Moodle 2.7
I did do the following
Copy the zip file to your server
Extract the zip file and move the tdmmodatcursor directory to your Moodle's local directory
Browse to Site Administration -> Notifications and allow the database upgrades to execute
Please help. hank you