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.

Screenshots

Screenshot #0
Screenshot #1

Contributors

Luke Carrier (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Anthony Borrow
    Wed, 23 Apr 2014, 11:16 AM
    Luke,

    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
  • Plugins bot
    Mon, 26 May 2014, 5:48 AM
    Thanks for sharing this plugin with the Moodle community. Some formal issues were detected and reported by our automated plugin checker tool. Please review all the plugin checker results and fix the issues mentioned, if possible. These changes are typically pretty easy to make but if you have any questions just let us know.
  • David Mudrák
    Tue, 27 May 2014, 8:09 PM
    Hi Luke. Thanks for sharing this plugin. I am going to approve it now. Please find couple of my comments noted during the review below.
    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!
  • David Mudrák
    Tue, 27 May 2014, 9:00 PM
    Luke, I spotted only now that you tend to organise your git repositories so that they contain the plugin code in the src subfolder. I know it is a common practise in other projects, especially where the compilation is a required step to make the program actually work. However, it also makes it difficult to clone your directory directly into the Moodle code tree and use it instantly. For that reason, we recommend contributors to put the plugin code into the root folder of the repository. You may consider switching to that layout.
  • Luke Carrier
    Thu, 29 May 2014, 5:59 AM
    Thanks David for the feedback -- I really appreciate it! I've made all of the changes above and switched to using Moodle's strings_for_js() and M.util.get_string() code instead of my own formatting.

    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! smile
  • rene diaz
    Mon, 13 Oct 2014, 5:50 AM
    I installed the plugin and it show the Add URL Add File links as should. However, when I click on the Add URL or the Add File links I get an Error 404 "This page was not found, page is missing or moved"

    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
  • Luke Carrier
    Tue, 29 Dec 2020, 8:30 PM
    I'm afraid I'm no longer able to maintain this plugin as I'm no longer working with Moodle. If anyone wishes to take up maintenance please let me know and I'll transfer ownership.
Please login to post comments