Rev 1929 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1929 | Rev 1930 | ||
---|---|---|---|
Line 483... | Line 483... | ||
483 | } |
483 | } |
484 | 484 | ||
485 | public 1.5.0/docs/api/java/lang/String.html">String generateGenerateGlobalLearningResultsChartSem(1.5.0/docs/api/java/lang/String.html">String reportDocumentJson, 1.5.0/docs/api/java/lang/String.html">String semesterCode, UserSession session) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
485 | public 1.5.0/docs/api/java/lang/String.html">String generateGenerateGlobalLearningResultsChartSem(1.5.0/docs/api/java/lang/String.html">String reportDocumentJson, 1.5.0/docs/api/java/lang/String.html">String semesterCode, UserSession session) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
486 | 486 | ||
487 | CourseReportDocument reportDocument = CourseReportDocument.fromJson(reportDocumentJson); |
487 | CourseReportDocument reportDocument = CourseReportDocument.fromJson(reportDocumentJson); |
488 | - | ||
489 | LearningResultsSection learningResultsSection = (LearningResultsSection) reportDocument.findDocumentSection(LearningResultsSection.class); |
488 | LearningResultsSection learningResultsSection = (LearningResultsSection) reportDocument.findDocumentSection(LearningResultsSection.class); |
490 | - | ||
491 | LearningAnalysisSection learningAnalysisSection = (LearningAnalysisSection) learningResultsSection.findSection(LearningAnalysisSection.class); |
489 | LearningAnalysisSection learningAnalysisSection = (LearningAnalysisSection) learningResultsSection.findSection(LearningAnalysisSection.class); |
492 | - | ||
493 | LearningResultsChartSem chartImg = (LearningResultsChartSem) learningAnalysisSection.findDocComponent(LearningResultsChartSem.class, semesterCode); |
490 | LearningResultsChartSem chartImg = (LearningResultsChartSem) learningAnalysisSection.findDocComponent(LearningResultsChartSem.class, semesterCode); |
494 | UnitsLearningResultsTable table = (UnitsLearningResultsTable) learningResultsSection.findDocComponent(UnitsLearningResultsTable.class); |
- | |
495 | 491 | ||
- | 492 | UnitsLearningResultsTable table = (UnitsLearningResultsTable) learningResultsSection.findDocComponent(UnitsLearningResultsTable.class); |
|
496 | 493 | ||
497 | 494 | ||
498 | FileUploaded fileUploaded = chartImg.generateChart2tmp(table,reportDocument); |
495 | FileUploaded fileUploaded = chartImg.generateChart2tmp(table,reportDocument); |
499 | 496 | ||
500 | - | ||
501 | - | ||
502 | RepositoryService repositoryService = new RepositoryService(); |
497 | RepositoryService repositoryService = new RepositoryService(); |
503 | 498 | ||
504 | - | ||
505 | boolean imageInitialized = chartImg.getImage() != null |
499 | boolean imageInitialized = chartImg.getImage() != null |
506 | && |
500 | && |
507 | chartImg.getImage().getIdentifier() != null; |
501 | chartImg.getImage().getIdentifier() != null; |
508 | 502 | ||
509 | - | ||
510 | RepositoryFile4JsonView view; |
503 | RepositoryFile4JsonView view; |
511 | - | ||
512 | if(imageInitialized) |
504 | if(imageInitialized) |
513 | { |
505 | { |
514 | 1.5.0/docs/api/java/lang/String.html">String identifier = chartImg.getImage().getIdentifier(); |
506 | 1.5.0/docs/api/java/lang/String.html">String identifier = chartImg.getImage().getIdentifier(); |
515 | view = repositoryService.replaceRepositoryFileFromFileUpload(identifier, fileUploaded, ResourceAccessControlEnum.publicDomain, session); |
507 | view = repositoryService.replaceRepositoryFileFromFileUpload(identifier, fileUploaded, ResourceAccessControlEnum.publicDomain, session); |
516 | } |
508 | } |
Line 549... | Line 541... | ||
549 | courseReportJson = cy.getCourseReportDocument(); |
541 | courseReportJson = cy.getCourseReportDocument(); |
550 | } |
542 | } |
551 | 543 | ||
552 | if (courseReportJson == null) { |
544 | if (courseReportJson == null) { |
553 | try { |
545 | try { |
554 | CourseReportDocument courseReport = new CourseReportServices().createNewCourseReportDocument(courseCode, year); |
546 | CourseReportDocument courseReport = createNewCourseReportDocument(courseCode, year); |
555 | courseReportJson = courseReport.toJson(); |
547 | courseReportJson = courseReport.toJson(); |
556 | saveCourseReportDocument(courseReportJson, session); |
548 | saveCourseReportDocument(courseReportJson, session); |
557 | } catch (1.5.0/docs/api/java/lang/Throwable.html">Throwable e) { |
549 | } catch (1.5.0/docs/api/java/lang/Throwable.html">Throwable e) { |
558 | 1.5.0/docs/api/java/lang/System.html">System.out.println(e); |
550 | 1.5.0/docs/api/java/lang/System.html">System.out.println(e); |
559 | e.printStackTrace(); |
551 | e.printStackTrace(); |