From 5ca8d4cd66cd77c5fa6d99c30f0c3a2ba6acace8 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 14 Dec 2015 10:54:37 +0800 Subject: [PATCH 01/23] =?UTF-8?q?=E4=BF=AE=E6=94=B9http=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=8D=A2=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_base_footer_public.html.erb | 4 ++-- app/views/layouts/_footer.html.erb | 2 +- app/views/layouts/_logined_header.html.erb | 2 +- app/views/layouts/_unlogin_header.html.erb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/layouts/_base_footer_public.html.erb b/app/views/layouts/_base_footer_public.html.erb index dba26f1f6..eb2e83ba2 100644 --- a/app/views/layouts/_base_footer_public.html.erb +++ b/app/views/layouts/_base_footer_public.html.erb @@ -2,9 +2,9 @@
- <% end %> -
截止时间:<%= activity.end_time.to_s %> 23:59
@@ -93,17 +92,26 @@
+
+
+ 匿评开启时间:<%= activity.homework_detail_manual.evaluation_start%> 00:00 +
+
+ 匿评关闭时间:<%= activity.homework_detail_manual.evaluation_end%> 23:59 +
+
+
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => activity.attachments} %>
- <% if activity.homework_type == 3 && !activity.student_work_projects.empty? && activity.homework_detail_group.base_on_project == 1 %> + <% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
+ <% projects = activity.student_work_projects.where("is_leader = 1") %>
- - 已关联项目: + 已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
- <% activity.student_work_projects.where("is_leader = 1").each do |pro| %> + <% projects.each do |pro| %> <% project = Project.find pro.project_id %> \ No newline at end of file diff --git a/app/views/student_work/edit.html.erb b/app/views/student_work/edit.html.erb index 6ca609502..c7c572cff 100644 --- a/app/views/student_work/edit.html.erb +++ b/app/views/student_work/edit.html.erb @@ -31,7 +31,11 @@ 提示:作品名称和描述中不要出现真实的姓名信息
- + <% if @homework.homework_type == 3 %> + + + <%=hidden_field_tag 'group_member_ids', params[:group_member_ids], :value=>User.current.id %> + <% end %>
@@ -51,6 +55,12 @@ <%= render :partial => 'users/user_homework_attachment', :locals => {:container => @work, :has_program=>false,:has_group=>false} %>
+ <% if @homework.homework_type == 3 %> + + <% end %> +
确定 @@ -61,14 +71,44 @@
\ No newline at end of file diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index 67892fe0f..65741adc8 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -267,8 +267,15 @@ function edit_student_work(id) { if(regexStudentWorkName()&®exStudentWorkDescription()) { - $("#edit_student_work_" + id).submit(); - $("#ajax-indicator").hide(); + if($("#group_member_ids").length > 0) { + if(regexStudentWorkMember(parseInt($.trim($("#min_num_member").html())),parseInt($.trim($("#max_num_member").html())))) { + $("#edit_student_work_" + id).submit(); + $("#ajax-indicator").hide(); + } + } else { + $("#edit_student_work_" + id).submit(); + $("#ajax-indicator").hide(); + } } }