]> git.parisson.com Git - teleforma.git/commitdiff
Sort webclass by date on course page
authorYoan Le Clanche <yoanl@pilotsystems.net>
Fri, 31 Jul 2020 15:18:19 +0000 (17:18 +0200)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Fri, 31 Jul 2020 15:18:19 +0000 (17:18 +0200)
teleforma/webclass/models.py

index e76908cc311126b1d75323e6b6dae8c5b5e2525f..c4760309da94ec5e5558ccabad3c288cfb298470 100644 (file)
@@ -73,6 +73,7 @@ def get_records_from_bbb(**kwargs):
 
             data['duration'] = data['end'] - data['start']
             records.append(data)
+    records = sorted(records, key=lambda r:r['start'])
     return records
 
 def get_records(period_id=None, course_id=None, rooms=None, recording_id=None):