+ <% committed_work_count = @homework.student_works.has_committed.count %>
+ <% stu_pro_count = @homework.student_work_projects.count %>
+ <% if committed_work_count != 0 %>
+ <% if @homework.homework_type == 1 %>
+
已有<%=committed_work_count %>个学生提交作品,不允许再修改作业类型。
+ <% elsif @homework.homework_type == 2 %>
+
已有<%=committed_work_count %>个学生提交作品,不允许再修改作业类型和测试集。
+ <% elsif @homework.homework_type == 3 %>
+
已有<%=committed_work_count %>个学生提交作品,不允许再修改作业类型和分组设置。
+ <% end %>
+ <% elsif stu_pro_count != 0 && @homework.homework_type == 3 %>
+
已有<%=stu_pro_count %>个学生关联项目,不允许再修改作业类型。
+ <% end %>
+
<%= form_for @homework do |f| %>
diff --git a/app/views/users/_user_group_attr.html.erb b/app/views/users/_user_group_attr.html.erb
index 6d09f6896..4596ef411 100644
--- a/app/views/users/_user_group_attr.html.erb
+++ b/app/views/users/_user_group_attr.html.erb
@@ -1,27 +1,27 @@
-
分组设置
-
-
-
每组最小人数:
-
人
-
+
+
分组设置:
+
每组最小人数:
+ />人
+
+
每组最大人数:
+ />人
+
+
+
+
+
+
提醒:勾选后各小组必须在Trustie平台创建项目,教师可随时观察平台对各小组最新进展的实时统计
+
+
+
-
- 每组最大人数:
- 人
-
-
-
-
-
-
提醒:勾选后各小组必须在Trustie平台创建项目,教师可随时观察平台对各小组最新进展的实时统计
-
-
-
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/app/views/users/_user_homework_attachment.html.erb b/app/views/users/_user_homework_attachment.html.erb
index 6051d8de9..4f35326b0 100644
--- a/app/views/users/_user_homework_attachment.html.erb
+++ b/app/views/users/_user_homework_attachment.html.erb
@@ -71,17 +71,6 @@
上传附件
<%= link_to "资源库", user_ref_resource_search_user_path(User.current.id, :homework_id => container.id), :class => "FilesBtn fl mt3 mr15", :title => "请从资源库中选择文件作为作业的附件", :remote => true %>
- <% if defined?(has_program) && has_program %>
-
- <% end %>
- <% if defined?(has_group) && has_group %>
-
- <% end %>
<% content_for :header_tags do %>
diff --git a/app/views/users/_user_homework_form.html.erb b/app/views/users/_user_homework_form.html.erb
index b3f9970c6..231c78b91 100644
--- a/app/views/users/_user_homework_form.html.erb
+++ b/app/views/users/_user_homework_form.html.erb
@@ -1,3 +1,4 @@
+<% not_allow_select = edit_mode && homework.student_works.has_committed.count != 0 %>
<% content_for :header_tags do %>
<%= import_ke(enable_at: true, prettify: false, init_activity: false) %>
@@ -5,14 +6,31 @@
-
-
-
-
-
-
-
-
<% unless edit_mode %>
+
+
+ <%= render :partial => 'evaluation_un_group_member_work', :locals => {:st => st, :anon_count => anon_count} %>
+
+ <% if j != 0 %>
+
+ <% is_teacher = User.current.allowed_to?(:as_teacher, @homework.course) || User.current.admin? %>
+ <% pro = @homework.student_work_projects.where(:user_id => User.current.id).first %>
+ <% is_my_work = pro && pro.student_work_id == work.id%>
+
+ -
+ 上交时间:
+ <%=format_time work.created_at %>
+
+
+ <% if work.user == User.current && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") %>
+
+ -
+ <%= link_to("", student_work_path(work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del",:title=>"删除") %>
+
+ -
+ <%= link_to "",edit_student_work_path(work),:class => "pic_edit",:title => "修改"%>
+
+ <% end%>
+ <% if @homework.homework_detail_manual.comment_status == 3 && !is_my_work %>
+
+ -
+ <%= render :partial => 'student_work_praise',:locals => {:work => work} %>
+
+ <% end%>
+
+
+
+
+ <% if work.student_work_projects && (@homework.homework_detail_manual.comment_status != 2 || is_my_work || is_teacher ) %>
+
+ -
+ 参与人员:
+ <%= link_to(work.user.show_name+"(组长)", user_path(work.user.id), :class => "linkBlue" )%>
+ <% members = work.student_work_projects.where("is_leader = 0") %>
+ <% members.each do |member| if !members.empty? %>
+ 、<%=link_to((User.find member.user_id).show_name, user_path(member.user.id), :class => "linkBlue" ) %>
+ <% end %>
+ <% end %>
+
+ <% if @homework.homework_detail_group.base_on_project == 1 %>
+ -
+ 关联项目:
+ <% if work.project_id == 0 || work.project_id.nil? %>
+ 暂无
+ <% elsif work.project.is_public || User.current.member_of?(work.project) || User.current.admin? %>
+ <%= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
+ (综合评分:<%=static_project_score(work.project.project_score).to_i %>)
+ <% else %>
+ <%=work.project.name %>
+ (综合评分:<%=static_project_score(work.project.project_score).to_i %>)
+ <% end %>
+ <%#= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
+
+ <% end %>
+ -
+ 内容:
+
+ <%= work.description.html_safe if work.description%>
+
+
+
+ -
+ 附件:
+ <% com_attachments = work.attachments.where("attachtype IS NULL OR attachtype <> 7") %>
+ <% if com_attachments.empty?%>
+ 尚未提交附件
+ <% else%>
+
+ <%= render :partial => 'work_attachments_status', :locals => {:attachments => com_attachments, :status => @homework.homework_detail_manual.comment_status} %>
+
+ <% end%>
+
+
+ <% end%>
+
+ -
+ <% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && !is_my_work)%>
+
+
+ <%= render :partial => 'add_score',:locals => {:work => work,:score => score}%>
+
+ <% end%>
+
+
+
+
+
+ <%= render :partial => 'student_work/revise_attachment', :locals => {:work => work} %>
+
+
+
+
+ <%student_work_scores.each do |student_score|%>
+
+ <%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%>
+
+ <% end%>
+
+
+
+
收起
+
+
+
\ No newline at end of file
diff --git a/app/views/student_work/_show.html.erb b/app/views/student_work/_show.html.erb
index 9f65376e3..feab67800 100644
--- a/app/views/student_work/_show.html.erb
+++ b/app/views/student_work/_show.html.erb
@@ -7,6 +7,8 @@
<% pro = @homework.student_work_projects.where(:user_id => User.current.id).first %>
<% is_my_work = pro && pro.student_work_id == work.id%>
<% end %>
+ <% is_member_work = @homework.homework_type == 3 && work.student_work_projects.empty? %>
+ <% if !is_member_work %>
<%= render :partial => 'student_work/revise_attachment', :locals => {:work => work} %>
<%student_work_scores.each do |student_score|%>
@@ -101,6 +115,9 @@
<%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%>
<% end%>
+ <% if is_member_work && student_work_scores.empty? %>
+