<% # Copyright (C) 2011 - present Instructure, Inc. # # This file is part of Canvas. # # Canvas is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, version 3 of the License. # # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more # details. # # You should have received a copy of the GNU Affero General Public License along # with this program. If not, see . %> <% set_active_tab 'settings' css_bundle :statistics add_crumb t('#crumbs.stats', "Statistics") %> <% provide :page_title, join_title(t(:page_title, "Course Statistics"), @context.name) %>

<%= t 'headings.stats', 'Statistics for %{course}', :course => @context.name %>

<% active_students = @context.participating_students.where("enrollments.type<>'StudentViewEnrollment'").distinct.count %> <% inactive_students = @context.student_enrollments.invited_by_date.distinct.count(:user_id) %> <% active_topics = @context.discussion_topics.active.pluck(:id) %> <% total_topics = active_topics.length %> <% total_entries = DiscussionEntry.active.where(:discussion_topic_id => active_topics).count %> <% total_assignments = @context.assignments.active.select{|a| a.expects_submission? }.length %> <% total_submissions = @context.submissions.having_submission.with_assignment.count %> <% rubric_associations = @context.rubric_associations.bookmarked.distinct.pluck(:rubric_id) %>
<% js_bundle :course_statistics %>