Skip to content

Commit

Permalink
Merge pull request #1143 from sergiofbsilva/ACDM-1251
Browse files Browse the repository at this point in the history
Use correct credits value for partial time checks ACDM-1251 #resolve
  • Loading branch information
Luis-Cruz committed Apr 4, 2017
2 parents ecf7587 + 5f9c188 commit ab07cb6
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 23 deletions.
Expand Up @@ -62,10 +62,10 @@ private void checkEctsCredits(final Registration registration, final ExecutionYe

}

if (enroledEctsCredits > MaximumNumberOfCreditsForEnrolmentPeriod.MAXIMUM_NUMBER_OF_CREDITS_PARTIAL_TIME) {
if (enroledEctsCredits > MaximumNumberOfCreditsForEnrolmentPeriod.MAXIMUM_NUMBER_OF_CREDITS) {
throw new DomainException("error.RegistrationRegime.semester.has.more.ects.than.maximum.allowed",
String.valueOf(enroledEctsCredits), executionYear.getQualifiedName(),
String.valueOf(MaximumNumberOfCreditsForEnrolmentPeriod.MAXIMUM_NUMBER_OF_CREDITS_PARTIAL_TIME));
String.valueOf(MaximumNumberOfCreditsForEnrolmentPeriod.MAXIMUM_NUMBER_OF_CREDITS));
}
}

Expand Down
Expand Up @@ -85,10 +85,10 @@ private void checkEctsCredits(final Registration registration, final ExecutionYe
enroledEctsCredits += studentCurricularPlan.getAccumulatedEctsCredits(semester);
}

if (enroledEctsCredits > MaximumNumberOfCreditsForEnrolmentPeriod.MAXIMUM_NUMBER_OF_CREDITS_PARTIAL_TIME) {
if (enroledEctsCredits > MaximumNumberOfCreditsForEnrolmentPeriod.MAXIMUM_NUMBER_OF_CREDITS) {
throw new DomainException("error.RegistrationRegime.semester.has.more.ects.than.maximum.allowed",
String.valueOf(enroledEctsCredits), executionYear.getQualifiedName(),
String.valueOf(MaximumNumberOfCreditsForEnrolmentPeriod.MAXIMUM_NUMBER_OF_CREDITS_PARTIAL_TIME));
String.valueOf(MaximumNumberOfCreditsForEnrolmentPeriod.MAXIMUM_NUMBER_OF_CREDITS));
}
}

Expand Down
Expand Up @@ -247,7 +247,7 @@ public ActionForward processNewAcademicServiceRequest(ActionMapping mapping, Act
addActionMessage(request, "academic.service.request.processed.with.success");
} catch (DomainException ex) {
addActionMessage(request, ex.getKey(), ex.getArgs());
request.setAttribute("failingCondition", ex.getKey());
request.setAttribute("failingCondition", ex.getLocalizedMessage());
return mapping.findForward("prepareRejectAcademicServiceRequest");
}

Expand Down
Expand Up @@ -302,7 +302,7 @@
<slot name="summaryTime" layout="hour-minute" key="label.hour" />
<slot name="summaryRoom" layout="menu-select" key="label.room" >
<property name="providerClass" value="org.fenixedu.academic.ui.renderers.providers.executionCourse.RoomsForEducationProvider" />
<property name="format" value="${fullName}" />
<property name="format" value="${presentationName}" />
</slot>
<slot name="title" key="label.lessonPlanning.title" validator="pt.ist.fenixWebFramework.rendererExtensions.validators.RequiredLocalizedStringValidator">
<property name="size" value="50"/>
Expand Down
Expand Up @@ -64,10 +64,7 @@
<p class="mtop025">
<logic:present name="failingCondition" scope="request">
<bean:define id="failingCondition" name="failingCondition" scope="request"/>
<bean:define id="justification">
<bean:message key="<%=failingCondition.toString()%>" bundle="ACADEMIC_OFFICE_RESOURCES"/>
</bean:define>
<html:textarea bundle="HTMLALT_RESOURCES" altKey="textarea.justification" property="justification" value="<%=justification%>" cols="65" rows="5"/>
<html:textarea bundle="HTMLALT_RESOURCES" altKey="textarea.justification" property="justification" value="<%=failingCondition.toString()%>" cols="65" rows="5"/>
</logic:present>
<logic:notPresent name="failingCondition" scope="request">
<html:textarea bundle="HTMLALT_RESOURCES" altKey="textarea.justification" property="justification" cols="65" rows="5"/>
Expand Down
Expand Up @@ -64,10 +64,7 @@
<p class="mtop025">
<logic:present name="failingCondition" scope="request">
<bean:define id="failingCondition" name="failingCondition" scope="request"/>
<bean:define id="justification">
<bean:message key="<%=failingCondition.toString()%>" bundle="ACADEMIC_OFFICE_RESOURCES"/>
</bean:define>
<html:textarea bundle="HTMLALT_RESOURCES" altKey="textarea.justification" property="justification" value="<%=justification%>" cols="65" rows="5"/>
<html:textarea bundle="HTMLALT_RESOURCES" altKey="textarea.justification" property="justification" value="<%=failingCondition.toString()%>" cols="65" rows="5"/>
</logic:present>
<logic:notPresent name="failingCondition" scope="request">
<html:textarea bundle="HTMLALT_RESOURCES" altKey="textarea.justification" property="justification" cols="65" rows="5"/>
Expand Down Expand Up @@ -95,4 +92,4 @@ function checkJustification(){
return false;
}
}
</script>
</script>
Expand Up @@ -61,10 +61,7 @@
<p class="mtop025">
<logic:present name="failingCondition" scope="request">
<bean:define id="failingCondition" name="failingCondition" scope="request"/>
<bean:define id="justification">
<bean:message key="<%=failingCondition.toString()%>" bundle="STUDENT_RESOURCES"/>
</bean:define>
<html:textarea bundle="HTMLALT_RESOURCES" altKey="textarea.justification" property="justification" value="<%=justification%>" cols="65" rows="5"/>
<html:textarea bundle="HTMLALT_RESOURCES" altKey="textarea.justification" property="justification" value="<%=failingCondition.toString()%>" cols="65" rows="5"/>
</logic:present>
<logic:notPresent name="failingCondition" scope="request">
<html:textarea bundle="HTMLALT_RESOURCES" altKey="textarea.justification" property="justification" cols="65" rows="5"/>
Expand Down
Expand Up @@ -61,10 +61,7 @@
<p class="mtop025">
<logic:present name="failingCondition" scope="request">
<bean:define id="failingCondition" name="failingCondition" scope="request"/>
<bean:define id="justification">
<bean:message key="<%=failingCondition.toString()%>" bundle="STUDENT_RESOURCES"/>
</bean:define>
<html:textarea bundle="HTMLALT_RESOURCES" altKey="textarea.justification" property="justification" value="<%=justification%>" cols="65" rows="5"/>
<html:textarea bundle="HTMLALT_RESOURCES" altKey="textarea.justification" property="justification" value="<%=failingCondition.toString()%>" cols="65" rows="5"/>
</logic:present>
<logic:notPresent name="failingCondition" scope="request">
<html:textarea bundle="HTMLALT_RESOURCES" altKey="textarea.justification" property="justification" cols="65" rows="5"/>
Expand Down

0 comments on commit ab07cb6

Please sign in to comment.