// We need to check to see if any of the institutions have profile completeness to allow
// the select box to work correctly for users with more than one institution
$multiinstitutionprogress=false;
$counting=null;
if(!empty($institutions)){
foreach($institutionsas$key=>$value){
if($result=get_records_select_assoc('institution_config','institution=? and field like \'progressbaritem_%\'',array($key),'field','field, value')){
$multiinstitutionprogress=true;
if($key==$institution){
$counting=$result;
break;
}
}
}
}
else{
$counting=get_records_select_assoc('institution_config','institution=? and field like \'progressbaritem_%\'',array($institution),'field','field, value');
}
// Get artefacts that count towards profile completeness
if($counting=get_records_select_assoc('institution_config','institution=? and field like \'progressbaritem_%\'',array($institution),'field','field, value')){
if($counting){
// Without locked ones (site locked and institution locked)