lib/course_training_progress_manager.rb
# Courses before Spring 2016 used the old on-wiki training
# instead of the dashboard-based training modules.
Courses before Spring 2016 used the old on-wiki training
instead of the dashboard-based training modules.
Courses before Spring 2016 used the old on - wiki training instead of the dashboard - based training modules .
def completed_modules_for_user_and_course
    TrainingModulesUsers
      .where(user_id: @user.id)
      .where(training_module_id: modules_for_course)
      .where.not(completed_at: nil)
      .count
  end
def completed_modules_for_user_and_course TrainingModulesUsers . where ( user_id : @user . id ) . where ( training_module_id : modules_for_course ) . where . not ( completed_at : nil ) . count end
Courses before Spring 2016 used the old on-wiki training
instead of the dashboard-based training modules.
Courses before Spring 2016 used the old on - wiki training instead of the dashboard - based training modules .