D'un point de vue stat, ce qui nous intéresse est exclusivement l'adhésion, pas la connexion.
* Le câblage c'est la gestion de la fiche d'adhésion, si on compte les gens qui paient au mois
alors il faut aussi compter la vente d'adaptateurs usb ethernet, ou la gestion du solde, ou
autre ;
* Du coup, le script est déjà à jour.
This reverts 136254980e
This commit is contained in:
parent
136254980e
commit
bb77a6b01d
1 changed files with 3 additions and 3 deletions
|
@ -45,7 +45,7 @@ def parse_historique(ligne):
|
||||||
"""Parse une ligne d'historique et renvoie [ligne parsée],action
|
"""Parse une ligne d'historique et renvoie [ligne parsée],action
|
||||||
du cableur, date de l'action"""
|
du cableur, date de l'action"""
|
||||||
champ = ligne.value.replace(',','').replace(':','').split(' ')
|
champ = ligne.value.replace(',','').replace(':','').split(' ')
|
||||||
sdate = champ[0].split('/')
|
sdate = champ[0].split('/')
|
||||||
date = datetime.date(int(sdate[2]),int(sdate[1]),int(sdate[0]))
|
date = datetime.date(int(sdate[2]),int(sdate[1]),int(sdate[0]))
|
||||||
champ_action=champ[4]
|
champ_action=champ[4]
|
||||||
return champ,champ_action,date
|
return champ,champ_action,date
|
||||||
|
@ -59,7 +59,7 @@ def actions_cableurs():
|
||||||
champ=parse_historique(histo[j])[0]
|
champ=parse_historique(histo[j])[0]
|
||||||
champ_action=parse_historique(histo[j])[1]
|
champ_action=parse_historique(histo[j])[1]
|
||||||
date=parse_historique(histo[j])[2]
|
date=parse_historique(histo[j])[2]
|
||||||
if ((champ_action == u'inscription' or u"debutAdhesion+" in champ_action) or len(champ) > 5 and (u"debutAdhesion+" in champ[5] or u"debutConnexion+" in champ[5] 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)
|
historique.append(champ)
|
||||||
return historique
|
return historique
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ def score_cableurs():
|
||||||
histo_action = historique[l][4]
|
histo_action = historique[l][4]
|
||||||
if histo_uid == uid and histo_action == u'inscription':
|
if histo_uid == uid and histo_action == u'inscription':
|
||||||
inscriptions = inscriptions+1
|
inscriptions = inscriptions+1
|
||||||
if histo_uid == uid and (u"debutConnexion+" in histo_action or (len(historique[l])>5 and (u'debutConnexion+' in historique[l][5]))):
|
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
|
reinscriptions = reinscriptions+1
|
||||||
score = 2*inscriptions + reinscriptions
|
score = 2*inscriptions + reinscriptions
|
||||||
scores.append(["%s %s" % (prenom, nom), score, inscriptions, reinscriptions])
|
scores.append(["%s %s" % (prenom, nom), score, inscriptions, reinscriptions])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue