=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java 2012-10-14 17:22:01 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java 2012-11-06 14:03:24 +0000 @@ -151,6 +151,25 @@ { return firstName + " " + surname; } + + /** + * Checks whether the profile has been filled, which is defined as three + * not-null properties out of all optional properties. + */ + public boolean isProfileFilled() + { + Object[] props = { jobTitle, introduction, gender, birthday, + nationality, employer, education, interests, languages }; + + int count = 0; + + for ( Object prop : props ) + { + count = prop != null ? ( count + 1 ) : count; + } + + return count > 3; + } /** * Returns the first of the organisation units associated with the user. === modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm 2012-11-06 13:08:45 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm 2012-11-06 14:03:24 +0000 @@ -4,7 +4,9 @@ var i18n_viewing = '$encoder.jsEscape( $i18n.getString( "viewing" ), "'")'; -