forked from ScoDoc/ScoDoc
Merge branch 'master' of https://scodoc.org/git/viennet/ScoDoc into ScoDoc8
Apply fixes.
This commit is contained in:
commit
5f425da6c0
@ -101,8 +101,7 @@ def formsemestre_editwithmodules(context, REQUEST, formsemestre_id):
|
||||
|
||||
|
||||
def can_edit_sem(context, REQUEST, formsemestre_id="", sem=None):
|
||||
"""Return sem if user can edit it, False otherwise
|
||||
"""
|
||||
"""Return sem if user can edit it, False otherwise"""
|
||||
sem = sem or sco_formsemestre.get_formsemestre(context, formsemestre_id)
|
||||
authuser = REQUEST.AUTHENTICATED_USER
|
||||
if not authuser.has_permission(ScoImplement, context): # pas chef
|
||||
@ -808,9 +807,9 @@ def do_formsemestre_createwithmodules(context, REQUEST=None, edit=False):
|
||||
|
||||
def formsemestre_delete_moduleimpls(context, formsemestre_id, module_ids_to_del):
|
||||
"""Delete moduleimpls
|
||||
module_ids_to_del: list of module_id (warning: not moduleimpl)
|
||||
Moduleimpls must have no associated evaluations.
|
||||
"""
|
||||
module_ids_to_del: list of module_id (warning: not moduleimpl)
|
||||
Moduleimpls must have no associated evaluations.
|
||||
"""
|
||||
ok = True
|
||||
msg = []
|
||||
for module_id in module_ids_to_del:
|
||||
@ -1023,7 +1022,10 @@ def do_formsemestre_clone(
|
||||
for pname in prefs.base_prefs.prefs[orig_formsemestre_id]:
|
||||
if not prefs.is_global(pname):
|
||||
pvalue = prefs[pname]
|
||||
prefs.base_prefs.set(formsemestre_id, pname, pvalue)
|
||||
try:
|
||||
prefs.base_prefs.set(formsemestre_id, pname, pvalue)
|
||||
except:
|
||||
log("do_formsemestre_clone: ignoring old preference %s" % pname)
|
||||
|
||||
# 5- Copy formules utilisateur
|
||||
objs = sco_compute_moy.formsemestre_ue_computation_expr_list(
|
||||
@ -1426,8 +1428,7 @@ def formsemestre_change_lock(
|
||||
def formsemestre_change_publication_bul(
|
||||
context, formsemestre_id, REQUEST=None, dialog_confirmed=False
|
||||
):
|
||||
"""Change etat publication bulletins sur portail
|
||||
"""
|
||||
"""Change etat publication bulletins sur portail"""
|
||||
ok, err = context._check_access_diretud(formsemestre_id, REQUEST)
|
||||
if not ok:
|
||||
return err
|
||||
@ -1479,8 +1480,7 @@ formsemestre_uecoef_delete = _formsemestre_uecoef_editor.delete
|
||||
|
||||
|
||||
def formsemestre_edit_uecoefs(context, formsemestre_id, err_ue_id=None, REQUEST=None):
|
||||
"""Changement manuel des coefficients des UE capitalisées.
|
||||
"""
|
||||
"""Changement manuel des coefficients des UE capitalisées."""
|
||||
context = context.Notes # si appele d'en haut, eg par exception ScoValueError
|
||||
ok, err = context._check_access_diretud(formsemestre_id, REQUEST)
|
||||
if not ok:
|
||||
|
@ -27,13 +27,9 @@
|
||||
|
||||
"""Semestres: gestion parcours DUT (Arreté du 13 août 2005)
|
||||
"""
|
||||
import urllib, time, datetime
|
||||
|
||||
from notesdb import *
|
||||
from sco_utils import *
|
||||
from notes_log import log
|
||||
from scolog import logdb
|
||||
from notes_table import *
|
||||
import sco_formsemestre
|
||||
from sco_codes_parcours import *
|
||||
from dutrules import DUTRules # regles generees a partir du CSV
|
||||
@ -264,7 +260,7 @@ class SituationEtudParcoursGeneric:
|
||||
return False # pas de semestre décalés
|
||||
if n == NO_SEMESTRE_ID or n > self.parcours.NB_SEM - 2:
|
||||
return False # n+2 en dehors du parcours
|
||||
if self._sem_list_validated(Set(range(1, n))):
|
||||
if self._sem_list_validated(set(range(1, n))):
|
||||
# antérieurs validé, teste suivant
|
||||
n1 = n + 1
|
||||
for sem in self.get_semestres():
|
||||
@ -426,7 +422,7 @@ class SituationEtudParcoursGeneric:
|
||||
if not cur or cur["formsemestre_id"] != self.formsemestre_id:
|
||||
log(
|
||||
"*** SituationEtudParcours: search_prev: cur not found (formsemestre_id=%s, etudid=%s)"
|
||||
% (formsemestre_id, etudid)
|
||||
% (self.formsemestre_id, self.etudid)
|
||||
)
|
||||
return None # pas de semestre courant !!!
|
||||
# Cherche semestre antérieur de même formation (code) et semestre_id precedent
|
||||
@ -602,7 +598,7 @@ class SituationEtudParcoursGeneric:
|
||||
self.prev["formsemestre_id"],
|
||||
self.etudid,
|
||||
decision.new_code_prev,
|
||||
decision.assiduite, # XXX attention: en toute rigueur il faudrait utiliser une indication de l'assiduite au sem. precedent, que nous n'avons pas...
|
||||
decision.assiduite, # attention: en toute rigueur il faudrait utiliser une indication de l'assiduite au sem. precedent, que nous n'avons pas...
|
||||
REQUEST=REQUEST,
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user