Skip to content

Commit

Permalink
Added course archived date to all course enrollment reports (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdul-Muqadim-Arbisoft authored Dec 2, 2024
1 parent ed8f8f2 commit 3a1c617
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ def all_courses_enrollment_report(request):
"course_url",
"course_title",
"available_since",
"archived_date",
"parent_course_url",
"parent_course_title",
"total_learners_enrolled",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def upload_all_courses_enrollment_csv(
csv_type = task_input.get("csv_type", "all_enrollments_stats")

query_features_names = [
'Course URL', 'Course title', 'Course available since', 'Parent course URL', 'Parent course title', 'Total learners enrolled', 'Total learners completed', 'Percentage of learners who completed the course', 'Certificates Generated',
'Course URL', 'Course title', 'Course available since', 'Course Archived Date', 'Parent course URL', 'Parent course title', 'Total learners enrolled', 'Total learners completed', 'Percentage of learners who completed the course', 'Certificates Generated',
]
data = list_all_courses_enrollment_data()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,10 @@ def list_all_courses_enrollment_data():

# Append outside the try block
courses_data.append({
'course_url': get_cms_course_url(str(course.id)),
'course_title': course.display_name,
'available_since': course.enrollment_start.strftime("%Y-%m-%d") if course.enrollment_start else '',
"course_url": get_cms_course_url(str(course.id)),
"course_title": course.display_name,
"available_since": course.enrollment_start.strftime("%Y-%m-%d") if course.enrollment_start else '',
"archived_date": course.end.strftime("%Y-%m-%d") if course.has_ended() else '',
"parent_course_url": parent_course_url,
"parent_course_title": parent_course_title,
"total_learners_enrolled": course_completion_stats["total_learners_enrolled"],
Expand Down

0 comments on commit 3a1c617

Please sign in to comment.