Subversion Repositories bacoAlunos

Compare Revisions

Ignore whitespace Rev 1903 → Rev 1904

/branches/grupo3/impl/conf/WEB-INF/struts/struts-json-ws.xml
53,7 → 53,7
<action path="/secure/ws-coordinators-list" forward="/user/jsonModel.do?dispatch=executeService&amp;serviceJson=wsListCoordinators"/>
 
<!--SERVICOS ABERTOS POR ENQUANTO-->
<action path="/ws-units-report-list" forward="/json/coursesServices.do?dispatch=executeService&amp;serviceJson=getCourseUnitsEvaluations"/>
<action path="/ws-units-report-list" forward="/jso<n/coursesServices.do?dispatch=executeService&amp;serviceJson=getCourseUnitsEvaluations"/>
<action path="/ws-course-pedagogic-results-list" forward="/json/coursesServices.do?dispatch=executeService&amp;serviceJson=findPedagogicReport4Period"/>
<action path="/ws-units-dtp-stats" forward="/json/coursesServices.do?dispatch=executeService&amp;serviceJson=getCourseUnitDtpStats"/>
<action path="/ws-course-unit-plan-year" forward="/json/coursesServices.do?dispatch=executeService&amp;serviceJson=loadPlanYearForCourseUnitCode"/>
/branches/grupo3/impl/conf/berserk/sd.xml
4046,4 → 4046,20
</service>
 
 
<!-- AA 7/12/2017 -->
<service>
<name>CourseReportSave</name>
<implementationClass>pt.estgp.estgweb.services.courses.CourseReportServices</implementationClass>
<description>
@reportCourseDocument documento course report em json
</description>
<isTransactional>true</isTransactional>
<defaultMethod>save</defaultMethod>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
</filterChains>
</service>
 
 
</serviceDefinitions>
/branches/grupo3/impl/src/java/pt/estgp/estgweb/services/courses/CourseReportServices.java
449,10 → 449,22
}
 
 
/* AA 7/12/2017 */
 
public String save(String reportDocumentJson,UserSession session) throws IOException {
 
CourseReportDocument reportDocument = CourseReportDocument.fromJson(reportDocumentJson);
 
DaoFactory.getCourseDaoImpl().findCourseByCode(reportDocument.getCourseCode());
 
 
 
return reportDocument.toJson();
}
 
 
 
 
/****************************************************************************/
/*
 
/branches/grupo3/impl/src/java/pt/estgp/estgweb/web/controllers/courses/CoursesController.java
696,8 → 696,4
return tJson;
}
 
 
 
 
 
}
/branches/grupo3/impl/src/java/pt/estgp/estgweb/web/controllers/courses/CoursesServicesController.java
43,4 → 43,21
}
 
 
/* AA 7/12/2017 */
 
public JSONObject saveReport(ActionForm form,HttpServletRequest request, HttpServletResponse response) throws Throwable {
 
String courseReportDocument = request.getParameter("courseReportDocument");
 
 
IServiceManager sm = ServiceManager.getInstance();
String json = (String) sm.execute(RequestUtils.getRequester(request, response),
"CourseReportSave",
new Object[]{courseReportDocument});
return new JSONObject(json);
}
 
 
 
 
}
/branches/grupo3/impl/src/web/user/courses/courseReportEdit.jsp
314,9 → 314,27
}
}
 
/* Guardar courseReport 7/12/2017 */
$scope.save = function()
{
widgetCallWithActionParameters(
"<%=request.getContextPath()%>/user/json/repository.do",
"saveReport",
{
"report" : BacoJS.stringifyOrdered($scope.report)
},
"#courseReportApp",
function(json)
{
alert(BacoJS.stringifyOrdered(json));
},
function(){}
);
}
 
 
 
 
});
</script>
 
337,6 → 355,7
 
</div><!--App-->
</div> <!--form-->
<button class="md-raised md-button md-ink-ripple" type="button" ng-transclude="" ng-click="save()"><span class="ng-scope">Save</span></button>
 
</div><!--Panel Body-->