注意:只需要填写课程的全称即可
+正确示例:数据结构
+错误示例:数据结构2017本部
+错误示例:数据结构2017秋季
+错误示例:数据结构2017电子商务1班
+From ef6c3a443a5c551aa7de30e0d19ae9fa1e32c17f Mon Sep 17 00:00:00 2001 From: XuCheng642 <287102909@qq.com> Date: Mon, 9 Oct 2017 15:16:34 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E5=92=8C=E7=82=B9?= =?UTF-8?q?=E8=B5=9E=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 2 +- .../_shixun_authorization_list.html.erb | 1 - app/views/memos/_common_reply_box.html.erb | 6 +- app/views/messages/_common_reply_box.html.erb | 6 +- .../praise_tread/_activity_praise.html.erb | 10 +- app/views/praise_tread/_edu_praise.html.erb | 12 +- .../student_work/_common_reply_box.html.erb | 6 +- .../_programing_work_show.html.erb | 348 +++++++++--------- .../student_work/_shixun_work_show.html.erb | 5 +- public/javascripts/edu/application.js | 2 +- 10 files changed, 210 insertions(+), 188 deletions(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index ca8c7f1a3..3470c1e9f 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1532,7 +1532,7 @@ end @sub_type = 5 @type = trial_authorization_status params[:type] # sql = select * from apply_actions where dealer_id is null - @authorizations = ApplyAction.where(:container_type => "ApplyShixun", :status => @type,:dealer_id =>'').order("created_at desc") + @authorizations = ApplyAction.where(:container_type => "ApplyShixun", :status => @type, :dealer_id =>'').order("created_at desc") search = params[:search] unless search.blank? @authorizations = @authorizations.where(:container_id => Shixun.where(:id => @authorizations.map(&:container_id)).where("name like '%#{search}%'").map(&:id)).order("created_at desc") diff --git a/app/views/managements/_shixun_authorization_list.html.erb b/app/views/managements/_shixun_authorization_list.html.erb index 756e8b4ae..059994224 100644 --- a/app/views/managements/_shixun_authorization_list.html.erb +++ b/app/views/managements/_shixun_authorization_list.html.erb @@ -32,7 +32,6 @@ <% end %> -
回复 diff --git a/app/views/messages/_common_reply_box.html.erb b/app/views/messages/_common_reply_box.html.erb index afd027cea..4917e5388 100644 --- a/app/views/messages/_common_reply_box.html.erb +++ b/app/views/messages/_common_reply_box.html.erb @@ -1,5 +1,9 @@
回复 diff --git a/app/views/praise_tread/_activity_praise.html.erb b/app/views/praise_tread/_activity_praise.html.erb index 8bbb6b6b8..ba0b379f0 100644 --- a/app/views/praise_tread/_activity_praise.html.erb +++ b/app/views/praise_tread/_activity_praise.html.erb @@ -2,19 +2,23 @@ + :type => type }) %>' data-remote="true" class="white-btn orange-btn" data-tip-down="点赞"> 赞 <%# num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %> + <% unless get_praise_num(activity) == 0%> <%= get_praise_num(activity) %> + <% end %> <% else %> + :type => type }) %>' data-remote="true" class="white-btn orange-bg-btn" data-tip-down ="取消点赞" > 赞 - <%= get_praise_num(activity) %> + <% unless get_praise_num(activity) == 0%> + <%= get_praise_num(activity) %> + <% end %> <%# num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %> diff --git a/app/views/praise_tread/_edu_praise.html.erb b/app/views/praise_tread/_edu_praise.html.erb index 0704eebad..26a8dc3be 100644 --- a/app/views/praise_tread/_edu_praise.html.erb +++ b/app/views/praise_tread/_edu_praise.html.erb @@ -2,19 +2,23 @@ + :type => type }) %>' data-remote="true" class="fr mr5 color-grey" data-tip-down="点赞"> 赞 <%# num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %> - <%= get_praise_num(activity) %> + <% unless get_praise_num(activity)==0 %> + <%= get_praise_num(activity) %> + <% end %> <% else %> + :type => type }) %>' data-remote="true" class="fr mr5 color-orange03" data-tip-down="取消点赞" > 赞 - <%= get_praise_num(activity) %> + <% unless get_praise_num(activity)==0 %> + <%= get_praise_num(activity) %> + <% end %> <%# num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %> diff --git a/app/views/student_work/_common_reply_box.html.erb b/app/views/student_work/_common_reply_box.html.erb index 094ff93cd..75f1ee563 100644 --- a/app/views/student_work/_common_reply_box.html.erb +++ b/app/views/student_work/_common_reply_box.html.erb @@ -1,5 +1,9 @@
全部回复(<%= count %>)
+全部回复 + <% unless count == 0 %> + (<%= count %>) + <% end %> +
回复 diff --git a/app/views/student_work/_programing_work_show.html.erb b/app/views/student_work/_programing_work_show.html.erb index 880d6b842..1f1a019ea 100644 --- a/app/views/student_work/_programing_work_show.html.erb +++ b/app/views/student_work/_programing_work_show.html.erb @@ -1,174 +1,174 @@ -
-- 第<%= work.student_work_tests.count - index%>次测试 -
- - <%= format_time(test.created_at).to_s %> - - -<%=x["time_used"]==0?1:x["time_used"]%>毫秒- - <% else %> - 测试正确! - - 耗时: -
<%=x["time_used"]==0?1:x["time_used"]%>毫秒- - <% end %> -
<%=x["result"].force_encoding("UTF-8")%>
- 正确输出:
- <%=x["output"].force_encoding("UTF-8")%>
- - 收起 -
-+ 第<%= work.student_work_tests.count - index%>次测试 +
+ + <%= format_time(test.created_at).to_s %> + + +<%=x["time_used"]==0?1:x["time_used"]%>毫秒+ + <% else %> + 测试正确! + + 耗时: +
<%=x["time_used"]==0?1:x["time_used"]%>毫秒+ + <% end %> +
<%=x["result"].force_encoding("UTF-8")%>
+ 正确输出:
+ <%=x["output"].force_encoding("UTF-8")%>
+ + 收起 +
+注意:只需要填写课程的全称即可
+正确示例:数据结构
+错误示例:数据结构2017本部
+错误示例:数据结构2017秋季
+错误示例:数据结构2017电子商务1班
++ Fork实训列表 +
+<%= shixun.shixun_trainee %>
<%= edit_mode ? '编辑' : '新建' %>普通作业
+<%= edit_mode ? '编辑' : '新建' %>普通作业
| ID | -实训名称 | +实训名称 | 顶 | 踩 | -已通关 | -已开启 | +已通关 | +已开启 | +fork数 | 创建者 | 发布时间 color-light-green ml5" title="功能完善中,敬请期待"> | 操作 | @@ -25,6 +26,7 @@<%= Myshixun.where(:shixun_id => shixun.id, :status => 1).count %> | <%= Myshixun.where(:shixun_id => shixun.id).count %> | +<%= Shixun.where(:fork_from =>shixun.id).count %> | <%= shixun.owner.try(:show_real_name) %> | <%= format_time shixun.created_at %> | @@ -36,7 +38,7 @@ | class="ml-3 mr5 magic-checkbox" id="join_course_role_<%= shixun.id %>"> - + | <% end %> diff --git a/app/views/managements/_update_school_form.html.erb b/app/views/managements/_update_school_form.html.erb index b436c35c1..4567ae88c 100644 --- a/app/views/managements/_update_school_form.html.erb +++ b/app/views/managements/_update_school_form.html.erb @@ -1,19 +1,39 @@ -<%= form_tag edit_applied_schools_managements_path(:applied_id =>edit_id), :id => 'schools_list_form' %> -
|---|