Index: lams_central/web/includes/javascript/portrait.js =================================================================== diff -u -r1957fd76826f5186dce77b204acfbbc73afbf22b -refa51a5d0464d96fada4e5a70f1fb86c2d726717 --- lams_central/web/includes/javascript/portrait.js (.../portrait.js) (revision 1957fd76826f5186dce77b204acfbbc73afbf22b) +++ lams_central/web/includes/javascript/portrait.js (.../portrait.js) (revision efa51a5d0464d96fada4e5a70f1fb86c2d726717) @@ -35,6 +35,45 @@ } } +// Define a DIV element that is the learner's portrait. Call in the ajaxProcessing (tablesorter) or +// in a formatter function (jqgrid). Is the direct eqivalent of the Portrait tag. Use this method if you need to return +// the HTML which defines a portrait. Use addPortrait if you need to add a portrait to an existing DIV. +function definePortrait( portraitId, userId, size, round, LAMS_URL, portraitLocationClasses ) { + var isRound = round == null ? true : round; + if ( portraitId && portraitId > 0) { + var retValue = '
'; + return retValue; + } else { + var retValue = '
'; + return retValue; + } +} + +// define a small header with the portrait and two lines of text next to portrait +function definePortraitMiniHeader(portraitId, userId, LAMS_URL, line1, line2, portraitOnRight, otherClasses) { + var html = ''; + html += '
' + line2 + ''; + html += ''; + return html; +} + // Get the colour that would be used for the generic portrait. Useful when you need a consistent colour for a user. function getPortraitColourClass(userId) { return PORTRAIT_VERSION_SUFFIX + userId % NUM_COLORS;