Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SCODOC_R6A06
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Paul Milleville
SCODOC_R6A06
Commits
fef9b70e
Commit
fef9b70e
authored
Jan 13, 2023
by
Emmanuel Viennet
Browse files
Options
Downloads
Patches
Plain Diff
Fix #559
parent
6c850d26
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/scodoc/sco_formsemestre_edit.py
+18
-10
18 additions, 10 deletions
app/scodoc/sco_formsemestre_edit.py
app/scodoc/sco_synchro_etuds.py
+1
-1
1 addition, 1 deletion
app/scodoc/sco_synchro_etuds.py
app/views/notes.py
+1
-1
1 addition, 1 deletion
app/views/notes.py
with
20 additions
and
12 deletions
app/scodoc/sco_formsemestre_edit.py
+
18
−
10
View file @
fef9b70e
...
...
@@ -28,7 +28,7 @@
"""
Form choix modules / responsables et creation formsemestre
"""
import
flask
from
flask
import
url_for
,
flash
from
flask
import
url_for
,
flash
,
redirect
from
flask
import
g
,
request
from
flask_login
import
current_user
...
...
@@ -177,10 +177,12 @@ def do_formsemestre_createwithmodules(edit=False, formsemestre: FormSemestre = N
uid2display
[
u
.
id
]
=
u
.
get_nomplogin
()
allowed_user_names
=
list
(
uid2display
.
values
())
+
[
""
]
#
if
formsemestre
:
formation
=
formsemestre
.
formation
else
:
formation_id
=
int
(
vals
[
"
formation_id
"
])
formation
=
Formation
.
query
.
get
(
formation_id
)
if
formation
is
None
:
raise
ScoValueError
(
"
Formation inexistante !
"
)
formation
=
Formation
.
query
.
get_or_404
(
formation_id
)
is_apc
=
formation
.
is_apc
()
if
not
edit
:
initvalues
=
{
"
titre
"
:
_default_sem_title
(
formation
)}
...
...
@@ -236,7 +238,7 @@ def do_formsemestre_createwithmodules(edit=False, formsemestre: FormSemestre = N
else
:
modules
=
(
Module
.
query
.
filter
(
Module
.
formation_id
==
formation
_
id
,
UniteEns
.
id
==
Module
.
ue_id
Module
.
formation_id
==
formation
.
id
,
UniteEns
.
id
==
Module
.
ue_id
)
.
order_by
(
Module
.
module_type
,
UniteEns
.
numero
,
Module
.
numero
)
.
all
()
...
...
@@ -254,7 +256,7 @@ def do_formsemestre_createwithmodules(edit=False, formsemestre: FormSemestre = N
#
modform
=
[
(
"
formsemestre_id
"
,
{
"
input_type
"
:
"
hidden
"
}),
(
"
formation_id
"
,
{
"
input_type
"
:
"
hidden
"
,
"
default
"
:
formation
_
id
}),
(
"
formation_id
"
,
{
"
input_type
"
:
"
hidden
"
,
"
default
"
:
formation
.
id
}),
(
"
date_debut
"
,
{
...
...
@@ -435,7 +437,7 @@ def do_formsemestre_createwithmodules(edit=False, formsemestre: FormSemestre = N
)
if
edit
:
formtit
=
f
"""
<p><a href=
"
{
url_for
(
"
notes.formsemestre_edit_uecoefs
"
,
<p><a
class=
"
stdlink
"
href=
"
{
url_for
(
"
notes.formsemestre_edit_uecoefs
"
,
scodoc_dept
=
g
.
scodoc_dept
,
formsemestre_id
=
formsemestre
.
id
)
}
"
>Modifier les coefficients des UE capitalisées</a>
</p>
...
...
@@ -772,7 +774,7 @@ def do_formsemestre_createwithmodules(edit=False, formsemestre: FormSemestre = N
if
tf
[
0
]
==
0
or
msg
:
return
f
"""
<p>Formation <a class=
"
discretelink
"
href=
"
{
url_for
(
"
notes.ue_table
"
,
scodoc_dept
=
g
.
scodoc_dept
,
formation_id
=
formation
_
id
)
formation_id
=
formation
.
id
)
}
"
><em>
{
formation
.
titre
}
</em> (
{
formation
.
acronyme
}
), version
{
formation
.
version
}
, code
{
formation
.
formation_code
}
</a>
</p>
...
...
@@ -1769,7 +1771,13 @@ def formsemestre_edit_uecoefs(formsemestre_id, err_ue_id=None):
if
tf
[
0
]
==
0
:
return
"
\n
"
.
join
(
H
)
+
tf
[
1
]
+
footer
elif
tf
[
0
]
==
-
1
:
return
"
<h4>annulation</h4>
"
return
redirect
(
url_for
(
"
notes.formsemestre_editwithmodules
"
,
scodoc_dept
=
g
.
scodoc_dept
,
formsemestre_id
=
formsemestre_id
,
)
)
else
:
# change values
# 1- supprime les coef qui ne sont plus forcés
...
...
This diff is collapsed.
Click to expand it.
app/scodoc/sco_synchro_etuds.py
+
1
−
1
View file @
fef9b70e
...
...
@@ -102,7 +102,7 @@ def formsemestre_synchro_etuds(
if
not
sem
[
"
etapes
"
]:
raise
ScoValueError
(
"""
opération impossible: ce semestre n
'
a pas de code étape
(voir
"
<a href=
"
formsemestre_editwithmodules?
formation_id=%(formation_id)s&
formsemestre_id=%(formsemestre_id)s
"
>Modifier ce semestre</a>
"
)
(voir
"
<a href=
"
formsemestre_editwithmodules?formsemestre_id=%(formsemestre_id)s
"
>Modifier ce semestre</a>
"
)
"""
%
sem
)
...
...
This diff is collapsed.
Click to expand it.
app/views/notes.py
+
1
−
1
View file @
fef9b70e
...
...
@@ -957,7 +957,7 @@ def edit_enseignants_form(moduleimpl_id):
<p class=
"
help
"
>Pour changer le responsable du module, passez par la
page
"
<a class=
"
stdlink
"
href=
"
{
url_for
(
"
notes.formsemestre_editwithmodules
"
,
scodoc_dept
=
g
.
scodoc_dept
,
formation_id
=
sem
[
"
formation_id
"
],
formsemestre_id
=
M
[
"
formsemestre_id
"
])
formsemestre_id
=
M
[
"
formsemestre_id
"
])
}
"
>Modification du semestre</a>
"
,
accessible uniquement au responsable de la formation (chef de département)
</p>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment