Merge branch 'szzh' of https://git.trustie.net/jacknudt/trustieforge into szzh
This commit is contained in:
commit
82b8cb77fd
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,19 +1,25 @@
|
|||
<ul class="hworkUl">
|
||||
<li class="hworkList340 hworkH30 width505">
|
||||
<span class="HomeworkNameTitle f14 fb fl">作品名称</span>
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<span class="HomeworkStuTitle f14 fb fl">姓名</span>
|
||||
<span class="HomeworkStuTitle f14 fb fl">学号</span>
|
||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<span class="HomeworkStuTitle f14 fb fl">关联项目</span>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li class="hworkList130 hworkH30 fb ml10">
|
||||
时间
|
||||
</li>
|
||||
|
||||
<li class="hworkList50 hworkH30 fb mr10 ml10">
|
||||
我的评分
|
||||
</li>
|
||||
<ul class="hworkUl">
|
||||
<li class="hworkList340 hworkH30 w455">
|
||||
<span class="HomeworkNameTitle f14 fb fl w235">作品名称</span>
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<span class="HomeworkStuTitle f14 fb fl">姓名</span>
|
||||
<span class="HomeworkStuTitle f14 fb fl">学号</span>
|
||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<span class="HomeworkStuTitle f14 fb fl">关联项目</span>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li class="hworkList130 hworkH30 fb ml10">
|
||||
时间
|
||||
</li>
|
||||
|
||||
<% if @homework.homework_type == 2%>
|
||||
<li class="hworkList50 hworkH30 fb">
|
||||
系统
|
||||
</li>
|
||||
<% end%>
|
||||
|
||||
<li class="hworkList50 hworkH30 fb mr10 ml10" style="float: right;">
|
||||
我的评分
|
||||
</li>
|
||||
</ul>
|
|
@ -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 %>
|
||||
<li class="hworkList340 width525">
|
||||
<li class="hworkList340 w465">
|
||||
<ul>
|
||||
<% if is_my_work%>
|
||||
<li class="hworkPortrait mt15 mr10">
|
||||
<%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40") %>
|
||||
</li>
|
||||
<li class="hworkName mt15 mr15 width255 student_work_<%= student_work.id%>">
|
||||
<li class="hworkName mt15 mr15 w230 student_work_<%= student_work.id%>">
|
||||
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
|
||||
<div>
|
||||
<%= 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"%>
|
||||
</div>
|
||||
</li>
|
||||
<li onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;" class="student_work_<%= student_work.id%>">
|
||||
|
@ -40,9 +40,9 @@
|
|||
<li class="hworkPortrait mt15 mr10">
|
||||
<%= image_tag(url_to_avatar(""),width:"40", height: "40") %>
|
||||
</li>
|
||||
<li class="hworkName mt15 mr15 width255 student_work_<%= student_work.id%>">
|
||||
<li class="hworkName mt15 mr15 w230 student_work_<%= student_work.id%>">
|
||||
<div>
|
||||
<%= 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"%>
|
||||
</div>
|
||||
</li>
|
||||
<li onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;" class="student_work_<%= student_work.id%>">
|
||||
|
@ -75,8 +75,15 @@
|
|||
</li>
|
||||
|
||||
<!-- 成绩 -->
|
||||
<% if @homework.homework_type == 2%>
|
||||
<!-- 系统评分 -->
|
||||
<li class="hworkList50 <%= score_color student_work.system_score%>">
|
||||
<%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
|
||||
</li>
|
||||
<% end%>
|
||||
|
||||
<% my_score = student_work_score(student_work,User.current) %>
|
||||
<li class="hworkList50 <%= my_score.nil? ? 'c_grey' : score_color(my_score.score)%> mr10">
|
||||
<li class="hworkList50 <%= my_score.nil? ? 'c_grey' : score_color(my_score.score)%> mr10 ml10" style="float:right; ">
|
||||
<%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
|
||||
</li>
|
||||
<li class="hworkTip" style="display: none" id="work_click_<%= student_work.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></li>
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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;}
|
||||
|
|
|
@ -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;}
|
||||
|
|
|
@ -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;}
|
||||
|
|
|
@ -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;}
|
||||
|
|
|
@ -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;}
|
||||
|
|
Loading…
Reference in New Issue