Forums | Mahara Community

Developers /
Bookmarking Artefact for 1.2 - tag issue


anonymous profile picture
Account deleted
Posts: 6

01 November 2011, 6:20

Hi all,

I've just spent some time this morning looking into the book marking artefact over at gitorious: http://gitorious.org/mahara-contrib/artefact-bookmark

I'm finding that it does not seem to be working with the mahara tagging system - you can add tags (and they display in the tag cloud) but when clicking a tag that has a bookmark associated with it I get a blank page. I also get a blank page when clicking on tags.php (with no data in the query string) - disabling the bookmark artefact fixes it.

I've had a quick look at the code for tags and artefacts and can't see what needs adding or editing - could anyone point me in the right direction to get this working?

Basically i'm trying to do a quick hack - I've managed to make a slight modification to the artefact that allows us to bookmark content directly from moodle 2 into the e-portfolio and just need this part to make it all work.

Thanks in advance for any help!

Regards

Mark

anonymous profile picture
Account deleted
Posts: 808

01 November 2011, 15:45

Hi Andrew,

I think to get a new artefact type to show up in the tags area, you might need to define the get_artefact_type_content_types() function in the artefact plugin's lib.php (see some of the other artefact plugins for examples).  I'm not sure about that, but give it a go and see if that works.

R.

anonymous profile picture
Account deleted
Posts: 808

01 November 2011, 15:48

Another thing - did you check whether there are any errors in the log at the time you got the blank page?

anonymous profile picture
Account deleted
Posts: 6

02 November 2011, 4:53

Hi Richard,

Many thanks for your quick replies! not being a developer I did not think to look into the logs. However looking into the logs I found this error:

PHP Fatal error:  Using $this when not in object context in /Applications/MAMP/htdocs/portfolio/artefact/bookmark/lib.php on line 111

I've since changed the line from: '_default' => get_config('wwwroot') . 'artefact/bookmark/view.php?id=' . $this->get('id'),

to: '_default' => get_config('wwwroot') . 'artefact/bookmark/view.php?id=' . $id,

All seems to be working as expected!

Great - I'm doing a quick hack that allows our users to bookmark any content on our moodle 2 installation into their portfolio. This was the missing piece.

 

Thanks again

Mark

anonymous profile picture
Account deleted
Posts: 808

02 November 2011, 15:51

Hi Mark,

Great, thanks for the fix.  Now corrected on gitorious.

Don Presant's profile picture
Posts: 255

02 November 2011, 16:50

Not to be staggeringly ignorant, but is there a page somewhere that describes this?

Gitorious is not that helpful.

Sounds interesting, like making links user friendly and curatable.

anonymous profile picture
Account deleted
Posts: 808

02 November 2011, 18:55

Don,

I'm afraid there's no page about it, but I've just added a line to the plugins page.

R.

anonymous profile picture
Account deleted
Posts: 6

07 November 2011, 5:37

Hi Richard,

As I know nothing about developing or upgrading artefacts - How much work would be involved in re-factoring this plugin to work in 1.4 - as is?

Would be neat if we could add a social element to it as well - will need to have a think.

Thanks

Mark

anonymous profile picture
Account deleted
Posts: 808

07 November 2011, 15:53

Mark, I haven't had a good look at it recently but from what I remember it's a very simple artefact, so it should only take about a day to get it working again in its current form.  I think it's just catching up with changes to the way Mahara processes templates, and the new navigation.

One thing I would have liked is a faster way to create bookmark artefacts - it'd be cool if you could just enter a url into a one-line form, and have Mahara go away and hit the url in the background, maybe scrape the page a bit, then guess an appropriate title & icon, to save the user the effort of doing it manually.

Don Presant's profile picture
Posts: 255

07 November 2011, 16:37

My 2 cents: having an optional comment field would also be good, to give the learner a chance to curate the bookmark artefact.

10 results