Moodle Plugins directory: Bookmarks (within book chapter) | Moodle.org
Bookmarks (within book chapter)
Users can create their own bookmarks at any desired position within the text Moodle Book chapters and they can later access it quickly using "jump focus" switch. All the bookmarks will be listed within the block once the user open desired chapter again. This might be useful to anyone who likes to have side notes next to their learning material. The tool can increase accessibility for blind and visually impaired people. Each user can easily create, delete and rename their own bookmarks.
This block works only with Moodle Book chapter. You can create an instance of a block in each Moodle Book chapter view where you need it. To include a block globally across all Moodle Book chapter views please follow this instructions:
- Go to Moodle homepage. Create a block instance to the Moodle homepage and set the configuration for the block to be visible in any page throughout entire Moodle
- Go to any Moodle Book chapter page. Access the configuration again and restrict the block to be visible only on Moodle Book type of pages
Please don't report bugs here
If you experience an error with the block, or would like to request a feature, please use the "Bug Tracker" link below.Disclaimer:
- This is a beta version of a block. Some functionality might not work properly. Please keep in mind that chapter text editing might cause user bookmarks to lose their correct positions within the text. In other words, if chapter text is edited after bookmark is created, a bookmark might not keep its correct position and could became useless.
- The plugin works exclusively in modern web browsers with Javascript enabled support, including Internet Explorer 9 and higher
- Released Under the GNU General Public Licence http://www.gnu.org/copyleft/gpl.html
You are the developer? This plugin is not maintained anymore. If you wish to bacome the contributor and continue the development feel free to contact me over github.
thanks for sharing the plugin. I've just had a quick look and noticed that the file dbaccess.php introduces some security issues and doesn't seem to be complete (you have some TODO comments at the top of the file that suggest you are already aware of this.)
Specifically - you make a call to $_POST which is not allowed - you should be using required_param and optional_param calls.
you should add the following text to the top of the page:
define('AJAX_SCRIPT', true);
You should be passing the sesskey() to the ajax script and checking it before any actions are taken.
https://docs.moodle.org/dev/Security:Cross-site_request_forgery
a better name for that file might be modifybookmarks.ajax.php rather than dbaccess.php
I am going to mark this plugin as needing more work to get these issues sorted out. Please note, I am having troubles to precheck the plugin code with our tools due to space characters in you directory and file names (Installation instructions). I admit it is a bug in our checking system (as we normally do not allow spaces in filenames), still you may want to move those instructions out of the plugin code to a web site or so.
1. no more calls to $_POST, only required_param and optional_param calls.
2. define('AJAX_SCRIPT', true); is set but I created another file for non-ajax database access
3. confirm_sesskey() is now used before any database action
4. I agree to your proposal on file name change: modifybookmarks.ajax.php
5. documentation is moved out of github
6. $SESSION is not used anymore at all. Not necessary needed
7. not any user is allowed to delete or update any record from database anymore
Are there any further comments? Should I re-apply?
We will get to re-reviewing your latest version this week and will let you know. Thanks for your patience.
Thanks for fixing the most crucial issues detected by Dan in his peer-review. Currently, it seems that the code would need a bit more clean-up and polishing to meet Moodle coding guidelines standards. I moved it into the 'Incubating' category so it can get a bit more mature there.
Yes, I'm unable to continue the development on this one, I wish I could. I'm able to assist in development though as much the free time makes it possible for me. I'm always here for advice as well or for some small improvements and bugfixes. It's not that I'm resigning of it completely, I'll just not code it anymore. All the cards are open for now.
I published the plugin here here because there is nothing similar on Moodle yet and it sounds like an interesting idea. It could help someone for sure or at least open mind.
I've fixed the issues you posted on Github! Thanks for feedback!
Cheers!