From 41ee4b838d67bd03e6c414e91db3d4c779546aab Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Mon, 9 Oct 2017 14:15:03 +0800 Subject: [PATCH 01/30] =?UTF-8?q?=E7=95=99=E8=A8=80=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E6=89=80=E6=9C=89=E5=A4=B4=E5=83=8F=E5=BA=94=E8=AF=A5?= =?UTF-8?q?=E4=B8=BA=E5=9C=86=E5=BD=A2=20=E5=B9=B3=E5=8F=B0=E5=BC=B9?= =?UTF-8?q?=E6=A1=86=E5=8F=AA=E6=9C=89=E4=B8=80=E4=B8=AA=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=97=B6=E5=8E=BB=E6=8E=89=E5=BC=B9=E6=A1=86?= =?UTF-8?q?=E5=8F=B3=E4=B8=8A=E8=A7=92=E7=9A=84=E5=8F=89=E5=8F=89=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../users/_user_journalsformessage.html.erb | 2 +- public/javascripts/edu/application.js | 24 ++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/app/views/users/_user_journalsformessage.html.erb b/app/views/users/_user_journalsformessage.html.erb index 448069e02..f0315ed8a 100644 --- a/app/views/users/_user_journalsformessage.html.erb +++ b/app/views/users/_user_journalsformessage.html.erb @@ -1,7 +1,7 @@
回复 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")%>
+ + 收起 +
+
+ <% if is_teacher || comment.creator_user == User.current%> + 删除 + <% end %> + | + <%= link_to( + '回复'.html_safe, + {:controller => 'users' ,:action => 'reply_to',:reply_id => comment.id, :type => activity.class.to_s, :user_activity_id => activity.id}, + :remote => true, + :method => 'get', + :title => l(:button_reply),:class => "color-grey") %> + | + + <%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> + +
+- <%= @shixun.owner.try(:show_name) %> - /
<%= @shixun.name %>
- ++ <%= @shixun.owner.try(:show_name) %> + /
<%= @shixun.name %>
+ + <% if false %> + + forked from 胡莎莎/实现新添加一个tab + <% end %> + + <% unless User.current.manager_of_shixun?(@shixun) %> + <%= @shixun.language %> + <%= @shixun.shixun_trainee %> + <%= @shixun.shixun_major_courses.blank? ? "" : CourseList.where(:id => @shixun.shixun_major_courses.map(&:course_list_id)).map(&:name).join("、") %> + <% end %> +第<%= i + 1 %>题:[<%= exercise_question.question_type_name %>]<%= exercise_question.question_score %>分
+第<%= i + 1 %>题:[<%= exercise_question.question_type_name %>]<%= exercise_question.question_score %>分
第<%= exercise_question.question_number %>题:[<%= exercise_question.question_type_name %>]<%= exercise_question.question_score %>分<%= question_commit_status exercise_question, @exercise_user.user %>
+第<%= exercise_question.question_number %>题:[<%= exercise_question.question_type_name %>]<%= exercise_question.question_score %>分<%= question_commit_status exercise_question, @exercise_user.user %>
<% if exercise_question.question_type != 4 %> <% is_correct = answer_is_correct(exercise_question, user) %><%= is_correct ? exercise_question.question_score : 0 %>分
diff --git a/app/views/homework_common/_homework_index_list.html.erb b/app/views/homework_common/_homework_index_list.html.erb index 4013d1c29..55aeb3e07 100644 --- a/app/views/homework_common/_homework_index_list.html.erb +++ b/app/views/homework_common/_homework_index_list.html.erb @@ -21,6 +21,11 @@ <% allow_late = homework_common.allow_late ? '已开启补交' : '未开启补交' %> <%= allow_late %> <% end %> + + <% if false %> + 未提交 + <% end %> +diff --git a/app/views/users/_comment_reply_detail.html.erb b/app/views/users/_comment_reply_detail.html.erb index 01610f6b3..9553230c6 100644 --- a/app/views/users/_comment_reply_detail.html.erb +++ b/app/views/users/_comment_reply_detail.html.erb @@ -23,7 +23,7 @@ <% end %>
--
+
-
答题统计
+ <% if @is_teacher %>
+ <% if false%>
+ -
+ 试卷预览
+
+ -
+ 设置
+
+ <% end %>
+ <%= link_to "导出成绩", student_exercise_list_exercise_path(@exercise, :course_id => @course.id, :format => 'xls'), :id => "export_exercise_work", :class => "fr white-btn orange-btn ml10 mt10 mr15" %>
+ <% else %>
+ <% if false%>
+ -
+ 查看设置
+
+ <% end %>
+
+ <% ex_user = @exercise.exercise_users.where(:user_id => User.current).first %> + <% if ex_user %> + <% if ex_user.commit_status > 0 %> + <%= link_to '查看答题', ex_user.commit_status == 1 ? exercise_path(@exercise,:user_id => User.current.id) : show_student_result_exercise_path(@exercise,:user_id => User.current.id), :class => "white-btn orange-btn fr mt10 mr15" %> + <% else %> + <% if @exercise.exercise_status == 2 %> + <%= link_to (ex_user.start_at.nil? ? "开始答题" : "继续答题"), exercise_path(@exercise,:user_id => User.current.id), :class => "white-btn orange-btn fr mt10 mr15" %> + <% end %> + <% end %> + <% end %> +
+ <% end %>+ <%= shixun.name %> +
+<%= shixun.shixun_trainee %>
++- <%= shixun.challenges.count %>
+ - <%= shixun.myshixuns.count %>
+ - <%= shixun.shixun_score %>
+
++ <%= pagination_links_full @shixun_pages, @shixuns_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %> +
+ ++-
<%= link_to '普通作业'.html_safe, new_homework_common_path(:course => @course.id, :homework_type => 1),:class => "color-grey" %>
diff --git a/app/views/repositories/shixun_show.html.erb b/app/views/repositories/shixun_show.html.erb
index 6c07638a2..547fef0a3 100644
--- a/app/views/repositories/shixun_show.html.erb
+++ b/app/views/repositories/shixun_show.html.erb
@@ -63,4 +63,25 @@
<%= edit_mode ? '编辑' : '新建' %>普通作业
+<%= edit_mode ? '编辑' : '新建' %>普通作业
diff --git a/app/views/managements/_all_schools.html.erb b/app/views/managements/_all_schools.html.erb index f6e6fa458..05224be30 100644 --- a/app/views/managements/_all_schools.html.erb +++ b/app/views/managements/_all_schools.html.erb @@ -9,7 +9,7 @@
--
-
-
-
-
+<% if defined?(upload) %> + <%= form_tag school_upload_logo_managements_path(:applied_id => edit_id), :id => 'schools_list_form' %> ++-
+
+
+
+
+ <% end %> <% end %> - <% end %> -+-
+
+
+
+
+ <% end %> + <% end %> +共 <%= @hw_count %>个搜索结果
- <%= link_to '引用次数排序', homework_bank_index_path(:type => @type, :order => "quotes", :search => @search, :sort => @r_sort, :property=>@property), :class => "fr mr15 #{@order == 'quotes' ? 'color-blue' : ''}", :remote => true %> + <%= link_to '引用次数排序', homework_bank_index_path(:type => @type, :order => "quotes", :search => @search, :sort => @r_sort, :property=>@property), :class => "fr mr15 #{@order == 'quotes' ? 'color-orange03' : ''}", :remote => true %> | - <%= link_to '更新时间排序', homework_bank_index_path(:type => @type, :order => "updated_at", :search => @search, :sort => @r_sort, :property=>@property), :class => "fr #{@order == 'updated_at' ? 'color-blue' : ''}", :remote => true %> + <%= link_to '更新时间排序', homework_bank_index_path(:type => @type, :order => "updated_at", :search => @search, :sort => @r_sort, :property=>@property), :class => "fr #{@order == 'updated_at' ? 'color-orange03' : ''}", :remote => true %>候选答案<%= convert_to_chi_num(index+1) %>:<%= exercise_choice.answer_text%>
<% end %>参考答案
From f404adcf705d715ac469b4e1b56d70cdf21b8ee3 Mon Sep 17 00:00:00 2001 From: huang