Commit 8c43e493 authored by Louis's avatar Louis
Browse files

Simplification des identifiants des exercices

parent 59b26c1d
......@@ -253,15 +253,10 @@ def do_lsexos(__options):
"""Perform the `lsexos` command."""
def iter_names():
for exo in match_exercise():
if issubclass(exo, pyromaths.ex.LegacyExercise):
name = exo.function[0].__name__
elif issubclass(exo, pyromaths.ex.TexExercise):
name = exo.__name__
for level in exo.level:
yield u"{}.{}".format(
level,
name
)
yield u"{}.{}".format(
exo.dirlevel,
exo.name(),
)
for name in sorted(iter_names()):
print(name)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment