# -*- mode: python -*- # -*- coding: utf-8 -*- ############################################################################## # # Gestion scolarite IUT # # Copyright (c) 1999 - 2021 Emmanuel Viennet. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program 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 # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Emmanuel Viennet emmanuel.viennet@viennet.net # ############################################################################## """Formulaires gestion des groupes """ import re import sco_utils as scu import notesdb as ndb from notes_log import log import sco_formsemestre import sco_groups from sco_exceptions import AccessDenied def affectGroups(context, partition_id, REQUEST=None): """Formulaire affectation des etudiants aux groupes de la partition. Permet aussi la creation et la suppression de groupes. """ # Ported from DTML and adapted to new group management (nov 2009) partition = sco_groups.get_partition(context, partition_id) formsemestre_id = partition["formsemestre_id"] if not sco_groups.can_change_groups(context, REQUEST, formsemestre_id): raise AccessDenied("vous n'avez pas la permission d'effectuer cette opération") H = [ context.sco_header( REQUEST, page_title="Affectation aux groupes", javascripts=["js/groupmgr.js"], cssstyles=["css/groups.css"], ), """

Affectation aux groupes de %s

""" % partition["partition_name"], ] H += [ """
""", """

Faites glisser les étudiants d'un groupe à l'autre. Les modifications ne sont enregistrées que lorsque vous cliquez sur le bouton "Enregistrer ces groupes". Vous pouvez créer de nouveaux groupes. Pour supprimer un groupe, utiliser le lien "suppr." en haut à droite de sa boite. Vous pouvez aussi répartir automatiquement les groupes.

""" % partition, """
""", """
""", """
""", """
""", """""" % partition_id, """                    Editer groupes de

""", context.sco_footer(REQUEST), ] return "\n".join(H)