feat: show exercise index in the title

Show exercise as "Exercise 2.1: Draw a Circle".
This commit is contained in:
Anand Chitipothu
2021-06-01 05:49:45 +05:30
parent b9a93bb160
commit a12a52747e
3 changed files with 3 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ class BatchReport:
self.submissions_by_exercise[s.exercise].append(s)
def get_exercises(self, course_name):
return frappe.get_all("Exercise", {"course": course_name}, ["name", "title"])
return frappe.get_all("Exercise", {"course": course_name}, ["name", "title", "index_label"], order_by="index_label")
def get_submissions_of_exercise(self, exercise_name):
return self.submissions_by_exercise[exercise_name]