]> git.parisson.com Git - teleforma.git/commitdiff
ifix script save, set default home course list number to 3
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 17 Aug 2015 12:05:00 +0000 (14:05 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 17 Aug 2015 12:05:25 +0000 (14:05 +0200)
teleforma/exam/models.py
teleforma/views/core.py

index a2fc998c29eb37c02a4b62165770dc7cad419d92..b9524cc012d05e6ccf4f3ea578f5f36a7c2d6256 100644 (file)
@@ -361,6 +361,7 @@ class Script(BaseResource):
                 if (statuses[0].get('error') == None):
                     if statuses[0]['status'] == 'DONE':
                         self.t = 1
+                        self.save()
                         break
                     else:
                         time.sleep(s)
index 2133539e2eb1c3fb34fb7eac4803ea32c9fe1fff..a4f3458a9b92ac45aea84d3f10eecea8e37f460a 100644 (file)
@@ -248,7 +248,7 @@ class CourseListView(CourseAccessMixin, ListView):
         context['room'] = get_room(name='site', period=context['period'].name)
         context['doc_types'] = DocumentType.objects.all()
         context['list_view'] = True
-        context['courses'] = sorted(context['all_courses'], key=lambda k: k['date'], reverse=True)[:5]
+        context['courses'] = sorted(context['all_courses'], key=lambda k: k['date'], reverse=True)[:3]
         return context
 
     @method_decorator(login_required)