Skip to content

Commit

Permalink
more refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
arslanashraf7 committed Nov 5, 2024
1 parent e033803 commit 77336f7
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lms/djangoapps/instructor_task/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,8 @@ def get_task_completion_info(instructor_task): # lint-amnesty, pylint: disable=
# Translators: {action} is a past-tense verb that is localized separately. {succeeded} and {attempted} are counts. # lint-amnesty, pylint: disable=line-too-long
msg_format = _("Problem {action} for {succeeded} of {attempted} students")
elif course_id is not None:
# this reports on actions for a course as a whole
results = task_output.get('results', {})
assignments_count = results.get("assignments", 0)
grades_count = results.get("grades", 0)

msg_format = _("{grades_count} grades and {assignments_count} assignments updated or created").format(
grades_count=grades_count,
assignments_count=assignments_count,
)
from ol_openedx_canvas_integration.utils import get_task_output_formatted_message
msg_format = get_task_output_formatted_message(task_output)
succeeded = True
elif email_id is not None:
# this reports on actions on bulk emails
Expand Down

0 comments on commit 77336f7

Please sign in to comment.