Jump to content

Student Photo Montage


ADT

Recommended Posts

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!

Link to comment
Share on other sites

7 minutes ago, adamw said:

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

Well i was thinking along the lines of Conkies Seating Planner....  but it just auto populates a set grid for a year group!!  @pconkie

 

Or Quincys Eportfolio user details widget @Graham Quince

Link to comment
Share on other sites

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
Link to comment
Share on other sites

I just happened to have some similar code for working out the whole school attendance rate by going through the attendance of every mis linked student

getAllStudents: function() {
  this.showLoader();
  Frog.Model.api('users.getSummary', {
    mis: "mis",
    profile: "profile-student",
    sortBy: "surname",
    direction: "asc",
    group_types: "registration|year"
  }).done(function(response) {
    for (var x = 0; x < response.data.length; x++) {
      var student = response.data[x];
      if (student.details.thumbnail == null) {
        console.log(student.displayname)
      }
    }
    this.hideLoader();
  }.bind(this)).fail(function(e) {
    var error = JSON.parse(e.responseText);
    var error_msg = error.response.message + "<BR/>Failed to get user data"
    this.hideLoader();
    this.modal("There has been an error", error_msg, "modal", null, false);
  }.bind(this)); 
}

 

Edited by pconkie
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

3 hours ago, pconkie said:

@ADT As for your second request......why????

First of all I havent got an idea of how to use your code???? To do what I want!!   

And second of all....  why not? ?

Link to comment
Share on other sites

@Graham Quince doesn't your Form checker widget do something like this... checks and group and checks them against submitted forms and tells you who has and who hasn't??

So you could knock me up a thing that check who has and who hasn't got a photo....  dead easy!! ?

Link to comment
Share on other sites

56 minutes ago, ADT said:

@Graham Quince doesn't your Form checker widget do something like this... checks and group and checks them against submitted forms and tells you who has and who hasn't??

So you could knock me up a thing that check who has and who hasn't got a photo....  dead easy!! ?

Graham can't come to the forum right now.   Your message has been recorded.   :)

 

To be honest, I'm not going to be near a PC for the next few weeks to even think about this.  Sorry

Link to comment
Share on other sites

4 minutes ago, Graham Quince said:

Graham can't come to the forum right now.   Your message has been recorded.   :)

 

To be honest, I'm not going to be near a PC for the next few weeks to even think about this.  Sorry

You ring me up out of the blue....  sounded as though you were at a bit of a loose end.....  give you a job and you claim to be all busy!!!  Shocking!! ?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...