diff --git a/Changelog.md b/Changelog.md index d7a2fd8c44..93819d8fae 100644 --- a/Changelog.md +++ b/Changelog.md @@ -8,6 +8,7 @@ - Improved layout and labeling in the assignment settings form for both standard and timed assessments. (#7531) - Design improvement of tables when the data is empty. (#7557) - Improved Assignment view for students (#7533) +- Added average annotations section in Assignment Summary (#7559) - Maintain font size in grading view (#7525) - Replaced assignment summary statistics in the "Status" column on the instructor Assignments page with a link to the grades page. (#7560) - Renamed the "Summary" sub-tab label to "Grades" in the Assignment interface. (#7560) diff --git a/app/controllers/assignments_controller.rb b/app/controllers/assignments_controller.rb index 6920e66106..f1b1e36cec 100644 --- a/app/controllers/assignments_controller.rb +++ b/app/controllers/assignments_controller.rb @@ -349,6 +349,7 @@ def grade_distribution summary = { name: "#{assignment.short_identifier}: #{assignment.description}", average: assignment.results_average(points: true) || 0, + average_annotations: assignment.average_annotations, median: assignment.results_median(points: true) || 0, max_mark: assignment.max_mark || 0, standard_deviation: assignment.results_standard_deviation || 0, diff --git a/app/javascript/Components/assignment_chart.jsx b/app/javascript/Components/assignment_chart.jsx index f3d2eedfb2..39d1a4c165 100644 --- a/app/javascript/Components/assignment_chart.jsx +++ b/app/javascript/Components/assignment_chart.jsx @@ -11,6 +11,7 @@ export class AssignmentChart extends React.Component { this.state = { summary: { average: null, + average_annotations: null, median: null, num_submissions_collected: null, num_submissions_graded: null, @@ -187,6 +188,28 @@ export class AssignmentChart extends React.Component { ); } + let annotation_summary = ( +
+ {I18n.t("assignments.average_annotations", { + average_annotations: this.state.summary.average_annotations || 0, + })} +
++ {I18n.t("assignments.average_annotations_detail_descriptor")}{" "} + + {I18n.t("activerecord.models.annotation.other")} + +
+