From 14209be05781c608e814b600d48eebc63af17589 Mon Sep 17 00:00:00 2001 From: miss <994230062@qq.com> Date: Thu, 14 Sep 2017 09:09:12 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E5=BC=B9=E6=A1=86=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E5=AE=9E=E8=AE=ADtpm=E7=89=88=E6=9C=AC=E5=BA=93=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E3=80=82=E6=A8=A1=E5=9D=97=E4=B9=8B=E9=97=B4=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E6=9C=89=E8=B7=9D=E7=A6=BB=EF=BC=8Cta=E7=9A=84?= =?UTF-8?q?=E4=B8=BB=E9=A1=B5=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E6=88=91=E7=9A=84=E8=B5=84=E6=96=99=E9=A1=B5=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E7=81=B0=E8=89=B2=E8=83=8C=E6=99=AF=E5=B9=B6=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E9=97=B4=E8=B7=9D=EF=BC=8C=E6=88=90=E9=95=BF=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E7=9A=84=E8=A1=A8=E6=A0=BC=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=20=E6=88=91=E7=9A=84=E4=B8=BB=E9=A1=B5=E5=92=8C=E5=90=84?= =?UTF-8?q?=E4=B8=AA=E5=8A=9F=E8=83=BD=E9=A6=96=E9=A1=B5=E7=9A=84=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E5=8A=9F=E8=83=BD=E6=9D=A1=EF=BC=8C=E9=83=A8=E5=88=86?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E4=BA=8B=E9=A1=B9=E6=9B=B4=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E5=88=B7=E6=96=B0=E6=98=BE=E7=A4=BA=20?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=8F=8D=E9=A6=88=EF=BC=8C=E7=82=B9=E5=87=BB=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86=E5=91=98=E7=9A=84=E7=95=99?= =?UTF-8?q?=E8=A8=80=E9=A1=B5=E9=9D=A2=EF=BC=88=EF=BC=89=20=E6=88=91?= =?UTF-8?q?=E7=9A=84=E9=A2=98=E5=BA=93=E5=92=8C=E5=85=AC=E5=85=B1=E9=A2=98?= =?UTF-8?q?=E5=BA=93=E9=A1=B5=E5=B0=BE=E6=98=BE=E7=A4=BA=E7=9A=84=E5=86=85?= =?UTF-8?q?=E5=AE=B9=EF=BC=8C=E8=AF=B7=E4=BF=9D=E6=8C=81=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E5=86=85=E4=B8=8A=E4=B8=8B=E5=B1=85=E4=B8=AD=20=E5=AE=9E?= =?UTF-8?q?=E8=AE=AD=E5=92=8C=E8=AF=BE=E5=A0=82=E6=90=9C=E7=B4=A2=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E6=97=A0=E6=95=B0=E6=8D=AE=E6=97=B6=E7=9A=84=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E5=8C=BA=E5=9F=9F=E4=B8=8E=E6=96=87=E5=AD=97=E8=A6=81?= =?UTF-8?q?=E6=9C=89=E9=97=B4=E8=B7=9D=20=E5=AE=9E=E8=AE=AD=E7=9A=84?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=A1=B5=E9=9D=A2=E4=B8=8D=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=98=BE=E7=A4=BA=E7=89=88=E6=9C=AC=E5=BA=93?= =?UTF-8?q?=20=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5=E3=80=81=E6=88=91?= =?UTF-8?q?=E7=9A=84=E8=AF=BE=E5=A0=82=E5=92=8C=E6=88=91=E7=9A=84=E5=AE=9E?= =?UTF-8?q?=E8=AE=AD=E7=9A=84=E6=96=B0=E5=BB=BA=E3=80=81=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F=E4=B8=8E=E5=90=84=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4=20=E6=88=91?= =?UTF-8?q?=E7=9A=84=E7=95=99=E8=A8=80=E3=80=81=E7=BB=99TA=E7=95=99?= =?UTF-8?q?=E8=A8=80=E5=92=8C=E7=A7=81=E4=BF=A1=E7=9A=84=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=8E=BB=E6=8E=89=E8=83=8C=E6=99=AF=E7=81=B0?= =?UTF-8?q?=E8=89=B2=E5=92=8C=E5=8A=A0=E8=BE=B9=E6=A1=86=E9=98=B4=E5=BD=B1?= =?UTF-8?q?=20=E5=9C=A8=E7=BA=BF=E8=AF=BE=E5=A0=82=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E7=9A=84=E6=90=9C=E7=B4=A2tip=E9=9C=80=E8=A6=81=E6=9B=B4?= =?UTF-8?q?=E6=8D=A2=E6=96=B0=E6=A0=B7=E5=BC=8F=EF=BC=8C=E8=AF=BE=E5=A0=82?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=98=BE=E7=A4=BA=E5=85=A8=E7=9A=84=E8=AF=9D?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BAtip=EF=BC=8C=E5=B8=A6=E6=9C=89?= =?UTF-8?q?=E7=9C=81=E7=95=A5=E5=8F=B7=E7=9A=84=E8=AF=9D=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E6=9C=89tip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 4 + app/views/courses/_courseList.html.erb | 13 +- .../_search_not_students_list.html.erb | 4 +- .../_homework_bank_list.html.erb | 4 +- app/views/layouts/_public_left_info.html.erb | 8 +- app/views/layouts/base_edu_account.html.erb | 4 +- app/views/layouts/base_shixun.html.erb | 7 +- app/views/projects/_no_data.html.erb | 2 +- app/views/shixuns/_settings_show.html.erb | 4 +- app/views/shixuns/settings.html.erb | 39 ++-- .../shixuns/statistics_students.html.erb | 197 ++++++++++++++++++ app/views/syllabuses/_syllabus_index.html.erb | 4 +- app/views/syllabuses/index.html.erb | 6 +- .../users/_user_experience_content.html.erb | 6 +- app/views/users/_user_grade_content.html.erb | 6 +- .../users/_user_journalsformessage.html.erb | 2 +- .../users/search_shixuns_or_courses.html.erb | 2 +- app/views/users/shixuns.html.erb | 10 +- app/views/users/show.html.erb | 21 +- app/views/users/user_fanslist.html.erb | 7 +- app/views/users/user_newfeedback.html.erb | 7 +- app/views/users/user_watchlist.html.erb | 7 +- config/routes.rb | 1 + public/javascripts/edu/application.js | 70 +------ public/stylesheets/css/edu-common.css | 21 +- public/stylesheets/css/edu-user.css | 5 +- public/stylesheets/css/taskstyle.css | 4 +- 27 files changed, 317 insertions(+), 148 deletions(-) create mode 100644 app/views/shixuns/statistics_students.html.erb diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 9f16575b8..36f775652 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -14,6 +14,10 @@ class ShixunsController < ApplicationController CODES = %W(2 3 4 5 6 7 8 9 A B C D E F G H J K L N M O P Q R S T U V W X Y Z) DCODES = %W(2 3 4 5 6 7 8 9 a b c f e f g h i j k l m n o p q r s t u v w x y z) + + def statistics_students + + end # push代码的时候会触发gitlab hook def ghook shixun_modify_status_without_publish(@shixun, 1) diff --git a/app/views/courses/_courseList.html.erb b/app/views/courses/_courseList.html.erb index eff37ff70..f9fe853fb 100644 --- a/app/views/courses/_courseList.html.erb +++ b/app/views/courses/_courseList.html.erb @@ -10,9 +10,15 @@ <% sy_author = User.find(sy.tea_id) %>
-

+ <% if sy.name.length > 32 %> +

<%= sy.name %>

+ <% else %> +

+ <%= sy.name %> +

+ <% end %>
<%= link_to image_tag(url_to_avatar(sy_author), :width => "60", :height => "60", :class => "panel-warp-img mr10 fl", :alt => "用户"), user_path(sy_author), :target => '_blank' %> @@ -65,6 +71,11 @@ <% end %> - +
<% if User.current.logged? %> @@ -48,7 +48,7 @@
<% end %> <% end %> -
+

    账户管理

    diff --git a/app/views/layouts/base_shixun.html.erb b/app/views/layouts/base_shixun.html.erb index aa188b0b6..efa74afcc 100644 --- a/app/views/layouts/base_shixun.html.erb +++ b/app/views/layouts/base_shixun.html.erb @@ -38,8 +38,11 @@ :class => (params[:controller] == 'repositories' ? 'active' : ''), :target => "_blank" %> -
  • ">合作者
  • -
  • ">配置
  • + <% end %> +
  • ">合作者
  • + + <% if User.current.manager_of_shixun?(@shixun) %> +
  • ">配置
  • <% end %>
diff --git a/app/views/projects/_no_data.html.erb b/app/views/projects/_no_data.html.erb index 96a27a999..5cf4e5cfe 100644 --- a/app/views/projects/_no_data.html.erb +++ b/app/views/projects/_no_data.html.erb @@ -1,4 +1,4 @@ -
+

没有数据可以显示!

\ No newline at end of file diff --git a/app/views/shixuns/_settings_show.html.erb b/app/views/shixuns/_settings_show.html.erb index 689515e2b..fca669be8 100644 --- a/app/views/shixuns/_settings_show.html.erb +++ b/app/views/shixuns/_settings_show.html.erb @@ -1,5 +1,5 @@ -
-
+
+

diff --git a/app/views/shixuns/settings.html.erb b/app/views/shixuns/settings.html.erb index 3900bba5a..f70b954c3 100644 --- a/app/views/shixuns/settings.html.erb +++ b/app/views/shixuns/settings.html.erb @@ -1,19 +1,20 @@ <%= stylesheet_link_tag '/editormd/css/editormd','/editormd/css/editormd.min.css' %> <%= javascript_include_tag '/editormd/lib/marked.min.js','/editormd/lib/prettify.min.js','/editormd/lib/raphael.min.js','/editormd/lib/underscore.min.js','/editormd/lib/sequence-diagram.min.js', '/editormd/lib/flowchart.min.js','/editormd/lib/jquery.flowchart.min.js','/editormd/editormd.js'%> -

diff --git a/app/views/managements/subject_authorization.html.erb b/app/views/managements/subject_authorization.html.erb index 845dc2121..82190e792 100644 --- a/app/views/managements/subject_authorization.html.erb +++ b/app/views/managements/subject_authorization.html.erb @@ -1,6 +1,6 @@
-

课程实训发布

+

实训路径发布

diff --git a/app/views/messages/_common_reply_box.html.erb b/app/views/messages/_common_reply_box.html.erb index f770a3de0..611d164b4 100644 --- a/app/views/messages/_common_reply_box.html.erb +++ b/app/views/messages/_common_reply_box.html.erb @@ -65,10 +65,10 @@

<% if is_teacher || comment.creator_user == User.current%> - 删除 + 删除 <% end %> - <%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> + <%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"} %> <%= link_to( '回复'.html_safe, diff --git a/app/views/praise_tread/_edu_praise.html.erb b/app/views/praise_tread/_edu_praise.html.erb index 67b9470ea..bc8bbd082 100644 --- a/app/views/praise_tread/_edu_praise.html.erb +++ b/app/views/praise_tread/_edu_praise.html.erb @@ -2,7 +2,7 @@ + :type => type }) %>' data-remote="true" class="fr ml15" title="点赞"> 赞 <% num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %> <%= (num.nil? ? 0 : num) > 0 ? num : 0 %> @@ -11,7 +11,7 @@ + :type => type }) %>' data-remote="true" class="fr ml15 link-color-green" title="取消点赞" > 赞 <% num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %> <%= (num.nil? ? 0 : num) > 0 ? num : 0 %> diff --git a/app/views/school/index.html.erb b/app/views/school/index.html.erb index 6dfc8c5de..34ab82068 100644 --- a/app/views/school/index.html.erb +++ b/app/views/school/index.html.erb @@ -1,95 +1,97 @@ -<% port = ":3000" if Rails.env.development? %> - - - -

-
-
-
    -
-
-<% html_title(l(:label_school_all)) -%> +<% port = ":3000" if Rails.env.development? %> + + +
+
+

+ <%= link_to l(:label_all_schol),school_index_path %>      + <% if User.current.logged? %> + + <%= l(:label_my_school) %> + + <% end %> +

+
    +
  • + <%= l(:label_select_province) %>: + +
  • +
  • + + 搜索 + +
  • +
+
+
+
+
    +
+
+
+<% html_title(l(:label_school_all)) -%> diff --git a/app/views/student_work/_common_reply_box.html.erb b/app/views/student_work/_common_reply_box.html.erb index 922c00e1a..4ef652e38 100644 --- a/app/views/student_work/_common_reply_box.html.erb +++ b/app/views/student_work/_common_reply_box.html.erb @@ -64,7 +64,7 @@

<% if is_teacher || comment.creator_user == User.current%> - 删除 + 删除 <% end %> <%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> diff --git a/app/views/student_work/_shixun_work_show.html.erb b/app/views/student_work/_shixun_work_show.html.erb index a5d8c4d3d..7705d882e 100644 --- a/app/views/student_work/_shixun_work_show.html.erb +++ b/app/views/student_work/_shixun_work_show.html.erb @@ -10,7 +10,7 @@ / <%= link_to @shixun.name, shixun_path(@shixun), :class => "edu-info-dark fl", :target => "_blank" %>

- 经验值:<%= @myshixun.total_score %> + 经验值:<%= @myshixun.total_score %>
<%= link_to image_tag(url_to_avatar(@work.user), :width =>"50", :height => "50", :alt=>"头像", :style => "width:50px; height:50px;"), user_path(@work.user), :class => "fl edu-work-user-img", :target => "_blank" %> @@ -22,8 +22,8 @@
  • 通关时间: <%= @myshixun.try(:status) == 1 ? (format_time @myshixun.done_time) : '- -' %>
    • -
    • 通关情况:<%= had_passed_changllenge_num(@shixun, @work.user).to_s+" / "+@shixun.challenges.count.to_s %>
    • -
    • 总耗时:<%=had_passed_changllenge_num(@shixun, @work.user) > 0 ? game_spend_time(@myshixun.total_spend_time) : '- -' %>
    • +
    • 通关情况:<%= had_passed_changllenge_num(@shixun, @work.user).to_s+" / "+@shixun.challenges.count.to_s %>
    • +
    • 总耗时 :<%=had_passed_changllenge_num(@shixun, @work.user) > 0 ? game_spend_time(@myshixun.total_spend_time) : '- -' %>
    diff --git a/app/views/subjects/_subject_list.html.erb b/app/views/subjects/_subject_list.html.erb index b16010d0c..2ce3f0f15 100644 --- a/app/views/subjects/_subject_list.html.erb +++ b/app/views/subjects/_subject_list.html.erb @@ -1,10 +1,10 @@
    diff --git a/app/views/users/_course_message_form.html.erb b/app/views/users/_course_message_form.html.erb index d7fb8b7f6..98d4e0f32 100644 --- a/app/views/users/_course_message_form.html.erb +++ b/app/views/users/_course_message_form.html.erb @@ -1,27 +1,19 @@ -<%= form_tag share_message_to_course_user_path(user), :remote => true, :id => 'course_list_form' %> -
    - <%= hidden_field_tag(:send_id, send_id) %> - <%= hidden_field_tag(:send_ids, send_ids) %> -
    - <% if !courses.empty? %> - <% courses.each do |course| %> -
      -
    • - -
    • -
    • <%= truncate(course.name, :length => 25) %>
    • -
    +<%= form_tag share_message_to_course_user_path(user),:remote=>true,:id=>'course_list_form' do %> +
    + <%= hidden_field_tag(:send_id, send_id) %> + <%= hidden_field_tag(:send_ids, send_ids) %> +
      + <% if !courses.empty? %> + <% courses.each do |course| %> +
    • + +
    • + <% end %> <% end %> - <% end %> -
    -
    -
    -
    -
    - - <%= submit_tag '确定', :class => 'sendSourceText', :onfocus => 'this.blur();' %> -
    - -
    -
    \ No newline at end of file + +
    +
    +<% end %> diff --git a/app/views/users/_edu_user_watch_fan_list.html.erb b/app/views/users/_edu_user_watch_fan_list.html.erb index e4a0b0615..385a0eb6d 100644 --- a/app/views/users/_edu_user_watch_fan_list.html.erb +++ b/app/views/users/_edu_user_watch_fan_list.html.erb @@ -9,12 +9,12 @@ -
    +
    <% if @user_watchlist_count > 12 %> 查看全部 <% end %> <% if @user_watchlist_count == 0 %> -

    +

    <% if current_user %> 你还没有关注任何人,去找找感兴趣的用户 <% else %> diff --git a/app/views/users/_resource_share_popup.html.erb b/app/views/users/_resource_share_popup.html.erb index eed2f2a86..3a0360b58 100644 --- a/app/views/users/_resource_share_popup.html.erb +++ b/app/views/users/_resource_share_popup.html.erb @@ -1,30 +1,34 @@ -

    -
    -

    发送资源

    - -
    -
    -
    -
    - <%= form_tag search_user_course_user_path(user),:method => 'get', :remote=>true, :id=> 'search_user_course_form', :class=> '' do %> - <%= hidden_field_tag(:send_id, send_id) %> - - - - <% end %> -
    -
    - <%= render :partial => "users/course_file_form", :locals => {:user => user, :send_id => send_id, :courses => courses, :type => type} %> -
    -
    - - 确定 - 取消 -
    -
    -
    -
    -
    - +
    +
    +

    发送资源

    + +
    +
    +
    +
    + + 选择的资源将会发送到指定课堂 +
    +
    + <%= form_tag search_user_course_user_path(user),:method => 'get', :remote=>true, :id=> 'search_user_course_form', :class=> '' do %> + <%= hidden_field_tag(:send_id, send_id) %> + + + + <% end %> +
    +
    + <%= render :partial => "users/course_file_form", :locals => {:user => user, :send_id => send_id, :courses => courses, :type => type} %> +
    +
    + + 确定 + 取消 +
    +
    +
    +
    +
    + diff --git a/app/views/users/_share_message_to_course.html.erb b/app/views/users/_share_message_to_course.html.erb index 80396fc69..dcfbe133a 100644 --- a/app/views/users/_share_message_to_course.html.erb +++ b/app/views/users/_share_message_to_course.html.erb @@ -4,37 +4,36 @@

    发送资源

    - - - - - - - - - - -
    -
    -
    - <%= form_tag search_user_course_user_path(user),:method => 'get',:remote=>true,:id=>'search_user_course_form',:class=>'resourcesSearchBox' do %> +
    +
    + + 选择的资源将会发送到指定课堂 +
    +
    + <%= form_tag search_user_course_user_path(user, :send_message => 1),:method => 'get', :remote => true, :id => 'course_list_form', :class=> '' do %> <%= hidden_field_tag(:send_id, send_id) %> - <%= hidden_field_tag(:send_ids, send_ids) %> + <%= hidden_field_tag(@send_ids,send_ids) %> + - - + - <%= submit_tag '',:class=>'searchIcon2',:onfocus=>"this.blur();",:style=>'border-style:none' %> <% end %>
    - <%= render :partial => 'users/course_message_form', :locals => {:user => user, :courses => courses, :send_id => send_id, :send_ids => send_ids} %> + <%= render :partial => 'users/course_message_form', :locals => {:user => user, :courses => courses, :send_id => send_id,:send_ids => send_ids} %> +
    +
    + + <%#= submit_tag '确定', :class => 'sendSourceText', :onfocus => 'this.blur();' %> + 确定 + 取消 +
    +
    - diff --git a/app/views/users/search_user_course.js.erb b/app/views/users/search_user_course.js.erb index 4a0a783d2..1417bbc4e 100644 --- a/app/views/users/search_user_course.js.erb +++ b/app/views/users/search_user_course.js.erb @@ -22,25 +22,16 @@ $('#ajax-modal').parent().css({"border":"3px solid #269ac9", "padding":"4px"}); var val = $("#search_course_input").val(); $("#search_course_input").val("").focus().val(val); - <% elsif params[:send_type] == 'file' %> var htmlvalue = "<%= escape_javascript(render :partial => 'users/resource_share_popup', :locals => {:courses => @course, :user => @user, :send_id => @send_id, :type=>@type}) %>"; pop_box_new(htmlvalue, 452, 463); <% elsif params[:send_type] == 'message' %> - var htmlvalue = "<%= escape_javascript( render :partial => 'users/share_message_to_course' ,:locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>"; - pop_box_new(htmlvalue, 452, 463); -// $("#ajax-modal").html('<%#= escape_javascript( render :partial => 'users/share_message_to_course' ,:locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>'); -// showModal('ajax-modal', '452px'); -// $('#ajax-modal').siblings().remove(); -// $('#ajax-modal').before(""); -// $('#ajax-modal').parent().css("top","50%").css("left","50%"); -// $('#ajax-modal').parent().addClass("popbox").addClass("resourceUploadPopup"); -// $('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px"); -// //与更新版本弹窗js冲突新增样式代码 -// $('#ajax-modal').parent().css({"border":"3px solid #269ac9", "padding":"4px"}); -// var val = $("#search_course_input").val(); -// $("#search_course_input").val("").focus().val(val); + var htmlvalue = "<%= escape_javascript( render :partial => 'users/share_message_to_course' ,:locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>"; + pop_box_new(htmlvalue, 452, 463); + + <% elsif params[:send_message] == "1" %> + alert("发送成功!"); <% end %> <% else %> <% if params[:send_type] == 'news' %> diff --git a/config/routes.rb b/config/routes.rb index a1a76bd33..03c4ce832 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -230,6 +230,8 @@ RedmineApp::Application.routes.draw do get 'shixun_feedback' match 'update_user',:via=>[:get,:post] post 'support_shixuns_search' + get 'add_departments_part' + post 'save_school' end end # Enable Grack support diff --git a/db/migrate/20170912090828_update_user_id_to_courselists.rb b/db/migrate/20170912090828_update_user_id_to_courselists.rb new file mode 100644 index 000000000..56a6038ae --- /dev/null +++ b/db/migrate/20170912090828_update_user_id_to_courselists.rb @@ -0,0 +1,8 @@ +class UpdateUserIdToCourselists < ActiveRecord::Migration + def up + sql = "update course_lists set user_id = 1 where user_id is null" + end + + def down + end +end diff --git a/public/javascripts/edu/application.js b/public/javascripts/edu/application.js index 617a103e2..33a5820ee 100644 --- a/public/javascripts/edu/application.js +++ b/public/javascripts/edu/application.js @@ -1071,6 +1071,8 @@ function submit_send_res_to_course(){ } } + + //验证实训名称 function regex_shixun_name() { diff --git a/public/javascripts/edu/shixun_course_path.js b/public/javascripts/edu/shixun_course_path.js index 4b5a95a71..58580fe05 100644 --- a/public/javascripts/edu/shixun_course_path.js +++ b/public/javascripts/edu/shixun_course_path.js @@ -32,7 +32,7 @@ DelaunayDataSet.prototype.drawLight = function() { x: Math.random() * this.context.canvas.width, y: Math.random() * this.context.canvas.height, angle: Math.random() * 360 * (Math.PI / 180), - speed: Math.random() * 1 + speed: Math.random() / 8 } lights.push(light); } @@ -421,7 +421,7 @@ window.requestAnimFrame = (function() { function loop() { context.clearRect(0, 0, canvasWid, canvasHig); - context.fillStyle='rgba(255,75,00,0.5)'; + context.fillStyle='rgba(255,75,00,0.6)'; context.fillRect(0,0,1350,130); // context.font="30px Arial"; // context.fillText("在线课堂",550,75); From 25cb688ace8bc32363444ea7863ce8d6628ad0dc Mon Sep 17 00:00:00 2001 From: miss <994230062@qq.com> Date: Fri, 15 Sep 2017 09:08:01 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=9B=86=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E6=98=BE=E7=A4=BA=E7=A9=BA=E6=A0=BC=E5=8F=8A=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/challenges/_edit_evaluating.html.erb | 15 ++++++++++++--- app/views/challenges/_evaluating_form.html.erb | 5 +---- public/javascripts/edu/edu_tpi.js | 4 ++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/app/views/challenges/_edit_evaluating.html.erb b/app/views/challenges/_edit_evaluating.html.erb index f7190a85e..97cc18ed7 100644 --- a/app/views/challenges/_edit_evaluating.html.erb +++ b/app/views/challenges/_edit_evaluating.html.erb @@ -27,7 +27,16 @@ 输入输出
    -
  • +
  • +
      <% if @test_sets.count > 0 %> @@ -39,8 +48,8 @@ <% end %>

      -
      输入:

      <%= test.input.gsub("\r\n", "
      ").html_safe unless test.input.blank? %>

      -
      输出:

      <%= test.output.gsub("\r\n", "
      ").html_safe unless test.output.blank? %>

      +
      输入:

      <%= test.input.gsub(" ", "").gsub(/\r\n$/, "
      ").html_safe unless test.input.blank? %>

      +
      输出:

      <%= test.output.gsub(" ", "").gsub(/\r\n$/, "
      ").html_safe unless test.output.blank? %>

      <% end %> <% else %> diff --git a/app/views/challenges/_evaluating_form.html.erb b/app/views/challenges/_evaluating_form.html.erb index 197860477..46e28bf47 100644 --- a/app/views/challenges/_evaluating_form.html.erb +++ b/app/views/challenges/_evaluating_form.html.erb @@ -190,8 +190,5 @@ $("#challenge_execfile_path").hide(); }); -/* $("#evaluating_cancel").click(function(){ - $("#evaluating_edit").hide(); - $("#evaluating_show").show(); - })*/ + diff --git a/public/javascripts/edu/edu_tpi.js b/public/javascripts/edu/edu_tpi.js index cffba5b9f..b9d9e33da 100644 --- a/public/javascripts/edu/edu_tpi.js +++ b/public/javascripts/edu/edu_tpi.js @@ -436,13 +436,13 @@ function code_evaluation(test_sets, "
    • " + "
      " + " 预期输出:" + - "

      " + ( test_sets[i].output == null ? "空" : test_sets[i].output.replace(/\r\n/g, "
      ").replace(/\t/g, "        ").replace(/ /g, "") ) + "

      " + + "

      " + ( test_sets[i].output == null ? "空" : test_sets[i].output.replace(/\r\n/g, "
      ").replace(/\t/g, "        ").replace(/ /g, "") ) + "

      " + "
      " + "
    • " + "
    • " + "
      " + "实际输出:" + - "

      " + (test_sets[i].actual_output == null ? "空" : (test_sets[i].compile_success == "1" ? test_sets[i].actual_output.replace(/\r\n/g, "
      ").replace(/ /g, "") : test_sets[i].actual_output.replace(/\r\n/g, "
      "))) + "

      " + + "

      " + (test_sets[i].actual_output == null ? "空" : (test_sets[i].compile_success == "1" ? test_sets[i].actual_output.replace(/\r\n$/, "
      ").replace(/ /g, "") : test_sets[i].actual_output.replace(/\r\n/g, "
      "))) + "

      " + "
      " + "
    • " + "
    " + From d2e03de9eb83980ddfbaa5b94137112e30676386 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 15 Sep 2017 09:13:28 +0800 Subject: [PATCH 05/13] =?UTF-8?q?=E5=8C=BF=E8=AF=84=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=8A=A5500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index c498af4a9..c82cc45ad 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -389,7 +389,7 @@ class StudentWorkController < ApplicationController @stundet_works = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id) end elsif @homework.homework_detail_manual.comment_status == 3 || @homework.homework_detail_manual.comment_status == 4 #学生 && 开启匿评 看到匿评列表 - my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id).first + my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id) @stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id} # elsif @homework.homework_detail_manual.comment_status == 5 || @homework.homework_detail_manual.comment_status == 6 #学生 && 关闭匿评 未提交作品之前列表为空,提交了作品看到所有的 # my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id).first @@ -420,7 +420,7 @@ class StudentWorkController < ApplicationController @stundet_works = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id) end elsif @homework.homework_detail_manual.comment_status == 3 || @homework.homework_detail_manual.comment_status == 4 #学生 && 开启匿评 看到匿评列表 - my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id).first + my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id) @stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id} # elsif @homework.homework_detail_manual.comment_status == 5 #学生 && 关闭匿评 未提交作品之前列表为空,提交了作品看到所有的 # my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id).first From 02861c3bd2bcb181d6ca495aabce34948c66b1b8 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 15 Sep 2017 11:23:24 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E5=8D=95=E9=80=89=E5=A4=9A=E9=80=89?= =?UTF-8?q?=E9=A2=98=E7=BC=BA=E9=99=B7=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/challenges_controller.rb | 2 +- app/views/challenges/_single_or_multiple_question.html.erb | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index 95cfeec76..b11b5d174 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -131,7 +131,7 @@ class ChallengesController < ApplicationController end end end - @index = params[:position].to_i + @index = params[:position].to_i - 1 respond_to do |format| format.js end diff --git a/app/views/challenges/_single_or_multiple_question.html.erb b/app/views/challenges/_single_or_multiple_question.html.erb index 38e3e6d7f..c157d6773 100644 --- a/app/views/challenges/_single_or_multiple_question.html.erb +++ b/app/views/challenges/_single_or_multiple_question.html.erb @@ -21,7 +21,7 @@
    - +
  • <% if @challenge_choose.blank? %>
  • @@ -128,7 +128,7 @@
  • <% end %> <% end %> -
    " id="add_shixun_skill"> +
    @@ -421,9 +421,6 @@ if($('#challenge_choose_subject textarea').val().trim() == ""){ $("#challenge_choose_subject textarea").focus(); $("#new_shixun_name").show(); - }else if($("#challenge_choose_answer textarea").val().trim() == ""){ - $("#challenge_choose_answer textarea").focus(); - $("#new_shixun_pass").show(); }else if(judge_choice_contents()){ error.html("选项不能为空").show(); }else{ From 1240c50cb5aa72f30bfc1c4116a7fd8a809207c2 Mon Sep 17 00:00:00 2001 From: XuCheng642 <287102909@qq.com> Date: Fri, 15 Sep 2017 18:17:19 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E5=B8=96=E5=AD=90?= =?UTF-8?q?=E5=8F=91=E9=80=81=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/managements/classroom_classment.html.erb | 7 +++++-- app/views/users/search_user_course.js.erb | 4 ++-- public/javascripts/edu/application.js | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/views/managements/classroom_classment.html.erb b/app/views/managements/classroom_classment.html.erb index cff28197a..e76259dab 100644 --- a/app/views/managements/classroom_classment.html.erb +++ b/app/views/managements/classroom_classment.html.erb @@ -26,9 +26,12 @@
    diff --git a/app/views/users/search_user_course.js.erb b/app/views/users/search_user_course.js.erb index 1417bbc4e..606232bec 100644 --- a/app/views/users/search_user_course.js.erb +++ b/app/views/users/search_user_course.js.erb @@ -30,8 +30,8 @@ var htmlvalue = "<%= escape_javascript( render :partial => 'users/share_message_to_course' ,:locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>"; pop_box_new(htmlvalue, 452, 463); - <% elsif params[:send_message] == "1" %> - alert("发送成功!"); + +// alert("发送成功!"); <% end %> <% else %> <% if params[:send_type] == 'news' %> diff --git a/public/javascripts/edu/application.js b/public/javascripts/edu/application.js index 33a5820ee..c8d5f8b52 100644 --- a/public/javascripts/edu/application.js +++ b/public/javascripts/edu/application.js @@ -1065,6 +1065,7 @@ function submit_send_res_to_course(){ if($("input[name='course_ids[]']:checked").length >= 1){ $("#search_course_notice_h").html("").hide(); $("#course_list_form").submit(); + alert("发送成功!"); hideModal(); }else{ $("#search_course_notice_h").html("请先选择一个班级").show(); From 550f152e27075d2b3f15a9ba41c2d59b69045570 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 15 Sep 2017 19:28:19 +0800 Subject: [PATCH 08/13] =?UTF-8?q?=E5=8D=95=E9=80=89=E5=A4=9A=E9=80=89?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/challenges_controller.rb | 3 +- app/controllers/myshixuns_controller.rb | 15 ++++++++ app/models/game.rb | 1 + app/views/challenges/_content_list.html.erb | 6 +++- .../_single_or_multiple_question.html.erb | 4 +-- ..._single_or_multiple_question_show.html.erb | 31 ++-------------- app/views/challenges/choose_type_show.js.erb | 20 ++++++++++- .../challenges/new_choose_question.js.erb | 16 ++++++++- ...32_modify_choose_question_for_challenge.rb | 35 +++++++++++++++++++ 9 files changed, 96 insertions(+), 35 deletions(-) create mode 100644 db/migrate/20170915085332_modify_choose_question_for_challenge.rb diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index b11b5d174..b84cee96f 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -213,10 +213,9 @@ class ChallengesController < ApplicationController def destroy next_challenges = @shixun.challenges.where("position > #{@challenge.position}") next_challenges.update_all("position = position - 1") - @challenge.destroy @challenges = @shixun.challenges - add_shixun_modify_status(@shixun, 1) + @challenge.destroy end def update diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 448868c08..1c7aef02c 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -69,6 +69,21 @@ class MyshixunsController < ApplicationController g = Gitlab.client shixun_tomcat = Redmine::Configuration['shixun_tomcat'] shixun = @myshixun.shixun + @challenges = shixun.challenges + # 删除选择题用户记录 + unless @challenges.blank? + @challenges.each do |challenge| + if challenge.st != 0 + challenge.challenge_chooses.each do |choose| + user_output = choose.choose_outputs + unless user_output.blank? + user_output.delete + end + end + end + end + end + #end myshixun_job = Base64.urlsafe_encode64("myshixun_#{@myshixun.id}") StudentWork.where(:myshixun_id => @myshixun.id).update_all(:myshixun_id => nil, :work_status => 0) @myshixun.destroy diff --git a/app/models/game.rb b/app/models/game.rb index 9485f2a15..7c0e913ae 100644 --- a/app/models/game.rb +++ b/app/models/game.rb @@ -6,6 +6,7 @@ class Game < ActiveRecord::Base belongs_to :user belongs_to :challenge has_many :outputs, :dependent => :destroy + has_many :choose_output has_many :test_sets, :dependent => :destroy has_many :challenge_samples has_one :game_code, :dependent => :destroy diff --git a/app/views/challenges/_content_list.html.erb b/app/views/challenges/_content_list.html.erb index 9c439ada2..ef5cd8335 100644 --- a/app/views/challenges/_content_list.html.erb +++ b/app/views/challenges/_content_list.html.erb @@ -55,7 +55,11 @@

    <%= shixun_done(@shixun, challenge.position).to_i %>人 完成挑战 <%= shixun_running(@shixun, challenge.position).to_i %>人 正在挑战 - <%= challenge.score %>经验值 + <% if challenge.st != 0 %> + <%= challenge.choose_score %>经验值 + <% else %> + <%= challenge.score %>经验值 + <% end %> <% if @shixun.status == 2 %> <%= find_game_status challenge.id %> <% end %> diff --git a/app/views/challenges/_single_or_multiple_question.html.erb b/app/views/challenges/_single_or_multiple_question.html.erb index c157d6773..be8a43f2c 100644 --- a/app/views/challenges/_single_or_multiple_question.html.erb +++ b/app/views/challenges/_single_or_multiple_question.html.erb @@ -12,7 +12,7 @@ <%#= form_tag(url_for(new_or_edit_choose_question_shixun_challenge_path(@challenge, :shixun_id => @shixun, :type => @type, :position => @position)), :remote => true, :id => 'challenge_choose_update') do |f| %>

  • 编辑 - 删除 + 删除
  • @@ -145,7 +145,7 @@
  • ')">保存 - 取消 + 取消
  • <% end %> \ No newline at end of file diff --git a/app/views/challenges/choose_type_show.js.erb b/app/views/challenges/choose_type_show.js.erb index e589ae71b..2934cbc53 100644 --- a/app/views/challenges/choose_type_show.js.erb +++ b/app/views/challenges/choose_type_show.js.erb @@ -1,2 +1,20 @@ $("#task_content").html("<%= j(render :partial => 'single_or_multiple_question_show')%>"); -$("#challenge_choose_tab").html("<%= j(render :partial => "challenges/choose_tab") %>"); \ No newline at end of file +$("#challenge_choose_tab").html("<%= j(render :partial => "challenges/choose_tab") %>"); + +// JS局部刷新时,有可能加载不成功,需要重新加载一次(具体原因不明) +editormd.loadKaTeX(function() { + editormd.markdownToHTML("challenge_choose_subject_show", { + htmlDecode: "style,script,iframe", // you can filter tags decode + taskList: true, + tex: true, // 默认不解析 + flowChart: true, // 默认不解析 + sequenceDiagram: true // 默认不解析 + }); + editormd.markdownToHTML("choose_task_pass_show", { + htmlDecode: "style,script,iframe", // you can filter tags decode + taskList: true, + tex: true, // 默认不解析 + flowChart: true, // 默认不解析 + sequenceDiagram: true // 默认不解析 + }) +}); \ No newline at end of file diff --git a/app/views/challenges/new_choose_question.js.erb b/app/views/challenges/new_choose_question.js.erb index e589ae71b..13e2341a9 100644 --- a/app/views/challenges/new_choose_question.js.erb +++ b/app/views/challenges/new_choose_question.js.erb @@ -1,2 +1,16 @@ $("#task_content").html("<%= j(render :partial => 'single_or_multiple_question_show')%>"); -$("#challenge_choose_tab").html("<%= j(render :partial => "challenges/choose_tab") %>"); \ No newline at end of file +$("#challenge_choose_tab").html("<%= j(render :partial => "challenges/choose_tab") %>"); +editormd.markdownToHTML("challenge_choose_subject_show", { + htmlDecode: "style,script,iframe", // you can filter tags decode + taskList: true, + tex: true, // 默认不解析 + flowChart: true, // 默认不解析 + sequenceDiagram: true // 默认不解析 +}); +editormd.markdownToHTML("choose_task_pass_show", { + htmlDecode: "style,script,iframe", // you can filter tags decode + taskList: true, + tex: true, // 默认不解析 + flowChart: true, // 默认不解析 + sequenceDiagram: true // 默认不解析 +}); \ No newline at end of file diff --git a/db/migrate/20170915085332_modify_choose_question_for_challenge.rb b/db/migrate/20170915085332_modify_choose_question_for_challenge.rb new file mode 100644 index 000000000..09b287fca --- /dev/null +++ b/db/migrate/20170915085332_modify_choose_question_for_challenge.rb @@ -0,0 +1,35 @@ +class ModifyChooseQuestionForChallenge < ActiveRecord::Migration + def up + challenges = Challenge.where(:st => [1,2]).where("created_at < '#{Time.now - 24*60*60}'") + unless challenges.blank? + challenges.each do |challenge| + questions = ChallengeQuestion.where(:challenge_choose_id => challenge.id) + answer = "" + unless questions.blank? + questions.each do |question| + if question.right_key + answer << (question.position.to_i + 65).chr + end + end + end + option = ChallengeChoose.create(:subject => challenge.task_pass, + :challenge_id => challenge.id, + :standard_answer => answer, + :answer => challenge.answer, + :score => challenge.score, + :difficult => challenge.difficulty, + :category => ((challenge.st == 1) ? 2 : 1), + :position => 1) + tag = ChallengeTag.where(:challenge_id => challenge.id) + questions.update_all(:challenge_choose_id => option.id) + unless tag.blank? + tag.update_all(:challenge_id => nil, :challenge_choose_id => option.id) + end + end + challenges.update_all(:st => 1) + end + end + + def down + end +end From c6a736205146c5c08ac47bd0418c25db6fa4c946 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 15 Sep 2017 20:20:01 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E8=AF=BE=E5=A0=82?= =?UTF-8?q?=E7=9A=84=E5=8A=A0=E5=85=A5=E5=AD=A6=E7=94=9F=E3=80=81=E8=80=81?= =?UTF-8?q?=E5=B8=88=E5=BC=B9=E6=A1=86=EF=BC=8C=E5=AE=9E=E8=AE=ADtpm?= =?UTF-8?q?=E7=9A=84=E6=B7=BB=E5=8A=A0=E5=90=88=E4=BD=9C=E8=80=85=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=9A=84=E7=94=A8=E6=88=B7=E8=81=8C=E4=B8=9A=E4=B8=8D?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/challenges/_single_or_multiple_question.html.erb | 4 ++-- app/views/courses/settings/_search_not_students_list.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/challenges/_single_or_multiple_question.html.erb b/app/views/challenges/_single_or_multiple_question.html.erb index be8a43f2c..fc5484c41 100644 --- a/app/views/challenges/_single_or_multiple_question.html.erb +++ b/app/views/challenges/_single_or_multiple_question.html.erb @@ -12,7 +12,7 @@ <%#= form_tag(url_for(new_or_edit_choose_question_shixun_challenge_path(@challenge, :shixun_id => @shixun, :type => @type, :position => @position)), :remote => true, :id => 'challenge_choose_update') do |f| %>
  • 编辑 - 删除 + 删除
  • @@ -145,7 +145,7 @@
  • ')">保存 - 取消 + 取消
  • <% end %> \ No newline at end of file From f659047c4df492397272a99bd824cff23a25109f Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 15 Sep 2017 20:45:00 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E8=AF=95=E7=94=A8=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E5=BE=85=E5=A4=84=E7=90=86=E6=9C=9F=E9=97=B4=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=BC=B9=E6=A1=86=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/my/account.html.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 293d2ff9d..8d57fad9e 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -431,6 +431,9 @@ var d_count = 0; //查询结果的总量 var d_maxPage = 0;//最大页面值 $(function () { + <% if @trail_authentication && @trail_authentication.status == 0%> + yes_notice_box("平台已收到你的试用申请,很快将会审核通过"); + <% end %> $("#search_department_result_list").scroll(function (e) { d_nScrollHight = $(this)[0].scrollHeight; d_nScrollTop = $(this)[0].scrollTop; From 53b015606c5da79464f2d81986feb893a7cf51aa Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 15 Sep 2017 20:53:41 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=E5=8D=95=E9=80=89=E5=A4=9A=E9=80=89?= =?UTF-8?q?=E9=A2=98=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/games/_game_choose_results.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/games/_game_choose_results.html.erb b/app/views/games/_game_choose_results.html.erb index 061dc8066..fab1b9eeb 100644 --- a/app/views/games/_game_choose_results.html.erb +++ b/app/views/games/_game_choose_results.html.erb @@ -14,7 +14,7 @@ <% unless game_challenge.choose_correct_num == nil %> <% if game_challenge.choose_correct_num != game_challenge.challenge_chooses.count %>

    - <%= game_challenge.choose_correct_num %>/<%= game_challenge.challenge_chooses.count %>错误 + <%= game_challenge.choose_correct_num %>/<%= game_challenge.challenge_chooses.count %>共有<%= game_challenge.challenge_chooses.count %>组测试集,其中有<%= game_challenge.challenge_chooses.count - game_challenge.choose_correct_num %>组测试结果不匹配。详情如下:

    <% else %>