Rev 1929 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1929 | Rev 1930 | ||
---|---|---|---|
Line 19... | Line 19... | ||
19 | /** |
19 | /** |
20 | * Created by jorgemachado on 06/01/17. |
20 | * Created by jorgemachado on 06/01/17. |
21 | */ |
21 | */ |
22 | public class CoursesServicesController extends AbstractWidgetAjaxController |
22 | public class CoursesServicesController extends AbstractWidgetAjaxController |
23 | { |
23 | { |
24 | - | ||
25 | - | ||
26 | /** |
24 | /** |
27 | * See also CoursesServicesWidgetController for WS-API services |
25 | * See also CoursesServicesWidgetController for WS-API services |
28 | */ |
26 | */ |
29 | 27 | ||
30 | /** |
28 | /** |
Line 34... | Line 32... | ||
34 | * @param response |
32 | * @param response |
35 | * @return |
33 | * @return |
36 | * @throws Throwable |
34 | * @throws Throwable |
37 | */ |
35 | */ |
38 | 36 | ||
39 | public JSONObject generateGlobalLearningResultsChartImg(ActionForm form,HttpServletRequest request, HttpServletResponse response) throws 1.5.0/docs/api/java/lang/Throwable.html">Throwable { |
37 | public JSONObject generateGlobalLearningResultsChartImg(ActionForm form, HttpServletRequest request, HttpServletResponse response) throws 1.5.0/docs/api/java/lang/Throwable.html">Throwable { |
40 | - | ||
41 | 1.5.0/docs/api/java/lang/String.html">String courseReportDocument = request.getParameter("courseReportDocument"); |
38 | 1.5.0/docs/api/java/lang/String.html">String courseReportDocument = request.getParameter("courseReportDocument"); |
42 | 39 | ||
43 | - | ||
44 | IServiceManager sm = ServiceManager.getInstance(); |
40 | IServiceManager sm = ServiceManager.getInstance(); |
45 | 1.5.0/docs/api/java/lang/String.html">String json = (1.5.0/docs/api/java/lang/String.html">String) sm.execute(RequestUtils.getRequester(request, response), |
41 | 1.5.0/docs/api/java/lang/String.html">String json = (1.5.0/docs/api/java/lang/String.html">String) sm.execute(RequestUtils.getRequester(request, response), |
46 | "CourseReportGenerateGlobalLearningResultsChartImg", |
42 | "CourseReportGenerateGlobalLearningResultsChartImg", |
47 | new 5+0%2Fdocs%2Fapi+Object">Object[]{courseReportDocument}); |
43 | new 5+0%2Fdocs%2Fapi+Object">Object[]{courseReportDocument}); |
48 | return new JSONObject(json); |
44 | return new JSONObject(json); |
49 | } |
45 | } |
50 | 46 | ||
51 | public JSONObject generateGlobalLearningResultsChartYearImg(ActionForm form,HttpServletRequest request, HttpServletResponse response) throws 1.5.0/docs/api/java/lang/Throwable.html">Throwable { |
47 | public JSONObject generateGlobalLearningResultsChartYearImg(ActionForm form, HttpServletRequest request, HttpServletResponse response) throws 1.5.0/docs/api/java/lang/Throwable.html">Throwable { |
52 | 1.5.0/docs/api/java/lang/String.html">String courseReportDocument = request.getParameter("courseReportDocument"); |
48 | 1.5.0/docs/api/java/lang/String.html">String courseReportDocument = request.getParameter("courseReportDocument"); |
53 | 49 | ||
54 | - | ||
55 | IServiceManager sm = ServiceManager.getInstance(); |
50 | IServiceManager sm = ServiceManager.getInstance(); |
56 | 1.5.0/docs/api/java/lang/String.html">String json = (1.5.0/docs/api/java/lang/String.html">String) sm.execute(RequestUtils.getRequester(request, response), |
51 | 1.5.0/docs/api/java/lang/String.html">String json = (1.5.0/docs/api/java/lang/String.html">String) sm.execute(RequestUtils.getRequester(request, response), |
57 | "CourseReportGenerateGlobalLearningResultsChartYearImg", |
52 | "CourseReportGenerateGlobalLearningResultsChartYearImg", |
58 | new 5+0%2Fdocs%2Fapi+Object">Object[]{courseReportDocument}); |
53 | new 5+0%2Fdocs%2Fapi+Object">Object[]{courseReportDocument}); |
59 | return new JSONObject(json); |
54 | return new JSONObject(json); |
60 | } |
55 | } |
61 | 56 | ||
62 | public JSONObject generateGenerateGlobalLearningResultsChartSem(HttpServletRequest request, HttpServletResponse response) throws 1.5.0/docs/api/java/lang/Throwable.html">Throwable { |
57 | public JSONObject generateGenerateGlobalLearningResultsChartSem(ActionForm form, HttpServletRequest request, HttpServletResponse response) throws 1.5.0/docs/api/java/lang/Throwable.html">Throwable { |
63 | 1.5.0/docs/api/java/lang/String.html">String courseReportDocument = request.getParameter("courseReportDocument"); |
58 | 1.5.0/docs/api/java/lang/String.html">String courseReportDocument = request.getParameter("courseReportDocument"); |
64 | 1.5.0/docs/api/java/lang/String.html">String semesterCode = request.getParameter("semesterCode"); |
59 | 1.5.0/docs/api/java/lang/String.html">String semesterCode = request.getParameter("semesterCode"); |
65 | 60 | ||
66 | - | ||
67 | IServiceManager sm = ServiceManager.getInstance(); |
61 | IServiceManager sm = ServiceManager.getInstance(); |
68 | 1.5.0/docs/api/java/lang/String.html">String json = (1.5.0/docs/api/java/lang/String.html">String) sm.execute(RequestUtils.getRequester(request, response), |
62 | 1.5.0/docs/api/java/lang/String.html">String json = (1.5.0/docs/api/java/lang/String.html">String) sm.execute(RequestUtils.getRequester(request, response), |
69 | "CourseReportGenerateLearningResultsChartSem", |
63 | "CourseReportGenerateLearningResultsChartSem", |
70 | new 5+0%2Fdocs%2Fapi+Object">Object[]{courseReportDocument, semesterCode}); |
64 | new 5+0%2Fdocs%2Fapi+Object">Object[]{courseReportDocument, semesterCode}); |
71 | return new JSONObject(json); |
65 | return new JSONObject(json); |
72 | } |
66 | } |
73 | 67 | ||
74 | public JSONObject saveCourseReportDocument(ActionForm form,HttpServletRequest request, HttpServletResponse response) throws 1.5.0/docs/api/java/lang/Throwable.html">Throwable { |
68 | public JSONObject saveCourseReportDocument(ActionForm form, HttpServletRequest request, HttpServletResponse response) throws 1.5.0/docs/api/java/lang/Throwable.html">Throwable { |
75 | 1.5.0/docs/api/java/lang/String.html">String courseReportDocument = request.getParameter("courseReportDocument"); |
69 | 1.5.0/docs/api/java/lang/String.html">String courseReportDocument = request.getParameter("courseReportDocument"); |
76 | 70 | ||
77 | IServiceManager sm = ServiceManager.getInstance(); |
71 | IServiceManager sm = ServiceManager.getInstance(); |
78 | 1.5.0/docs/api/java/lang/String.html">String json = (1.5.0/docs/api/java/lang/String.html">String) sm.execute(RequestUtils.getRequester(request, response), |
72 | 1.5.0/docs/api/java/lang/String.html">String json = (1.5.0/docs/api/java/lang/String.html">String) sm.execute(RequestUtils.getRequester(request, response), |
79 | "SaveCourseReportDocument", |
73 | "SaveCourseReportDocument", |
80 | new 5+0%2Fdocs%2Fapi+Object">Object[]{courseReportDocument}); |
74 | new 5+0%2Fdocs%2Fapi+Object">Object[]{courseReportDocument}); |
81 | return new JSONObject(json); |
75 | return new JSONObject(json); |
82 | } |
76 | } |
83 | 77 | ||
84 | public ActionForward startEdit(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response) throws 1.5.0/docs/api/java/lang/Throwable.html">Throwable { |
78 | public ActionForward startEdit(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws 1.5.0/docs/api/java/lang/Throwable.html">Throwable { |
85 | 1.5.0/docs/api/java/lang/String.html">String courseCode = request.getParameter("courseCode"); |
79 | 1.5.0/docs/api/java/lang/String.html">String courseCode = request.getParameter("courseCode"); |
86 | 1.5.0/docs/api/java/lang/String.html">String year = request.getParameter("year"); |
80 | 1.5.0/docs/api/java/lang/String.html">String year = request.getParameter("year"); |
87 | 81 | ||
88 | IServiceManager sm = ServiceManager.getInstance(); |
82 | IServiceManager sm = ServiceManager.getInstance(); |
89 | 1.5.0/docs/api/java/lang/String.html">String courseReportJson = (1.5.0/docs/api/java/lang/String.html">String) sm.execute(RequestUtils.getRequester(request, response), |
83 | 1.5.0/docs/api/java/lang/String.html">String courseReportJson = (1.5.0/docs/api/java/lang/String.html">String) sm.execute(RequestUtils.getRequester(request, response), |
90 | "LoadCourseReportDocument", |
84 | "LoadCourseReportDocument", |
91 | new 5+0%2Fdocs%2Fapi+Object">Object[]{courseCode, year}); |
85 | new 5+0%2Fdocs%2Fapi+Object">Object[]{courseCode, year}, |
- | 86 | new 1.5.0/docs/api/java/lang/String.html">String[]{"courseCode", "year"}); |
|
92 | request.setAttribute("courseReportJson", courseReportJson); |
87 | request.setAttribute("courseReportJson", courseReportJson); |
93 | 88 | ||
94 | AbstractDao.getCurrentSession().beginTransaction(); |
89 | AbstractDao.getCurrentSession().beginTransaction(); |
95 | CourseImpl courseImpl = DaoFactory.getCourseDaoImpl().findCourseByCode(courseCode); |
90 | CourseImpl courseImpl = DaoFactory.getCourseDaoImpl().findCourseByCode(courseCode); |
96 | request.setAttribute("course", courseImpl); |
91 | request.setAttribute("course", courseImpl); |