## Blocks: User bookmarks

block_user_bookmarks
Maintained by Gurvinder Singh, Jonas Rüegge
User Bookmarks allows users to bookmark any moodle page.
1k
1
Moodle 2.1, 2.2, 2.3, 2.4, 2.5

User Bookmarks (for Moodle 2.0-2.5)

This Block adds the possibility for Users to create their own URL bookmarks.

Simple but usefull, be it to set a shortcut to an administration function deep in the menu, or to have your favorite courses at your fingertip.

It's currently based on the admin_bookmarks block.

A new Version with it's own Database and Upgrade Function for previous Versions which is compatible with Moodle 2.6.x and 2.7.X is in development and expected to be available End of 2014.

### Contributors

Jonas Rüegge: Maintainer

• Fri, Apr 4, 2014, 3:54 PM
Hi, I'm really interested in using your plugin, however I'm on Moodle 2.6 and obviously want to avoid any current bugs that have been highlighted above.... Is there a release date for a 2.6 supported version coming soon?

Many thanks
• Mon, Apr 7, 2014, 6:14 PM
I was planning on leaving 2.6 and going directly to 2.7.
There will defenitely be a Version for 2.7, which should be compatible with 2.6, but not before may
• Sat, May 3, 2014, 2:28 AM
Hi,

I am trying to use this block in Moodle 2.6.1, but on every page where the block is present I get this:

Warning: Creating default object from empty value in /var/web/wwwroot/blocks/user_bookmarks/block_user_bookmarks.php on line 81
Call Stack
# Time Memory Function Location
1 0.0036 240320 {main} ../view.php:0
3 0.0444 5039824 moodle_page->set_state ../outputrenderers.php:791
4 0.0444 5040168 moodle_page->starting_output ../pagelib.php:855
5 0.0468 5072288 block_manager->create_all_block_instances ../pagelib.php:1424
6 0.0475 5205288 block_manager->ensure_instances_exist ../blocklib.php:931
7 0.0475 5205288 block_manager->create_block_instances ../blocklib.php:992
8 0.0478 5231448 block_instance ../blocklib.php:916
10 0.0480 5259520 block_user_bookmarks->specialization ../moodleblock.class.php:442

Line 81 attempts to set a property of $this->config, which leads me to believe that$this->config is not set. So I added this at line 81:

if (!isset($this->config)) {$this->config = new stdClass();
}

The problem went away, but I would rather not patch third-party code myself. Is there an "official" patch for this?

• Mon, May 5, 2014, 2:19 PM

Currently there's no Version of the Plugin for 2.6.X.
There will be an updated Version for the 2.7 Stable once it is released.
1.1.3 might also solve your Problem.
• Sun, Jul 6, 2014, 1:04 AM
I have it installed for test in 2.7 and I noticed that if you bookmark a page in English and change language, User Bookmarks don't change. Don't know if this is because of 2.7 or not but I figured I'd let you know.
• Wed, Sep 3, 2014, 9:54 PM
Hi,

Is it possible to set a default bookmark that all users get?

Thanks
• Thu, Sep 4, 2014, 7:52 PM
No, Maybe in the next release.
Currently the bookmarks are stored user-specific.
• Thu, Oct 2, 2014, 2:39 AM
I noticed today in both Moodle 2.6.1 and 2.7.2 that in some courses the "Bookmark this site" link does not work.

Suspecting a JavaScript issue I turned on Firebug and observed the following error:

SyntaxError: missing ) after argument list
...urse/view.php?id=2088', 'Course: Gerald's Test Course 789', 'DO7wJOuB9M', 'http:...
view.php?id=2088 (line 1, col 56)

So the problem looks to be an unescaped apostrophe in the course title that is prematurely closing a parameter, breaking the script.

I have fixed this on my beta site by replacing line 165 in block_user_bookmarks.php
Old:
$bookmarktitle =$PAGE->title;
New:
$bookmarktitle = addslashes($PAGE->title);

This fixes the problem by escaping quotes and apostrophes in the course title.
• Thu, Oct 2, 2014, 2:24 PM
Thanks for the Feedback Gerald i will Test and implement it in the next Version,
The current Version here is not intended for 2.6. You can check out the Version at Github or wait untill the 19.10, when I will release a completely new Version with it's own databasetables.
(since the current solutation has not just a limitations on the amount of links one user can theoretically create but also a high probability for running into Problems with non ASCI characters on Multilingual environements, mainly ones with Asian Characters)
• Sat, Oct 11, 2014, 7:40 AM
This is a great module. Any chance you could add the option to re-arrange links and import/export.
Cheers,
Jesse
• Mon, Oct 13, 2014, 2:08 PM
It's planed for the next Version (Release Date 19.10.2014)
I was also thinking about a bookmarkexport / Import with Firefox, but that's something for a November or december release
• Thu, Nov 13, 2014, 9:12 PM
Hello! Whenever I try to bookmark a course main page that uses a format such as the Grid format or the TabTopics format, I can't create the bookmark because there is a yui code embedded in the link.
Click me to create a bookmark
You can see it in the example above after "id=" in the link.

With other formats, I do not see that yui code and can create the bookmark with no problem. Do you have any advice here?
• Thu, Jan 22, 2015, 2:25 AM
Hi Jonas,
Thanks for the reply, hows development coming along? I've had to uninstall this plugin for now, it was causing a few errors in 2.8. I'm missing it quite a bit :p
Cheers,
Jesse
• Tue, Feb 3, 2015, 8:30 PM
Sorry to all that have been waiting for a new release in December.
I didn't have the time to test it and the next release is supposed to fix all the Problems as automatic as possible.

• Tue, Feb 3, 2015, 8:31 PM
Also there was the release of 2.8, so I have to fix some things for this Version too.