// Path: src/java/se/idega/idegaweb/commune/school/presentation/CentralPlacementEditorConstants.java
// public class CentralPlacementEditorConstants {
// 
// 	public static final String KP = "central_placement_editor.";
// 	public static final String FORM_NAME = CommuneCareConstants.CENTRAL_PLACEMENT_EDITOR_FORM_NAME;
// 	public static final String KEY_PLACEMENT_PARAGRAPH_LABEL = KP + "placement_paragraph_label";
// 	public static final String KEY_SCHOOL_YEAR = KP + "school_year";
// 	public static final String KEY_SCHOOL_GROUP = KP + "school_group";
// 	public static final String KEY_STUDY_PATH = KP + "study_path";
// 	public static final String KEY_LANGUAGE = KP + "language";
// 	public static final String KEY_NATIVE_LANGUAGE = KP + "native_language";
// 
// }


import java.rmi.RemoteException;
import java.sql.Timestamp;
import java.util.Collection;
import java.util.Iterator;
import javax.ejb.FinderException;
import javax.transaction.SystemException;
import javax.transaction.UserTransaction;
import se.idega.idegaweb.commune.business.CommuneUserBusiness;
import se.idega.idegaweb.commune.care.business.CareBusiness;
import se.idega.idegaweb.commune.care.resource.data.ResourceClassMember;
import se.idega.idegaweb.commune.care.resource.data.ResourceClassMemberHome;
import se.idega.idegaweb.commune.school.presentation.CentralPlacementEditorConstants;
import com.idega.block.school.business.SchoolBusiness;
import com.idega.block.school.data.SchoolCategory;
import com.idega.block.school.data.SchoolCategoryHome;
import com.idega.block.school.data.SchoolClassMember;
import com.idega.block.school.data.SchoolClassMemberHome;
import com.idega.block.school.data.SchoolSeason;
import com.idega.block.school.data.SchoolStudyPath;
import com.idega.block.school.data.SchoolStudyPathHome;
import com.idega.block.school.data.SchoolYear;
import com.idega.business.IBOLookup;
import com.idega.business.IBOServiceBean;
import com.idega.data.IDOLookup;
import com.idega.idegaweb.IWResourceBundle;
import com.idega.presentation.IWContext;
import com.idega.user.business.UserBusiness;
import com.idega.user.data.User;
import com.idega.util.IWTimestamp;
			SchoolYear theYear = placement.getSchoolYear();
			if (theYear != null) {
				buf.append(", " + iwrb.getLocalizedString(CentralPlacementEditorConstants.KEY_SCHOOL_YEAR, "school year") + " "
								   												+ theYear.getName());
			}						
		} catch (Exception e) {}
		try {
			// add school group
			buf.append(", " + iwrb.getLocalizedString(CentralPlacementEditorConstants.KEY_SCHOOL_GROUP, "group") + " "
								   + placement.getSchoolClass().getSchoolClassName());						
		} catch (Exception e) {}
		try {
			// add study path
			if (placement.getStudyPathId() != -1) {
				SchoolStudyPathHome  home = (SchoolStudyPathHome) IDOLookup.getHome(SchoolStudyPath.class);
				SchoolStudyPath sp = home.findByPrimaryKey(new Integer(placement.getStudyPathId()));
				buf.append(", " + iwrb.getLocalizedString(CentralPlacementEditorConstants.KEY_STUDY_PATH, "Study path") + " "+ sp.getCode());
			}
		} catch (Exception e) {}
		
		try {
			// add language
			if (placement.getLanguage() != null && !("-1").equals(placement.getLanguage())) {
				buf.append(", " + iwrb.getLocalizedString(CentralPlacementEditorConstants.KEY_LANGUAGE, "Language") + " "+ iwrb.getLocalizedString(placement.getLanguage(), ""));
			}
		} catch (Exception e) {}

		try {
			// add native language
			if (user.getNativeLanguage() != null) {
// Path: src/java/se/idega/idegaweb/commune/school/presentation/CentralPlacementEditorConstants.java
// public class CentralPlacementEditorConstants {
// 
// 	public static final String KP = "central_placement_editor.";
// 	public static final String FORM_NAME = CommuneCareConstants.CENTRAL_PLACEMENT_EDITOR_FORM_NAME;
// 	public static final String KEY_PLACEMENT_PARAGRAPH_LABEL = KP + "placement_paragraph_label";
// 	public static final String KEY_SCHOOL_YEAR = KP + "school_year";
// 	public static final String KEY_SCHOOL_GROUP = KP + "school_group";
// 	public static final String KEY_STUDY_PATH = KP + "study_path";
// 	public static final String KEY_LANGUAGE = KP + "language";
// 	public static final String KEY_NATIVE_LANGUAGE = KP + "native_language";
// 
// }


// Path: src/java/se/idega/idegaweb/commune/school/business/CentralPlacementBusinessBean.java
import java.rmi.RemoteException;
import java.sql.Timestamp;
import java.util.Collection;
import java.util.Iterator;
import javax.ejb.FinderException;
import javax.transaction.SystemException;
import javax.transaction.UserTransaction;
import se.idega.idegaweb.commune.business.CommuneUserBusiness;
import se.idega.idegaweb.commune.care.business.CareBusiness;
import se.idega.idegaweb.commune.care.resource.data.ResourceClassMember;
import se.idega.idegaweb.commune.care.resource.data.ResourceClassMemberHome;
import se.idega.idegaweb.commune.school.presentation.CentralPlacementEditorConstants;
import com.idega.block.school.business.SchoolBusiness;
import com.idega.block.school.data.SchoolCategory;
import com.idega.block.school.data.SchoolCategoryHome;
import com.idega.block.school.data.SchoolClassMember;
import com.idega.block.school.data.SchoolClassMemberHome;
import com.idega.block.school.data.SchoolSeason;
import com.idega.block.school.data.SchoolStudyPath;
import com.idega.block.school.data.SchoolStudyPathHome;
import com.idega.block.school.data.SchoolYear;
import com.idega.business.IBOLookup;
import com.idega.business.IBOServiceBean;
import com.idega.data.IDOLookup;
import com.idega.idegaweb.IWResourceBundle;
import com.idega.presentation.IWContext;
import com.idega.user.business.UserBusiness;
import com.idega.user.data.User;
import com.idega.util.IWTimestamp;

			SchoolYear theYear = placement.getSchoolYear();
			if (theYear != null) {
				buf.append(", " + iwrb.getLocalizedString(CentralPlacementEditorConstants.KEY_SCHOOL_YEAR, "school year") + " "
								   												+ theYear.getName());
			}						
		} catch (Exception e) {}
		try {
			// add school group
			buf.append(", " + iwrb.getLocalizedString(CentralPlacementEditorConstants.KEY_SCHOOL_GROUP, "group") + " "
								   + placement.getSchoolClass().getSchoolClassName());						
		} catch (Exception e) {}
		try {
			// add study path
			if (placement.getStudyPathId() != -1) {
				SchoolStudyPathHome  home = (SchoolStudyPathHome) IDOLookup.getHome(SchoolStudyPath.class);
				SchoolStudyPath sp = home.findByPrimaryKey(new Integer(placement.getStudyPathId()));
				buf.append(", " + iwrb.getLocalizedString(CentralPlacementEditorConstants.KEY_STUDY_PATH, "Study path") + " "+ sp.getCode());
			}
		} catch (Exception e) {}
		
		try {
			// add language
			if (placement.getLanguage() != null && !("-1").equals(placement.getLanguage())) {
				buf.append(", " + iwrb.getLocalizedString(CentralPlacementEditorConstants.KEY_LANGUAGE, "Language") + " "+ iwrb.getLocalizedString(placement.getLanguage(), ""));
			}
		} catch (Exception e) {}

		try {
			// add native language
			if (user.getNativeLanguage() != null) {
				buf.append(", " + iwrb.getLocalizedString(CentralPlacementEditorConstants.KEY_NATIVE_LANGUAGE, "Native language") + " "+ user.getNativeLanguage());