if (registration.getDegreeType() != DegreeType.DEGREE) {
if (registration.getDegreeType() != DegreeType.DEGREE && registration.getDegreeType() != DegreeType.BOLONHA_DEGREE && registration.getDegreeType() != DegreeType.BOLONHA_INTEGRATED_MASTER_DEGREE) {
    public ActionForward prepareCourses(ActionMapping actionMapping, ActionForm actionForm,	    HttpServletRequest request, HttpServletResponse response) throws Exception {	IUserView userView = SessionUtils.getUserView(request);	final Registration registration = userView.getPerson().getStudentsSet().iterator().next();	if (registration == null) {	    throw new InvalidSessionActionException();	}	if (registration.getDegreeType() != DegreeType.DEGREE) {	    request.setAttribute(InquiriesUtil.INQUIRY_MESSAGE_KEY,		    "message.inquiries.not.open.for.non.degrees");	    return actionMapping.findForward("inquiryIntroduction");	}	// Obtaining the current execution period	InfoExecutionPeriod currentExecutionPeriod = (InfoExecutionPeriod) ServiceUtils.executeService(		userView, "ReadCurrentExecutionPeriod", null);	final Date inquiryResponseBegin = currentExecutionPeriod.getInquiryResponseBegin();	final Date inquiryResponseEnd = currentExecutionPeriod.getInquiryResponseEnd();	if (inquiryResponseBegin == null || inquiryResponseEnd == null) {	    request.setAttribute(InquiriesUtil.INQUIRY_MESSAGE_KEY,		    "message.inquiries.period.not.defined");	    return actionMapping.findForward("inquiryIntroduction");	}	if (!insidePeriod(inquiryResponseBegin, inquiryResponseEnd)) {	    request.setAttribute(InquiriesUtil.INQUIRY_MESSAGE_KEY,		    "message.inquiries.not.inside.period");	    return actionMapping.findForward("inquiryIntroduction");	}	// THIS IS ONLY READING THE ENROLLED COURSES, AND NOT ALL THE ATTENDING        // ONES	Object[] argsStudentIdExecutionPeriodId = { registration.getIdInternal(),		currentExecutionPeriod.getIdInternal(), Boolean.TRUE, Boolean.TRUE };	List<InfoAttendsWithProfessorshipTeachersAndNonAffiliatedTeachers> studentAttends = (List<InfoAttendsWithProfessorshipTeachersAndNonAffiliatedTeachers>) ServiceUtils		.executeService(userView, "student.ReadAttendsByStudentIdAndExecutionPeriodId",			argsStudentIdExecutionPeriodId);	// Order by execution course name	Collections.sort(studentAttends, new BeanComparator("disciplinaExecucao.nome"));	// Removing attends with no specified class types	Object[] argsStudent = { registration };	List<InfoInquiriesRegistry> studentInquiriesResgistries = (List<InfoInquiriesRegistry>) ServiceUtils		.executeService(userView, "inquiries.ReadInquiriesRegistriesByStudent", argsStudent);	List<InfoFrequenta> evaluatedAttends = new ArrayList<InfoFrequenta>();	// removing the attending courses which inquiries were already answered	for (InfoInquiriesRegistry iir : studentInquiriesResgistries) {	    for (InfoFrequenta iattends : studentAttends) {		if (iir.getExecutionCourse().equals(iattends.getDisciplinaExecucao())			&& iir.getExecutionPeriod().equals(currentExecutionPeriod)) {		    evaluatedAttends.add(iattends);		}	    }	}	studentAttends.removeAll(evaluatedAttends);	request.setAttribute(InquiriesUtil.STUDENT_ATTENDS, studentAttends);	request.setAttribute(InquiriesUtil.EVALUATED_STUDENT_ATTENDS, evaluatedAttends);	return actionMapping.findForward("inquiryIntroduction");    }