Jump to content

pconkie

Members
  • Content Count

    428
  • Joined

  • Last visited

Community Reputation

591 Knows loads about Frog

1 Follower

About pconkie

  • Rank
    Uber Frog

Personal Information

  • School
    Backwell

Recent Profile Visitors

1,530 profile views
  1. I can’t see a link between the collection and the site the collection was created from. There is a source-uuid in the collection, but it doesn’t appear to match the uuid of the site the collection was created from?
  2. @ADT Great idea and very much needed! @Graham Q sounds like your next project! 1. Widget that only staff and admin can see * (like the button on the page viewer widget) * because if the widget is on the page that gets copied, then the widget will get copied too! 2. Essentially a button that when clicked gets the current page it is sat on and the ePortfolio collection * that the current site was the master for * May not be currently possible, so instead could provide a list of ePortfolio collections to select from 3. Button uses the "copy page" functionality of the newly updated button widget as it loops around each ePortfolio in the collection adding the new page * * This requires passing the source page (which we would have) and a sibling page (which specifies where to insert the copied page). We wouldn't have the sibling page, but could fudge this by always inserting at the end of the menu. What do you think?
  3. Frog.Model.api('groups.getMembers' etc etc //gets me all I need except pupil_number i.e. UPN FrogOS.fdp({ url: 'group/users/'+group_data[0], path: '/api/fdp/2/', type: 'GET' etc etc //gets me all I need (including pupil_number) except thumbnail //none of the other fdp group apis seem to be better I can solve the problem by doing a second call to: Frog.Widget.Model.api('users.getSummary', { 'uuid' : uuids { etc etc which does include thumbnails Just wanted to know if I had missed a single api call that had everything i needed in return?
  4. I think we are there now: var data = JSON.parse(response.response[i].data); if (data[0].child in this.receipts) { for (var x = 0; x < data.length; x++) { this.receipts[data[0].child].push(data[x]); } this.receipts[data[0].child].sort(function(a, b){return b.datetime-a.datetime}); } else { this.receipts[data[0].child] = data; this.receipts[data[0].child].sort(function(a, b){return b.datetime-a.datetime}); } @Graham Quince please feel free to take the updated widget and app. @simon brahan thanks for your help!
  5. Rather than this: var data = JSON.parse(response.response[i].data); this.receipts[data.child] = data; This seems to work: var data = JSON.parse(response.response[i].data); if (data[0].child in this.receipts) { for (var x = 0; x < data.length; x++) { this.receipts[data[0].child].push(data[x]); } } else { this.receipts[data[0].child] = data; } However, the receipts are not necessarily ion chronological order now, so we need to do a sort at some point...
  6. Assuming both parents independently read the report we might lose the first parents data when we group the data in the app. But we should be able to do something about that... Yes, I think this a really good suggestion, thanks.
  7. @Graham Quince I'm not sure I really follow. Yes, parents can currently write entries to the datastore, but only about themselves and not about their children. If they could write an entry regarding their child, it would still be 'theirs', no? I suppose you would need to implement a sort of "is this parent user the user who created this entry [created_by_uuid] or do they have a relationship to the user for whom it is about [user_uuid]" logic. If that logic isn't in the codebase then I think it should be considered. But if it's not, then I also agree there is no quick fix as it would inappropriate to grant 'global' read/write. We really need to work from lists of students (not lists of parents) with this - i'm struggling to work out how the app and widget can be re-written? I assume if the child has two parents and they both read the report the datastore will not allow for one parent to edit an entry made by the other(?) and there will therefore bu multiple entries relating to a single child. What I think you are suggesting would be very cumbersome - we would have to search through every datastore entry for a particular report looking in the data field for a child's uuid. We would have to check them all, even if we found one because there could be multiple parents. So if we wanted a year group list (say 300 in a year group) and there were 500 entries for that particular report in the datastore. This would involve doing 150,000 checks before rendering the list. Probably should avoid this. If there is a way to return the members of a group with associated parent uuids then we could use an associative array to directly access the related parent views and avoid all that looping/checking. Is this possible?
  8. pconkie

    Pinboard

    4 tips to make a great what??? Python?!
  9. I have the following validdays.js file in a frogcode project var validDays = [ {from:'03/09/2018', until:'26/10/2018'}, {from:'05/11/2018', until:'21/12/2018'}, {from:'07/01/2019', until:'15/02/2019'}, {from:'25/02/2019', until:'05/04/2019'}, {from:'23/04/2019', until:'24/05/2019'}, {from:'03/06/2019', until:'23/07/2019'} ] It looks like terms dates, but only because it is test data. It will list valid days that detentions can take place on. It will be used in a couple of different widgets and a couple of apps too. While developing the js file was referenced in the project as other assets are e.g. Com.Frog.Utils.require( '//package/applications/189607D420048EA5819BDFE3CD8C91047FD735DC518F1808/assets/styles/main.css', '//package/applications/189607D420048EA5819BDFE3CD8C91047FD735DC518F1808/validdays.js', '//package/applications/189607D420048EA5819BDFE3CD8C91047FD735DC518F1808/assets/views/thumb.ejs', '//package/applications/189607D420048EA5819BDFE3CD8C91047FD735DC518F1808/assets/views/popover.ejs', '//package/applications/189607D420048EA5819BDFE3CD8C91047FD735DC518F1808/assets/views/main.ejs' ).then(function() { This worked fine until I deployed! I have realised that the require doesn't allow js to be loaded for a published app/widget. I really don't want to put the code into the app/widgets as this will duplicate it and require me to update it in multiple places. Any suggestion please for getting around this?
  10. pconkie

    Slides from Frog19

    Where can I get the slides used by the speaker at Frog19?
  11. Thanks @simon brahan It feels like this is something that would be incredibly useful moving forward, so thank you for adding it to your (no doubt long) list of things to do! @gbligh be aware that the linked document widget won't collect the data required for the app to show you read receipts until we get this sorted.
  12. PS: I gave the test parent account temporary edit and manage permissions to the site and they still couldn't save anything other than their own uuid. Please could we consider this use case and the others like it where, it would be useful for us to have a parent record they have done something for one of their children?
  13. Thanks Graham. I just checked the other widget that works in the same way and it still works?! Wondering now if it's a complex permissions issue and not a bug? For context, the current user has a parent profile (parents have contribute permissions on the page). The user_uuid we are passing is the uuid of one of their children (students do not have any permissions to the page this widget is on) Could it be the case that parents need greater permission in order to save a uuid other than their own? Or perhaps students need at least some permissions? When I log in with an admin account (edit and manage permissions) I can add my "child's' uuid! Would be a real shame if we needed to give parents edit and manage permissions in order for this to work!
  14. There has been a change to the frogcode datastore api that has stopped this widget from working. I hope it is just a bug inadvertently introduced in Frank as it has also broken several other widgets.... Here is an example... Yesterday, if you supplied a user_uuid (as I am doing above in the params section) this is what was saved. Today, it is getting ignored and being replaced with the uuid of the currently logged in user (this is why created_by and user_uuid are the same in the response section). @adamw @Matt @Graham Quince Please help!
  15. I’m trying to get users of a group but need at minimum to return user_uuid, displayname, surname, forename, pupil_number and thumbnail picture. as far as I can tell I have to choose between having pupil_number or thumbnail? Any chance of both?
×
×
  • Create New...