Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Maud Kerebel
scripts
Commits
927e39a8
Commit
927e39a8
authored
Sep 01, 2014
by
Pierre-Elliott Bécue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[stats_cableurs2] Fial
parent
26c29cf3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
utils/stats_cableurs2.py
utils/stats_cableurs2.py
+2
-2
No files found.
utils/stats_cableurs2.py
View file @
927e39a8
...
...
@@ -58,7 +58,7 @@ def actions_cableurs():
champ
=
parse_historique
(
histo
[
j
])[
0
]
champ_action
=
parse_historique
(
histo
[
j
])[
1
]
date
=
parse_historique
(
histo
[
j
])[
2
]
if
((
champ_action
==
u
'inscription'
or
champ_action
==
u
'debutAdhesion+%s'
%
(
crans_utils
.
toGeneralizedTimeFormat
(
config
.
debut_periode_transitoire
),)
)
or
len
(
champ
)
>
5
and
(
champ
[
5
]
==
u
'debutAdhesion+%s'
%
(
crans_utils
.
toGeneralizedTimeFormat
(
config
.
debut_periode_transitoire
),
)
or
champ
[
5
]
==
u
'inscription'
))
and
date
>
datetime
.
date
(
config
.
ann_scol
,
8
,
16
)
:
if
((
champ_action
==
u
'inscription'
or
u
"debutAdhesion+"
in
champ_action
)
or
len
(
champ
)
>
5
and
(
u
"debutAdhesion+"
in
champ
[
5
]
or
champ
[
5
]
==
u
'inscription'
))
and
date
>
datetime
.
date
(
config
.
ann_scol
,
8
,
16
)
:
historique
.
append
(
champ
)
return
historique
...
...
@@ -76,7 +76,7 @@ def score_cableurs():
histo_action
=
historique
[
l
][
4
]
if
histo_uid
==
uid
and
histo_action
==
u
'inscription'
:
inscriptions
=
inscriptions
+
1
if
histo_uid
==
uid
and
(
histo_action
==
u
'debutAdhesion+%s'
%
(
crans_utils
.
toGeneralizedTimeFormat
(
config
.
debut_periode_transitoire
),)
or
(
len
(
historique
[
l
])
>
5
and
(
historique
[
l
][
5
]
==
u
'debutAdhesion+%s'
%
(
crans_utils
.
toGeneralizedTimeFormat
(
config
.
debut_periode_transitoire
),)
))):
if
histo_uid
==
uid
and
(
u
"debutAdhesion+"
in
histo_action
or
(
len
(
historique
[
l
])
>
5
and
(
u
'debutAdhesion+'
in
historique
[
l
][
5
]
))):
reinscriptions
=
reinscriptions
+
1
score
=
2
*
inscriptions
+
reinscriptions
scores
.
append
([
"%s %s"
%
(
prenom
,
nom
),
score
,
inscriptions
,
reinscriptions
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment