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 course_training_progress(user)
    @user = user
    if in_dashboard_training?
      return @user.trained? ? nil : I18n.t('users.training_incomplete')
    end
    assigned_count = total_modules_for_course
    return if assigned_count.zero?
    completed_count = completed_modules_for_user_and_course
    I18n.t('users.training_modules_completed', completed_count: completed_count,
                                               count: assigned_count)
  end
def course_training_progress ( user ) @user = user if in_dashboard_training? return @user . trained? ? nil : I18n . t ( 'users.training_incomplete' ) end assigned_count = total_modules_for_course return if assigned_count . zero? completed_count = completed_modules_for_user_and_course I18n . t ( 'users.training_modules_completed' , completed_count : completed_count , count : assigned_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 .
# For old courses, on-wiki training completion is tracked with User#trained?
user
<not_specific>