← Back to team overview

mahara-contributors team mailing list archive

[Bug 617159] Re: Block title links should be made optional

 

Eugene,

We always need to have render_self implemented for html export to work
at all, otherwise you get a fatal error.  So there's no point in
checking for it with method_exists; it's better to write a dummy
render_self function in the ArtefactType base class that prints the
artefact title & description inside divs (or make it abstract).

I do think the titles should be optional though.

-- 
Block title links should be made optional
https://bugs.launchpad.net/bugs/617159
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.

Status in Mahara ePortfolio: Confirmed

Bug description:
Blocks that contain a single artefact are automatically rendered with a link around the block title pointing to view/artefact.php?artefact=x&view=y

That is annoying for artefact plugin authors who haven't implemented a render_self function, because that page is broken without one.

There are two things we should do to solve this.

(1) Either
- make render_self abstract in the base class (force plugin authors to write it as it's used in html export anyway); or
- implement a very plain render_self function in the ArtefactType base class to stop view/artefact.php from breaking (personally i prefer this option)

(2) Make the title link to view/artefact.php optional in the render_viewing function in blocktype/lib.php.  We could allow blocktypes to say whether to add the link or not, or perhaps control it at the instance config level so that blocktypes can allow the user to decide whether to link the title or not.  (We should also allow view owners to turn off the display of the block titles altogether if they want to...)





References