Module: Course::Assessment::SubmissionsHelper

Included in:
Course::AssessmentsComponent
Defined in:
app/helpers/course/assessment/submissions_helper.rb

Instance Method Summary collapse

Instance Method Details

#my_students_pending_submissions_countInteger

Returns the count of submissions of my students in a course that are pending grading


16
17
18
19
20
21
# File 'app/helpers/course/assessment/submissions_helper.rb', line 16

def my_students_pending_submissions_count
  @my_student_pending_submissions ||= begin
    my_student_ids = current_course_user ? current_course_user.my_students.select(:user_id) : []
    pending_submission_count_for(my_student_ids)
  end
end

#pending_submissions_countInteger

Returns the count of student submissions in a course that are pending grading.


6
7
8
9
10
11
# File 'app/helpers/course/assessment/submissions_helper.rb', line 6

def pending_submissions_count
  @pending_submissions_count ||= begin
    student_ids = current_course.course_users.students.select(:user_id)
    pending_submission_count_for(student_ids)
  end
end