querycraft 2.7.0__tar.gz → 2.7.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {querycraft-2.7.0/querycraft.egg-info → querycraft-2.7.1}/PKG-INFO +1 -1
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/PlantUML.py +14 -3
- querycraft-2.7.1/querycraft/__init__.py +2 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/config/codemata.json +2 -2
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/config.html +3 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/traces.html +33 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/web/sql_routes.py +46 -1
- {querycraft-2.7.0 → querycraft-2.7.1/querycraft.egg-info}/PKG-INFO +1 -1
- querycraft-2.7.0/querycraft/__init__.py +0 -2
- {querycraft-2.7.0 → querycraft-2.7.1}/AUTHORS +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/LICENSE +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/MANIFEST.in +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/README.md +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/LLM.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/LLM_providers.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/LRS.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/SQLException.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/cache/readme.txt +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/cachemanager.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/config/config-sbs-std.cfg +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/config/config-sbs.cfg +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/configmanager.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/data/cinema.db +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/data/cours.db +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/data/em.db +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/data/entreprise.db +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/data/librairie.db +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/data/lutins.db +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/data/robots.db +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/data/vols.db +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/database/MYSQL.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/database/PGSQL.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/database/SQLITE.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/database/__init__.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/database/base.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/exceptions/OperationNotSupportedException.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/exceptions/__init__.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/exercicemanager.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/exos/Didapro11.json +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/exos/OENU2026.json +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/exos/ex1.json +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/exos/exos1.json +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/exos/readme.txt +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/logger.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/logs/readme.txt +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/__init__.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/cli/CliOutputFactory.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/cli/__init__.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/cli/outputBuilder/CliCodeBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/cli/outputBuilder/CliListBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/cli/outputBuilder/CliParagraphBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/cli/outputBuilder/CliTableBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/cli/outputBuilder/CliTextBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/cli/outputBuilder/CliTitleBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/cli/outputBuilder/__init__.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/commons/OutputBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/commons/OutputCodeFactory.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/commons/OutputFactory.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/commons/OutputListBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/commons/OutputParagraphFactory.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/commons/OutputTableBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/commons/SimpleOutputBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/commons/__init__.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/commons/utils.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/html/HtmlOutputFactory.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/html/__init__.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/html/outputBuilder/HTMLCodeBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/html/outputBuilder/HTMLListBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/html/outputBuilder/HTMLParagraphBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/html/outputBuilder/HTMLTableBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/html/outputBuilder/HTMLTextBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/html/outputBuilder/HTMLTitleBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/html/outputBuilder/__init__.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/markdown/MarkdownOutputFactory.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/markdown/__init__.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/markdown/outputBuilder/MarkdownCodeBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/markdown/outputBuilder/MarkdownListBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/markdown/outputBuilder/MarkdownParagraphBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/markdown/outputBuilder/MarkdownTableBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/markdown/outputBuilder/MarkdownTextBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/markdown/outputBuilder/MarkdownTitleBuilder.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/markdown/outputBuilder/__init__.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/paths.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/security.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/sql/SQLContext.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/sql/SQLExecutionService.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/sql/SQLNormalizationService.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/sql/SQLQueryService.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/sql/SQLStepByStepService.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/sql/__init__.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/sqlsbs.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/static/qc-0973b307dafc25e2b7a5f12be0f68d1786cedbf5ad0371c3f3d5f051fc00b626.puml +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/static/qc-18be2287f8920a2975f21fe98022750b27c222b85ac8d6de95a686835f147e9e.puml +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/static/qc-3d819e30e542ba328af562eb160d23140f2193d92354b0897289767e1c041e96.puml +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/static/qc-54c49d1ad35ea5cf736dfd64c3ed9c42ea90d7b82a5f3783f73f46de99bf0987.puml +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/static/qc-5b552498722250bebfe20f44257243a9f9e08d2f3865955c60f4469ff1c12fea.puml +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/static/qc-a70191192c2a1640bfec39afd281537d4ede20bb5c9e87ccb32b883e1e58bcab.puml +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/static/qc-d1881606867eea2d5f0cf600fa342f8e04e8d5cc388946a09cffb855052b22ad.puml +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/static/qc-eb48d0ac9258e52c7715e6313b6da064ed9ab2efab6ba7b3225b9568a3c2545e.puml +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/admin_login.html +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/base.html +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/correction_prompt.md +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/credits.html +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/database_prompt.md +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/didactique.md +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/didapro11.html +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/erreur_prompt.md +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/exercices.html +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/index.html +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/instance_error.html +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/requete_prompt.md +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/systeme_prompt.md +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/systeme_prompt_factuel.md +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/systeme_prompt_valideur.md +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/templates/valideur_prompt.md +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/tenantadmin.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/tenantdashboard.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/tenantlogging.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/tenantregistry.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/tools.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/traceservice.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/web/__init__.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/web/admin_routes.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/web/app.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/web/context.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/web/exercices_routes.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/web/helpers.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/web/pages.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/web/tenancy.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/web/traces_routes.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft/web_sbs.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft.egg-info/SOURCES.txt +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft.egg-info/dependency_links.txt +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft.egg-info/entry_points.txt +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft.egg-info/requires.txt +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/querycraft.egg-info/top_level.txt +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/setup.cfg +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/setup.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/test/testAnthropic.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/test/testOllama.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/test/testParse.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/test/test_LLM.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/test/test_SQLNormalizationService.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/test/test_SQLQueryService.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/test/test_configmanager.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/test/test_exercicemanager.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/test/test_litellm_provider.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/test/test_traces_routes.py +0 -0
- {querycraft-2.7.0 → querycraft-2.7.1}/test/test_traceservice.py +0 -0
|
@@ -34,7 +34,14 @@ class PlantUML:
|
|
|
34
34
|
# MultiplexedPath dont str() n'est pas un chemin exploitable.
|
|
35
35
|
self.images_dir = Path(__file__).parent / "static" / "images"
|
|
36
36
|
|
|
37
|
-
def createModel(self):
|
|
37
|
+
def createModel(self, force=False):
|
|
38
|
+
"""Génère (ou renvoie depuis le cache) le PNG du schéma relationnel.
|
|
39
|
+
|
|
40
|
+
Args:
|
|
41
|
+
force: si ``True``, ignore le cache et régénère le diagramme même si le
|
|
42
|
+
PNG existe déjà (bouton « Régénérer le schéma » du mode enseignant,
|
|
43
|
+
utile quand le schéma de la base a changé depuis le dernier rendu).
|
|
44
|
+
"""
|
|
38
45
|
self.__logger.info(f"Création du modèle PlantUML pour {self.db.getType()} avec {self.db.getDatabaseName()}")
|
|
39
46
|
if 'querycraft/querycraft/data' in self.db.getDatabaseName() :
|
|
40
47
|
name = "qc-"
|
|
@@ -46,7 +53,7 @@ class PlantUML:
|
|
|
46
53
|
tmp_file_name = f'{name}.puml'
|
|
47
54
|
self.images_dir.mkdir(parents=True, exist_ok=True)
|
|
48
55
|
output_file = self.images_dir / output_file_name
|
|
49
|
-
if existFile(output_file):
|
|
56
|
+
if not force and existFile(output_file):
|
|
50
57
|
return output_file_name
|
|
51
58
|
|
|
52
59
|
try:
|
|
@@ -64,8 +71,12 @@ class PlantUML:
|
|
|
64
71
|
with open(lock_file, "w") as lock:
|
|
65
72
|
fcntl.flock(lock, fcntl.LOCK_EX)
|
|
66
73
|
try:
|
|
67
|
-
if existFile(output_file):
|
|
74
|
+
if not force and existFile(output_file):
|
|
68
75
|
return output_file_name
|
|
76
|
+
if force and existFile(output_file):
|
|
77
|
+
# Supprimé avant régénération : si le rendu échoue, on doit le
|
|
78
|
+
# détecter (absence du fichier) plutôt que resservir l'ancien PNG.
|
|
79
|
+
output_file.unlink()
|
|
69
80
|
|
|
70
81
|
tmp_file = self.images_dir / tmp_file_name
|
|
71
82
|
try:
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
}
|
|
31
31
|
],
|
|
32
32
|
"dateCreated": "2024-07-15",
|
|
33
|
-
"dateModified": "2026-07-
|
|
33
|
+
"dateModified": "2026-07-31",
|
|
34
34
|
"datePublished": "2024-12-04",
|
|
35
35
|
"description": "Ce programme permet de proposer une exécution \"pas à pas\" d'une requête SQL. Il doit être utilisé dans le cadre d'un enseignement de SQL en bases de données. Cette bibliothèque propose des classes Python permettant de manipuler des requêtes SQL. Elle propose aussi des applications pour décomposer l'exécution d'une requête SQL sur une base de données PostgreSQL, MySQL ou SQLite.",
|
|
36
36
|
"downloadUrl": "https://gitlab.univ-nantes.fr/ls2n-didactique/querycraft.git",
|
|
37
37
|
"license": "https://spdx.org/licenses/GPL-3.0",
|
|
38
38
|
"name": "QueryCraft",
|
|
39
39
|
"programmingLanguage": "Python 3",
|
|
40
|
-
"version": "2.7.
|
|
40
|
+
"version": "2.7.1"
|
|
41
41
|
}
|
|
@@ -170,6 +170,9 @@
|
|
|
170
170
|
<div>
|
|
171
171
|
<button type="button" class="btn btn-info js-upload-db" disabled>⬆️ Téléverser</button>
|
|
172
172
|
</div>
|
|
173
|
+
<div class="alert alert-warning show">⚠️ Si le nom du fichier correspond à une base déjà
|
|
174
|
+
présente, celle-ci sera <strong>remplacée définitivement</strong> (écrasée), sans
|
|
175
|
+
confirmation ni conservation de l'ancienne version.</div>
|
|
173
176
|
<div class="alert" id="alertBoxUpload"></div>
|
|
174
177
|
</div>
|
|
175
178
|
</div>
|
|
@@ -180,6 +180,39 @@
|
|
|
180
180
|
</tbody>
|
|
181
181
|
</table>
|
|
182
182
|
</div>
|
|
183
|
+
<div class="traces-legend">
|
|
184
|
+
<div class="traces-legend-group">
|
|
185
|
+
<span class="traces-legend-title">Résultat :</span>
|
|
186
|
+
<span class="badge badge-succes traces-legend-item" title="La requête a été exécutée sans erreur, jusqu'au bout.">✅ Succès</span>
|
|
187
|
+
<span class="badge badge-erreur traces-legend-item" title="La requête a été bloquée avant exécution par le contrôle de sécurité (instruction interdite, motif suspect...).">🚫 Erreur sécurité</span>
|
|
188
|
+
<span class="badge badge-erreur traces-legend-item" title="La requête n'a pas pu être analysée : erreur de syntaxe SQL.">❌ Erreur syntaxe</span>
|
|
189
|
+
<span class="badge badge-warning traces-legend-item" title="La requête est syntaxiquement correcte mais ne respecte pas une règle pédagogique attendue (ex. ce n'est pas un SELECT, colonne du SELECT absente du GROUP BY...).">⚠️ Non conforme</span>
|
|
190
|
+
<span class="badge badge-erreur traces-legend-item" title="La requête a été acceptée et envoyée à la base, mais son exécution a échoué (erreur retournée par le SGBD).">💥 Erreur exécution</span>
|
|
191
|
+
<span class="badge badge-erreur traces-legend-item" title="Une erreur inattendue (bug interne à QueryCraft) s'est produite pendant le traitement de la requête.">🐛 Erreur interne</span>
|
|
192
|
+
</div>
|
|
193
|
+
<div class="traces-legend-group">
|
|
194
|
+
<span class="traces-legend-title">Type :</span>
|
|
195
|
+
<span class="badge traces-legend-item" title="L'élève a soumis et exécuté une requête SQL.">▶️ Exécution SQL</span>
|
|
196
|
+
<span class="badge traces-legend-item" title="L'élève a consulté le schéma (diagramme/structure) de la base sans exécuter de requête.">🧭 Consultation du schéma</span>
|
|
197
|
+
</div>
|
|
198
|
+
<div class="traces-legend-group">
|
|
199
|
+
<span class="traces-legend-title">Réponse exo :</span>
|
|
200
|
+
<span class="traces-legend-item" title="La requête était liée à une question d'exercice et son résultat correspond à la solution attendue.">✅ Correcte</span>
|
|
201
|
+
<span class="traces-legend-item" title="La requête était liée à une question d'exercice mais son résultat diffère de la solution attendue.">❌ Incorrecte</span>
|
|
202
|
+
<span class="traces-legend-item" title="La tentative n'est rattachée à aucun exercice/question : il n'y a donc pas de solution à comparer.">— Non évaluée (pas de code exercice/question)</span>
|
|
203
|
+
</div>
|
|
204
|
+
<div class="traces-legend-group">
|
|
205
|
+
<span class="traces-legend-title">IA :</span>
|
|
206
|
+
<span class="traces-legend-item" title="L'élève n'a pas coché l'aide de l'IA pour cette tentative.">— Non sollicitée</span>
|
|
207
|
+
<span class="traces-legend-item" title="L'élève a demandé l'aide de l'IA en niveau standard (explication de la requête ou de l'erreur).">🤖 Normale</span>
|
|
208
|
+
<span class="traces-legend-item" title="L'élève a demandé l'aide de l'IA en mode renforcé (feedback tenant compte de son historique de tentatives sur cette question).">🚀 Renforcée</span>
|
|
209
|
+
</div>
|
|
210
|
+
<div class="traces-legend-group">
|
|
211
|
+
<span class="traces-legend-title">Pas-à-pas :</span>
|
|
212
|
+
<span class="traces-legend-item" title="La requête a été exécutée étape par étape (décomposition pédagogique de la requête).">👣 Oui</span>
|
|
213
|
+
<span class="traces-legend-item" title="La requête a été exécutée directement, sans décomposition pas-à-pas.">— Non (exécution directe)</span>
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
183
216
|
<div class="pagination" id="pagination">
|
|
184
217
|
<!-- Rempli en JS -->
|
|
185
218
|
</div>
|
|
@@ -23,6 +23,7 @@ from querycraft.tools import colorize_sql
|
|
|
23
23
|
from querycraft.traceservice import IA_NIVEAU_NON, IA_NIVEAU_NORMALE, IA_NIVEAU_RENFORCEE
|
|
24
24
|
from querycraft.web.context import app_config
|
|
25
25
|
from querycraft.web.helpers import error_ref, get_or_create_pseudo, set_pseudo_cookie
|
|
26
|
+
from querycraft.web.tenancy import admin_required
|
|
26
27
|
|
|
27
28
|
sql_bp = Blueprint("sql", __name__)
|
|
28
29
|
|
|
@@ -337,7 +338,19 @@ def schema():
|
|
|
337
338
|
|
|
338
339
|
model_div = getOutputFactory(app_config.type_output, 'block')
|
|
339
340
|
model_div.addTitle("Modèle relationnel de la base", 4)
|
|
340
|
-
model_div.addText(
|
|
341
|
+
model_div.addText(
|
|
342
|
+
f'<img src="{img_url}" alt="{database.getDatabaseName()}" '
|
|
343
|
+
'style="max-width:85%;" id="schema-diagram-img">'
|
|
344
|
+
)
|
|
345
|
+
if g.is_admin:
|
|
346
|
+
model_div.addText(
|
|
347
|
+
'<div class="schema-regenerate">'
|
|
348
|
+
'<button type="button" id="btn-regenerate-schema" class="btn btn-secondary btn-small" '
|
|
349
|
+
'title="Régénérer le diagramme si le schéma de la base a été modifié">'
|
|
350
|
+
'🔄 Régénérer le schéma</button>'
|
|
351
|
+
'<span id="regenerate-schema-status" class="regenerate-status"></span>'
|
|
352
|
+
'</div>'
|
|
353
|
+
)
|
|
341
354
|
legend_factory = getOutputFactory(app_config.type_output, 'block')
|
|
342
355
|
legend_factory.setStyle(Style("", 'class="legend"', ""))
|
|
343
356
|
legend_factory.addText("Légende :")
|
|
@@ -444,3 +457,35 @@ def schema():
|
|
|
444
457
|
if is_new:
|
|
445
458
|
set_pseudo_cookie(response, pseudo)
|
|
446
459
|
return response
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
@sql_bp.route("/schema/regenerate", methods=["POST"])
|
|
463
|
+
@admin_required
|
|
464
|
+
def regenerate_schema():
|
|
465
|
+
"""Force la régénération du diagramme PlantUML du schéma (mode enseignant).
|
|
466
|
+
|
|
467
|
+
Réservé à l'enseignant : utile quand la structure de la base a changé depuis
|
|
468
|
+
le dernier rendu, le cache PNG existant n'étant sinon jamais invalidé.
|
|
469
|
+
"""
|
|
470
|
+
try:
|
|
471
|
+
database = app_config.database
|
|
472
|
+
if database is None:
|
|
473
|
+
raise Exception("Database unreachable")
|
|
474
|
+
with database:
|
|
475
|
+
pumlfile = app_config.plant_uml.createModel(force=True)
|
|
476
|
+
if pumlfile is None:
|
|
477
|
+
return jsonify({
|
|
478
|
+
"success": False,
|
|
479
|
+
"error": "Le diagramme n'a pas pu être régénéré (voir les journaux de l'instance).",
|
|
480
|
+
})
|
|
481
|
+
img_url = f'{g.base_path}/images/{pumlfile}?t={int(time.time())}'
|
|
482
|
+
return jsonify({"success": True, "img_url": img_url})
|
|
483
|
+
except Exception as e:
|
|
484
|
+
ref = error_ref()
|
|
485
|
+
get_logger("querycraft.web.schema").error(
|
|
486
|
+
"[réf %s] Erreur lors de la régénération du schéma : %s", ref, e, exc_info=True
|
|
487
|
+
)
|
|
488
|
+
return jsonify({
|
|
489
|
+
"success": False,
|
|
490
|
+
"error": f"Erreur lors de la régénération du schéma (réf: {ref}).",
|
|
491
|
+
})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{querycraft-2.7.0 → querycraft-2.7.1}/querycraft/exceptions/OperationNotSupportedException.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/cli/outputBuilder/CliParagraphBuilder.py
RENAMED
|
File without changes
|
{querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/cli/outputBuilder/CliTableBuilder.py
RENAMED
|
File without changes
|
|
File without changes
|
{querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/cli/outputBuilder/CliTitleBuilder.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/html/outputBuilder/HTMLCodeBuilder.py
RENAMED
|
File without changes
|
{querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/html/outputBuilder/HTMLListBuilder.py
RENAMED
|
File without changes
|
{querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/html/outputBuilder/HTMLParagraphBuilder.py
RENAMED
|
File without changes
|
{querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/html/outputBuilder/HTMLTableBuilder.py
RENAMED
|
File without changes
|
{querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/html/outputBuilder/HTMLTextBuilder.py
RENAMED
|
File without changes
|
{querycraft-2.7.0 → querycraft-2.7.1}/querycraft/output/html/outputBuilder/HTMLTitleBuilder.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|