From 1acadd1edf4c1314ad91c4ad155637822db91803 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 30 Sep 2015 09:50:14 +0800 Subject: [PATCH 1/7] =?UTF-8?q?1=E3=80=81=E6=B5=8B=E8=AF=95=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE=202?= =?UTF-8?q?=E3=80=81=E4=BD=9C=E5=93=81=E5=88=97=E8=A1=A8=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/_evaluation_un_work.html.erb | 8 +++++--- app/views/users/new_user_commit_homework.html.erb | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index da2723636..94fcfcee2 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -26,9 +26,11 @@
  • - <%= 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") %> - [迟交] + <% 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") %> + [迟交] + <% end %> <% end %>
  • diff --git a/app/views/users/new_user_commit_homework.html.erb b/app/views/users/new_user_commit_homework.html.erb index c8998fd55..c3a736058 100644 --- a/app/views/users/new_user_commit_homework.html.erb +++ b/app/views/users/new_user_commit_homework.html.erb @@ -105,7 +105,10 @@ <% @student_work.student_work_tests.each_with_index do |test, index| %>
    -

    第<%= @student_work.student_work_tests.count - index%>次测试

    <%= test.created_at.to_s(:db) %> +

    + 第<%= @student_work.student_work_tests.count - index%>次测试 +

    + <%= format_time(test.created_at).to_s%>
    <% if test.status.to_i == -2 %> From 11736eb2663c0329de9d1431e501c6acf13bc33a Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 30 Sep 2015 10:16:55 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...150930011457_alter_user_activities_news.rb | 4 +- db/schema.rb | 41 +++++++++++-------- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/db/migrate/20150930011457_alter_user_activities_news.rb b/db/migrate/20150930011457_alter_user_activities_news.rb index 169ac6795..f91cbb791 100644 --- a/db/migrate/20150930011457_alter_user_activities_news.rb +++ b/db/migrate/20150930011457_alter_user_activities_news.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index 9da8cdd66..6edcdcc42 100644 --- a/db/schema.rb +++ b/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" From d1bb76cfcb14cbacfe42319aa1582eecafef2d35 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 30 Sep 2015 10:24:20 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E5=8C=BF=E8=AF=84=E7=95=8C=E9=9D=A2=E6=8F=90=E4=BA=A4=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/courses.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 403febc23..328570345 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -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; } /* 与我相关 */ From 42d4a5628da645546355d2b2e595a48958d2cb6e Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 30 Sep 2015 10:33:13 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E5=BC=95=E7=94=A8=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=BA=93=E7=9A=84icon=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/new_user.css | 4 ++-- public/stylesheets/public.css | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 5949d44aa..d3f5e92db 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -741,8 +741,8 @@ 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;} +.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:475px; 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;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 144b8526c..bf89de015 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -624,8 +624,8 @@ 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;} +.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:475px; 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;} From 11314a536687e5eb38192896da3672838da06db0 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 30 Sep 2015 10:43:40 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E6=89=93=E5=88=86=E4=B9=8B=E5=90=8E=EF=BC=8C=E8=AF=84=E5=88=86?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 1 + app/views/student_work/add_score.js.erb | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index f2858d097..17f179492 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -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] != "" diff --git a/app/views/student_work/add_score.js.erb b/app/views/student_work/add_score.js.erb index 6cb5bd6d8..762aa4a8a 100644 --- a/app/views/student_work/add_score.js.erb +++ b/app/views/student_work/add_score.js.erb @@ -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("
    <%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score,:is_last => true}) %>
    "); + $("#score_list_<%= @work.id%>").prepend("
    <%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score,:is_last => @is_last_a}) %>
    "); <% else %> $("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score,:is_last => @is_last}) %>"); <% end%> From fed1a99bec9b979ce7d40004ab1783040ca63c8d Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 30 Sep 2015 10:49:04 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=8A=A5500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_journalsformessage.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/users/_course_journalsformessage.html.erb b/app/views/users/_course_journalsformessage.html.erb index 1fcd3797e..aab26c20b 100644 --- a/app/views/users/_course_journalsformessage.html.erb +++ b/app/views/users/_course_journalsformessage.html.erb @@ -14,10 +14,10 @@ <%= link_to course.name.to_s+" | 课程留言", course_feedback_path(course), :class => "newsBlue ml15" %>
    - <% 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 %>
    From ff18381f6495e449ece2618e8a028f467610c333 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 30 Sep 2015 10:52:27 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E5=BC=95=E7=94=A8=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=BA=93=E5=BC=B9=E6=A1=86=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/new_user.css | 2 +- public/stylesheets/public.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index a3cf6bf9b..5147aaf3b 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -743,7 +743,7 @@ ul.list_watch{ .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_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:475px; height:34px; line-height:34px; vertical-align:middle; background-color:#f6f6f6; margin-top:15px;} +.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;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 669f086a3..79f194e66 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -629,7 +629,7 @@ a.loginChooseTab {color:#484848; height:30px; display:block;} .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_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:475px; height:34px; line-height:34px; vertical-align:middle; background-color:#f6f6f6; margin-top:15px;} +.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;}