Subversion Repositories bacoAlunos

Rev

Rev 1872 | Rev 1914 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1872 Rev 1898
Line 446... Line 446...
446
        chartImg.setImage(view);
446
        chartImg.setImage(view);
447
        //TODO FALTA GUARDAR O JSON NO CURSO
447
        //TODO FALTA GUARDAR O JSON NO CURSO
448
        return view.toJson();
448
        return view.toJson();
449
    }
449
    }
450
 
450
 
-
 
451
    public 1.5.0/docs/api/java/lang/String.html">String generateGenerateGlobalLearningResultsChartYearImg(1.5.0/docs/api/java/lang/String.html">String reportDocumentJson,UserSession session) throws 1.5.0/docs/api/java/io/IOException.html">IOException {
451
 
452
 
-
 
453
        CourseReportDocument reportDocument =  CourseReportDocument.fromJson(reportDocumentJson);
-
 
454
        LearningResultsSection learningResultsSection = (LearningResultsSection) reportDocument.findDocumentSection(LearningResultsSection.class);
-
 
455
        LearningGlobalAnalysisSection learningGlobalAnalysisSection = (LearningGlobalAnalysisSection) learningResultsSection.findSection(LearningGlobalAnalysisSection.class);
-
 
456
        GlobalLearningResultsChartImg chartImg = (GlobalLearningResultsChartImg) learningGlobalAnalysisSection.findDocComponent(GlobalLearningResultsChartImg.class);
-
 
457
 
-
 
458
        UnitsLearningResultsTable table = (UnitsLearningResultsTable) learningResultsSection.findDocComponent(UnitsLearningResultsTable.class);
-
 
459
 
452
 
460
 
-
 
461
        FileUploaded fileUploaded = chartImg.generateChart2tmp(table,reportDocument);
-
 
462
 
-
 
463
        RepositoryService repositoryService = new RepositoryService();
-
 
464
 
-
 
465
        boolean imageInitialized = chartImg.getImage() != null
-
 
466
                &&
-
 
467
                chartImg.getImage().getIdentifier() != null;
-
 
468
 
-
 
469
        RepositoryFile4JsonView view;
-
 
470
        if(imageInitialized)
-
 
471
        {
-
 
472
            1.5.0/docs/api/java/lang/String.html">String identifier = chartImg.getImage().getIdentifier();
-
 
473
            view = repositoryService.replaceRepositoryFileFromFileUpload(identifier, fileUploaded, ResourceAccessControlEnum.privateDomain, session);
-
 
474
        }
-
 
475
        else
-
 
476
        {
-
 
477
            view = repositoryService.storeRepositoryFileFromFileUpload(fileUploaded,ResourceAccessControlEnum.privateDomain,session);
-
 
478
        }
-
 
479
        chartImg.setImage(view);
-
 
480
        //TODO FALTA GUARDAR O JSON NO CURSO
-
 
481
        return view.toJson();
-
 
482
    }
453
 
483
 
454
 
484
 
455
 
485
 
456
    /****************************************************************************/
486
    /****************************************************************************/
457
    /*
487
    /*