summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/app.py b/app.py
index 1f39fd4..8d2a5d4 100644
--- a/app.py
+++ b/app.py
@@ -121,11 +121,13 @@ def study_show(study, oid, filename):
@app.route('/<study>/modules/<module>')
def study_index(study, module=None):
if module:
- return render_template(
- 'module_show.html', study = study, module=module, entries=fit[study].get_module(module)
- )
+ entries = sorted(fit[study].get_module(module), reverse=True)
+ return render_template('module_show.html',
+ study = study, module=module, entries=entries
+ )
- return render_template('module_list.html', study = study, modules=fit[study].get_modules())
+ modules = fit[study].get_modules()
+ return render_template('module_list.html', study = study, modules=modules)