From 9348cc9c241a3bf0a2dfeb0163e3bd6b2008d970 Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 30 Dec 2015 15:22:26 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E7=BC=96=E7=A8=8B=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E5=8C=BF=E8=AF=84=E6=B7=BB=E5=8A=A0=E7=B3=BB=E7=BB=9F=E8=AF=84?= =?UTF-8?q?=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/_evaluation_title.html.erb | 6 ++++++ app/views/student_work/_evaluation_work.html.erb | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/app/views/student_work/_evaluation_title.html.erb b/app/views/student_work/_evaluation_title.html.erb index 7398dbee1..1e006a6a6 100644 --- a/app/views/student_work/_evaluation_title.html.erb +++ b/app/views/student_work/_evaluation_title.html.erb @@ -13,6 +13,12 @@ 时间 + <% if @homework.homework_type == 2%> +
  • + 系统 +
  • + <% end%> +
  • 我的评分
  • diff --git a/app/views/student_work/_evaluation_work.html.erb b/app/views/student_work/_evaluation_work.html.erb index db680cbec..e65d4f267 100644 --- a/app/views/student_work/_evaluation_work.html.erb +++ b/app/views/student_work/_evaluation_work.html.erb @@ -75,6 +75,13 @@ + <% if @homework.homework_type == 2%> + +
  • + <%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%> +
  • + <% end%> + <% my_score = student_work_score(student_work,User.current) %>
  • <%= my_score.nil? ? "--" : format("%.1f",my_score.score)%> From e948c9430061981b14c66a41147f627d50021f3a Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 30 Dec 2015 15:49:16 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E6=B5=8B=E9=AA=8C?= =?UTF-8?q?=E7=9A=84=E5=A1=AB=E7=A9=BA=E9=A2=98=E6=9C=AA=E6=96=AD=E7=BD=91?= =?UTF-8?q?=E6=97=B6=E6=8A=A5=E7=BD=91=E7=BB=9C=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/exercise_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/exercise_controller.rb b/app/controllers/exercise_controller.rb index 9c073afa8..444446ef4 100644 --- a/app/controllers/exercise_controller.rb +++ b/app/controllers/exercise_controller.rb @@ -450,7 +450,7 @@ class ExerciseController < ApplicationController if params[:answer_text].nil? || params[:answer_text].blank? #用户提交空答案,视作不作答 @percent = get_percent(@exercise,User.current) - render :json => {:text => ea.answer_text,:percent => format("%.2f", @percent)} + render :json => {:text => "",:percent => format("%.2f", @percent)} else #添加答案 ea = ExerciseAnswer.new @@ -476,7 +476,7 @@ class ExerciseController < ApplicationController # 用户提交空答案,视为删除答案 if ea.delete @percent = get_percent(@exercise,User.current) - render :json => {:text => ea.answer_text,:percent => format("%.2f", @percent)} + render :json => {:text => "",:percent => format("%.2f", @percent)} else render :json => {:text => "failure"} end From 077368f5971f82611eb9d7bd89d0242a93a1015b Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 30 Dec 2015 16:02:31 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=8C=BF=E8=AF=84=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=AF=84=E5=88=86=E6=98=BE=E7=A4=BA=EF=BC=8C?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_work/_evaluation_title.html.erb | 48 +++++++++---------- .../student_work/_evaluation_work.html.erb | 12 ++--- public/stylesheets/public.css | 4 ++ 3 files changed, 34 insertions(+), 30 deletions(-) diff --git a/app/views/student_work/_evaluation_title.html.erb b/app/views/student_work/_evaluation_title.html.erb index 1e006a6a6..2ef5ee9af 100644 --- a/app/views/student_work/_evaluation_title.html.erb +++ b/app/views/student_work/_evaluation_title.html.erb @@ -1,25 +1,25 @@ -
      -
    • - 作品名称 - <% if @homework.homework_type != 3 %> - 姓名 - 学号 - <% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %> - 关联项目 - <% end %> -
    • - -
    • - 时间 -
    • - - <% if @homework.homework_type == 2%> -
    • - 系统 -
    • - <% end%> - -
    • - 我的评分 -
    • +
        +
      • + 作品名称 + <% if @homework.homework_type != 3 %> + 姓名 + 学号 + <% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %> + 关联项目 + <% end %> +
      • + +
      • + 时间 +
      • + + <% if @homework.homework_type == 2%> +
      • + 系统 +
      • + <% end%> + +
      • + 我的评分 +
      \ No newline at end of file diff --git a/app/views/student_work/_evaluation_work.html.erb b/app/views/student_work/_evaluation_work.html.erb index e65d4f267..cc346361e 100644 --- a/app/views/student_work/_evaluation_work.html.erb +++ b/app/views/student_work/_evaluation_work.html.erb @@ -6,16 +6,16 @@ <% pro = @homework.student_work_projects.where(:user_id => User.current.id).first %> <% is_my_work = pro && pro.student_work_id == student_work.id%> <% end %> -
    • +
      • <% if is_my_work%>
      • <%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40") %>
      • -
      • +
      • <% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
        - <%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word width285"%> + <%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word w230"%>
      • @@ -40,9 +40,9 @@
      • <%= image_tag(url_to_avatar(""),width:"40", height: "40") %>
      • -
      • +
      • - <%= link_to "匿名的作品", student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word width285"%> + <%= link_to "匿名的作品", student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word w230"%>
      • @@ -83,7 +83,7 @@ <% end%> <% my_score = student_work_score(student_work,User.current) %> -
      • +
      • <%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
      • diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 51f0be25d..cf741476e 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -135,12 +135,16 @@ h4{ font-size:14px; color:#3b3b3b;} .w100{width: 100px;} .w210{ width:210px;} .w150{ width:150px;} +.w230{width:230px !important;} +.w235{ width:235px !important;} .w280{ width:280px;} .w265{ width: 265px;} .w270{ width: 270px;} .w350 {width:350px;} .w362 {width:362px;} .w430{ width:470px;} +.w455{width:455px !important;} +.w465{width:465px !important;} .w520{ width:520px;} .w543{ width:543px;} .w557{ width:557px;} From 76b95fbf9374c936ef398b08ee48eadd30a86091 Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 30 Dec 2015 16:27:56 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=92=8C=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=9A=84=E8=AF=BE=E7=A8=8B=E7=AE=80=E4=BB=8B=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=8F=AF=E6=98=BE=E7=A4=BA20=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/course.js | 2 +- public/javascripts/project.js | 2 +- public/stylesheets/leftside.css | 2 +- public/stylesheets/leftside_new.css | 2 +- public/stylesheets/pleft.css | 2 +- public/stylesheets/user_leftside.css | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 5bfaccf30..a0bce3099 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -813,7 +813,7 @@ function hidden_atert_form(cur_page,cur_type) //当课程描述长度小于112px时,不显示更多按钮 $(function(){ - if($("#course_description_content").height()>112) + if($("#course_description_content").height()>400) { $("#lg-foot").show(); } diff --git a/public/javascripts/project.js b/public/javascripts/project.js index 24e864780..67fecaa3f 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -280,7 +280,7 @@ function submitComment() //当项目描述长度小于112px时,不显示更多按钮 $(function () { // alert($("#course_description_content").height()); - if ($("#course_description_content").height() > 112) { + if ($("#course_description_content").height() > 400) { $("#lg-foot").show(); } }); diff --git a/public/stylesheets/leftside.css b/public/stylesheets/leftside.css index 26976343e..aded204d2 100644 --- a/public/stylesheets/leftside.css +++ b/public/stylesheets/leftside.css @@ -45,7 +45,7 @@ a:hover.subnav_green{ background:#14ad5a;} /*简介*/ .project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;} -.course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;} +.course_description{max-height: 420px;overflow:hidden; word-break: break-all;word-wrap: break-word;line-height: 20px;} .project_board_content{overflow: hidden;max-height: 212px;word-break: break-all;word-wrap: break-word;} .project_board_content1{overflow: hidden;max-height: 72px;word-break: break-all;word-wrap: break-word;} .course_description_none{max-height: none;} diff --git a/public/stylesheets/leftside_new.css b/public/stylesheets/leftside_new.css index 2f31a1f65..f7f0c139d 100644 --- a/public/stylesheets/leftside_new.css +++ b/public/stylesheets/leftside_new.css @@ -46,7 +46,7 @@ a:hover.subnav_green{ background:#14ad5a;} /*简介*/ .project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;} -.course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;} +.course_description{max-height: 420px;overflow:hidden; word-break: break-all;word-wrap: break-word;line-height: 20px;} .course_description_none{max-height: none;} .lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;} .lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;} diff --git a/public/stylesheets/pleft.css b/public/stylesheets/pleft.css index 1ce12bdda..2cd51d5ec 100644 --- a/public/stylesheets/pleft.css +++ b/public/stylesheets/pleft.css @@ -48,7 +48,7 @@ a:hover.subnav_green{ background:#14ad5a;} /*简介*/ .project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;} -.course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;} +.course_description{max-height: 420px;overflow:hidden; word-break: break-all;word-wrap: break-word;line-height: 20px;} .project_board_content{overflow: hidden;max-height: 212px;word-break: break-all;word-wrap: break-word;} .project_board_content1{overflow: hidden;max-height: 72px;word-break: break-all;word-wrap: break-word;} .course_description_none{max-height: none;} diff --git a/public/stylesheets/user_leftside.css b/public/stylesheets/user_leftside.css index c8dfbe316..c0ff7c8a2 100644 --- a/public/stylesheets/user_leftside.css +++ b/public/stylesheets/user_leftside.css @@ -46,7 +46,7 @@ a:hover.subnav_green{ background:#14ad5a;} /*简介*/ .project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;} -.course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;} +.course_description{max-height: 420px;overflow:hidden; word-break: break-all;word-wrap: break-word;line-height: 20px;} .course_description_none{max-height: none;} .lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;} .lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;} From a74cba5190dc067b76c505dfeefd99a26b368dca Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 30 Dec 2015 17:21:06 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E7=BC=96=E7=A8=8B=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E7=9A=84=E8=BF=9F=E4=BA=A4=E6=89=A3=E5=88=86=E6=9C=89=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index f26f6c118..78d8e2b46 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -497,7 +497,7 @@ class UsersController < ApplicationController #提交作品时,计算是否迟交 if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d") - student_work.late_penalty = 1 + student_work.late_penalty = homework.late_penalty else student_work.late_penalty = 0 end