Forums | Mahara Community
Support
/
"Tagged Journal Entries" not available for Institution pages
28 February 2017, 10:50
Hi!
Using Mahara 16.10.2, I am trying to build Institution pages as an Administrator of an institution.
While trying to edit the page, I can't find the "Tagged journal entries" block in the toolbox. I then tried as the Administrator of the site with the same result.
To see a screenshot, please visit this link : https://mahara.uqam.ca/view/view.php?id=12211
(I wasn't able to insert an image directly here in my post)
As I would have need it, I wonder if this is really the expected behavior?
All the best,
Stéphanie
28 February 2017, 11:41
Hello Stéphanie,
The "Tagged journal entries" block is currently not available on the site level. You can create a wishlist item for it on our tracker or give it a go yourself to make it available. Technically, it shouldn't be too hard as the block is not enabled for group, site and institution pages. In Mahara 16.10 we enabled the copying of that block for individual user accounts, but instead of copying the journal entries, we only allow the copying of the tags.
Cheers
Kristina
03 March 2017, 5:53
Hi Kristina,
Thanks for your precisions. We will first take a look at the code before adding anything to the wishlist.
All the best,
Stéphanie
14 March 2017, 7:08
Hello Kristina,
To achieve our goal, we figured that we could change the artefact/blog/blocktype/taggedposts/lib.php file near the line 510, from :
/** * Taggedposts blocktype is only allowed in personal views, because currently * there's no such thing as group/site blogs */ public static function allowed_in_view(View $view) { return $view->get('owner') != null; }
to
/** * Taggedposts blocktype is only allowed in personal views, because currently * there's no such thing as group/site blogs */ public static function allowed_in_view(View $view) { return true; }
We then set the institutions pages. To do so, we copied three collections that we used to copy from a model user. One of those collections include a Journal; some of the pages included "Tagged journal entries" blocks.
New users in the institution get now all the institutions pages, and are effectively and correctly getting the "Tagged journal entries" blocks.
For our model here, this behavior suits our needs.
Do you feel that the change in the code could cause any bad side effect of which we are unware of?
Thanks!
Stéphanie
14 March 2017, 14:34
Hi Stéphanie
The way the taggedposts block checks what tags are allowed to be chosen for the block it checks against the user.
So if the Site Journal has a Journal entry tagged 'sitejournal' but the user does not have this tag then the tagged journal entry block can not choose the tag.
To make the change fully functional we'd need to check if the page is owned by something other than user (eg group/institution/site) and check the tags they own
But otherwise it should be ok to make that change as only people that can view the page can view the taggedposts block on it and therefore the journal entries that are tagged.
Cheers
Robert