diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index d474b5587..35a907ecc 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -108,5 +108,7 @@ module CoursesHelper now > cTime end - + def find_by_extra_from_project extra + Course.find_by_extra(try(extra)) + end end diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index d0b0ee5ad..ed435fe6d 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -129,7 +129,7 @@ module WelcomeHelper # end #end end - + def find_miracle_project(sum, max_rate) max = sum*(max_rate.to_f/10) c1 = find_new_project(sum).to_a.dup diff --git a/app/models/course.rb b/app/models/course.rb index 9f0c42c6f..0420b1744 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -47,5 +47,4 @@ class Course < ActiveRecord::Base return time end end - end diff --git a/app/views/bids/show_course.html.erb b/app/views/bids/show_course.html.erb index 0d1bdee57..574bd117c 100644 --- a/app/views/bids/show_course.html.erb +++ b/app/views/bids/show_course.html.erb @@ -12,7 +12,8 @@ <%= l(:label_homework) %> (<%= link_to (course.homeworks.count), {:controller => 'projects', :action => 'homework', :id => course.identifier} %>) <%= l(:label_course_news)%> (<%= link_to (course.news.count), {:controller => 'news', :action => 'index', :project_id => course.identifier} %>) - + +