Jump to content
Graham Quince

ePortfolio photos

Recommended Posts

I've had a few minutes to mess around with code and managed to get the recipient's user details to display on their ePortfolio site:

<div class="siterecipient"></div>


var siteName = this.element.closest('.sites-site-content').data('site-name'),
    siteNameArray = siteName.split(' - '),
    recipientUsername = siteNameArray[2],
    siterecipient = this.element.find(".siterecipient");

Frog.Model.api('users.getSummary', {
    search: recipientUsername,
    direction: 'asc',
    group_types: 'registration|year',
    sortBy: 'surname'
}).done(function(listResponse) {
    var userdeets = listResponse.data[0].details;

        'Name: '+userdeets.forename+" "+            
        'Sex: '+userdeets.gender+"<br>"+
        '<img src="'+userdeets.thumbnail+'">'                          


Loads more to investigate on this and the username needs to be part of the site's title.  In this iteration, it actually has to be the last part of the title.  I'll do more work around this and try to get time to turn it into a FrogCode widget, but thought I'd share in the meantime.

Remember - the service desk can work with you to get student photos uploaded.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...