pconkie Posted May 22, 2017 Share Posted May 22, 2017 We use the frog noticeboard widget on our dashboards (all-staff email groups don't exist!) and a filedrop for any attachments. This doesn't work great - it's sometimes hard to find the right attachment and files remain long after notices have expired. So I thought i'd have a go at recreating the noticeboard widget with the option to attach files directly to the notice. I've managed to do this. But I have a few things on the wishlist....... 1. With advice from @Chris.Smith i'm using the site assets to store the attachments. However, I've noticed that when the page with my noticeboard is nested on our dashboard the attachments get stored in the dashboards assets instead. I'd rather not do this, so i'm wondering if there is a way to get the uuid of the site the widget is on when that site is nested on a dashboard? This: var site_uuid = this.elements.site.find('[data-site-uuid]:first').data('site-uuid'); doesn't do it. 2. I currently have to drag a frog noticeboard widget onto a page and hunt down the uuid of the forum that got created to hijack. I then provide that forum uuid to the widget via a preference. Is there a way in edit mode when my noticeboard is dragged onto a page to create a new forum and return the uuid (and i suppose to be tidy, delete a forum when the widget is deleted from a page). 3. Frog seems to use CKeditor in various places in order to add custom mark-up to text. Is it possible to turn my 'content' textarea into a WYSIWYG enabled element using CKeditor? 4. I'm using this https://froglearn.backwellschool.net/app/public/sprite/os-icon-ext/sprite.png frog sprite map to get the correct file type images for each attachment. However is this reliable across different froglearn instances? Should i be uploading as a widget asset? I'm also getting a weird border around the images which I think is actually sue to not setting a src on the image placeholder i'm using. Is there a frog transparent.png somewhere i can use or again, should i be uploading one as an asset. That's it for now! Thanks Paul Link to comment Share on other sites More sharing options...
Chris.Smith Posted May 25, 2017 Share Posted May 25, 2017 On 2017-5-22 at 23:05, pconkie said: We use the frog noticeboard widget on our dashboards (all-staff email groups don't exist!) and a filedrop for any attachments. This doesn't work great - it's sometimes hard to find the right attachment and files remain long after notices have expired. So I thought i'd have a go at recreating the noticeboard widget with the option to attach files directly to the notice. I've managed to do this. But I have a few things on the wishlist....... 1. With advice from @Chris.Smith i'm using the site assets to store the attachments. However, I've noticed that when the page with my noticeboard is nested on our dashboard the attachments get stored in the dashboards assets instead. I'd rather not do this, so i'm wondering if there is a way to get the uuid of the site the widget is on when that site is nested on a dashboard? This: var site_uuid = this.elements.site.find('[data-site-uuid]:first').data('site-uuid'); doesn't do it. 2. I currently have to drag a frog noticeboard widget onto a page and hunt down the uuid of the forum that got created to hijack. I then provide that forum uuid to the widget via a preference. Is there a way in edit mode when my noticeboard is dragged onto a page to create a new forum and return the uuid (and i suppose to be tidy, delete a forum when the widget is deleted from a page). 3. Frog seems to use CKeditor in various places in order to add custom mark-up to text. Is it possible to turn my 'content' textarea into a WYSIWYG enabled element using CKeditor? 4. I'm using this https://froglearn.backwellschool.net/app/public/sprite/os-icon-ext/sprite.png frog sprite map to get the correct file type images for each attachment. However is this reliable across different froglearn instances? Should i be uploading as a widget asset? I'm also getting a weird border around the images which I think is actually sue to not setting a src on the image placeholder i'm using. Is there a frog transparent.png somewhere i can use or again, should i be uploading one as an asset. That's it for now! Thanks Paul Hi Paul, I can address some of your issues now but I'll have to get back to you on the rest. 1. Try... this.elements.page.controller().options.origin_site_uuid 2. I will have to get back to you... 3. It is supposed to be simple... but for some reason our CKEditor component doesn't want to work for me today, I'll get back to you. 4. For a reliable way to display file icons, use the extension as a css class on a div tag. For example: .os-icon-ext-jpeg, .os-icon-ext-jpg You can add a class of small to get a smaller icon. Here is a full example <div class="os-icon-ext os-icon-ext-jpeg"> <span class="file-name">JPEG</span> </div> Hope that helps, ~ Chris 2 Link to comment Share on other sites More sharing options...
pconkie Posted May 30, 2017 Author Share Posted May 30, 2017 Ok, @Graham Quince @Chris.Smith come on, this is getting in the way of writing the timetable for next year! This is almost 'finished' - thought you might want a look... This has now replaced the frog noticeboard on our dashboard You can: Choose your title font colour Add attachments without needed a file drop! Changed the default date options to "until" rather than "from" This one is on the student dashboard You can insert hyperlinks (like the final notice) but not easily! Better if CKEditor was available! Found this.options.sitePermission so that I could hide the 'Create Notice' button for users that only have 'view' permissions. BTW: The Croak is our in house student run magazine on frog - it's great! At the moment I have to drag a frog noticeboard onto a page and grab the forum uuid to enter as a preference in my widget. If the forum uuid is not set, the widget won't work (I do test for this and load in another view,ejs to let them know in detail what to do). So is there a way to generate a forum uuid from scratch as I presume the real noticeboard widget does? This must be possible, right? Thanks Paul 1 Link to comment Share on other sites More sharing options...
Graham Quince Posted June 2, 2017 Share Posted June 2, 2017 Hi Paul sorry, - there probably is, but i've not found it. I've checked with Chris too and he's not sure. We'll bear it in mind to keep looking though. Graham 1 Link to comment Share on other sites More sharing options...
pconkie Posted June 5, 2017 Author Share Posted June 5, 2017 (edited) Help! @Chris.Smith @Graham Quince Some staff can not attach files to their notices. They get error: {"status":{"code":3000,"message":"You do not have the api.assetsfiles.add role"},"params":{"method":"assetsfiles.add"},"data":null} BUT.... I can't find this role in Groups and Policies - how do i give all staff this role? Paul Edited June 5, 2017 by pconkie Link to comment Share on other sites More sharing options...
Graham Quince Posted June 5, 2017 Share Posted June 5, 2017 Hi Paul, Oh that's annoying. I've checked in the back-end settings and staff do have access to the API. Can you DM or email me a staff account which is working and one which isn't and I'll do some more digging. Graham Link to comment Share on other sites More sharing options...
Graham Quince Posted June 5, 2017 Share Posted June 5, 2017 Hi Paul In order to be able to add a notice to a noticeboard, your staff will need edit and manage rights to the site. If you increase the permissions to the notices site to edit and manage, it should work for you. Apologies if you've tried this already. Graham Link to comment Share on other sites More sharing options...
pconkie Posted June 5, 2017 Author Share Posted June 5, 2017 Hi Graham Thanks! That fixed it. All working as expected now. I did think it was working for my teacher account (I have an admin account too) but seem i was mistaken. Of course now all staff get the little "edit" handle when they follow the link from the notification that is generated from a new post (as the site is nested on our dashboard they don't see the edit handler under all other circumstances). I suppose a member of staff *could* inadvertently delete the widget off the page. It looks like they can't delete the entire site though (because they are not the owner?). Would be nice to have the api to tick! I think with a bit of time to think about it I could probably hide the edit handle for all but those in the admin profile. Thanks again Paul 1 Link to comment Share on other sites More sharing options...
pconkie Posted June 16, 2017 Author Share Posted June 16, 2017 Made some further improvements to this widget today... 1. If an email address or link is included in the post, it is automatically turned into a clickable link. 2. Introduced a "frog tag" like feature. - Often we have notices that include long lists of student names which take up a lot of screen space! Now we can put a list like this between two tags <start list> and <stop list>. The notice board widget turns this into a collapsible "click to show" / "click to hide" container. If anyone wants the widget, they of course can, but @Graham Quince how would i get if off our platform? Paul 3 Link to comment Share on other sites More sharing options...
Graham Quince Posted June 16, 2017 Share Posted June 16, 2017 Hi Paul Right now, i can extract any widgets anyone would like and then host them on the community. Thank you again for your generosity. Everyone else - I'll get this widget off Paul's Frog next week. 1 Link to comment Share on other sites More sharing options...
Graham Quince Posted June 19, 2017 Share Posted June 19, 2017 Hi Paul I've got your widget, but while preparing a video to demonstrate it, I spotted one thing that might cause issues for users. When a file is linked to, the link opens in the existing window, so if I upload a PDF or image, I leave Frog. Is there any chance you could add a target="_blank" to the link? Works fine for word docs though. Link to comment Share on other sites More sharing options...
pconkie Posted June 19, 2017 Author Share Posted June 19, 2017 Thanks for pointing this out Graham - that would be annoying. All changed and tested. Paul Link to comment Share on other sites More sharing options...
Graham Quince Posted June 19, 2017 Share Posted June 19, 2017 Paul's widget is now on the community site https://www.frogcommunity.com/frogcode/showcase 1 Link to comment Share on other sites More sharing options...
C Wilson Posted June 19, 2017 Share Posted June 19, 2017 This looks really useful - especially as we have a noticeboard for all staff and each year group. If this has been mentioned elsewhere, apologies, but how do I add the widget to our platform? Chris Link to comment Share on other sites More sharing options...
Graham Quince Posted June 19, 2017 Share Posted June 19, 2017 If you're a Frog3-FrogLearn school, you'll have to wait for Austen as there is a fix in that update you need. If you're FrogLearn only, you'll need to enable Package Manager via Groups and Policies, then follow the tutorial on the Frogcode community site Link to comment Share on other sites More sharing options...
paulmitchell1989 Posted June 20, 2017 Share Posted June 20, 2017 Fantastic work. I really want to use the new noticeboard widget on the student dashboard, however when logged in as my test student account I can create a notice whereas on the original noticeboard widget the permissions are in place where I can’t. Can I restrict students from creating notices using the new widget? Thank you in advance! Link to comment Share on other sites More sharing options...
pconkie Posted June 20, 2017 Author Share Posted June 20, 2017 Hi @paulmitchell1989 As per the original widget if a user or group has only "view" permission for a site then they won't see the button to create a new notice. If they have "view and contribute" or "admin" permissions then they will see it. That's the theory anyway! And that works on our frog box. I'm not sure what the default sharing settings are for the student dashboard, but if you create a new site and give students "view" sharing permissions and put the noticeboard on that site, then embed that site on your dashboard, it should work like you want it to. We don't let students create notices either! Let me know if you still can't get it to hide. Paul 1 Link to comment Share on other sites More sharing options...
paulmitchell1989 Posted June 20, 2017 Share Posted June 20, 2017 19 minutes ago, pconkie said: Hi @paulmitchell1989 As per the original widget if a user or group has only "view" permission for a site then they won't see the button to create a new notice. If they have "view and contribute" or "admin" permissions then they will see it. That's the theory anyway! And that works on our frog box. I'm not sure what the default sharing settings are for the student dashboard, but if you create a new site and give students "view" sharing permissions and put the noticeboard on that site, then embed that site on your dashboard, it should work like you want it to. We don't let students create notices either! Let me know if you still can't get it to hide. Paul Perfect! Thank you for the widget and your help, Frog need to start paying you with all your contributions! 1 Link to comment Share on other sites More sharing options...
Graham Quince Posted June 20, 2017 Share Posted June 20, 2017 Ah, I see a potential problem here. If a school has a forum on the dashboard site, then students will need contribute access in order to post. With your notice board only requiring Contribute and not edit and manage, there is a little bit of a conflict. Personally, i think we need an additional layer of permissions between contribute and edit & manage and there have been some discussions internally about this. Could I make a suggestion? How about a preference in the widget to turn off the create notice button for contribute level access or just for students (and one for parents) Link to comment Share on other sites More sharing options...
pconkie Posted June 20, 2017 Author Share Posted June 20, 2017 Hi @Graham Quince Also worth noting that contribute access is required by the forums api to submit a new post (notice). Just wondering why a student would need "contribute" access to their dashboard? In theory Paul could also have solved his problem by changing the students permissions to "view" for their dashboard. This would be consistent with how other widgets work. Having said that, the original widget does hide the new notice button when that widget is placed directly on the student dashboard (but not the staff dashboard) when the students have contribute access. So this is clearly a different behaviour! If someone can tell what line of code i need to check if the page is a dashboard then i can replicate what the original widget does. Your suggestion of an over-ride is a good one and I can build that in! Paul Link to comment Share on other sites More sharing options...
Graham Quince Posted June 20, 2017 Share Posted June 20, 2017 The original Dashboards sites are a bit of a weird legacy and have several quirks. If Paul did change the permissions for students to view and has a forum, file drop, poll or wall on the dashboard then I believe the students would not be able to interact with these widgets. The original noticeboards require Edit and Manage rights to be able to post a notice, which isn't ideal.# In the API, sites.getInfo A dashboard is listed under "type" as "dashboard", whereas a site is listed as "site" 1 Link to comment Share on other sites More sharing options...
pconkie Posted June 20, 2017 Author Share Posted June 20, 2017 What's happened to FrogCode?! We got Austin yesterday and now I can't update any widgets via package manager? Link to comment Share on other sites More sharing options...
pconkie Posted June 21, 2017 Author Share Posted June 21, 2017 Morning @Graham Quince I had my NM create me a new frog account with access to everything... This seems to have sorted the FrogCode issues i was experiencing yesterday. I have been able to update the widget to sort out the issues with when and where the new notice button should appear. I have also added in the over-ride to ensure it is off when you want it off. Waiting for you when you get a chance to take the latest version. Paul PS: I can't see the video that goes with the widget on the showcase. That might mean loots of other community members can't see it either. I can see the office365 video if that helps? Link to comment Share on other sites More sharing options...
Chris.Smith Posted June 21, 2017 Share Posted June 21, 2017 51 minutes ago, pconkie said: Morning @Graham Quince I had my NM create me a new frog account with access to everything... This seems to have sorted the FrogCode issues i was experiencing yesterday. I have been able to update the widget to sort out the issues with when and where the new notice button should appear. I have also added in the over-ride to ensure it is off when you want it off. Waiting for you when you get a chance to take the latest version. Paul PS: I can't see the video that goes with the widget on the showcase. That might mean loots of other community members can't see it either. I can see the office365 video if that helps? Hi @pconkie, Does this mean you can save changes again? Thanks, Chris Link to comment Share on other sites More sharing options...
pconkie Posted June 21, 2017 Author Share Posted June 21, 2017 Hi Chris Saving was hit and miss yesterday - sometimes yes, sometime no. That has continued today for my teacher account (the account I have been using for all the frogcode stuff i've been doing). So something in Austin isn't behaving itself. With a super-dupa admin account the issues seem to have gone away! Paul 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now