From 607c31c8c5ed2c12863dbc3897bfbf3b6eb22f41 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 18 Sep 2015 16:08:59 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=9B=BE=E7=89=87=E4=B8=8D=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/new_user.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index c15fbbccd..c8d075f93 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -473,7 +473,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no- .homepageFollow {background:url(../images/homepage_icon.png) -10px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;} .homepageFollowCancel {background:url(../images/homepage_icon.png) -178px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;} .homepageEditProfile {width:16px; height:16px; border-radius:2px; background-color:#888888; position:absolute; right:5px; bottom:5px; font-size:12px; filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5;} -.homepageEditProfileIcon {background:url(../images/homepage_icon.png) -14px -37px no-repeat; width:20px; height:20px; display:block;} +.homepageEditProfileIcon {background:url(../images/homepage_icon2.png) -14px -37px no-repeat; width:20px; height:20px; display:block;} .homepageImageName {font-size:16px; color:#484848; height:25px; float:left; font-weight: bold; max-width:90px;overflow: hidden; white-space:nowrap; text-overflow:ellipsis;} .homepageImageSexMan {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;} .homepageImageSexWomen {width: 20px;height: 20px;background: url(../images/homepage_icon.png) -10px -149px no-repeat;float: left;} From 1d39df5469b5ae641477add3c215bc89acc3c7ca Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 18 Sep 2015 16:15:05 +0800 Subject: [PATCH 2/6] =?UTF-8?q?C=E6=94=B9=E4=B8=BA=E5=A4=A7=E5=86=99?= =?UTF-8?q?=E3=80=81=E7=BC=96=E7=A8=8B=E5=B1=9E=E6=80=A7=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/homework_detail_programing.rb | 2 +- app/views/users/_user_programing_attr.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/homework_detail_programing.rb b/app/models/homework_detail_programing.rb index e5938d091..f6286a45e 100644 --- a/app/models/homework_detail_programing.rb +++ b/app/models/homework_detail_programing.rb @@ -4,6 +4,6 @@ class HomeworkDetailPrograming < ActiveRecord::Base belongs_to :homework_common def language_name - %W(c c++).at(self.language.to_i - 1) + %W(C C++).at(self.language.to_i - 1) end end diff --git a/app/views/users/_user_programing_attr.html.erb b/app/views/users/_user_programing_attr.html.erb index 0bfbd379f..498005010 100644 --- a/app/views/users/_user_programing_attr.html.erb +++ b/app/views/users/_user_programing_attr.html.erb @@ -29,7 +29,7 @@ <% end %>
- 温馨提示:您可以在发布作业后,在作业“模拟答题”中进行标准代码的检测和提交。 + 温馨提示:您可以在发布作业后,在作业“模拟答题”中进行标准代码的检测。 确  定
From 20b4c056a8e8ae978812643ce309b3a5407dc107 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 18 Sep 2015 16:19:30 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=EF=BC=9A=E6=99=AE=E9=80=9A=E4=BD=9C=E4=B8=9A=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E5=8C=BF=E8=AF=84=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150918063404_normal_homework_type.rb | 8 +++ db/schema.rb | 52 +++++++++++-------- 2 files changed, 39 insertions(+), 21 deletions(-) create mode 100644 db/migrate/20150918063404_normal_homework_type.rb diff --git a/db/migrate/20150918063404_normal_homework_type.rb b/db/migrate/20150918063404_normal_homework_type.rb new file mode 100644 index 000000000..def3b0024 --- /dev/null +++ b/db/migrate/20150918063404_normal_homework_type.rb @@ -0,0 +1,8 @@ +class NormalHomeworkType < ActiveRecord::Migration + def up + HomeworkCommon.where("homework_type = 0").update_all(:homework_type => 1) + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index a3c8277bb..9749410a0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150917071652) do +ActiveRecord::Schema.define(:version => 20150918063404) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -476,6 +476,13 @@ ActiveRecord::Schema.define(:version => 20150917071652) 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 => 20150917071652) 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| @@ -609,11 +619,12 @@ ActiveRecord::Schema.define(:version => 20150917071652) do t.text "description" t.date "publish_time" t.date "end_time" - t.integer "homework_type", :default => 1 + t.integer "homework_type", :default => 1 t.string "late_penalty" t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "teacher_priority", :default => 1 end create_table "homework_detail_manuals", :force => true do |t| @@ -906,7 +917,6 @@ ActiveRecord::Schema.define(:version => 20150917071652) 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" @@ -1318,7 +1328,7 @@ ActiveRecord::Schema.define(:version => 20150917071652) do t.datetime "updated_at", :null => false t.integer "late_penalty", :default => 0 t.integer "absence_penalty", :default => 0 - t.integer "system_score" + t.float "system_score", :default => 0.0 t.boolean "is_test", :default => false end From ec4c7f531da0c38235482a5bde9572e231e3cb1b Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 18 Sep 2015 17:16:31 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=8C=BF=E8=AF=84=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=88=90=E7=BB=A9=E8=AE=A1=E7=AE=97=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/student_work.rb | 3 +-- app/views/student_work/_evaluation_un_work.html.erb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/models/student_work.rb b/app/models/student_work.rb index a6d641c0c..cd4d81a32 100644 --- a/app/models/student_work.rb +++ b/app/models/student_work.rb @@ -31,9 +31,8 @@ class StudentWork < ActiveRecord::Base else self.system_score = last_test.test_score end - set_final_score self.homework_common,self end - + set_final_score self.homework_common,self end def set_src self.description = last_test.src if last_test diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index caaaa2775..d3bac240d 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -57,7 +57,7 @@ - <% score = student_work.respond_to?("score") ? student_work.score : student_work.final_score - student_work.absence_penalty - student_work.late_penalty%> + <% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%>
  • <%= score.nil? ? "--" : format("%.1f",score)%> <% unless score.nil?%> From bb197897b7708de29e6b055db5c13ffd4efbe459 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 18 Sep 2015 17:27:10 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BD=9C=E5=93=81=E5=88=97=E8=A1=A8enter?= =?UTF-8?q?=E9=94=AE=E6=90=9C=E7=B4=A2=EF=BC=8C=E4=BB=A5=E5=8F=8A=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/index.html.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index db704a7de..5398b7084 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -87,13 +87,13 @@
    - <%= link_to "所有作品[共#{@homework.student_works.count}份]".html_safe,student_work_index_path(:homework => @homework.id),:class => "fl f14"%> + <%= link_to "所有作品[共#{@stundet_works.count}份]".html_safe,student_work_index_path(:homework => @homework.id),:class => "fl f14"%> <%if @is_teacher || @homework.homework_detail_manual.comment_status == 3%> -
    - +
    + - +
    <% end%>
    From 4061aa8a143c1720601d0cc92ae9dec1bab10a29 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 18 Sep 2015 17:34:44 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BD=9C=E5=93=81?= =?UTF-8?q?=E5=85=B3=E8=81=94=E9=A1=B9=E7=9B=AE=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/student_work_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/student_work_helper.rb b/app/helpers/student_work_helper.rb index 834b8dd61..e1cf3464e 100644 --- a/app/helpers/student_work_helper.rb +++ b/app/helpers/student_work_helper.rb @@ -6,7 +6,7 @@ module StudentWorkHelper def user_projects_option projects = User.current.projects.visible not_have_project = [] - not_have_project << "没有可选项目,请直接为本作品创建一个项目" + not_have_project << "请选择关联项目" not_have_project << 0 type = [] type << not_have_project