diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb
index 3e1e0ba29..01f858442 100644
--- a/app/controllers/student_work_controller.rb
+++ b/app/controllers/student_work_controller.rb
@@ -387,8 +387,8 @@ class StudentWorkController < ApplicationController
if stundet_work && params[:results] && params[:results].class.to_s == "Array"
homework_common = stundet_work.homework_common
params[:results].each do |result|
- homework_test = homework_common.homework_tests.where("input = '#{result[:input]}' AND output = '#{result[:output]}'").first
- if homework_test
+ homework_tests = homework_common.homework_tests.where("input = '#{result[:input]}' AND output = '#{result[:output]}'")
+ homework_tests.each do |homework_test|
student_work_test = StudentWorkTest.new
student_work_test.student_work = stundet_work
student_work_test.homework_test = homework_test
diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb
index c4f61d73c..49c8b5499 100644
--- a/app/views/layouts/_base_header.html.erb
+++ b/app/views/layouts/_base_header.html.erb
@@ -34,7 +34,7 @@
<%=link_to l(:label_my_message)+'('+User.current.count_new_jour.to_s+')',
- {:controller=> 'users', :action => 'show', id: User.current.id, host: Setting.host_user},
+ {:controller=> 'users', :action => 'user_newfeedback', id: User.current.id, host: Setting.host_user},
{:class => 'my-message'} if User.current.logged?%>
diff --git a/app/views/projects/settings/_new_versions.html.erb b/app/views/projects/settings/_new_versions.html.erb
index 30da08614..557025eaa 100644
--- a/app/views/projects/settings/_new_versions.html.erb
+++ b/app/views/projects/settings/_new_versions.html.erb
@@ -13,8 +13,8 @@
<%= l(:field_effective_date) %> |
<%= l(:field_description) %> |
<%= l(:field_status) %> |
- <%= l(:field_sharing) %> |
- <%= l(:label_wiki_page) %> |
+
+
|
<% for version in @project.shared_versions.sort %>
@@ -25,13 +25,13 @@
<%= format_date(version.effective_date) %> |
<%=h version.description %> |
<%= l("version_status_#{version.status}") %> |
- <%=h format_version_sharing(version.sharing) %> |
-
- <%= link_to_if_authorized(h(truncate(version.wiki_page_title,:length=>20)), {:controller => 'wiki',
- :action => 'show',
- :project_id => version.project,
+
+
+ <%#= link_to_if_authorized(h(truncate(version.wiki_page_title,:length=>20)), {:controller => 'wiki',
+# :action => 'show',
+# :project_id => version.project,
:id => Wiki.titleize(version.wiki_page_title)},:class=>"c_blue02") || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %>
- |
+
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
<%= link_to l(:button_edit), edit_version_path(version), :class => 'c_purple' %>
diff --git a/app/views/student_work/_evaluation_student_work.html.erb b/app/views/student_work/_evaluation_student_work.html.erb
index 9569718fb..368c636df 100644
--- a/app/views/student_work/_evaluation_student_work.html.erb
+++ b/app/views/student_work/_evaluation_student_work.html.erb
@@ -48,8 +48,10 @@
<%= student_work.final_score%> 分。
迟交扣分
<%= student_work.late_penalty%> 分,
- 缺评扣分
- <%= student_work.absence_penalty%> 分,
+ <% if student_work.homework_common.homework_type == 1%>
+ 缺评扣分
+ <%= student_work.absence_penalty%> 分,
+ <% end%>
最终成绩为
<%= format("%.1f",score)%> 分。
diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb
index 3783d67d3..0250a7eed 100644
--- a/app/views/student_work/index.html.erb
+++ b/app/views/student_work/index.html.erb
@@ -148,7 +148,7 @@
输出
|
- <% homework.homework_tests.each do |test|%>
+ <% @homework.homework_tests.each do |test|%>
">
<%=test.input%>
|