From 0f92a2e3cb2e97cecc374834b45914b64bdaf0ab Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 26 Jun 2015 14:29:03 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E7=BB=99=E5=87=BA=E4=BD=BF=E7=94=A8winrar=E8=A7=A3=E5=8E=8B?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/index.html.erb | 13 +++++++++++-- public/javascripts/course.js | 12 ++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index 015fb8e48..e0d1f8bad 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -55,11 +55,20 @@ <% if @is_teacher%>
<% if @homework.student_works.empty?%> - <%= link_to "附件", "javascript:void(0)", class: "down_btn fr", :onclick => "alert('没有学生提交作业,无法下载附件')" %> + <%= link_to "附件", "javascript:void(0)", class: "down_btn fr zip_download_alert", :onclick => "alert('没有学生提交作业,无法下载附件')" %> <% else%> <%= link_to "附件", zipdown_assort_path(obj_class: @homework.class, obj_id: @homework, format: :json), - remote: true, class: "down_btn fr", :id => "download_homework_attachments" %> + remote: true, class: "down_btn fr zip_download_alert", :id => "download_homework_attachments" %> <% end%> +
+ 使用 + winzip + 工具进行解压可能会导致 + 下载文件乱码 + ,建议您使用 + winrar + 工具进行解压 +
<%= link_to l(:label_list), student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :format => 'xls'),:class=>'down_btn fr'%> 导出全部: diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 50dc89de8..f73ab7bf6 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -797,6 +797,18 @@ $(function(){ }); $("#about_project label").eq(1).remove(); + + //附件下载提示 + $(".zip_download_alert").bind("mouseover",function(e){ + //alert($(this).html()); + $(this).next("div").show(); + $(this).next("div").css("top",e.pageY); + $(this).next("div").css("left",e.pageX); + }); + $(".zip_download_alert").bind("mouseout",function(e){ + //alert($(this).html()); + $(this).next("div").hide(); + }); }); //匿评弹框取消按钮 From 399fc447f5c2eb23207e2a966bfd55698bbaa8ed Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 26 Jun 2015 14:31:08 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=BF=AB=E9=80=9F=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=BC=B9=E6=A1=86=E6=BB=9A=E5=8A=A8=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/join_project.js.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/join_project.js.erb b/app/views/projects/join_project.js.erb index f3bdfb50a..85e9e294b 100644 --- a/app/views/projects/join_project.js.erb +++ b/app/views/projects/join_project.js.erb @@ -1,5 +1,5 @@ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'projects/join_project') %>'); -showModal('ajax-modal', '510px'); +showModal('ajax-modal', '540px'); $('#ajax-modal').css('height','260px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + From 66eba14dfeb3e01edc3ba76630aa43f40242dcdb Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 26 Jun 2015 14:46:37 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E8=AF=BE=E7=A8=8B=E6=A0=B7=E5=BC=8F=20?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=A6=96=E9=A1=B5=20=20=20=20=E5=85=AC?= =?UTF-8?q?=E5=BC=80=E8=B5=84=E6=BA=90-->=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/join_private_courses.js.erb | 2 +- app/views/welcome/_course_list.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/courses/join_private_courses.js.erb b/app/views/courses/join_private_courses.js.erb index 23dc551f7..fecfb13cd 100644 --- a/app/views/courses/join_private_courses.js.erb +++ b/app/views/courses/join_private_courses.js.erb @@ -1,5 +1,5 @@ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'join_private_course') %>'); -showModal('ajax-modal', '510px'); +showModal('ajax-modal', '540px'); $('#ajax-modal').css('height','330px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + diff --git a/app/views/welcome/_course_list.html.erb b/app/views/welcome/_course_list.html.erb index a2f0ee6c5..09cf17a12 100644 --- a/app/views/welcome/_course_list.html.erb +++ b/app/views/welcome/_course_list.html.erb @@ -27,7 +27,7 @@ (<%= course.members.count %>人) <% files_count = visable_attachemnts_incourse(course).count %> <% if files_count > 0%> - (<%= link_to "#{files_count.to_s}份", course_files_path(course) %>公开资料) + (<%= link_to "#{files_count.to_s}份", course_files_path(course) %>资料) <% end %>
From 19c474e422f2bbe115f8ab1b00607bb1f32c6d36 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 26 Jun 2015 15:13:53 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E5=8F=AF=E4=BB=A5=E6=9F=A5=E7=9C=8B=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E3=80=81=E6=95=99=E5=B8=88=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/courses_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 13012a70c..a0bd18582 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -35,7 +35,7 @@ module CoursesHelper #生成课程老师成员链接 def course_teacher_link teacher_num - if User.current.member_of_course?(@course) + if User.current.member_of_course?(@course) || User.current.admin? link_to "#{teacher_num}", course_member_path(@course, :role => 1), :class => 'info_foot_num c_blue' else content_tag 'span',teacher_num, :class => 'info_foot_num c_blue' @@ -44,7 +44,7 @@ module CoursesHelper #生成课程学生列表连接 def course_student_link student_num - if (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) + if (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin? link_to "#{student_num}", course_member_path(@course, :role => 2), :class => 'info_foot_num c_blue' else content_tag 'span',student_num, :class => 'info_foot_num c_blue' From bb9c46a63248c24577d549b8718b77a32325fd5f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 26 Jun 2015 16:27:55 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=95=99=E8=A8=80?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=EF=BC=8C=E5=9B=9E=E5=A4=8D=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E5=92=8C=E6=97=B6=E9=97=B4=E5=9C=A8=E5=90=8C=E4=B8=80=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_history.html.erb | 1 + app/views/words/_journal_reply_items.html.erb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/views/courses/_history.html.erb b/app/views/courses/_history.html.erb index e5f5fc0ec..df2737337 100644 --- a/app/views/courses/_history.html.erb +++ b/app/views/courses/_history.html.erb @@ -18,6 +18,7 @@

<%= journal.notes.html_safe %>

+
<% ids = 'project_respond_form_'+ journal.id.to_s%> diff --git a/app/views/words/_journal_reply_items.html.erb b/app/views/words/_journal_reply_items.html.erb index 7c8dd7f64..d299c9123 100644 --- a/app/views/words/_journal_reply_items.html.erb +++ b/app/views/words/_journal_reply_items.html.erb @@ -24,6 +24,7 @@

<%= reply.notes.html_safe %>

+
<%= format_time reply.created_on %>