diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb index bb17a90b2..085b4d41f 100644 --- a/app/controllers/homework_attach_controller.rb +++ b/app/controllers/homework_attach_controller.rb @@ -358,6 +358,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/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 53b384e2c..cf4f3b1a0 100644 --- a/app/views/homework_attach/_homeworks_list.html.erb +++ b/app/views/homework_attach/_homeworks_list.html.erb @@ -58,6 +58,8 @@ <%= link_to homework_filename , homework_attach_path(homework), :title => homework_filename, :remote => true%>
  • + 评分: + <%= rating_for @homework, dimension: :quality, class: 'rateable div_inline' %> <%= link_to "(#{homework.attachments.count.to_s}个附件)", zipdown_download_user_homework_path(:homework => homework)%>
  • 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 %>

      -
    • 参与人员:gugu02
    • -
    • 发布时间:2014-10-24
    • +
    • <%= l(:label_create_person) %>:<%= link_to @homework.user, user_path(@homework.user)%>
    • +
    • <%= l(:label_activity_time) %>:<%=format_time @homework.created_at %>
    -

    我写了一个验证身份证号码的程序,它是以一定内存空间(大概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/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: 该作业无任何描述!