Ludovicollin commited on
Commit
4cd26fe
Β·
verified Β·
1 Parent(s): 9cbe19d

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +20 -7
main.py CHANGED
@@ -136,6 +136,14 @@ async def on_action(action):
136
  ).send()
137
  await action.remove()
138
 
 
 
 
 
 
 
 
 
139
  @cl.action_callback("close_button")
140
  async def on_action(action):
141
  time.sleep(0.5)
@@ -283,7 +291,7 @@ async def construction_REV(romeListArray,settings):
283
  actions = [
284
  cl.Action(name="download", value=completion_REV.completion, description="download_referentiel_evaluation")
285
  ]
286
- await cl.Message(author="Datapcc : 🌐🌐🌐",content="Download", actions=actions).send()
287
  else:
288
  await cl.Message(
289
  author="Datapcc : 🌐🌐🌐",content="β›” Vous n'avez pas encore créé de Fiche synoptique!"
@@ -316,7 +324,7 @@ async def construction_MDC(romeListArray,settings):
316
  actions = [
317
  cl.Action(name="download", value=completion_MDC.completion, description="download_matrice_coherence")
318
  ]
319
- await cl.Message(author="Datapcc : 🌐🌐🌐",content="Download", actions=actions).send()
320
  else:
321
  await cl.Message(
322
  author="Datapcc : 🌐🌐🌐",content="β›” Vous n'avez pas encore créé de Fiche synoptique!"
@@ -349,7 +357,7 @@ async def construction_MDF(romeListArray,settings):
349
  actions = [
350
  cl.Action(name="download", value=completion_MDF.completion, description="download_module_formation")
351
  ]
352
- await cl.Message(author="Datapcc : 🌐🌐🌐",content="Download", actions=actions).send()
353
  else:
354
  await cl.Message(
355
  author="Datapcc : 🌐🌐🌐",content="β›” Vous n'avez pas encore créé de Fiche synoptique!"
@@ -383,7 +391,7 @@ async def construction_FCC(romeListArray,settings):
383
  actions = [
384
  cl.Action(name="download", value=completion_FCC.completion, description="download_fiche_competence")
385
  ]
386
- await cl.Message(author="Datapcc : 🌐🌐🌐",content="Download", actions=actions).send()
387
  else:
388
  await cl.Message(
389
  author="Datapcc : 🌐🌐🌐",content="β›” Vous n'avez pas encore créé de Fiche synoptique!"
@@ -417,7 +425,7 @@ async def construction_FCA(romeListArray,settings):
417
  actions = [
418
  cl.Action(name="download", value=completion_FCA.completion, description="download_fiche_activite")
419
  ]
420
- await cl.Message(author="Datapcc : 🌐🌐🌐",content="Download", actions=actions).send()
421
  else:
422
  await cl.Message(
423
  author="Datapcc : 🌐🌐🌐",content="β›” Vous n'avez pas encore créé de Fiche synoptique!"
@@ -499,7 +507,7 @@ async def construction_FCS(romeListArray,settings):
499
  actions = [
500
  cl.Action(name="download", value=completion_FCS.completion, description="download_fiche_synoptique")
501
  ]
502
- await cl.Message(author="Datapcc : 🌐🌐🌐",content="Download", actions=actions).send()
503
  cl.user_session.set("allactivities", arrayOfActivites[0])
504
  cl.user_session.set("allskills", arrayOfCompetences[1])
505
  else:
@@ -548,7 +556,12 @@ async def construction_NCS(romeListArray):
548
  actions = [
549
  cl.Action(name="download", value=completion_NCS.completion, description="download_note_sectorielle")
550
  ]
551
- await cl.Message(author="Datapcc : 🌐🌐🌐",content="Download", actions=actions).send()
 
 
 
 
 
552
  await cl.sleep(2)
553
  return "Construction de la Note Sectorielle"
554
 
 
136
  ).send()
137
  await action.remove()
138
 
139
+ @cl.action_callback("saveToMemory")
140
+ async def on_action(action):
141
+ user_session.set("saveMemory", action.value)
142
+ await cl.Message(
143
+ author="Datapcc : 🌐🌐🌐", content="πŸ—ƒοΈ Document sauvegardΓ©"
144
+ ).send()
145
+ await action.remove()
146
+
147
  @cl.action_callback("close_button")
148
  async def on_action(action):
149
  time.sleep(0.5)
 
291
  actions = [
292
  cl.Action(name="download", value=completion_REV.completion, description="download_referentiel_evaluation")
293
  ]
294
+ await cl.Message(author="Datapcc : 🌐🌐🌐",content="Télécharger le référentiel", actions=actions).send()
295
  else:
296
  await cl.Message(
297
  author="Datapcc : 🌐🌐🌐",content="β›” Vous n'avez pas encore créé de Fiche synoptique!"
 
324
  actions = [
325
  cl.Action(name="download", value=completion_MDC.completion, description="download_matrice_coherence")
326
  ]
327
+ await cl.Message(author="Datapcc : 🌐🌐🌐",content="Télécharger la matrice", actions=actions).send()
328
  else:
329
  await cl.Message(
330
  author="Datapcc : 🌐🌐🌐",content="β›” Vous n'avez pas encore créé de Fiche synoptique!"
 
357
  actions = [
358
  cl.Action(name="download", value=completion_MDF.completion, description="download_module_formation")
359
  ]
360
+ await cl.Message(author="Datapcc : 🌐🌐🌐",content="Télécharger les modules", actions=actions).send()
361
  else:
362
  await cl.Message(
363
  author="Datapcc : 🌐🌐🌐",content="β›” Vous n'avez pas encore créé de Fiche synoptique!"
 
391
  actions = [
392
  cl.Action(name="download", value=completion_FCC.completion, description="download_fiche_competence")
393
  ]
394
+ await cl.Message(author="Datapcc : 🌐🌐🌐",content="Télécharger la fiche", actions=actions).send()
395
  else:
396
  await cl.Message(
397
  author="Datapcc : 🌐🌐🌐",content="β›” Vous n'avez pas encore créé de Fiche synoptique!"
 
425
  actions = [
426
  cl.Action(name="download", value=completion_FCA.completion, description="download_fiche_activite")
427
  ]
428
+ await cl.Message(author="Datapcc : 🌐🌐🌐",content="Télécharger la fiche", actions=actions).send()
429
  else:
430
  await cl.Message(
431
  author="Datapcc : 🌐🌐🌐",content="β›” Vous n'avez pas encore créé de Fiche synoptique!"
 
507
  actions = [
508
  cl.Action(name="download", value=completion_FCS.completion, description="download_fiche_synoptique")
509
  ]
510
+ await cl.Message(author="Datapcc : 🌐🌐🌐",content="Télécharger la fiche", actions=actions).send()
511
  cl.user_session.set("allactivities", arrayOfActivites[0])
512
  cl.user_session.set("allskills", arrayOfCompetences[1])
513
  else:
 
556
  actions = [
557
  cl.Action(name="download", value=completion_NCS.completion, description="download_note_sectorielle")
558
  ]
559
+ await cl.Message(author="Datapcc : 🌐🌐🌐",content="Télécharger la note", actions=actions).send()
560
+ await cl.sleep(2)
561
+ saves = [
562
+ cl.Action(name="saveToMemory", value=completion_NCS.completion, description="Mettre en mΓ©moire la note")
563
+ ]
564
+ await cl.Message(author="Datapcc : 🌐🌐🌐",content="Mettre en mémoire la note", actions=saves).send()
565
  await cl.sleep(2)
566
  return "Construction de la Note Sectorielle"
567