Rev 1337 | Rev 1346 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1337 | Rev 1338 | ||
---|---|---|---|
Line 461... | Line 461... | ||
461 | { |
461 | { |
462 | msg = "Criando nova unidade para o código " + cu.getCode(); |
462 | msg = "Criando nova unidade para o código " + cu.getCode(); |
463 | serviceLogInfo(msg); |
463 | serviceLogInfo(msg); |
464 | logger.info(msg); |
464 | logger.info(msg); |
465 | unidadeAfeta = DomainObjectFactory.createQuestionarioPedagogicoUnidadeCurricularAfeta(); |
465 | unidadeAfeta = DomainObjectFactory.createQuestionarioPedagogicoUnidadeCurricularAfeta(); |
- | 466 | unidadeAfeta.setUsar(true); |
|
- | 467 | unidadeAfeta.setVista(false); |
|
466 | DaoFactory.getQuestionarioPedagogicoUnidadeCurricularAfetaDaoImpl().save(unidadeAfeta); |
468 | DaoFactory.getQuestionarioPedagogicoUnidadeCurricularAfetaDaoImpl().save(unidadeAfeta); |
467 | } |
469 | } |
468 | 470 | ||
469 | unidadeAfeta.resetStats(); |
471 | unidadeAfeta.resetStats(); |
470 | unidadeAfeta.setCursoAfeto(cursoAfeto);//so metemos de um dos lados |
472 | unidadeAfeta.setCursoAfeto(cursoAfeto);//so metemos de um dos lados |
Line 481... | Line 483... | ||
481 | checkTurmaAndProfs(cu, unidadeAfeta, mergedTipologias); |
483 | checkTurmaAndProfs(cu, unidadeAfeta, mergedTipologias); |
482 | checkProfs(cur, unidadeAfeta); |
484 | checkProfs(cur, unidadeAfeta); |
483 | checkTurmas(cur, unidadeAfeta); |
485 | checkTurmas(cur, unidadeAfeta); |
484 | checkStudents(cur, unidadeAfeta); |
486 | checkStudents(cur, unidadeAfeta); |
485 | 487 | ||
- | 488 | ||
486 | if(unidadeAfeta.isMarked()) |
489 | if(unidadeAfeta.isMarked()) |
487 | cursoAfeto.incMarcadas(); |
490 | cursoAfeto.incMarcadas(); |
488 | 491 | ||
489 | 492 | ||
490 | } |
493 | } |
Line 631... | Line 634... | ||
631 | logger.warn("Curso pedido no serviço não faz parte do questionario requisitado: " + cursoAfeto.getId() + " " + cursoAfeto.getQuestionario().getId() + " != " + questionarioId); |
634 | logger.warn("Curso pedido no serviço não faz parte do questionario requisitado: " + cursoAfeto.getId() + " " + cursoAfeto.getQuestionario().getId() + " != " + questionarioId); |
632 | 635 | ||
633 | } |
636 | } |
634 | 637 | ||
635 | } |
638 | } |
- | 639 | ||
- | 640 | public void updateCheckVarPedagogico(long questionarioId,long unidadeAfetaId, 1.5.0/docs/api/java/lang/String.html">String op,1.5.0/docs/api/java/lang/String.html">String val,UserSession session, QuestionarioImpl questionarioCleared) throws NotAuthorizedException { |
|
- | 641 | ||
- | 642 | if(!questionarioCleared.isClear((UserSessionImpl) session,QuestionarioImpl.QuestionarioClearancesOperation.QUESTIONARIO_CHANGE_TIPOLOGIES.name())) |
|
- | 643 | { |
|
- | 644 | throw new NotAuthorizedException("Nao tem autorização para alterar as tipologias"); |
|
- | 645 | } |
|
- | 646 | QuestionarioPedagogicoUnidadeCurricularAfetaImpl unidade = (QuestionarioPedagogicoUnidadeCurricularAfetaImpl) DaoFactory.getQuestionarioPedagogicoUnidadeCurricularAfetaDaoImpl().load(unidadeAfetaId); |
|
- | 647 | if(op.equals("usar")) |
|
- | 648 | { |
|
- | 649 | unidade.setUsar(1.5.0/docs/api/java/lang/Boolean.html">Boolean.parseBoolean(val)); |
|
- | 650 | } |
|
- | 651 | else if(op.equals("vista")) |
|
- | 652 | { |
|
- | 653 | unidade.setVista(1.5.0/docs/api/java/lang/Boolean.html">Boolean.parseBoolean(val)); |
|
- | 654 | } |
|
- | 655 | else if(op.equals("observacoes")) |
|
- | 656 | { |
|
- | 657 | unidade.setObs(val); |
|
- | 658 | } |
|
- | 659 | } |
|
636 | } |
660 | } |