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 1/8] =?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 @@
+ <% 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 %> +
+ +