Jump to content

adamw

Former Frog Staff
  • Posts

    515
  • Joined

  • Last visited

Posts posted by adamw

  1. There's probably a better way, but a quick look at the API's show that a call to 

    users.getSummary

    with a param of

    {
    	profile: 'profile-student'
    }

    Should get you something back for every student - you can then look in the details section that comes back with every user:

    "details": {
      	"forename": "Fname 3",
      	"surname": "Sname 3",
      	"thumbnail": null,
      	"gender": null,
    	"mis_linked": false
    }

    I don't have time to knock together a widget at the moment to do this - and like I say, there may be a more efficient way using different api's - perhaps the ones to find users extended data. I'll keep an eye out for a better way! In the meantime, I know @Graham Quince is always chomping at the bit for new widgets to make ?

    • Thanks 1
  2. 17 hours ago, ADT said:

    Ok so I’m putting this out there!!  I was wondering if there was a quick way to find out which kids didn’t have photos!!

    So i was wondering if there was a way to create a photo montage of all the kids in a year group...  with the names under neath??  

    Go..........

    @pconkie @Graham Quince @adamw

    I will have a look at the API's and see if there's an easy way. Not something I've considered before!

  3. 4 hours ago, Pete Foulkes said:

    Hi all

    Does anyone else think it would be more beneficial if the message when a parent requests a password reset via the 'forgotten password' button could include a little more information?

    image.png.000e8c61fdb80c133bb267d0c59a28dd.png

    For example, if they enter their username, could it state the matching email address on the system so that if it's not their current email, they know to contact the school to get their email updated, rather than assuming the password reset link doesn't work?

    And if they enter their email address, it can tell them if their email address was found rather than saying "if it was found"?

    Thanks,

    Pete

    I wasn't directly involved in this, but I imagine this is a security precaution (and quite a common one too). By showing the email address when a user puts their username in, you're potentially exposing that information to a malicious user. For example, if all your usernames follow a certain format, then someone could use that to get the email addresses of all your users, simply by guessing usernames. The same could be said for the other way around - if you know someone's email address then you can get the system to tell you their username.

    By not revealing if the username / email was correct you are making it more difficult for a malicious user to gain unauthorized access to the platform.

    • Like 1
    • Thanks 1
  4. Impressive stuff!

    We are looking into solutions that will allow us more real-time access into SIMS, but there is nothing concrete yet to report. I mentioned the lack of address information in Frog to our MIS guru, and made them aware that this could be useful for people going forwards. I believe (don't hold me to this) that the reason we don't currently have that information in Frog is mainly down to GDPR - as you are only supposed to hold information on your system that you need - and not keep stuff that you don't use.

    Glad to see you've got a nice solution working for you :)

     

  5. Hey folks! 

    Just a quick reminder about posting on the forums as related to GDPR. As you know we all have a responsibility to ensure that personal information is handled correctly. Since this is a public forum, you are reminded that when posting images that may contain such information, to ensure that anything personal (names. usernames, addresses etc....) is blanked out.

    Also take care when posting code snippets etc...

    If we spot anything on the forums that might be a problem we'll remove it and ask you to re-upload a sanitized version. If you need to send more detailed information then it can be done via our support system - that way everything stays nice and private.

    Thanks everyone :)

  6. On 11/08/2019 at 10:04, ADT said:

    @pconkie @Graham Quince Is there a way i can get my test student account to appear in the SEN list???  

    Currently non of my kids show up...  which i assume is something to do with the summer and SIMs being updated...........  and i want to demo it first day back in September!!!
     

    Thanks in advance!!! :D

    You could try importing some new users with the SEN field. Probably with a Value of Y - which might make the test students appear in that list. Worth a try anyway.

     

    sen.PNG

  7. On 02/08/2019 at 21:15, pconkie said:

    Looks like frog have tightened security in html widgets.  The function in the onClick of the button can't be found.  

    Here is another way of doing the same thing....

    
    <button data-name="open-site" class="btn btn-primary">Open</button>
    <script>
      this.element.find("button[data-name=open-site]").click(function(e) {
        FrogOS.openSite({
          site:'/prcadm/d_t_lessons_in_year_8/',
          fullscreen: false,
          resizable: true,
          height: 500,
          width: 500
        });
      });
    </script>

    The site now opens when the button is pressed BUT....

    The bit provided by @adamw to get it to open not fullscreen doesn't seem to work...

    I'm on annual leave this week, and don't have access to the code, so I can't check it for you. I will have to refer you to @Graham Quince for now!

  8. 1 minute ago, pconkie said:

    And now you need a big bonus too - next time I speak to Gareth i'll mention it!

    It's working!

    Would still be interested to know how you would adapt this to save the docs elsewhere...at some point....

    Cheers.

    Next time I have a performance review, I'll be sure to point out this thread ??

    The other things are going to take more thinking!

    • Thanks 1
  9. 8 minutes ago, pconkie said:

    obj.modal.find("[data-name=file-upload]").click(function() {

    Right, honest answer - at the moment, I don't know! It could be that the upload button press is performing some default html form-like action, which may be trying to submit the form. I'd need to see the code for the upload button. However, you could try changing the above bit of code to this:

    obj.modal.find("[data-name=file-upload]").click(function(el) {
    	el.preventDefault();

    Disclaimer - this is a wild-stab-in-the-dark-with-no-research-whatsoever-type-guess.

     

  10. 38 minutes ago, pconkie said:

    I’ve still not found a way around this. @adamw any luck?

    Try this perhaps?

    obj.modal.find("[data-name=file-upload]").click(function() {
      $('.os_core:first').trigger('os.app.upload', {
        "data": {
          "upload_type": "asset",
          "site_uuid": "62D4442D2002520CF7345F0960EDDD095847DB4C186723A6",
          "focusApp": $('.modal'),
          "callback": function(result) {
            if (result.files && result.files.length) {
              $.each(result.files, function(i, file) {
                console.log(file.attachment.name);
              });
            }
          },
          launchAboveModal: true
        }
      });

    notice the: 

    launchAboveModal: true

    param. It looks like we use that param in a few places, so I'm hoping it does what you need it to do.

  11. 2 hours ago, pconkie said:

    @adamw any ideas?

    Hmmm, is this a custom modal, or using our built in modal? If it's our built-in one then it should work. If not, you could convert it to using our bsmodal stuff maybe? I don't have the exact syntax on hand at the moment, but when I get a chance I'll drop something here.

  12. On 21/07/2019 at 09:47, pconkie said:

    Great @Graham Quince 

    What other frogui modules are there and is there any documentation? For example is there a user selector or a subject selector? Maybe a date picker?

    There are tonnes of them. Pretty much everything in Frog is either a component or a module (at least, we always try to do that). Unfortunately they were for internal use, so we don't have any documentation as such. All of the things you mentioned have either a component or a module associated with them (for easy reuse and consistency throughout the platform).

    However, we shall need to call upon the front-end guru's of Frog in order to unlock this mystical power.

    To get started though, I can see that we have:

    frogui_components_date_time_picker //date time picker

    frogui_components_curriculumbrowser_subject //subject picker (I think)

    frogui._modules_selectusers  //users select

    A quick check shows we have around ~60 modules and 100 components - so if you're trying to do anything in particular, it might be worth asking if we have a component available for it first (pretty much if you can see some functionality in the front end, there's a good chance we have something already)

    • Like 1
  13. On 10/07/2018 at 22:34, pconkie said:

    This will open a site if you have the data link and the uuid. if you only have uuid you can use an api to get the data link,

    
    FrogOS.openSite({
      site: datalink,
      assignment_uuid: uuid
    });

    You could run this off a button click or otherwise.

    Only problem is the site opens maximised, but i'm guessing there is another parameter so that it doesn't do this?

     

    Right,

    Sorry about the delay in responding, super busy here at the moment (as always!). 

    You could try something like this:

    FrogOS.openSite({
      site: datalink,
      assignment_uuid: uuid,
      fullscreen: false,
      resizable: true,
      height: 500,
      width: 500
    });

    I've not tested this - but the code seems to look like it will accept those params. If not, I'll have to consult one of the front-end experts. Obviously you don't need to pass any params you're not using - for example assignment_uuid

    • Thanks 2
  14. On 29/06/2019 at 09:45, pconkie said:

    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?

    What API request are you making and which parameters are you sending?

  15. On 02/07/2019 at 12:19, ADT said:

    See i said you would say that...... 

    I haven't checked, but I assume pressing that button fires off an api call to clear the poll, in which case a html widget with a bit of javascript could do the trick?

  16. On 04/07/2019 at 15:50, simon brahan said:

    Code review time!

    • Since you're using the child id a lot, it might be helpful to pull it into a variable.
    • If you move the sort line out of the if statement you can remove the duplicate line in the other branch, which means you only have to fix it once if anything changes.
    • Arrays have a concat method that can be used to add the contents of an array to the end of another array. This should be faster than pushing the entries one at a time.
    • The overall logic might be clearer in future if you handle the initialisation of this.receipts before trying to add data.

    Add those together, you get something like the following:

    
    var data = JSON.parse(response.response[i].data);
    var childId = data[0].child;
    
    // If we haven't seen any data for this child, initialise their record here
    if (!(childId in this.receipts)) {
        this.receipts[childId] = [];
    }
    
    // Add the new records to the end of the old ones
    this.receipts[childId] = this.receipts[childId].concat(data);
    
    // Sort the child's records
    this.receipts[childId].sort(function(a, b){return b.datetime-a.datetime});

    At the moment the code will also sort the receipts for a child every time records for that child are found; it shouldn't be too big a deal here since you're only likely to have one or two records per child.

    None of the above is essential, just thought you might like some insight as to how we approach things here. ?

    I should go on holiday more often ? 

    I quickly scanned the thread, so I am kinda up to speed - the issue was that you were trying to save something to the datastore that was using the uuid of a child for one of the parents - and it wouldn't let you, correct? In that case, I will speak to @simon brahan about this, because we do have helpers that allow us to easily check if a parent has permission to see data related to a child (e.g. they need parental responsibility over that child etc).

    I'm pretty sure that the helper also checks the court order flags from your MIS systems as well. It may be worth investigating how easy it would be to alter the FDP endpoint to do this check on a passed user. I suspect it would be trivial.

    Something to think about at least.

    • Like 1
  17. 23 minutes ago, pconkie said:

    The widget is ready and this is what you need in place asap so that it can start to capture the read receipts..  

    @adamw I assume there won't be any issues with parents being able to save/update to the data-store? 

    The app needs a group picker to be added - you have to type in a group uuid at the moment! Surely this is a re-usable component? Any tips from frog how to drop one in without reinventing the wheel?

    Parents will need contribute rights to whatever site you put the widget on, in order to create datastore entries.

    Honestly, I think we could do with having a good look at the datastore @Matt since its use now outstrips what it was originally designed to do. It seems to be a popular feature, so it may be worth looking into improving it. 

    • Like 1
  18. On 23/06/2019 at 09:44, nward said:

    Good Morning

     

    Is there a way we can clear a photo stream from a site to reuse it? Our Year group pages are just recycled every year and the year leaders were asking if they could have new photo streams for the new term. 

    Many thanks 

    Natalie 

     

    You could try opening the site and at the top: Site -> Site assets, this should load a window with all the site assets. This may have the photostream images in them and you might be able to delete them from here? Might be worth a try.

  19. 14 minutes ago, Graham Quince said:

    I tried testing this and it logs site visits.  If you have two on a site, but different pages, both counts go up.  I tried rewriting it but got nowhere.

    I'll be passing the site_uuid to the data-store, all you'd need to do is pass the page_uuid instead. We can have a play sometime and see if we can get it working.

    • Thanks 2
  20.  

    36 minutes ago, pconkie said:

    Really like this widget - we have it on a number of pages.  But.....

    Does this widget record page visits or does it actually record site visits? Not sure which is the designed behaviour, but I think it actually records site visits.  If i'm correct, would be even more powerful if it recorded page visits.

    I honestly can't remember. If I get a moment I will look at the code, but I think that it records page visits. More specifically, I think it uses the widget id as the source. So if you put two on a page, they might show different data.... 

    I'll have to look into it. You could test this by putting this widget on each page of a test site and visiting it a few times to see what data it shows.

  21. On 29/05/2019 at 11:08, pconkie said:

    Why does the FrogCode App take so long to load?  7-12 minutes?!!

    This has been the case consistently over the last few months regardless of:

    • which computer I use
    • whether I am at school or home (different networks / internet providers)
    • time of day

    At least you can fast forward to the end of the video!

     

     

     

     

    Just FYI - I think we've found the problem causing the slowdown and so hope to have this fixed and available to you as soon as we can.

    • Like 1
    • Thanks 1
×
×
  • Create New...