* <http://www.cecill.info/licences.fr.html>.
*/
-
-
package org.lilie.services.eliot.notes
import org.lilie.services.eliot.scolarite.StructureEnseignement
class BulletinOptions {
TemplateDocument templateDocument
+ StructureEnseignement classe
+ BulletinOptionsPortee portee
Boolean moyenneGenerale = true
Boolean coefficient = true
Boolean nombreNotes = true
Boolean rangs = false
- StructureEnseignement classe
-
- String portee
static constraints = {
templateDocument(nullable: false)
classe(nullable: true, validator: {value -> value == null || value.isClasse()})
- portee(nullable: true, validator: {value -> value == null || 'CONSULTATION' || 'CONSEIL_DE_CLASSE'})
+ portee(nullable: true)
}
static mapping = {
table('impression.bulletin_options')
id column: 'id', generator: 'sequence', params: [sequence: 'impression.bulletin_options_id_seq']
- version false
+ version true
}
@Override
--- /dev/null
+package org.lilie.services.eliot.notes
+
+/**
+ * Created by bpe on 02/10/14.
+ */
+public enum BulletinOptionsPortee {
+ CONSULTATION(true, true, false, true, false, false),
+ CONSEIL_DE_CLASSE(true, true, false, true, false, false)
+
+ // Les valeurs par défaut en fonction de la portée
+ Boolean moyenneGenerale
+ Boolean coefficient
+ Boolean moyennePrecedente
+ Boolean moyenneMinMax
+ Boolean nombreNotes
+ Boolean rangs
+
+ BulletinOptionsPortee(Boolean moyenneGenerale,
+ Boolean coefficient,
+ Boolean moyennePrecedente,
+ Boolean moyenneMinMax,
+ Boolean nombreNotes,
+ Boolean rangs) {
+
+ this.moyenneGenerale = moyenneGenerale
+ this.coefficient = coefficient
+ this.moyennePrecedente = moyennePrecedente
+ this.moyenneMinMax = moyenneMinMax
+ this.nombreNotes = nombreNotes
+ this.rangs = rangs
+ }
+
+ String getId() {
+ return this
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.notes
+
+import org.lilie.services.eliot.scolarite.StructureEnseignement
+
+/**
+ * Options d'affichage et d'impression du relevé
+ * @author bper
+ */
+class ReleveOptions {
+
+ StructureEnseignement classe
+
+ Boolean coefficient = false
+
+ static constraints = {
+ classe(nullable: false, validator: {value -> value.isClasse()})
+ }
+
+ static mapping = {
+ table('impression.releve_options')
+ id column: 'id', generator: 'sequence', params: [sequence: 'impression.releve_options_id_seq']
+ version true
+ }
+
+ @Override
+ String toString() {
+ return "ReleveOptions{coefficient: $coefficient, classe: $classe}"
+ }
+}
package org.lilie.services.eliot.applications.notes
+import org.lilie.services.eliot.impression.TemplateDocument
+import org.lilie.services.eliot.impression.constantes.TemplateDocumentEnum
import org.lilie.services.eliot.notes.BulletinOptions
+import org.lilie.services.eliot.notes.BulletinOptionsPortee
import org.lilie.services.eliot.scolarite.StructureEnseignement
class BulletinOptionsService {
+ static transactional = true
+
public void enregistre(BulletinOptions bulletinOptions) {
bulletinOptions.save(flush: true, failOnError: true)
}
- public void enregistre(BulletinOptions bulletinOptions, Map params) {
- bulletinOptions.moyenneGenerale = Boolean.valueOf(params.moyenneGenerale)
- bulletinOptions.coefficient = Boolean.valueOf(params.coefficient)
- bulletinOptions.moyennePrecedente = Boolean.valueOf(params.moyennePrecedente)
- bulletinOptions.moyenneMinMax = Boolean.valueOf(params.moyenneMinMax)
- bulletinOptions.nombreNotes = Boolean.valueOf(params.nombreNotes)
- bulletinOptions.rangs = Boolean.valueOf(params.rangs)
+ public void enregistre(StructureEnseignement classe,
+ Map params,
+ BulletinOptionsPortee portee) {
- enregistre(bulletinOptions)
- }
+ BulletinOptions bulletinOptions = findOrCree(classe, portee)
+
+ bulletinOptions.moyenneGenerale = Boolean.valueOf(params.bulletinMoyenneGenerale)
+ bulletinOptions.coefficient = Boolean.valueOf(params.bulletinCoefficient)
+ bulletinOptions.moyennePrecedente = Boolean.valueOf(params.bulletinMoyennePrecedente)
+ bulletinOptions.moyenneMinMax = Boolean.valueOf(params.bulletinMoyenneMinMax)
+ bulletinOptions.nombreNotes = Boolean.valueOf(params.bulletinNombreNotes)
+ bulletinOptions.rangs = Boolean.valueOf(params.bulletinRangs)
- private final static PORTEE_CONSULTATION = 'CONSULTATION'
- private final static PORTEE_CONSEIL = 'CONSEIL_DE_CLASSE'
+ bulletinOptions.save(flush: true, failOnError: true)
+ }
public void copie(StructureEnseignement classeSource, StructureEnseignement classeCible) {
- copie(classeSource, classeCible, PORTEE_CONSULTATION)
- copie(classeSource, classeCible, PORTEE_CONSEIL)
+ copieOptions(classeSource, classeCible, BulletinOptionsPortee.CONSULTATION)
+ copieOptions(classeSource, classeCible, BulletinOptionsPortee.CONSEIL_DE_CLASSE)
}
/**
* Copie des options de bulletin d'une classe source vers une classe cible et pour une portée donnée
*/
- private void copie(StructureEnseignement classeSource, StructureEnseignement classeCible, String portee) {
+ private void copieOptions(StructureEnseignement classeSource,
+ StructureEnseignement classeCible,
+ BulletinOptionsPortee portee) {
if (log.debugEnabled) {log.debug "Copie d'option de bulletin pour la portee ${portee}"}
bulletinOptionsCible.nombreNotes = bulletinOptionsSource.nombreNotes
bulletinOptionsCible.rangs = bulletinOptionsSource.rangs
}
+
+ BulletinOptions findOrCree(StructureEnseignement classe, BulletinOptionsPortee portee) {
+
+ BulletinOptions bulletinOptions =
+ BulletinOptions.findByClasseAndPortee(classe, portee)
+
+ if (!bulletinOptions){
+ bulletinOptions = new BulletinOptions(
+ templateDocument: TemplateDocument.findByCode(TemplateDocumentEnum.BULLETIN_NOTES_1.toString()),
+ moyenneGenerale: portee.moyenneGenerale,
+ coefficient: portee.coefficient,
+ moyennePrecedente: portee.moyennePrecedente,
+ moyenneMinMax: portee.moyenneMinMax,
+ nombreNotes: portee.nombreNotes,
+ rangs: portee.moyenneMinMax,
+ classe: classe,
+ portee: portee
+ )
+
+ bulletinOptions.save(failOnError: true, flush: true)
+ }
+
+ return bulletinOptions
+ }
}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.applications.notes
+
+import org.lilie.services.eliot.notes.ReleveOptions
+import org.lilie.services.eliot.scolarite.StructureEnseignement
+
+class ReleveOptionsService {
+
+ static transactional = true
+
+ ReleveOptions enregistre(StructureEnseignement classe, Map params) {
+
+ ReleveOptions releveOptions = findOrCree(classe)
+
+ releveOptions.coefficient = Boolean.valueOf(params.releveCoefficient)
+
+ releveOptions.save(failOnError: true, flush: true)
+
+ return releveOptions
+ }
+
+
+ ReleveOptions findOrCree(StructureEnseignement classe) {
+ ReleveOptions releveOptions = ReleveOptions.findByClasse(classe)
+
+ if (!releveOptions) {
+ releveOptions = new ReleveOptions(classe: classe)
+ }
+
+ return releveOptions
+ }
+}
*/
//TOREFACT : faire une gestion de modèle d'impression de note
String getListeNotes() {
- String result = "";
- noteImpressions.each { NoteImpressionInfo noteImpression ->
- String noteFormatee = noteImpression.note
- String noteMaxFormatee = noteImpression.noteMax
- result = result +
- noteImpression.libelle +
- " : <b>" +
- noteFormatee + '/' + noteMaxFormatee +
- "</b>, "
- }
- if (result == "") {
- return ""
- } else {
- return result.substring(0, result.length() - 2)
+ List<String> notes = noteImpressions.collect {
+ String note = it.libelle + " : <b>" + it.note
+
+ if (it.note.isNumber()) {
+ note += '/' + it.noteMax
+ }
+
+ note += "</b>"
+
+ if (it.note.isNumber() && it.coeff != null) {
+ note += " (Coef. ${it.coeff})"
+ }
+
+ return note
}
+
+ return notes.join(', ')
}
}
void testEnregistreBulletinAvecMap(){
- String portee = "CONSULTATION"
+ BulletinOptionsPortee portee = BulletinOptionsPortee.CONSULTATION
BulletinOptions.createCriteria().get{
eq('classe', classe1)
bulletinOptionsNbAvant == 0)
Map params = [:]
- params.moyenneGenerale = false
- params.coefficient = true
- params.moyennePrecedente = true
- params.moyenneMinMax = false
- params.nombreNotes = true
- params.rangs = false
+ params.bulletinMoyenneGenerale = false
+ params.bulletinCoefficient = true
+ params.bulletinMoyennePrecedente = true
+ params.bulletinMoyenneMinMax = false
+ params.bulletinNombreNotes = true
+ params.bulletinRangs = false
- BulletinOptions bulletinOptionsAEnregistrer = new BulletinOptions(
- templateDocument: templateDocument,
- classe: classe1,
- portee: portee
- )
-
- bulletinOptionsService.enregistre(bulletinOptionsAEnregistrer, params)
+ bulletinOptionsService.enregistre(classe1, params, portee)
Integer bulletinOptionsNbApres = BulletinOptions.createCriteria().count{
eq('templateDocument', templateDocument)
eq('classe', classe1)
eq('portee', portee)
- eq('moyenneGenerale', params.moyenneGenerale)
- eq('coefficient', params.coefficient)
- eq('moyennePrecedente', params.moyennePrecedente)
- eq('moyenneMinMax', params.moyenneMinMax)
- eq('nombreNotes', params.nombreNotes)
- eq('rangs', params.rangs)
+ eq('moyenneGenerale', params.bulletinMoyenneGenerale)
+ eq('coefficient', params.bulletinCoefficient)
+ eq('moyennePrecedente', params.bulletinMoyennePrecedente)
+ eq('moyenneMinMax', params.bulletinMoyenneMinMax)
+ eq('nombreNotes', params.bulletinNombreNotes)
+ eq('rangs', params.bulletinRangs)
}
assertTrue("Les options de bulletin n'ont pas été enregistrées",
void testCopie(){
- String portee = "CONSULTATION"
+ BulletinOptionsPortee portee = BulletinOptionsPortee.CONSEIL_DE_CLASSE
Map params = [:]
- params.moyenneGenerale = false
- params.coefficient = true
- params.moyennePrecedente = true
- params.moyenneMinMax = false
- params.nombreNotes = true
- params.rangs = false
+ params.bulletinMoyenneGenerale = false
+ params.bulletinCoefficient = true
+ params.bulletinMoyennePrecedente = true
+ params.bulletinMoyenneMinMax = false
+ params.bulletinNombreNotes = true
+ params.bulletinRangs = false
/* suppression options classe source si elles existent */
BulletinOptions.createCriteria().get{
'templateDocument' : templateDocument,
'classe' : classe1,
'portee' : portee,
- 'moyenneGenerale' : params.moyenneGenerale,
- 'coefficient' : params.coefficient,
- 'moyennePrecedente' : params.moyennePrecedente,
- 'moyenneMinMax' : params.moyenneMinMax,
- 'nombreNotes' : params.nombreNotes,
- 'rangs' : params.rangs
+ 'moyenneGenerale' : params.bulletinMoyenneGenerale,
+ 'coefficient' : params.bulletinCoefficient,
+ 'moyennePrecedente' : params.bulletinMoyennePrecedente,
+ 'moyenneMinMax' : params.bulletinMoyenneMinMax,
+ 'nombreNotes' : params.bulletinNombreNotes,
+ 'rangs' : params.bulletinRangs
)
bulletinOptionsClasseSource.save(flush: true, failOnError: true)
'templateDocument' : templateDocument,
'classe' : classe1_2,
'portee' : portee,
- 'moyenneGenerale' : !params.moyenneGenerale,
- 'coefficient' : !params.coefficient,
- 'moyennePrecedente' : !params.moyennePrecedente,
- 'moyenneMinMax' : !params.moyenneMinMax,
- 'nombreNotes' : !params.nombreNotes,
- 'rangs' : !params.rangs
+ 'moyenneGenerale' : !params.bulletinMoyenneGenerale,
+ 'coefficient' : !params.bulletinCoefficient,
+ 'moyennePrecedente' : !params.bulletinMoyennePrecedente,
+ 'moyenneMinMax' : !params.bulletinMoyenneMinMax,
+ 'nombreNotes' : !params.bulletinNombreNotes,
+ 'rangs' : !params.bulletinRangs
)
bulletinOptionsClasseCible.save(flush: true, failOnError: true)
--- /dev/null
+package org.lilie.services.eliot.notes
+
+import grails.test.GrailsUnitTestCase
+import org.lilie.services.eliot.applications.notes.ReleveOptionsService
+import org.lilie.services.eliot.scolarite.StructureEnseignement
+import org.lilie.services.eliot.test.LocalInitDonneesCommunesTestService
+import org.lilie.services.eliot.test.PopulationTestClasse
+
+/**
+ * Created by bpe on 03/10/14.
+ */
+class ReleveOptionsServiceTests extends GrailsUnitTestCase {
+
+ LocalInitDonneesCommunesTestService localInitDonneesCommunesTestService
+ ReleveOptionsService releveOptionsService
+
+ StructureEnseignement classe
+
+
+ protected void setUp(){
+ super.setUp()
+
+ classe = localInitDonneesCommunesTestService.getStructureEnseignement(PopulationTestClasse.CLASSE_1)
+ }
+
+ void testEnregistre() {
+
+ ReleveOptions.findByClasse(classe)?.delete()
+
+ // Création de ReleveOptions
+ Map params = [releveCoefficient: true]
+
+ ReleveOptions releveOptionsCree = releveOptionsService.enregistre(classe, params)
+
+ ReleveOptions releveOptions = ReleveOptions.findByClasse(classe)
+ assertNotNull(releveOptions)
+
+ assertNotNull(releveOptionsCree)
+ assertEquals(releveOptions, releveOptionsCree)
+
+ assertEquals(params.releveCoefficient, releveOptionsCree.coefficient)
+
+
+ // Modification de ReleveOptions existant
+ params.releveCoefficient = false
+
+ ReleveOptions releveOptionsModofie = releveOptionsService.enregistre(classe, params)
+
+ assertNotNull(releveOptionsModofie)
+ assertEquals(releveOptions, releveOptionsModofie)
+
+ assertEquals(params.releveCoefficient, releveOptionsCree.coefficient)
+ }
+}
--- /dev/null
+<!--
+ ~ Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ ~ This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ ~
+ ~ Lilie is free software. You can redistribute it and/or modify since
+ ~ you respect the terms of either (at least one of the both license) :
+ ~ - under the terms of the GNU Affero General Public License as
+ ~ published by the Free Software Foundation, either version 3 of the
+ ~ License, or (at your option) any later version.
+ ~ - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ ~ License, or any later version
+ ~
+ ~ There are special exceptions to the terms and conditions of the
+ ~ licenses as they are applied to this software. View the full text of
+ ~ the exception in file LICENSE.txt in the directory of this software
+ ~ distribution.
+ ~
+ ~ Lilie is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ Licenses for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ and the CeCILL-C along with Lilie. If not, see :
+ ~ <http://www.gnu.org/licenses/> and
+ ~ <http://www.cecill.info/licences.fr.html>.
+ -->
+
+<databaseChangeLog
+ xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
+
+ <changeSet id="1" author="bper">
+ <comment>
+ Ajout de la table 'impression.releve_options'
+ </comment>
+
+ <createTable tableName="releve_options" schemaName="impression">
+ <column name="id" type="bigint">
+ <constraints primaryKey="true"/>
+ </column>
+
+ <column name="version" type="int">
+ <constraints nullable="false"/>
+ </column>
+
+ <column name="classe_id" type="bigint">
+ <constraints nullable="false"/>
+ </column>
+
+ <column name="coefficient" type="boolean">
+ <constraints nullable="false"/>
+ </column>
+ </createTable>
+
+ <createSequence sequenceName="releve_options_id_seq"
+ schemaName="impression"/>
+
+ <addForeignKeyConstraint
+ baseTableSchemaName="impression"
+ baseTableName="releve_options"
+ baseColumnNames="classe_id"
+ constraintName="fk_releve_options_classe_id"
+ referencedTableSchemaName="ent"
+ referencedTableName="structure_enseignement"
+ referencedColumnNames="id" />
+
+ <addUniqueConstraint schemaName="impression"
+ tableName="releve_options"
+ columnNames="classe_id"/>
+ </changeSet>
+
+
+ <changeSet id="2" author="bper">
+ <comment>
+ Ajout de la colonne 'version' dans table 'impression.bulletin_options'
+ </comment>
+
+ <addColumn schemaName="impression" tableName="bulletin_options">
+ <column name="version" type="int">
+ <constraints nullable="true"/>
+ </column>
+ </addColumn>
+
+ <sql>
+ UPDATE impression.bulletin_options
+ SET version = 0;
+ </sql>
+
+ <addNotNullConstraint schemaName="impression"
+ tableName="bulletin_options"
+ columnName="version"/>
+
+ </changeSet>
+
+</databaseChangeLog>
\ No newline at end of file
<include file="changelogs/scolarite/2014-09-24-0039248.xml"/>
<include file="changelogs/scolarite/2014-10-01-0039248.xml"/>
<include file="changelogs/securite/2014-10-01-0039436.xml"/>
-
+ <include file="changelogs/scolarite/2014-10-02-0039478.xml"/>
+
</databaseChangeLog>
package org.lilie.services.eliot.notes.consultation
import org.lilie.services.eliot.scolarite.Personne
-import org.lilie.services.eliot.scolarite.Service
import org.lilie.services.eliot.scolarite.SousService
import org.lilie.services.eliot.notes.notes.Releve
import org.lilie.services.eliot.notes.notes.ReleveServiceNote
import org.lilie.services.eliot.notes.notes.ReleveModaliteMatiereNote
import org.lilie.services.eliot.scolarite.ModaliteMatiere
import grails.converters.JSON
-import org.lilie.services.eliot.scolarite.Enseignement
/**
* Regroupe les converteurs JSON utilisés dans BootStrap.
// Converteur JSON pour ModaliteMatiere
cfg.registerObjectMarshaller(ModaliteMatiere) {
ModaliteMatiere modaliteMatiere ->
- return [matiere: modaliteMatiere.libelle]
+ return [matiere: modaliteMatiere.libelle]
}
lignes << serviceNote
serviceNote.modaliteMatiereNotes?.each {
ReleveModaliteMatiereNote modaliteMatiereNote ->
- lignes << modaliteMatiereNote
+ lignes << modaliteMatiereNote
}
}
return lignes
// Converteur JSON pour ReleveServiceNote
cfg.registerObjectMarshaller(ReleveServiceNote) {
ReleveServiceNote serviceNote ->
- return [
- service: [
- matiere: serviceNote.service.matiere.libelleLong,
- professeur: serviceNote.enseignants?.collect{
- "${it.nomAffichageInitiales()}"
- }
- ],
- notes: serviceNote.notes,
- isSousService: false
- ]
+ return [
+ service: [
+ matiere: serviceNote.service.matiere.libelleLong,
+ professeur: serviceNote.enseignants?.collect{
+ "${it.nomAffichageInitiales()}"
+ }
+ ],
+ notes: serviceNote.notes,
+ isSousService: false
+ ]
}
// Converteur JSON pour ReleveSousServiceNote
cfg.registerObjectMarshaller(ReleveSousServiceNote) {
ReleveSousServiceNote sousServiceNote ->
- return [
- service: sousServiceNote.sousService,
- notes: sousServiceNote.notes,
- isSousService: true
- ]
+ return [
+ service: sousServiceNote.sousService,
+ notes: sousServiceNote.notes,
+ isSousService: true
+ ]
}
// Converteur JSON pour ReleveModaliteMatiereNote
cfg.registerObjectMarshaller(ReleveModaliteMatiereNote) {
ReleveModaliteMatiereNote modaliteMatiereNote ->
- return [
- service: modaliteMatiereNote.modaliteMatiere,
- notes: modaliteMatiereNote.notes,
- isSousService: true
- ]
+ return [
+ service: modaliteMatiereNote.modaliteMatiere,
+ notes: modaliteMatiereNote.notes,
+ isSousService: true
+ ]
}
// Converteur JSON pour Note
cfg.registerObjectMarshaller(Note) {Note note ->
return [
- evaluation: note.evaluation.titre,
- //coeff: note.evaluation.coefficient,
- valeurNumerique: note.valeurNumeriqueAffichee,
- valeur: note.valeurAffichee,
- noteMax: note.evaluation.noteMaxPossibleAffichee
+ evaluation: note.evaluation.titre,
+ coeff: note.evaluation.coefficient,
+ valeurNumerique: note.valeurNumeriqueAffichee,
+ valeur: note.valeurAffichee,
+ noteMax: note.evaluation.noteMaxPossibleAffichee
]
}
}
package org.lilie.services.eliot.notes.consultation
+import org.lilie.services.eliot.applications.notes.ReleveOptionsService
import org.lilie.services.eliot.impression.constantes.TemplateTypeFonctionnaliteEnum
import org.lilie.services.eliot.impression.template.ImpressionTemplateDocumentService
import org.lilie.services.eliot.notes.AbstractNotesController
+import org.lilie.services.eliot.notes.ReleveOptions
import org.lilie.services.eliot.notes.page.Page
import org.lilie.services.eliot.scolarite.StructureEnseignement
import org.lilie.services.eliot.notes.scolarite.NotesStructureEnseignementService
NotesPersonneService notesPersonneService
ImpressionRequetageBulletinReleveService impressionRequetageBulletinReleveService
ImpressionTemplateDocumentService impressionTemplateDocumentService
+ ReleveOptionsService releveOptionsService
/**
* @author bper
Releve releve = null
Boolean relevePublie = true
String message = null
+ ReleveOptions releveOptions = null
if (eleve && periode) {
+ releveOptions = releveOptionsService.findOrCree(periode.classe)
try {
releve = releveService.construisReleve(securiteSession, eleve, periode)
} catch (PeriodeNonPublieException e) {
return [
releve: releve,
publie: relevePublie,
- messagePublication: message
+ messagePublication: message,
+ releveOptions: releveOptions
]
}
}
package org.lilie.services.eliot.notes.domaine
import grails.converters.JSON
+import org.lilie.services.eliot.applications.notes.ReleveOptionsService
+import org.lilie.services.eliot.notes.BulletinOptionsPortee
+import org.lilie.services.eliot.notes.ReleveOptions
import org.lilie.services.eliot.notes.scolarite.NotesPeriodeService
import org.lilie.services.eliot.scolarite.Periode
import org.lilie.services.eliot.scolarite.StructureEnseignement
NotesPeriodeService notesPeriodeService
NotesStructureEnseignementService notesStructureEnseignementService
BulletinOptionsService bulletinOptionsService
+ ReleveOptionsService releveOptionsService
- String portee = 'CONSULTATION'
-
+ private static final PORTEE = BulletinOptionsPortee.CONSULTATION
/**
* Retourne la liste des périodes pour une classe
Map result = tryCatch{
verifieDroitFonctionnalite(NotesFonctionnalite.NOTES_PARAM)
- BulletinOptions bulletinOptions
+ StructureEnseignement classe = StructureEnseignement.get(params.classeId)
- def bulletinOptionsId = params.bulletinOptionsId
- if (bulletinOptionsId){
- bulletinOptions = BulletinOptions.get(Long.valueOf(bulletinOptionsId))
- } else {
- StructureEnseignement classe = params.classeId ? StructureEnseignement.get(params.classeId) : null
- bulletinOptions = BulletinOptions.findByClasseAndPortee(classe, portee)
- if (!bulletinOptions){
- bulletinOptions = new BulletinOptions()
- bulletinOptions.templateDocument = getTemplateDocumentForImpressionDirecteBulletin()
- bulletinOptions.classe = classe
- bulletinOptions.portee = portee
- }
+ if (!classe){
+ throw new IllegalArgumentException("La classe avec l'id = ${params.classeId} n'existe pas")
}
- if (!bulletinOptions.classe){
- throw new IllegalArgumentException("La classe concernée par les options de publication ne peut pas être nulle")
- }
-
- bulletinOptionsService.enregistre(bulletinOptions, params)
+ verifieDroitAccesObjetDomaine(classe)
+ bulletinOptionsService.enregistre(classe, params, PORTEE)
+ releveOptionsService.enregistre(classe, params)
}
render result as JSON
def getOptionsPublication = {
- BulletinOptions bulletinOptions = null
-
Map result = tryCatch{
verifieDroitFonctionnalite(NotesFonctionnalite.NOTES_PARAM)
- StructureEnseignement classe = params.classeId ? StructureEnseignement.get(params.classeId) : null
- if (classe){
- bulletinOptions = BulletinOptions.findByClasseAndPortee(classe, portee)
- if (!bulletinOptions){
- bulletinOptions = new BulletinOptions(
- templateDocument : getTemplateDocumentForImpressionDirecteBulletin(),
- moyenneGenerale : true,
- coefficient : true,
- moyennePrecedente : false,
- moyenneMinMax : true,
- nombreNotes : false,
- rangs : false,
- classe : classe,
- portee: portee
- )
- bulletinOptionsService.enregistre(bulletinOptions)
- }
- } else {
- throw new IllegalArgumentException("La classe concernée par les options de publication ne peut pas être nulle")
+ StructureEnseignement classe = StructureEnseignement.get(params.classeId)
+
+ if (!classe){
+ throw new IllegalArgumentException("La classe avec l'id = ${params.classeId} n'existe pas")
}
- }
- result.optionsDePublication = bulletinOptions
+ verifieDroitAccesObjetDomaine(classe)
+
+ BulletinOptions bulletinOptions =
+ bulletinOptionsService.findOrCree(classe, PORTEE)
+
+ ReleveOptions releveOptions = releveOptionsService.findOrCree(classe)
+
+ [optionsDePublication: [bulletin: bulletinOptions, releve: releveOptions]]
+ }
render result as JSON
}
package org.lilie.services.eliot.notes.saisie
import org.lilie.services.eliot.notes.AbstractNotesController
+import org.lilie.services.eliot.notes.BulletinOptionsPortee
import org.lilie.services.eliot.notes.page.Page
import grails.converters.JSON
import org.lilie.services.eliot.notes.domaine.PeriodeInfo
AvisService avisService
BulletinOptionsService bulletinOptionsService
- String portee = 'CONSEIL_DE_CLASSE'
+ private static final PORTEE = BulletinOptionsPortee.CONSEIL_DE_CLASSE
/**
* @param classeId identifiant de la classe sélectionnée
}
// Période sélectionnée
periode = periodeId != null ? periodes.find {it.id == periodeId} :
- periodes.find {it.isPeriodeEnCours() && it.isPeriodeXmestre()}
+ periodes.find {it.isPeriodeEnCours() && it.isPeriodeXmestre()}
// Les élèves de la classe
StructureEnseignementElevesListes structureEnseignementElevesListes = eleveAnnuaireService.
result.verrouille = periode ? periode.verrouille : true
Boolean isProfPrincipal = classe ?
- notesDroitService.isObjetDansPerimetre(
- securiteSession, PerimetreClasseEnseignantPrincipal, classe) : false
+ notesDroitService.isObjetDansPerimetre(
+ securiteSession, PerimetreClasseEnseignantPrincipal, classe) : false
result.isProfPrincipal = isProfPrincipal
result.isDatePublicationBulletinDepassee = periode.getBulletinsPublies()
// Récupération des périodes précédentes
List<Periode> periodesPrecedentes = periode.isPeriodeNotation() ?
- periode.getPeriodesPrecedentes() : []
+ periode.getPeriodesPrecedentes() : []
result.periodesPrecedentes = periodesPrecedentes.isEmpty() ?
- null :
- periodesPrecedentes.collect {[id: it.id, libelle: periodeService.getNomPeriodePrecedente(it.typePeriode.libelle)]} as JSON
+ null :
+ periodesPrecedentes.collect {[id: it.id, libelle: periodeService.getNomPeriodePrecedente(it.typePeriode.libelle)]} as JSON
if (classe) {
BulletinOptions bulletinOptions = BulletinOptions.findByClasseAndPortee(
classe,
- portee
+ PORTEE
)
result.put('optionsPublication', bulletinOptions as JSON)
}
Periode periode = params.periodeId ? Periode.get(params.periodeId) : null
Boolean chargePeriodesPrecedentes = params?.chargePeriodesPrecedentes == "true"
StructureEnseignement classe =
- params.classeId ? StructureEnseignement.get(params.classeId) : null
+ params.classeId ? StructureEnseignement.get(params.classeId) : null
verifieDroitAccesObjetDomaine(classe)
// Récupération des périodes précédentes
List<Periode> periodesPrecedentes = periode.isPeriodeNotation() ?
- periode.getPeriodesPrecedentes() : []
+ periode.getPeriodesPrecedentes() : []
result.periodesPrecedentes = periodesPrecedentes.isEmpty() ?
- null :
- periodesPrecedentes.collect {[id: it.id, libelle: periodeService.getNomPeriodePrecedente(it.typePeriode.libelle)]}
+ null :
+ periodesPrecedentes.collect {[id: it.id, libelle: periodeService.getNomPeriodePrecedente(it.typePeriode.libelle)]}
- result.optionsPublication = chercheOptionsPublication(classe)
+ result.optionsPublication =
+ bulletinOptionsService.findOrCree(classe, PORTEE)
return result
}
Map result = tryCatch {
verifieDroitFonctionnalite(NotesFonctionnalite.NOTES_SAISIE_SYNTH_CONSEIL)
- BulletinOptions bulletinOptions
+ StructureEnseignement classe = StructureEnseignement.get(params.classeId)
- def bulletinOptionsId = params.bulletinOptionsId
- if (bulletinOptionsId) {
- bulletinOptions = BulletinOptions.get(Long.valueOf(bulletinOptionsId))
- if (!bulletinOptions) {
- throw new IllegalArgumentException("Les bulletinOptions id:$bulletinOptionsId ne sont pas trouve")
- }
- } else {
- StructureEnseignement classe = params.classeId ? StructureEnseignement.get(Long.valueOf(params.classeId)) : null
- if (!classe) {
- throw new IllegalArgumentException("La classe concernée par les options de publication ne peut pas être nulle")
- }
- bulletinOptions = BulletinOptions.findByClasseAndPortee(classe, portee)
- if (!bulletinOptions) {
- bulletinOptions = new BulletinOptions()
- bulletinOptions.templateDocument = getTemplateDocumentForImpressionDirecteBulletin()
- bulletinOptions.classe = classe
- bulletinOptions.portee = portee
- }
+ if (!classe) {
+ throw new IllegalArgumentException("La classe avec l'id = ${params.classeId} n'existe pas")
}
- if (!bulletinOptions.classe) {
- throw new IllegalArgumentException("La classe concernée par les options de publication ne peut pas être nulle")
- }
+ verifieDroitAccesObjetDomaine(classe)
// Droit de saisir les appréciations = droit d'acceder la page de
// conseil de classe = droit d'afficher et modifier les options de publication
Boolean aDroitAfficherOptions = notesDroitService.peutModifierSynthese(
securiteSession,
- bulletinOptions.classe
+ classe
)
if (!aDroitAfficherOptions) {
AutorisationException.modificationContenuException()
}
- bulletinOptionsService.enregistre(bulletinOptions, params)
+ bulletinOptionsService.enregistre(classe, params, PORTEE)
}
render result as JSON
Map result = tryCatch {
verifieDroitFonctionnalite(NotesFonctionnalite.NOTES_SAISIE_SYNTH_CONSEIL)
- StructureEnseignement classe =
- params.classeId ? StructureEnseignement.get(params.classeId) : null
+ StructureEnseignement classe = StructureEnseignement.get(params.classeId)
if (!classe) {
- throw new IllegalArgumentException("La classe concernée par les "+
- "options de publication ne peut pas être nulle")
+ throw new IllegalArgumentException("La classe avec l'id = ${params.classeId} n'existe pas")
}
// Droit de saisir les appréciations = droit d'acceder la page de
AutorisationException.modificationContenuException()
}
- return [optionsDePublication: chercheOptionsPublication(classe)]
- }
-
- render result as JSON
- }
-
+ BulletinOptions bulletinOptions =
+ bulletinOptionsService.findOrCree(classe, PORTEE)
- private BulletinOptions chercheOptionsPublication(StructureEnseignement classe) {
-
- if (!classe) {
- throw new IllegalArgumentException("La classe concernée par les options"+
- " de publication ne peut pas être nulle")
+ return [optionsDePublication: bulletinOptions]
}
- BulletinOptions bulletinOptions = BulletinOptions.findByClasseAndPortee(classe, portee)
- if (!bulletinOptions) {
- bulletinOptions = new BulletinOptions(
- templateDocument: getTemplateDocumentForImpressionDirecteBulletin(),
- moyenneGenerale: true,
- coefficient: true,
- moyennePrecedente: false,
- moyenneMinMax: true,
- nombreNotes: false,
- rangs: false,
- classe: classe,
- portee: portee
- )
- bulletinOptionsService.enregistre(bulletinOptions)
- }
-
- return bulletinOptions
+ render result as JSON
}
eliot.notes.libelle.non=Non
eliot.notes.libelle.selParamAppliqueA=Sélection des paramétrages des périodes à appliquer
-eliot.notes.libelle.selOptionsDePublication=Afficher sur le bulletin en consultation :
-eliot.notes.libelle.selOptionsDePublicationConseil=Afficher sur le bulletin :
+eliot.notes.libelle.bulletinOptionsChoix=Afficher sur le bulletin en consultation :
+eliot.notes.libelle.releveOptionsChoix=Afficher sur le relevé de notes en consultation :
+eliot.notes.libelle.bulletinOptionsChoixConseil=Afficher sur le bulletin :
eliot.notes.libelle.selClassesAModifier=Sélection des classes à modifier
eliot.notes.libelle.notesEtMoyennes=Notes et Moyennes
package org.lilie.services.eliot.notes.impression
import org.lilie.services.eliot.annuaire.SecuriteSession
-
+import org.lilie.services.eliot.applications.notes.ReleveOptionsService
import org.lilie.services.eliot.impression.donnees.eleve.notetextuelle.AllNoteTextuelleImpression
import org.lilie.services.eliot.impression.donnees.eleve.notetextuelle.NoteTextuelleImpression
import org.lilie.services.eliot.notes.Note
import org.lilie.services.eliot.notes.NoteTextuelle
+import org.lilie.services.eliot.notes.ReleveOptions
import org.lilie.services.eliot.notes.TypeAvis
import org.lilie.services.eliot.notes.resultat.bulletin.Bulletin
import org.lilie.services.eliot.notes.resultat.bulletin.BulletinService
ReleveService releveService
ImpressionBulletinOptionsService impressionBulletinOptionsService
LocalPersonneService localPersonneService
+ ReleveOptionsService releveOptionsService
static final NoteFormateur COEFF_NF = new NoteFormateur(new BigDecimal('0.01'), ',', '#.##')
TableauImpressionInfo tab = new TableauImpressionInfo()
+ ReleveOptions releveOptions = releveOptionsService.findOrCree(releve.classe)
+
tab.lignesTableau = []
releve.serviceNotes?.each {ReleveServiceNote rsn ->
- tab.lignesTableau << construitMatiereImpressionInfo(rsn, noteFormateur)
+ tab.lignesTableau << construitMatiereImpressionInfo(rsn, noteFormateur, releveOptions)
}
tab.allNoteTextuelleImpression = construisNoteTextuelleInfo(releve.annotationsUtilisees)
* @author bper
*/
MatiereImpressionInfo construitMatiereImpressionInfo(ReleveServiceNote rsn,
- NoteFormateur noteFormateur) {
+ NoteFormateur noteFormateur,
+ ReleveOptions releveOptions) {
MatiereImpressionInfo mii = new MatiereImpressionInfo()
Service service = rsn.service
// sous-services
if (rsn.modaliteMatiereNotes?.size() > 0) {
rsn.modaliteMatiereNotes.each {ReleveModaliteMatiereNote rmmn ->
- mii.sousMatieres << construitSousMatiereImpressionInfo(rmmn, noteFormateur)
+ mii.sousMatieres << construitSousMatiereImpressionInfo(rmmn, noteFormateur, releveOptions)
}
} else {
// notes
mii.noteImpressions =
- construitNoteImpressionInfos(rsn.notes, noteFormateur)
+ construitNoteImpressionInfos(rsn.notes, noteFormateur, releveOptions)
}
return mii
* @author bper
*/
SousMatiereImpressionInfo construitSousMatiereImpressionInfo(ReleveModaliteMatiereNote rmmn,
- NoteFormateur noteFormateur) {
+ NoteFormateur noteFormateur,
+ ReleveOptions releveOptions) {
SousMatiereImpressionInfo smii = new SousMatiereImpressionInfo()
smii.libelle = rmmn.modaliteMatiere.libelle
// notes
smii.noteImpressions =
- construitNoteImpressionInfos(rmmn.notes, noteFormateur)
+ construitNoteImpressionInfos(rmmn.notes, noteFormateur, releveOptions)
return smii
}
* @author bper
*/
List<NoteImpressionInfo> construitNoteImpressionInfos(List<Note> notes,
- NoteFormateur noteFormateur) {
- List<NoteImpressionInfo> noteInfos = []
- notes?.each {Note note ->
- noteInfos << new NoteImpressionInfo(
+ NoteFormateur noteFormateur,
+ ReleveOptions releveOptions) {
+ List<NoteImpressionInfo> noteInfos = notes?.collect {Note note ->
+ NoteImpressionInfo noteImpressionInfo = new NoteImpressionInfo(
libelle: note.evaluation.titre,
note: noteFormateur.format(note.getValeurAffichee()),
noteMax: note.evaluation.noteMaxPossibleAffichee
)
+
+ if (releveOptions.coefficient) {
+ noteImpressionInfo.coeff = note.evaluation.coefficient.toString()
+ }
+
+ noteImpressionInfo
}
+
return noteInfos
}
eliot.notes.parametrages.periodes.Modele.libelle.notation = '${g.message(code: "groupePeriode.notation").encodeAsJavaScript()}';
eliot.notes.parametrages.periodes.Modele.libelle.examen = '${g.message(code: "groupePeriode.examen").encodeAsJavaScript()}';
eliot.notes.parametrages.periodes.Modele.libelle.selParamAppliqueA = '${g.message(code: "eliot.notes.libelle.selParamAppliqueA").encodeAsJavaScript()}';//'Sélection des paramétrages des périodes à appliquer'
- eliot.notes.parametrages.periodes.Modele.libelle.selOptionsDePublication = '${g.message(code: "eliot.notes.libelle.selOptionsDePublication").encodeAsJavaScript()}';
+ eliot.notes.parametrages.periodes.Modele.libelle.bulletinOptionsChoix = '${g.message(code: "eliot.notes.libelle.bulletinOptionsChoix").encodeAsJavaScript()}';
+ eliot.notes.parametrages.periodes.Modele.libelle.releveOptionsChoix = '${g.message(code: "eliot.notes.libelle.releveOptionsChoix").encodeAsJavaScript()}';
eliot.notes.parametrages.periodes.Modele.libelle.selClassesAModifier = '${g.message(code: "eliot.notes.libelle.selClassesAModifier").encodeAsJavaScript()}';//'Sélection des classes à modifier'
<g:setJsValueMessage name="rangSurNbEleves" code="eliot.notes.libelle.rangSurNbEleves"/>
<g:setJsValueMessage name="examen" code="groupePeriode.examen"/>
<g:setJsValueMessage name="selParamAppliqueA" code="eliot.notes.libelle.selParamAppliqueA"/>//'Sélection des paramétrages des périodes à appliquer'
- <g:setJsValueMessage name="selOptionsDePublicationConseil" code="eliot.notes.libelle.selOptionsDePublicationConseil"/>
+ <g:setJsValueMessage name="bulletinOptionsChoixConseil" code="eliot.notes.libelle.bulletinOptionsChoixConseil"/>
<g:setJsValueMessage name="selClassesAModifier" code="eliot.notes.libelle.selClassesAModifier"/>//'Sélection des classes à modifier'
// Icônes
isEleveOuParent: undefined,
choixTemplateActif: undefined,
- templateDocuments: undefined
+ templateDocuments: undefined,
+
+ releveOptions: {}
}
};
\ No newline at end of file
detailsDesNotes: this.regroupeSousServices(releve)
});
- this.fireEvent(this.Constantes.eventId.relevePublieChange,
+ this.fireEvent(
+ this.Constantes.eventId.relevePublieChange,
true,
'',
releve.length);
success: function(reponse) {
+ this.ConfigServeur.data.releveOptions = reponse.releveOptions;
+
this.afficheReleve(
reponse.releve,
reponse.publie,
}
notesText += '</b>';
+ if (!isNaN(note.valeur) && this.ConfigServeur.data.releveOptions.coefficient) {
+ notesText += ' (Coef. ' + note.coeff + ')';
+ }
+
if (i != notes.length - 1) {
notesText += separateur;
}
rangSurNbEleves: undefined,
examen: undefined,
selParamAppliqueA: undefined, //'Sélection des paramétrages des périodes à appliquer'
- selOptionsDePublication: undefined,
+ bulletinOptionsChoix: undefined,
+ releveOptionsChoix: undefined,
selClassesAModifier: undefined //'Sélection des classes à modifier'
},
icon : {
actionAfficherOptionsDePublication: function() {
this.getOptionsPublication(function(reponse) {
- this.fireEvent(this.Constantes.eventId.openWindowOptionsDePublication, this.classe, reponse.optionsDePublication);
+ this.fireEvent(
+ this.Constantes.eventId.openWindowOptionsDePublication,
+ this.classe,
+ reponse.optionsDePublication
+ );
});
},
params: {
classeId: this.classe.id,
- bulletinOptionsId: optionsDePublication.id,
- moyenneGenerale: optionsDePublication.moyenneGenerale,
- coefficient: optionsDePublication.coefficient,
- moyennePrecedente: optionsDePublication.moyennePrecedente,
- moyenneMinMax: optionsDePublication.moyenneMinMax,
- nombreNotes:optionsDePublication.nombreNotes,
- rangs: optionsDePublication.rangs
-
+ bulletinMoyenneGenerale: optionsDePublication.bulletin.moyenneGenerale,
+ bulletinCoefficient: optionsDePublication.bulletin.coefficient,
+ bulletinMoyennePrecedente: optionsDePublication.bulletin.moyennePrecedente,
+ bulletinMoyenneMinMax: optionsDePublication.bulletin.moyenneMinMax,
+ bulletinNombreNotes:optionsDePublication.bulletin.nombreNotes,
+ bulletinRangs: optionsDePublication.bulletin.rangs,
+
+ releveCoefficient: optionsDePublication.releve.coefficient
},
scope: this,
/**
* Ouvre la fenêtre popup Options de publication
* @param classe
- * @param optionsDePublication
+ * @param opt
*/
- openWindowOptionsDePublication:function (classe, optionsDePublication) {
+ openWindowOptionsDePublication:function (classe, opt) {
if (this.windowOptionsDePublication === undefined) {
this.initWindowOptionsDePublication(classe);
}
- this.optionsDePublication = optionsDePublication;
- if (this.optionsDePublication) {
- var moyenneGenerale = this.optionsDePublication.moyenneGenerale;
- var coefficient = this.optionsDePublication.coefficient;
- var moyenneMinMax = this.optionsDePublication.moyenneMinMax;
- var moyennePrecedente = this.optionsDePublication.moyennePrecedente;
- var nombreNotes = this.optionsDePublication.nombreNotes;
- var rangs = this.optionsDePublication.rangs;
- if (moyenneGenerale != undefined) {
- this.checkBoxMoyenneGenerale.setValue(moyenneGenerale);
+ this.optionsDePublication = opt;
+
+ if (opt) {
+ if (opt.bulletin.moyenneGenerale != undefined) {
+ this.bulletinCheckBox.moyenneGenerale.setValue(opt.bulletin.moyenneGenerale);
+ }
+ if (opt.bulletin.coefficient != undefined) {
+ this.bulletinCheckBox.coefficient.setValue(opt.bulletin.coefficient);
}
- if (coefficient != undefined) {
- this.checkBoxCoefficient.setValue(coefficient);
+ if (opt.bulletin.moyenneMinMax != undefined) {
+ this.bulletinCheckBox.moyennesMinMax.setValue(opt.bulletin.moyenneMinMax);
}
- if (moyenneMinMax != undefined) {
- this.checkBoxMoyennesMinMax.setValue(moyenneMinMax);
+ if (opt.bulletin.moyennePrecedente != undefined) {
+ this.bulletinCheckBox.moyennesPrecedentes.setValue(opt.bulletin.moyennePrecedente);
}
- if (moyennePrecedente != undefined) {
- this.checkBoxMoyennesPrecedentes.setValue(moyennePrecedente);
+ if (opt.bulletin.nombreNotes != undefined) {
+ this.bulletinCheckBox.nbNotes.setValue(opt.bulletin.nombreNotes);
}
- if (nombreNotes != undefined) {
- this.checkBoxNbNotes.setValue(nombreNotes);
+ if (opt.bulletin.rangs != undefined) {
+ this.bulletinCheckBox.rang.setValue(opt.bulletin.rangs);
}
- if (rangs != undefined) {
- this.checkBoxRang.setValue(rangs);
+
+ if (opt.releve.coefficient != undefined) {
+ this.releveCheckBox.coefficient.setValue(opt.releve.coefficient);
}
}
*/
initWindowOptionsDePublication:function (classe) {
- this.checkBoxMoyenneGenerale = new Ext.form.Checkbox({
- boxLabel:'<span style="font-weight:normal;">' + this.ConfigServeur.libelle.moyenneGenerale + '</span>',
- checked:true
- });
- this.checkBoxCoefficient = new Ext.form.Checkbox({
- boxLabel:'<span style="font-weight:normal;">' + this.ConfigServeur.libelle.coefficient + '</span>',
- checked:true
- });
- this.checkBoxMoyennesMinMax = new Ext.form.Checkbox({
- boxLabel:'<span style="font-weight:normal;">' + this.ConfigServeur.libelle.moyennesMinMax + '</span>',
- checked:true
- });
- this.checkBoxMoyennesPrecedentes = new Ext.form.Checkbox({
- boxLabel:'<span style="font-weight:normal;">' + this.ConfigServeur.libelle.moyennesPrecedentes + '</span>',
- checked:false
- });
- this.checkBoxNbNotes = new Ext.form.Checkbox({
- boxLabel:'<span style="font-weight:normal;">' + this.ConfigServeur.libelle.nbNotes + '</span>',
- checked:false
- });
- this.checkBoxRang = new Ext.form.Checkbox({
- boxLabel:'<span style="font-weight:normal;">' + this.ConfigServeur.libelle.rangSurNbEleves + '</span>',
- checked:false
- });
+ this.bulletinCheckBox = {
+ moyenneGenerale: new Ext.form.Checkbox({
+ boxLabel: '<span style="font-weight:normal;">' + this.ConfigServeur.libelle.moyenneGenerale + '</span>',
+ checked: true
+ }),
+ coefficient: new Ext.form.Checkbox({
+ boxLabel: '<span style="font-weight:normal;">' + this.ConfigServeur.libelle.coefficient + '</span>',
+ checked: true
+ }),
+ moyennesMinMax: new Ext.form.Checkbox({
+ boxLabel: '<span style="font-weight:normal;">' + this.ConfigServeur.libelle.moyennesMinMax + '</span>',
+ checked: true
+ }),
+ moyennesPrecedentes: new Ext.form.Checkbox({
+ boxLabel: '<span style="font-weight:normal;">' + this.ConfigServeur.libelle.moyennesPrecedentes + '</span>',
+ checked: false
+ }),
+ nbNotes: new Ext.form.Checkbox({
+ boxLabel: '<span style="font-weight:normal;">' + this.ConfigServeur.libelle.nbNotes + '</span>',
+ checked: false
+ }),
+ rang: new Ext.form.Checkbox({
+ boxLabel: '<span style="font-weight:normal;">' + this.ConfigServeur.libelle.rangSurNbEleves + '</span>',
+ checked: false
+ })
+ };
+
+ this.releveCheckBox = {
+ coefficient: new Ext.form.Checkbox({
+ boxLabel: '<span style="font-weight:normal;">' + this.ConfigServeur.libelle.coefficient + '</span>',
+ checked: true
+ })
+ };
this.buttonOk = new Ext.Button({
text:this.ConfigServeur.libelle.ok,
handler:function () {
- this.optionsDePublication.moyenneGenerale = this.checkBoxMoyenneGenerale.getValue();
- this.optionsDePublication.coefficient = this.checkBoxCoefficient.getValue();
- this.optionsDePublication.moyenneMinMax = this.checkBoxMoyennesMinMax.getValue();
- this.optionsDePublication.moyennePrecedente = this.checkBoxMoyennesPrecedentes.getValue();
- this.optionsDePublication.nombreNotes = this.checkBoxNbNotes.getValue();
- this.optionsDePublication.rangs = this.checkBoxRang.getValue();
+ this.optionsDePublication.bulletin.moyenneGenerale = this.bulletinCheckBox.moyenneGenerale.getValue();
+ this.optionsDePublication.bulletin.coefficient = this.bulletinCheckBox.coefficient.getValue();
+ this.optionsDePublication.bulletin.moyenneMinMax = this.bulletinCheckBox.moyennesMinMax.getValue();
+ this.optionsDePublication.bulletin.moyennePrecedente = this.bulletinCheckBox.moyennesPrecedentes.getValue();
+ this.optionsDePublication.bulletin.nombreNotes = this.bulletinCheckBox.nbNotes.getValue();
+ this.optionsDePublication.bulletin.rangs = this.bulletinCheckBox.rang.getValue();
+
+ this.optionsDePublication.releve.coefficient = this.releveCheckBox.coefficient.getValue();
this.fireEvent(
this.Constantes.eventId.enregistreOptionsDePublication,
modal:true,
layout:'fit',
width:350,
- height:250,
+ height:290,
closeAction:'hide',
resizable:false,
plain:true,
items:[
{
xtype:'label',
- html:this.ConfigServeur.libelle.selOptionsDePublication + '<div style="margin: 0 0 5px 0"/>'
+ html:this.ConfigServeur.libelle.bulletinOptionsChoix + '<div style="margin: 0 0 5px 0"/>'
+ },
+ {
+ xtype:'checkboxgroup',
+ columns:1,
+ labelWidth:30,
+ hideLabel:true,
+ items:[
+ this.bulletinCheckBox.moyenneGenerale,
+ this.bulletinCheckBox.coefficient,
+ this.bulletinCheckBox.moyennesMinMax,
+ this.bulletinCheckBox.moyennesPrecedentes,
+ this.bulletinCheckBox.nbNotes,
+ this.bulletinCheckBox.rang
+ ]
+ },
+ {
+ xtype:'label',
+ html:this.ConfigServeur.libelle.releveOptionsChoix + '<div style="margin: 0 0 5px 0"/>'
},
{
xtype:'checkboxgroup',
labelWidth:30,
hideLabel:true,
items:[
- this.checkBoxMoyenneGenerale,
- this.checkBoxCoefficient,
- this.checkBoxMoyennesMinMax,
- this.checkBoxMoyennesPrecedentes,
- this.checkBoxNbNotes,
- this.checkBoxRang
+ this.releveCheckBox.coefficient
]
}
]
rangSurNbEleves: undefined,
examen: undefined,
selParamAppliqueA: undefined, //'Sélection des paramétrages des périodes à appliquer'
- selOptionsDePublicationConseil: undefined,
+ bulletinOptionsChoixConseil: undefined,
selClassesAModifier: undefined //'Sélection des classes à modifier'
},
params: {
classeId: classe.get('id'),
- bulletinOptionsId: optionsDePublication.id,
- moyenneGenerale: optionsDePublication.moyenneGenerale,
- coefficient: optionsDePublication.coefficient,
- moyennePrecedente: optionsDePublication.moyennePrecedente,
- moyenneMinMax: optionsDePublication.moyenneMinMax,
- nombreNotes:optionsDePublication.nombreNotes,
- rangs: optionsDePublication.rangs
-
+ bulletinMoyenneGenerale: optionsDePublication.moyenneGenerale,
+ bulletinCoefficient: optionsDePublication.coefficient,
+ bulletinMoyennePrecedente: optionsDePublication.moyennePrecedente,
+ bulletinMoyenneMinMax: optionsDePublication.moyenneMinMax,
+ bulletinNombreNotes:optionsDePublication.nombreNotes,
+ bulletinRangs: optionsDePublication.rangs
},
scope: this,
items:[
{
xtype:'label',
- html:this.ConfigServeur.libelle.selOptionsDePublicationConseil + '<div style="margin: 0 0 5px 0"/>'
+ html:this.ConfigServeur.libelle.bulletinOptionsChoixConseil + '<div style="margin: 0 0 5px 0"/>'
},
{
xtype:'checkboxgroup',