app/models/project.rb
# Update the badge percentage for a given level (expressed as a number;
# 0=passing), and update relevant event datetime if needed.
# It presumes the lower-level percentages (if relevant) are calculated.
Update the badge percentage for a given level (expressed as a number;
0=passing), and update relevant event datetime if needed.
It presumes the lower-level percentages (if relevant) are calculated.
Update the badge percentage for a given level ( expressed as a number ; 0 = passing ) and update relevant event datetime if needed . It presumes the lower - level percentages ( if relevant ) are calculated .
def update_badge_percentage(level, current_time)
    old_badge_percentage = self["badge_percentage_#{level}".to_sym]
    update_prereqs(level) unless level.to_i.zero?
    self["badge_percentage_#{level}".to_sym] =
      calculate_badge_percentage(level)
    update_passing_times(level, old_badge_percentage, current_time)
  end
def update_badge_percentage ( level , current_time ) old_badge_percentage = self [ "badge_percentage_#{level}" . to_sym ] update_prereqs ( level ) unless level . to_i . zero? self [ "badge_percentage_#{level}" . to_sym ] = calculate_badge_percentage ( level ) update_passing_times ( level , old_badge_percentage , current_time ) end
Update the badge percentage for a given level (expressed as a number;
0=passing), and update relevant event datetime if needed.
Update the badge percentage for a given level ( expressed as a number ; 0 = passing ) and update relevant event datetime if needed .
level
<not_specific>
current_time
<not_specific>