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
e772a293
Commit
e772a293
authored
8 months ago
by
Emmanuel Viennet
Browse files
Options
Downloads
Patches
Plain Diff
Page passage d'un semestre à l'autre: améliore listes
parent
dc009856
Branches
Branches containing commit
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_inscr_passage.py
+46
-42
46 additions, 42 deletions
app/scodoc/sco_inscr_passage.py
app/templates/formsemestre/synchro_etuds.j2
+23
-1
23 additions, 1 deletion
app/templates/formsemestre/synchro_etuds.j2
sco_version.py
+1
-1
1 addition, 1 deletion
sco_version.py
with
70 additions
and
44 deletions
app/scodoc/sco_inscr_passage.py
+
46
−
42
View file @
e772a293
...
@@ -349,6 +349,7 @@ def formsemestre_inscr_passage(
...
@@ -349,6 +349,7 @@ def formsemestre_inscr_passage(
inscrit_groupes
=
inscrit_groupes
,
inscrit_groupes
=
inscrit_groupes
,
inscrit_parcours
=
inscrit_parcours
,
inscrit_parcours
=
inscrit_parcours
,
ignore_jury
=
ignore_jury
,
ignore_jury
=
ignore_jury
,
with_apo_cols
=
False
,
)
)
else
:
else
:
if
not
dialog_confirmed
:
if
not
dialog_confirmed
:
...
@@ -447,9 +448,10 @@ def formsemestre_inscr_passage(
...
@@ -447,9 +448,10 @@ def formsemestre_inscr_passage(
"""
"""
)
)
#
return
render_template
(
return
render_template
(
"
sco_page.j2
"
,
title
=
"
Passage des étudiants
"
,
content
=
"
\n
"
.
join
(
H
)
"
formsemestre/synchro_etuds.j2
"
,
title
=
"
Passage des étudiants
"
,
content
=
"
\n
"
.
join
(
H
),
)
)
...
@@ -462,6 +464,7 @@ def _build_page(
...
@@ -462,6 +464,7 @@ def _build_page(
inscrit_groupes
=
False
,
inscrit_groupes
=
False
,
inscrit_parcours
=
False
,
inscrit_parcours
=
False
,
ignore_jury
=
False
,
ignore_jury
=
False
,
with_apo_cols
:
bool
=
True
,
):
):
inscrit_groupes
=
int
(
inscrit_groupes
)
inscrit_groupes
=
int
(
inscrit_groupes
)
inscrit_parcours
=
int
(
inscrit_parcours
)
inscrit_parcours
=
int
(
inscrit_parcours
)
...
@@ -506,7 +509,7 @@ def _build_page(
...
@@ -506,7 +509,7 @@ def _build_page(
de ce semestre (
{
formsemestre
.
date_debut
.
strftime
(
scu
.
DATE_FMT
)
}
) sont pris en
de ce semestre (
{
formsemestre
.
date_debut
.
strftime
(
scu
.
DATE_FMT
)
}
) sont pris en
compte.</em>
compte.</em>
</div>
</div>
{
etuds_select_boxes
(
auth_etuds_by_sem
,
inscrits_ailleurs
)
}
{
etuds_select_boxes
(
auth_etuds_by_sem
,
inscrits_ailleurs
,
with_apo_cols
=
with_apo_cols
)
}
<input type=
"
submit
"
name=
"
submitted
"
value=
"
Appliquer les modifications
"
/>
<input type=
"
submit
"
name=
"
submitted
"
value=
"
Appliquer les modifications
"
/>
...
@@ -586,6 +589,7 @@ def etuds_select_boxes(
...
@@ -586,6 +589,7 @@ def etuds_select_boxes(
export_cat_xls
=
None
,
export_cat_xls
=
None
,
base_url
=
""
,
base_url
=
""
,
read_only
=
False
,
read_only
=
False
,
with_apo_cols
:
bool
=
True
,
):
):
"""
Boites pour selection étudiants par catégorie
"""
Boites pour selection étudiants par catégorie
auth_etuds_by_cat = { category : {
'
info
'
: {},
'
etuds
'
: ... }
auth_etuds_by_cat = { category : {
'
info
'
: {},
'
etuds
'
: ... }
...
@@ -598,22 +602,7 @@ def etuds_select_boxes(
...
@@ -598,22 +602,7 @@ def etuds_select_boxes(
return
etuds_select_box_xls
(
auth_etuds_by_cat
[
export_cat_xls
])
return
etuds_select_box_xls
(
auth_etuds_by_cat
[
export_cat_xls
])
H
=
[
H
=
[
"""
<script type=
"
text/javascript
"
>
"""
function sem_select(formsemestre_id, state) {
var elems = document.getElementById(formsemestre_id).getElementsByTagName(
"
input
"
);
for (var i =0; i < elems.length; i++) { elems[i].checked=state; }
}
function sem_select_inscrits(formsemestre_id) {
var elems = document.getElementById(formsemestre_id).getElementsByTagName(
"
input
"
);
for (var i =0; i < elems.length; i++) {
if (elems[i].parentNode.className.indexOf(
'
inscrit
'
) >= 0) {
elems[i].checked=true;
} else {
elems[i].checked=false;
}
}
}
</script>
<div class=
"
etuds_select_boxes
"
>
"""
<div class=
"
etuds_select_boxes
"
>
"""
]
# "
]
# "
# Élimine les boites vides:
# Élimine les boites vides:
...
@@ -645,6 +634,7 @@ def etuds_select_boxes(
...
@@ -645,6 +634,7 @@ def etuds_select_boxes(
sel_inscrits
=
sel_inscrits
,
sel_inscrits
=
sel_inscrits
,
xls_url
=
xls_url
,
xls_url
=
xls_url
,
inscrits_ailleurs
=
inscrits_ailleurs
,
inscrits_ailleurs
=
inscrits_ailleurs
,
with_apo_cols
=
with_apo_cols
,
)
)
)
)
...
@@ -659,6 +649,7 @@ def etuds_select_box(
...
@@ -659,6 +649,7 @@ def etuds_select_box(
sel_inscrits
:
bool
=
True
,
sel_inscrits
:
bool
=
True
,
xls_url
:
str
=
""
,
xls_url
:
str
=
""
,
inscrits_ailleurs
:
set
=
None
,
inscrits_ailleurs
:
set
=
None
,
with_apo_cols
:
bool
=
True
,
)
->
str
:
)
->
str
:
"""
HTML pour une
"
boite
"
avec une liste d
'
étudiants à sélectionner
"""
"""
HTML pour une
"
boite
"
avec une liste d
'
étudiants à sélectionner
"""
inscrits_ailleurs
=
inscrits_ailleurs
or
{}
inscrits_ailleurs
=
inscrits_ailleurs
or
{}
...
@@ -693,16 +684,17 @@ def etuds_select_box(
...
@@ -693,16 +684,17 @@ def etuds_select_box(
if
xls_url
:
if
xls_url
:
H
.
append
(
f
'
<a href=
"
{
xls_url
}
"
>
{
scu
.
ICON_XLS
}
</a>
'
)
H
.
append
(
f
'
<a href=
"
{
xls_url
}
"
>
{
scu
.
ICON_XLS
}
</a>
'
)
H
.
append
(
"
</div>
"
)
H
.
append
(
"
</div>
"
)
checkbox_title
=
"
<th></th>
"
if
with_checkbox
else
""
checkbox_title
=
"""
<th class=
"
no-sort
"
></th>
"""
if
with_checkbox
else
""
ths
=
(
f
"
<th>Étape</th>
{
checkbox_title
}
<th>Nom</th><th>Paiement</th><th>Finalisé</th>
"
if
with_apo_cols
else
f
"
{
checkbox_title
}
<th>Nom</th>
"
)
H
.
append
(
H
.
append
(
f
"""
<table class=
"
etuds-box
"
>
f
"""
<table class=
"
etuds-box
"
>
<thead>
<thead>
<tr>
<tr>
<th>Étape</th>
{
ths
}
{
checkbox_title
}
<th>Nom</th>
<th>Paiement</th>
<th>Finalisé</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -723,6 +715,7 @@ def etuds_select_box(
...
@@ -723,6 +715,7 @@ def etuds_select_box(
etud_key
=
infos
.
get
(
"
etud_key
"
,
"
etudid
"
),
etud_key
=
infos
.
get
(
"
etud_key
"
,
"
etudid
"
),
is_inscrit
=
is_inscrit
,
is_inscrit
=
is_inscrit
,
extra_class
=
extra_class
,
extra_class
=
extra_class
,
with_apo_cols
=
with_apo_cols
,
)
)
)
)
H
.
append
(
H
.
append
(
...
@@ -741,6 +734,7 @@ def _etud_row(
...
@@ -741,6 +734,7 @@ def _etud_row(
etud_key
:
str
=
""
,
etud_key
:
str
=
""
,
is_inscrit
:
bool
=
False
,
is_inscrit
:
bool
=
False
,
extra_class
:
str
=
""
,
extra_class
:
str
=
""
,
with_apo_cols
:
bool
=
True
,
)
->
str
:
)
->
str
:
"""
HTML
'
row
'
for this etud
"""
"""
HTML
'
row
'
for this etud
"""
H
=
[]
H
=
[]
...
@@ -768,6 +762,7 @@ def _etud_row(
...
@@ -768,6 +762,7 @@ def _etud_row(
)
)
paiement
=
etud
.
get
(
"
paiementinscription
"
,
True
)
paiement
=
etud
.
get
(
"
paiementinscription
"
,
True
)
datefinalisation
=
etud
.
get
(
"
datefinalisationinscription
"
)
datefinalisation
=
etud
.
get
(
"
datefinalisationinscription
"
)
if
with_apo_cols
:
H
.
append
(
H
.
append
(
f
"""
f
"""
<tr class=
"
{
extra_class
}
"
>
<tr class=
"
{
extra_class
}
"
>
...
@@ -785,6 +780,15 @@ def _etud_row(
...
@@ -785,6 +780,15 @@ def _etud_row(
</tr>
</tr>
"""
"""
)
)
else
:
# juste checkbox et nom
H
.
append
(
f
"""
<tr class=
"
{
extra_class
}
"
>
{
checkbox_cell
}
<td data-order=
"
{
etud
.
get
(
"
nom
"
,
""
).
upper
()
}
"
>
{
elink
}
</td>
</tr>
"""
)
return
"
\n
"
.
join
(
H
)
return
"
\n
"
.
join
(
H
)
...
...
This diff is collapsed.
Click to expand it.
app/templates/formsemestre/synchro_etuds.j2
+
23
−
1
View file @
e772a293
{% extends "sco_page.j2" %}
{% extends "sco_page.j2" %}
{% import 'wtf.j2' as wtf %}
{% import 'wtf.j2' as wtf %}
{# Utilisé pour passage d'un semestre à l'autre et pour synchro Apogée #}
{% block scripts %}
{% block scripts %}
{{ super() }}
{{ super() }}
<script>
<script>
function sem_select(formsemestre_id, state) {
let elems = document.getElementById(formsemestre_id).getElementsByTagName("input");
for (var i =0; i < elems.length; i++) {
elems[i].checked = state;
}
}
function sem_select_inscrits(formsemestre_id) {
var elems = document.getElementById(formsemestre_id).getElementsByTagName("input");
for (var i =0; i < elems.length; i++) {
if (elems[i].parentNode.className.indexOf('inscrit') >= 0) {
elems[i].checked=true;
} else {
elems[i].checked=false;
}
}
}
$(document).ready(function() {
$(document).ready(function() {
$('.etuds-box').DataTable({
$('.etuds-box').DataTable({
paging: false,
paging: false,
autoWidth: false,
autoWidth: false,
searching: false,
searching: false,
info: false // Disable the "Showing 1 to X of X entries" information
info: false, // Disable the "Showing 1 to X of X entries"
columnDefs: [
{ targets: 'no-sort', orderable: false } // Disable sorting on columns with class 'no-sort'
]
});
});
});
});
</script>
</script>
...
...
This diff is collapsed.
Click to expand it.
sco_version.py
+
1
−
1
View file @
e772a293
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
"
Infos sur version ScoDoc
"
"
Infos sur version ScoDoc
"
SCOVERSION
=
"
9.7.3
6
"
SCOVERSION
=
"
9.7.3
7
"
SCONAME
=
"
ScoDoc
"
SCONAME
=
"
ScoDoc
"
...
...
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
register
or
sign in
to comment