result.periodes = periodeInfos as JSON
result.periodeId = periode?.id
+ result.isDirection = securiteSession.hasFonctionIn(NotesFonction.DIRECTION_ASSIMILE)
result.verrouille = periode ? periode.verrouille : true
+ Boolean isProfPrincipal = classe ?
+ notesDroitService.isProfPrincipalInClasse(securiteSession, classe) : false
+ result.isProfPrincipal = isProfPrincipal
+ result.isDatePublicationBulletinDepassee = periode.getBulletinsPublies()
+
result.putAll(getAllAvis())
result.banqueAppreciations = modeleAppreciationProfesseurService.findAll(
result.verrouille = periode ? periode.verrouille : true
+ result.isDatePublicationBulletinDepassee = periode.getBulletinsPublies()
+
return result
}
<g:setJsValue name="libelleTypeAvis1" value="${libelleTypeAvis1}"/>
<g:setJsValue name="libelleTypeAvis2" value="${libelleTypeAvis2}"/>
+ <g:setJsValueBoolean name="isDirection" value="${isDirection}"/>
+ <g:setJsValueBoolean name="isProfPrincipal" value="${isProfPrincipal}"/>
+ <g:setJsValueBoolean name="isDatePublicationBulletinDepassee" value="${isDatePublicationBulletinDepassee}"/>
+
</g:javascript>
<g:javascript library="src/views/Messages"/>
libelleTypeAvis1: undefined,
libelleTypeAvis2: undefined,
- graphPeriodes: []
+ graphPeriodes: [],
+
+ isDirection: undefined,
+ isProfPrincipal: undefined,
+ isDatePublicationBulletinDepassee: undefined
}
};
\ No newline at end of file
{name: 'avisType1Id'},
{name: 'avisType2Id'},
{name: 'verrouille', type: 'boolean'},
- {name: 'actif'}
+ {name: 'actif'},
+ {name: 'isDatePublicationBulletinDepassee', type : 'boolean'}
]
})
};
avisType1Id: data.avisType1Id,
avisType2Id: data.avisType2Id,
verrouille: this.ConfigServeur.data.verrouille,
- actif: data.actif
+ actif: data.actif,
+ isDatePublicationBulletinDepassee : this.ConfigServeur.data.isDatePublicationBulletinDepassee
}
]
};
this.rechargeListeEleveEtPeriode(classe);
},
this
- );
+ );
this.eleveModel.addListener(
this.Constantes.eventId.eleveChange,
this.rechargeConseilDeClasse();
},
this
- );
+ );
this.periodeModel.addListener(
this.Constantes.eventId.periodeChange,
this.rechargeConseilDeClasse();
},
this
- );
+ );
},
/**
this.annule();
},
this);
-
+
},
observeApplication: function (application) {
}
},
this
- );
+ );
},
/**
params: {
classeId: classe.get('id'),
chargePeriodesPrecedentes:
- this.view.periodesPrecedentesCheckbox.getValue()
+ this.view.periodesPrecedentesCheckbox.getValue()
},
success: function(reponse) {
reponse.avisType2Id,
reponse.tableauRecap,
reponse.verrouille,
- reponse.actif);
+ reponse.actif,
+ reponse.isDatePublicationBulletinDepassee);
this.afficheBulletin({
moyennesServices: reponse.moyennesServices,
* @param verrouille
* @param actif
*/
- afficheConseilDeClasse: function(appreciation, avisType1Id, avisType2Id, tableauRecap, verrouille, actif) {
+ afficheConseilDeClasse: function(appreciation, avisType1Id, avisType2Id, tableauRecap, verrouille, actif, isDatePublicationBulletinDepassee) {
if (appreciation !== undefined) {
avisType1Id: avisType1Id,
avisType2Id: avisType2Id,
verrouille: verrouille,
- actif: actif
+ actif: actif,
+ isDatePublicationBulletinDepassee: isDatePublicationBulletinDepassee
}
]
});
eleveId: eleve.get('eleveId'),
periodeId: periode.get('idPeriode'),
chargePeriodesPrecedentes:
- this.view.periodesPrecedentesCheckbox.getValue()
+ this.view.periodesPrecedentesCheckbox.getValue()
},
success: function(reponse) {
reponse.avisType2Id,
reponse.tableauRecap,
reponse.verrouille,
- reponse.actif);
+ reponse.actif,
+ reponse.isDatePublicationBulletinDepassee);
this.afficheBulletin({
moyennesServices: reponse.moyennesServices,
afficheBulletin: function(config) {
this.bulletin.actualiseReferences({
- classe: this.classeModel.getClasse(),
- eleve: this.eleveModel.getEleve(),
- periode: this.periodeModel.getPeriode()
+ classe: this.classeModel.getClasse(),
+ eleve: this.eleveModel.getEleve(),
+ periode: this.periodeModel.getPeriode()
});
this.bulletin.afficheBulletin(config);
this.addEvents(
- /**
- * Changement dans la saisie
- * @event saisieChange
- * @param valide
- */
+ /**
+ * Changement dans la saisie
+ * @event saisieChange
+ * @param valide
+ */
this.Constantes.eventId.saisieChange,
- /**
- * Ajoute une appréciation
- * @appreciation
- */
+ /**
+ * Ajoute une appréciation
+ * @appreciation
+ */
this.Constantes.eventId.actionInsereAppreciation,
- /**
- * Demande l'actualisation du graph
- */
+ /**
+ * Demande l'actualisation du graph
+ */
this.Constantes.eventId.actionActualiserGraph);
// Définition de la configuration par défaut
click: function() {
this.fireEvent(
this.Constantes.eventId.actionInsereAppreciation,
- {
- texte: this.appreciationTextArea.getValue()
- });
+ {
+ texte: this.appreciationTextArea.getValue()
+ });
},
scope: this
},
var record = this.storeSaisie.getAt(0);
if ((record !== undefined) && (record !== null)) {
this.formSaisie.getForm().loadRecord(record);
- if ((this.ConfigServeur.data.verrouille !== true) &&
- (record.get('actif') !== false)) {
- this.appreciationTextArea.enable();
- this.banqueAppreciationBoutonEnregistrer.enable();
- this.avisType1ComboBox.enable();
- this.avisType2ComboBox.enable();
+ if (record.get('actif') !== false){
+ if (this.ConfigServeur.data.isDirection == true ||
+ (this.ConfigServeur.data.isProfPrincipal == true && this.ConfigServeur.data.isDatePublicationBulletinDepassee == false) ||
+ this.ConfigServeur.data.verrouille !== true) {
+ this.appreciationTextArea.enable();
+ this.banqueAppreciationBoutonEnregistrer.enable();
+ this.avisType1ComboBox.enable();
+ this.avisType2ComboBox.enable();
+ }
}
}
function(store, records) {
if (records.length > 0) {
this.formSaisie.getForm().loadRecord(records[0]);
- if ((records[0].get('verrouille') !== true) &&
- (records[0].get('actif') !== false)) {
- this.appreciationTextArea.enable();
- this.banqueAppreciationBoutonEnregistrer.enable();
- this.banqueAppreciation.enable();
- this.avisType1ComboBox.enable();
- this.avisType2ComboBox.enable();
+ if (records[0].get('actif') !== false){
+ if (this.ConfigServeur.data.isDirection == true ||
+ (this.ConfigServeur.data.isProfPrincipal == true && this.ConfigServeur.data.isDatePublicationBulletinDepassee == false) ||
+ records[0].get('verrouille') !== true) {
+ this.appreciationTextArea.enable();
+ this.banqueAppreciationBoutonEnregistrer.enable();
+ this.banqueAppreciation.enable();
+ this.avisType1ComboBox.enable();
+ this.avisType2ComboBox.enable();
+ }
}
else {
this.appreciationTextArea.disable();