Merge remote-tracking branch 'origin/szzh' into szzh
This commit is contained in:
commit
88ddaaaaf5
|
@ -271,6 +271,7 @@ class StudentWorkController < ApplicationController
|
|||
end
|
||||
@is_new = false
|
||||
else
|
||||
@is_last_a = @work.student_works_scores.empty?
|
||||
@score = StudentWorksScore.new
|
||||
@score.score = params[:score] if params[:score]
|
||||
@score.comment = params[:new_form][:user_message] if params[:new_form] && params[:new_form][:user_message] && params[:new_form][:user_message] != ""
|
||||
|
|
|
@ -79,7 +79,7 @@ class Memo < ActiveRecord::Base
|
|||
receivers << self.forum.creator
|
||||
end
|
||||
# 添加发帖人
|
||||
if self.author_id != self.parent.author_id
|
||||
if self.author_id != self.parent.author_id && self.parent.author_id != self.forum.creator_id
|
||||
receivers << self.parent.author
|
||||
end
|
||||
end
|
||||
|
|
|
@ -94,11 +94,13 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="navHomepageNews">
|
||||
<%= link_to "", user_message_path(User.current), :class => "homepageNewsIcon" %>
|
||||
<% if User.current.count_new_message >0 %>
|
||||
<div ><%= link_to "" , user_message_path(User.current), :class => "newsActive" %></div>
|
||||
<div ><%= link_to User.current.count_new_message , user_message_path(User.current), :class => "newsActive" %></div>
|
||||
<% end %>
|
||||
<%#= link_to User.current.count_new_message, user_message_path(User.current), :class => "homepageNewsIcon" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -26,9 +26,11 @@
|
|||
</ul>
|
||||
</li>
|
||||
<li class="hworkList130 c_grey" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
|
||||
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>
|
||||
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
|
||||
<span class="c_red">[迟交]</span>
|
||||
<% if student_work.created_at && @homework.end_time%>
|
||||
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>
|
||||
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
|
||||
<span class="c_red">[迟交]</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="hworkList50 <%= score_color student_work.teacher_score%>">
|
||||
|
|
|
@ -2,8 +2,7 @@ $("#add_student_score_<%= @work.id%>").html("<%= escape_javascript(render :parti
|
|||
$('#score_<%= @work.id%>').peSlider({range: 'min'});
|
||||
|
||||
<% if @is_new%>
|
||||
$("#score_list_<%= @work.id%>").find("div:last").find("ul").addClass("ping_line");
|
||||
$("#score_list_<%= @work.id%>").prepend("<div id='work_score_<%= @score.id%>'><%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score,:is_last => true}) %></div>");
|
||||
$("#score_list_<%= @work.id%>").prepend("<div id='work_score_<%= @score.id%>'><%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score,:is_last => @is_last_a}) %></div>");
|
||||
<% else %>
|
||||
$("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score,:is_last => @is_last}) %>");
|
||||
<% end%>
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
<%= link_to course.name.to_s+" | 课程留言", course_feedback_path(course), :class => "newsBlue ml15" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle break_word list_style upload_img">
|
||||
<% if activity.m_parent_id.nil? %>
|
||||
<%= link_to activity.notes.html_safe, course_feedback_path(course), :class => "postGrey" %>
|
||||
<% if activity.parent %>
|
||||
<%= link_to activity.parent.notes.html_safe, course_feedback_path(course), :class => "postGrey" %>
|
||||
<% else %>
|
||||
<%= link_to activity.parent.notes.html_safe, course_feedback_path(course), :class => "postGrey" %>
|
||||
<%= link_to activity.notes.html_safe, course_feedback_path(course), :class => "postGrey" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostDate">
|
||||
|
|
|
@ -105,7 +105,10 @@
|
|||
|
||||
<% @student_work.student_work_tests.each_with_index do |test, index| %>
|
||||
<div class="ProResultTop">
|
||||
<p class="c_blue fl">第<%= @student_work.student_work_tests.count - index%>次测试</p><span class="fr c_grey"><%= test.created_at.to_s(:db) %></span>
|
||||
<p class="c_blue fl">
|
||||
第<%= @student_work.student_work_tests.count - index%>次测试
|
||||
</p>
|
||||
<span class="fr c_grey"><%= format_time(test.created_at).to_s%></span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% if test.status.to_i == -2 %>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
class AlterUserActivitiesNews < ActiveRecord::Migration
|
||||
def up
|
||||
UserActivity.all.each do |activity|
|
||||
if activity.act_type = 'News'
|
||||
if activity.act_type == 'News'
|
||||
if activity.act
|
||||
activity.created_at = activity.act.created_on
|
||||
activity.updated_at = activity.act.updated_on ? activity.act.updated_on : activity.act.created_on
|
||||
activity.updated_at = activity.act.respond_to?("updated_on") ? activity.act.updated_on : activity.act.created_on
|
||||
activity.save
|
||||
else
|
||||
activity.destroy
|
||||
|
|
41
db/schema.rb
41
db/schema.rb
|
@ -476,6 +476,13 @@ ActiveRecord::Schema.define(:version => 20150930011457) do
|
|||
|
||||
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
||||
|
||||
create_table "discuss_demos", :force => true do |t|
|
||||
t.string "title"
|
||||
t.text "body"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "documents", :force => true do |t|
|
||||
t.integer "project_id", :default => 0, :null => false
|
||||
t.integer "category_id", :default => 0, :null => false
|
||||
|
@ -490,23 +497,26 @@ ActiveRecord::Schema.define(:version => 20150930011457) do
|
|||
add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
|
||||
add_index "documents", ["project_id"], :name => "documents_project_id"
|
||||
|
||||
create_table "dts", :force => true do |t|
|
||||
t.string "IPLineCode"
|
||||
t.string "Description"
|
||||
t.string "Num"
|
||||
t.string "Variable"
|
||||
t.string "TraceInfo"
|
||||
t.string "Method"
|
||||
create_table "dts", :primary_key => "Num", :force => true do |t|
|
||||
t.string "Defect", :limit => 50
|
||||
t.string "Category", :limit => 50
|
||||
t.string "File"
|
||||
t.string "IPLine"
|
||||
t.string "Review"
|
||||
t.string "Category"
|
||||
t.string "Defect"
|
||||
t.string "PreConditions"
|
||||
t.string "StartLine"
|
||||
t.string "Method"
|
||||
t.string "Module", :limit => 20
|
||||
t.string "Variable", :limit => 50
|
||||
t.integer "StartLine"
|
||||
t.integer "IPLine"
|
||||
t.string "IPLineCode", :limit => 200
|
||||
t.string "Judge", :limit => 15
|
||||
t.integer "Review", :limit => 1
|
||||
t.string "Description"
|
||||
t.text "PreConditions", :limit => 2147483647
|
||||
t.text "TraceInfo", :limit => 2147483647
|
||||
t.text "Code", :limit => 2147483647
|
||||
t.integer "project_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "id", :null => false
|
||||
end
|
||||
|
||||
create_table "enabled_modules", :force => true do |t|
|
||||
|
@ -911,7 +921,6 @@ ActiveRecord::Schema.define(:version => 20150930011457) do
|
|||
t.datetime "created_on"
|
||||
t.integer "comments_count", :default => 0, :null => false
|
||||
t.integer "course_id"
|
||||
t.datetime "updated_on"
|
||||
end
|
||||
|
||||
add_index "news", ["author_id"], :name => "index_news_on_author_id"
|
||||
|
|
|
@ -873,7 +873,7 @@ a.work_list_tit{width:580px; display:block; overflow:hidden; font-size:14px; f
|
|||
|
||||
.filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.evaluation{position: relative;}
|
||||
.evaluation_submit{position: absolute;right: 0px;bottom: 5px;}
|
||||
.evaluation_submit{position: absolute;right: 0px;bottom: 0px;}
|
||||
.student_work_search{background-color: #64bdd9;color: white !important;padding: 2px 7px;margin-left: 10px;cursor: pointer; }
|
||||
|
||||
/* 与我相关 */
|
||||
|
|
|
@ -14,7 +14,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
|
|||
#navSearchAlert {display:none;}
|
||||
.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;}
|
||||
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;}
|
||||
.newsActive {width:10px; height:10px; border-radius:50%; border:2px solid #ffffff; background-color:#ff0000; position:absolute; left:17px; top:5px;}
|
||||
.newsActive {width:16px; height:16px; border-radius:50%; background-color:#ff0000; position:absolute; left:17px; top:5px; text-align:center;font-size:12px; color:#ffffff !important;padding-bottom: 3px;padding-left: 2px;padding-right: 1px;font-weight: bold;}
|
||||
.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;}
|
||||
.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block; line-height:0;}
|
||||
.homepageProfileMenuIconhover {background:url(../images/nav_icon.png) 30px -122px no-repeat;}
|
||||
|
|
|
@ -528,7 +528,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
|
|||
#navSearchAlert {display:none;}
|
||||
.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;}
|
||||
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;}
|
||||
.newsActive {width:10px; height:10px; border-radius:50%; border:2px solid #ffffff; background-color:#ff0000; position:absolute; left:17px; top:5px;}
|
||||
.newsActive {width:16px; height:16px; border-radius:50%; background-color:#ff0000; position:absolute; left:17px; top:5px; text-align:center;font-size:12px; color:#ffffff !important;padding-bottom: 3px;padding-left: 2px;padding-right: 1px;font-weight: bold;}
|
||||
.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;}
|
||||
.portraitRadius {border-radius: 3px;}
|
||||
.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block; line-height:0;}
|
||||
|
@ -741,9 +741,9 @@ ul.list_watch{
|
|||
.referenceText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; display:inline-block; font-weight:bold;}
|
||||
.referenceSearchBox {border:1px solid #e6e6e6; width:235px; height:32px; background-color:#ffffff; margin-top:12px; margin-bottom:15px;}
|
||||
.searchReferencePopup {border:none; outline:none; background-color:#ffffff; width:190px; height:32px; padding-left:10px; display:inline-block; float:left;}
|
||||
.referenceSearchIcon{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon.png) -180px -270px no-repeat; display:inline-block; float:left;}
|
||||
.referenceSearchIcon:hover {background:url(../images/homepage_icon.png) -180px -311px no-repeat;}
|
||||
.referenceResourceType {font-size:14px; width:475px; height:34px; line-height:34px; vertical-align:middle; background-color:#f6f6f6; margin-top:15px;}
|
||||
.referenceSearchIcon{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon2.png) -180px -270px no-repeat; display:inline-block; float:left;}
|
||||
.referenceSearchIcon:hover {background:url(../images/homepage_icon2.png) -180px -311px no-repeat;}
|
||||
.referenceResourceType {font-size:14px; width:460px; height:34px; line-height:34px; vertical-align:middle; background-color:#f6f6f6; margin-top:15px;}
|
||||
.referenceTypeActive {background-color:#269ac9; color:#ffffff !important;}
|
||||
a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;}
|
||||
|
||||
|
|
|
@ -451,7 +451,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
|
|||
#navSearchAlert {display:none;}
|
||||
.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;}
|
||||
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;}
|
||||
.newsActive {width:8px; height:8px; border-radius:50%; border:2px solid #ffffff; background-color:#ff0000; position:absolute; left:17px; top:5px;}
|
||||
.newsActive {width:16px; height:16px; border-radius:50%; background-color:#ff0000; position:absolute; left:17px; top:5px; text-align:center;font-size:12px; color:#ffffff !important;padding-bottom: 3px;padding-left: 2px;padding-right: 1px;font-weight: bold;}
|
||||
.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;}
|
||||
.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block;}
|
||||
.homepageProfileMenuIcon:hover {background:url(../images/nav_icon.png) 30px -122px no-repeat;}
|
||||
|
@ -627,9 +627,9 @@ a.loginChooseTab {color:#484848; height:30px; display:block;}
|
|||
.referenceText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; display:inline-block; font-weight:bold;}
|
||||
.referenceSearchBox {border:1px solid #e6e6e6; width:235px; height:32px; background-color:#ffffff; margin-top:12px; margin-bottom:15px;}
|
||||
.searchReferencePopup {border:none; outline:none; background-color:#ffffff; width:190px; height:32px; padding-left:10px; display:inline-block; float:left;}
|
||||
.referenceSearchIcon{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon.png) -180px -270px no-repeat; display:inline-block; float:left;}
|
||||
.referenceSearchIcon:hover {background:url(../images/homepage_icon.png) -180px -311px no-repeat;}
|
||||
.referenceResourceType {font-size:14px; width:475px; height:34px; line-height:34px; vertical-align:middle; background-color:#f6f6f6; margin-top:15px;}
|
||||
.referenceSearchIcon{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon2.png) -180px -270px no-repeat; display:inline-block; float:left;}
|
||||
.referenceSearchIcon:hover {background:url(../images/homepage_icon2.png) -180px -311px no-repeat;}
|
||||
.referenceResourceType {font-size:14px; width:460px; height:34px; line-height:34px; vertical-align:middle; background-color:#f6f6f6; margin-top:15px;}
|
||||
.referenceTypeActive {background-color:#269ac9; color:#ffffff !important;}
|
||||
a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;}
|
||||
|
||||
|
|
Loading…
Reference in New Issue