Commit 5c424893 authored by Matheus Miranda's avatar Matheus Miranda
Browse files

Add status to course module status

parent 691a31b6
......@@ -570,11 +570,12 @@ class CourseStudent(models.Model):
# TODO refator to make one query to count unts done for all lessons
from courses_learning_objects.models import LearningObject, Answer
progress_list = []
for lesson in self.course.lessons.filter(status='published'):
for lesson in self.course.lessons.all():
lesson_progress = {}
lesson_progress['name'] = lesson.name
lesson_progress['slug'] = lesson.slug
lesson_progress['position'] = lesson.position
lesson_progress['status'] = lesson.status
units_len = lesson.unit_count()
lesson_progress['activities'] = []
if units_len:
......
Markdown is supported
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