diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 5b17271af..4b1526fa9 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -200,7 +200,7 @@ class BidsController < ApplicationController flash[:notice] = l(:label_bid_succeed) end end - redirect_to respond_path(@homework) + redirect_to course_for_bid_path(@homework) else @bid.safe_attributes = params[:bid] @courses = [] diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb index 2237ccab6..38195bd5b 100644 --- a/app/controllers/homework_attach_controller.rb +++ b/app/controllers/homework_attach_controller.rb @@ -374,6 +374,7 @@ class HomeworkAttachController < ApplicationController @teaher_score = teacher_score_for_homework @homework respond_to do |format| + format.html format.js end else diff --git a/app/helpers/stores_helper.rb b/app/helpers/stores_helper.rb index 5a161dc85..e987367ad 100644 --- a/app/helpers/stores_helper.rb +++ b/app/helpers/stores_helper.rb @@ -138,7 +138,7 @@ module StoresHelper return [link_to('unkown', '#')] end bid_list = link_to l(:label_homework), homework_course_path(bid.courses.first) - bid_item = link_to bid.name, respond_path(bid) + bid_item = link_to bid.name, course_for_bid_path(bid) return project_link(bid.courses.first).push(bid_list, bid_item) else xxx diff --git a/app/views/bids/_bid_homework_show.html.erb b/app/views/bids/_bid_homework_show.html.erb index 7c6a9d494..f5db7c04a 100644 --- a/app/views/bids/_bid_homework_show.html.erb +++ b/app/views/bids/_bid_homework_show.html.erb @@ -77,10 +77,10 @@ <% end %> - <%= l(:label_x_responses, :count => bid.commit) %> + <%= l(:label_students_responses) %> ( - <%= bid.commit %> + <%= bid.commit.nil? ? bid.commit : 0 %> ) diff --git a/app/views/homework_attach/_evaluation.html.erb b/app/views/homework_attach/_evaluation.html.erb index 9ec926035..c92f84e42 100644 --- a/app/views/homework_attach/_evaluation.html.erb +++ b/app/views/homework_attach/_evaluation.html.erb @@ -1,4 +1,4 @@ -
我写了一个验证身份证号码的程序,它是以一定内存空间(大概100M)换取cpu消耗,然后它的运算量就降低了,前十四位的验证就相当于转换类型再查表一样,所以它的验证号码速度比一般的方式快。如果还不明白就说明你写框架写多了,或者你不了解java基础。测试结果只代表算法效率,测一个号码是因为正确号码运算次数基本相同,如果你们用自己的电脑测,13亿次循环应该不到1分钟。这种设计思路,也可以套式信息验证上去。
- + <% if @homework.users.count > 0 %> ++ <% if @homework.description != nil && @homework.description != "" %> + <%= @homework.description %> + <% else %> +
<%= l(:label_attachment) %>: + + + <% if @is_evaluation || is_teacher%> + <% options = {:author => true } %> + <%= render :partial => 'app_link', :locals => {:attachments => @homework.attachments, :options => options} %> + <% else %> + <%= l(:label_cant_download) %> + <% end %> + +
我写了一个验证身份证号码的程序,它是以一定内存空间(大概100M)换取cpu消耗,然后它的运算量就降低了,前十四位的验证就相当于转换类型再查表一样,所以它的验证号码速度比一般的方式快。如果还不明白就说明你写框架写多了,或者
<% if bid.reward_type.nil? or bid.reward_type == 1 %> <%= l(:label_bids_reward_method) %><%= l(:label_call_bonus) %> <%= l(:label_RMB_sign) %><%= bid.budget%> <% elsif bid.reward_type == 2 %> <%= l(:label_bids_reward_method) %><%= bid.budget%> <% else %> <% end %> | +<% if bid.reward_type.nil? or bid.reward_type == 1 %> <%= l(:label_bids_reward_method) %><%= l(:label_call_bonus) %> <%= l(:label_RMB_sign) %><%= bid.budget%> <% elsif bid.reward_type == 2 %> <%= l(:label_bids_reward_method) %><%= bid.budget%> <% else %> <% end %> |
diff --git a/config/locales/en.yml b/config/locales/en.yml index 6f4826766..8a07284ba 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1844,4 +1844,7 @@ en: lable_school_list: List of schools button_delete_file: delete label_attachment: attachment - label_max_length: A maximum of 250 characters \ No newline at end of file + label_max_length: A maximum of 250 characters + label_create_person: Create personnel + label_participation_person: The participation of personnel + label_homework_without_description: The homework without any description! \ No newline at end of file diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 2872cde7a..3df099ef5 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1487,10 +1487,7 @@ zh: one: 留言 other: 留言 #end - label_x_responses: #modify by huang - zero: 学生提问 - one: 学生提问 - other: 学生提问 + label_students_responses: 学生提问 #end label_x_bids_responses: #modify by huang zero: 用户反馈 @@ -2179,3 +2176,6 @@ zh: label_time: 时间 label_attachment: 附件 label_max_length: 最多250个字 + label_create_person: 创建人员 + label_participation_person: 参与人员 + label_homework_without_description: 该作业无任何描述! diff --git a/config/routes.rb b/config/routes.rb index 2132d7aba..78f0eeedb 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -748,7 +748,7 @@ RedmineApp::Application.routes.draw do # added by young match 'calls', :to => 'bids#index' - #match 'calls/:id', :to => 'bids#show', :as => 'respond' + match 'calls/:id', :to => 'bids#show', :as => 'respond' # modified by longjun # bids#contests is not exist # match 'contest', :to => 'bids#contests', :as => 'contest' #modified @20140403 |