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 @@ -
评分: +
评分: <%= rating_for homework, dimension: :quality, class: 'rateable div_inline' %> - (您可以对作业进行多次评价,以最后一次评价为最终结果) +
\ No newline at end of file diff --git a/app/views/homework_attach/_homeworks_list.html.erb b/app/views/homework_attach/_homeworks_list.html.erb index d03ca22b0..ef2b9a001 100644 --- a/app/views/homework_attach/_homeworks_list.html.erb +++ b/app/views/homework_attach/_homeworks_list.html.erb @@ -11,10 +11,10 @@ ) 按  - <%= link_to l(:label_work_rating), sort_homework_path(@bid, 'socre', @direction), {:remote => true}%> -  /  - <%= link_to l(:label_time), sort_homework_path(@bid, 'time', @direction), {:remote => true}%> -  <%= l(:label_sort) %> + <%= link_to l(:label_work_rating), sort_homework_path(@bid, 'socre', @direction), {:remote => true}%> +  /  + <%= link_to l(:label_time), sort_homework_path(@bid, 'time', @direction), {:remote => true}%> +  <%= l(:label_sort) %>
<% end %> @@ -43,7 +43,7 @@
<% end %> @@ -54,4 +54,4 @@ -<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/homework_attach/_show.html.erb b/app/views/homework_attach/_show.html.erb index 9811cf228..620a29936 100644 --- a/app/views/homework_attach/_show.html.erb +++ b/app/views/homework_attach/_show.html.erb @@ -1,51 +1,58 @@ - - - - - 作业评分弹框 - - - - - - -
- - - - - -
-

科大校园助手最终提交文档及源码

+

<%= @homework.name %>

-

我写了一个验证身份证号码的程序,它是以一定内存空间(大概100M)换取cpu消耗,然后它的运算量就降低了,前十四位的验证就相当于转换类型再查表一样,所以它的验证号码速度比一般的方式快。如果还不明白就说明你写框架写多了,或者你不了解java基础。测试结果只代表算法效率,测一个号码是因为正确号码运算次数基本相同,如果你们用自己的电脑测,13亿次循环应该不到1分钟。这种设计思路,也可以套式信息验证上去。

-

附件:附件1附件2附件3附件4附件5

+ <% if @homework.users.count > 0 %> +
<%= l(:label_participation_person) %>: + <% @homework.users.each do |homework_user| %> + <%= link_to homework_user, user_path(homework_user)%> + <% if @homework.users.count > 1 && homework_user != @homework.users.last %> + 、                 + <% end %> + <% end %> +
+ <% end %> +

+ <% if @homework.description != nil && @homework.description != "" %> + <%= @homework.description %> + <% else %> +

+ <%= l(:label_homework_without_description) %> +
+ <% end %> +

+

<%= 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 %> + +

- 评分: - - - - - + 评分: + <%= rating_for @homework, dimension: :quality, class: 'rateable div_inline' %>
- + 提交评论
@@ -53,24 +60,20 @@
    -
  • +
  • 全部评论(30
  • -
  • +
  • 教师评论(30
-
+
- +
- gugu012014-10-24评分: + gugu012014-10-24评分:

我写了一个验证身份证号码的程序,它是以一定内存空间(大概100M)换取cpu消耗,然后它的运算量就降低了,前十四位的验证就相当于转换类型再查表一样,所以它的验证号码速度比一般的方式快。如果还不明白就说明你写框架写多了,或者

@@ -80,17 +83,17 @@
- +
- gugu012014-10-24评分: + gugu012014-10-24评分:

我写了一个验证身份证号码的程序,它是以一定内存空间(大概100M)换取cpu消耗,然后它的运算量就降低了,前十四位的验证就相当于转换类型再查表一样,所以它的验证号码速度比一般的方式快。如果还不明白就说明你写框架写多了,或者

- +
jack 回复 jack:

我们尽快修复,此问题已发现原因,测试后我们尽快上线。谢谢反馈!!

@@ -100,7 +103,7 @@
- +
jack 回复 jack:

我们尽快修复,此问题已发现原因,测试后我们尽快上线。谢谢反馈!!

@@ -115,10 +118,10 @@
- +
- gugu012014-10-24评分: + gugu012014-10-24评分:

我写了一个验证身份证号码的程序,它是以一定内存空间(大概100M)换取cpu消耗,然后它的运算量就降低了,前十四位的验证就相当于转换类型再查表一样,所以它的验证号码速度比一般的方式快。如果还不明白就说明你写框架写多了,或者

@@ -131,12 +134,12 @@
-
+
- +
- gugu012014-10-24评分: + gugu012014-10-24评分:

我写了一个验证身份证号码的程序,它是以一定内存空间(大概100M)换取cpu消耗,然后它的运算量就降低了,多了,或者

@@ -154,7 +157,3 @@
- -
- - diff --git a/app/views/homework_attach/show.js.erb b/app/views/homework_attach/show.js.erb index f4178c0f8..9f9b39b89 100644 --- a/app/views/homework_attach/show.js.erb +++ b/app/views/homework_attach/show.js.erb @@ -1,3 +1,3 @@ -$('#ajax-modal').html('<%= escape_javascript(render :partial => 'show') %>'); +$('#ajax-modal').html('<%= escape_javascript(render :partial => 'show',:locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework, :teaher_score => @teaher_score}) %>'); showModal('ajax-modal', '503px'); $('#ajax-modal').css('height','569px'); diff --git a/app/views/test/courselist.html.erb b/app/views/test/courselist.html.erb index 195913ed2..3f9f22489 100644 --- a/app/views/test/courselist.html.erb +++ b/app/views/test/courselist.html.erb @@ -19,7 +19,7 @@
- <%= link_to homework.name, respond_path(homework) %>(<%=homework.homeworks.count %>)<%#Bid%> + <%= link_to homework.name, course_for_bid_path(homework) %>(<%=homework.homeworks.count %>)<%#Bid%> <%#= link_to "打包下载", zipdown_assort_path(obj_class: homework.class, obj_id: homework.id), :class => "btn btn-primary btn-sm" %>
diff --git a/app/views/users/_my_create_homework.html.erb b/app/views/users/_my_create_homework.html.erb index 4c7cbe02f..aa102bf85 100644 --- a/app/views/users/_my_create_homework.html.erb +++ b/app/views/users/_my_create_homework.html.erb @@ -34,7 +34,7 @@ - +
<% 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