Subversion Repositories bacoAlunos

Compare Revisions

Ignore whitespace Rev 1800 → Rev 1801

/branches/v3/impl/src/java/pt/estgp/estgweb/services/courseunits/SaveCourseUnitProgram.java
169,13 → 169,23
}
 
 
public void sendPdfIonlineOnly(CourseUnit cu, List<String> errors,UserSession u,List<String> warns) throws IOException, TransformerException, FOPException {
public boolean sendCurrentPdf2IonlineDontGeneratePdf(CourseUnit cu, List<String> errors,UserSession u,FTPClient client,List<String> warns) throws IOException, TransformerException, FOPException {
 
if(cu.getProgramStreamId() != null && cu.getProgramStreamId().length()> 0)
{
try
{
IRepositoryFile repoFileLastVersion = repositoryService.load(cu.getProgramStreamId(), null);
 
IRepositoryFile repoFileLastVersion = repositoryService.load(cu.getProgramStreamId(), null);
 
FTPClient nullClient = null;
sendPdfFtpIonline(cu, errors, u, repoFileLastVersion.getInput(), repoFileLastVersion.getSaveDate(), nullClient, warns);
sendPdfFtpIonline(cu, errors, u, repoFileLastVersion.getInput(), repoFileLastVersion.getSaveDate(), client, warns);
return true;
}
catch(Throwable e)
{
logger.error("Loading repository file: " + cu.getProgramStreamId() + " " + e.toString(),e);
}
}
return false;
}
 
 
476,7 → 486,7
try {
List<String> errors = new ArrayList<String>();
System.out.print("Sending " + next.getCourse().getName() + " - " + next.getSemestre() + " - " + next.getNormalizedName());
if(sendPdfFtpIonline(next,errors,null,client,null))
if(sendCurrentPdf2IonlineDontGeneratePdf(next, errors, null, client, null))
System.out.print(" ... OK");
else
System.out.print(" ... FAIL probably no StreamID");