Merge branch 'szzh' into develop

This commit is contained in:
cxt 2016-03-07 13:57:50 +08:00
commit cdd8deb340
7 changed files with 8 additions and 7 deletions

View File

@ -764,8 +764,8 @@ class UsersController < ApplicationController
homework_detail_programing.save if homework_detail_programing
homework_detail_group.save if homework_detail_group
if params[:quotes] && !params[:quotes].blank?
homework = HomeworkCommon.find params[:quotes].to_i
homework.update_attribute(:quotes, homework.quotes+1)
quotes_homework = HomeworkCommon.find params[:quotes].to_i
quotes_homework.update_attribute(:quotes, quotes_homework.quotes+1)
end
if params[:is_in_course] == "1"
redirect_to homework_common_index_path(:course => homework.course_id)

View File

@ -8,7 +8,7 @@
<% end %>
<% if show_nav?(@course.news.count) %>
<div class="subNav">
<%= link_to l(:label_course_news), course_news_index_path(@course), :class => "f12 c_blue02 ml10 fn" %>
<%= link_to "通知", course_news_index_path(@course), :class => "f12 c_blue02 ml10 fn" %>
<%= link_to( "", new_course_news_path(@course), :class => 'courseMenuSetting', :title =>"#{l(:label_course_news_new)}") if is_teacher %>
</div>
<% end %>

View File

@ -85,7 +85,7 @@
<% end %>
<% unless show_nav?(@course.news.count) %>
<div class="subNav">
<%= link_to l(:label_course_news), course_news_index_path(@course), :class => "f14 c_blue02" %>
<%= link_to "通知", course_news_index_path(@course), :class => "f14 c_blue02" %>
<%= link_to "(#{@course.news.count})", course_news_index_path(@course), :class => "subnav_num c_orange"%>
<%= link_to( "", new_course_news_path(@course,:is_new=>1), :class => 'courseMenuSetting', :title =>"#{l(:label_course_news_new)}") if is_teacher %>
</div>

View File

@ -158,7 +158,7 @@
<p class="w100 hidden"><%= link_to sw.user.show_name, student_work_index_path(:homework => activity.id)%></p>
</a>
<% score = sw.respond_to?("score") ? sw.score : (sw.final_score || 0) - sw.absence_penalty - sw.late_penalty %>
<p class="fontGrey2">分数:<span class="c_red"><%=format("%.1f",score<0 ? 0 : score) %>分</span></p>
<p class="fontGrey2">分数:<span class="c_red"><%=format("%.1f",score.to_i<0 ? 0 : score.to_i) %>分</span></p>
</div>
<% if i == 4 %>
<% break %>

View File

@ -157,7 +157,7 @@
<p class="w100 hidden"><%= link_to sw.user.show_name, student_work_index_path(:homework => activity.id)%></p>
</a>
<% score = sw.respond_to?("score") ? sw.score : (sw.final_score || 0) - sw.absence_penalty - sw.late_penalty %>
<p class="fontGrey2">分数:<span class="c_red"><%=format("%.1f",score<0 ? 0 : score) %>分</span></p>
<p class="fontGrey2">分数:<span class="c_red"><%=format("%.1f",score.to_i<0 ? 0 : score.to_i) %>分</span></p>
</div>
<% if i == 4 %>
<% break %>

View File

@ -161,7 +161,7 @@
<p class="w100 hidden"><%= link_to sw.user.show_name, student_work_index_path(:homework => homework_common.id)%></p>
</a>
<% score = sw.respond_to?("score") ? sw.score : (sw.final_score || 0) - sw.absence_penalty - sw.late_penalty %>
<p class="fontGrey2">分数:<span class="c_red"><%=format("%.1f",score<0 ? 0 : score) %>分</span></p>
<p class="fontGrey2">分数:<span class="c_red"><%=format("%.1f",score.to_i<0 ? 0 : score.to_i) %>分</span></p>
</div>
<% if i == 4 %>
<% break %>

View File

@ -1387,6 +1387,7 @@ ActiveRecord::Schema.define(:version => 20160304234903) do
t.integer "changeset_num", :default => 0
t.integer "board_message_num", :default => 0
t.integer "board_num", :default => 0
t.integer "act_num", :default => 0
t.integer "attach_num", :default => 0
t.datetime "commit_time"
end