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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Paul Milleville
SCODOC_R6A06
Commits
61061d49
Commit
61061d49
authored
3 years ago
by
Emmanuel Viennet
Browse files
Options
Downloads
Patches
Plain Diff
Table recap.: export evaluations en excel
parent
6e43ec6f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/models/formsemestre.py
+7
-2
7 additions, 2 deletions
app/models/formsemestre.py
app/scodoc/sco_recapcomplet.py
+3
-2
3 additions, 2 deletions
app/scodoc/sco_recapcomplet.py
app/static/js/table_recap.js
+1
-1
1 addition, 1 deletion
app/static/js/table_recap.js
with
11 additions
and
5 deletions
app/models/formsemestre.py
+
7
−
2
View file @
61061d49
...
...
@@ -287,7 +287,7 @@ class FormSemestre(db.Model):
"""
if
not
self
.
etapes
:
return
""
return
"
,
"
.
join
(
sorted
([
str
(
x
.
etape_apo
)
for
x
in
self
.
etapes
]))
return
"
,
"
.
join
(
sorted
([
etape
.
etape_apo
for
etape
in
self
.
etapes
if
etape
]))
def
responsables_str
(
self
,
abbrev_prenom
=
True
)
->
str
:
"""
chaîne
"
J. Dupond, X. Martin
"
...
...
@@ -449,10 +449,15 @@ class FormSemestreEtape(db.Model):
db
.
Integer
,
db
.
ForeignKey
(
"
notes_formsemestre.id
"
),
)
# etape_apo aurait du etre not null, mais oublié
etape_apo
=
db
.
Column
(
db
.
String
(
APO_CODE_STR_LEN
),
index
=
True
)
def
__bool__
(
self
):
"
Etape False if code empty
"
return
self
.
etape_apo
is
not
None
and
(
len
(
self
.
etape_apo
)
>
0
)
def
__repr__
(
self
):
return
f
"
<Etape
{
self
.
id
}
apo=
{
self
.
etape_apo
}
>
"
return
f
"
<Etape
{
self
.
id
}
apo=
{
self
.
etape_apo
!r
}
>
"
def
as_apovdi
(
self
):
return
ApoEtapeVDI
(
self
.
etape_apo
)
...
...
This diff is collapsed.
Click to expand it.
app/scodoc/sco_recapcomplet.py
+
3
−
2
View file @
61061d49
...
...
@@ -85,7 +85,7 @@ def formsemestre_recapcomplet(
"""
formsemestre
=
FormSemestre
.
query
.
get_or_404
(
formsemestre_id
)
file_formats
=
{
"
csv
"
,
"
json
"
,
"
xls
"
,
"
xlsx
"
,
"
xlsall
"
,
"
xml
"
}
supported_formats
=
file_formats
|
{
"
html
"
}
supported_formats
=
file_formats
|
{
"
html
"
,
"
evals
"
}
if
tabformat
not
in
supported_formats
:
raise
ScoValueError
(
f
"
Format non supporté:
{
tabformat
}
"
)
is_file
=
tabformat
in
file_formats
...
...
@@ -131,7 +131,8 @@ def formsemestre_recapcomplet(
for
(
format
,
label
)
in
(
(
"
html
"
,
"
Tableau
"
),
(
"
evals
"
,
"
Avec toutes les évaluations
"
),
(
"
xlsx
"
,
"
Excel non formatté
"
),
(
"
xlsx
"
,
"
Excel (non formatté)
"
),
(
"
xlsall
"
,
"
Excel avec évaluations
"
),
(
"
xml
"
,
"
Bulletins XML (obsolète)
"
),
(
"
json
"
,
"
Bulletins JSON
"
),
):
...
...
This diff is collapsed.
Click to expand it.
app/static/js/table_recap.js
+
1
−
1
View file @
61061d49
...
...
@@ -100,7 +100,7 @@ $(function () {
},
{
// Elimine les 0 à gauche pour les exports excel et les "copy"
targets
:
[
"
col_mod
"
,
"
col_moy_gen
"
,
"
col_ue
"
,
"
col_res
"
,
"
col_sae
"
],
targets
:
[
"
col_mod
"
,
"
col_moy_gen
"
,
"
col_ue
"
,
"
col_res
"
,
"
col_sae
"
,
"
evaluation
"
],
render
:
function
(
data
,
type
,
row
)
{
return
type
===
'
export
'
?
data
.
replace
(
/0
(\d\.
.*
)
/
,
'
$1
'
)
:
data
;
}
...
...
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