Merge branch 'cxt_course' of https://git.trustie.net/jacknudt/trustieforge into cxt_course

This commit is contained in:
cxt 2016-05-12 17:49:13 +08:00
commit f74e5eb6ae
8 changed files with 138 additions and 149 deletions

View File

@ -50,29 +50,19 @@
}*/
</script>
<ul class="hworkListRow" id="student_work_<%= exercise.id%>">
<li class="hworkList340 width530">
<ul>
<li class="ml5 mr5" style="width:28px; text-align:center;">1</li>
<li class="hworkPortrait mt15 mr10">
<%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40"),user_activities_path(exercise.user)) %>
<%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40",:style => "display:block;"),user_activities_path(exercise.user)) %>
</li>
<div id="show_student_result_div_<%= exercise.id%>" style="cursor: pointer;" class="student_work_<%= exercise.id%>">
<li>
<ul class="mt10 fl">
<li class="hworkStName mr15 mt16" title="姓名" id="student_name_<%= exercise.id%>">
<li class="hworkStName" title="姓名" id="student_name_<%= exercise.id%>" style="cursor:pointer;">
<%=exercise.user.show_name %>
</li>
<li class="hworkStID mr10 mt16" title="学号" id="student_id_<%= exercise.id%>">
</li><li class="hworkStID pl15 pr10" title="学号" id="student_id_<%= exercise.id%>" style="cursor:pointer;">
<%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%>
</li>
<li class="hworkStID mt16" title="班级" id="student_class_<%= exercise.id%>">
<li class="hworkStID" title="班级" id="student_class_<%= exercise.id%>" style="cursor:pointer;">
--
</li>
</ul>
</li>
</div>
</ul>
</li>
<li class="hworkList130 c_grey student_work_<%= exercise.id%>">
<li class="hworkList130 ml200 c_grey student_work_<%= exercise.id%>">
<% if exercise.created_at%>
<%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>&nbsp;
<% if @exercise.end_time <= exercise.created_at %>

View File

@ -1,5 +1,6 @@
<ul class="hworkUl">
<li class="hworkList340 hworkH30 width530">
<span class="c_dark f14 fb fl mr5">序号</span>
<span class="c_dark f14 fb fl mr55">&nbsp;&nbsp;</span>
<span class="c_dark f14 fb fl mr60">姓名</span>
<span class="c_dark f14 fb fl mr60">学号</span>

View File

@ -1,13 +1,15 @@
<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 class="hworkList30 hworkH30 ml5 mr5"><span class="c_dark f14 fb fl">序号</span></li>
<li class="hworkList50 hworkH30">&nbsp;</li>
<li class="hworkList260 hworkH30">
<span class="f14 fb fl">作品名称</span>
</li>
<% if @homework.homework_type != 3 %>
<li class="hworkList80 hworkH30"><span class="HomeworkStuTitle f14 fb fl">姓名</span></li>
<li class="hworkList80 hworkH30"><span class="HomeworkStuTitle f14 fb fl">学号</span></li>
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
<li class="hworkList160 hworkH30"><span class="HomeworkStuTitle f14 fb fl">关联项目</span></li>
<% end %>
<li class="hworkList130 hworkH30 fb ml10">
时间
@ -19,7 +21,7 @@
</li>
<% end%>
<li class="hworkList50 hworkH30 fb mr10 ml10" style="float: right;">
<li class="hworkList50 hworkH30 fb mr10 ml10">
我的评分
</li>
</ul>

View File

@ -1,21 +1,29 @@
<ul class="hworkUl">
<li class="hworkList340 hworkH30 <%= @homework.homework_type == 2 ? '' : 'width385'%>">
<span class="c_dark f14 fb fl <%= @homework.homework_type == 2 ? 'mr90 ml50' : 'mr150 ml50'%>">作品名称</span>
<li class="hworkList30 hworkH30 ml5 mr5"><span class="c_dark f14 fb fl">序号</span></li>
<li class="hworkList50">&nbsp;</li>
<li class="<%= @homework.homework_type == 2 ? 'hworkList80 mr10' : 'hworkList130 mr10'%> hworkH30">
<span class="c_dark f14 fb fl <%#= @homework.homework_type == 2 ? 'mr90 ml50' : 'mr150 ml50'%>">作品名称</span>
</li>
<% if @homework.homework_type != 3 %>
<!--<span class="c_dark f14 fb fl mr50">姓名</span>-->
<%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl" ,:remote => true%>
<li class="hworkList60 hworkH30 mr10">
<%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml18" ,:remote => true%>
<% if @show_all && @order == "lastname"%>
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
<% end%>
</li>
<li class="hworkList80 hworkH30 mr10">
<!--<span class="c_dark f14 fb fl">学号</span>-->
<%= link_to "学号",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml50" ,:remote => true%>
<%= link_to "学号",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml30" ,:remote => true%>
<% if @show_all && @order == "student_id"%>
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
<% end%>
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
<span class="c_dark f14 fb fl">关联项目</span>
<% end %>
</li>
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
<li class="hworkList160 hworkH30">
<span class="c_dark f14 fb">关联项目</span>
</li>
<% end %>
<li class="hworkList130 hworkH30">
<%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml50" ,:remote => true%>

View File

@ -1,45 +1,36 @@
<!-- 匿评作品列表,显示某一个作品的信息 -->
<a name="<%= student_work.id%>"></a>
<ul class="hworkListRow" id="student_work_<%= student_work.id%>">
<li class="hworkList340 <%= @homework.homework_type == 2 ? '' : 'width385'%>">
<ul>
<li class="hworkList30 ml5 mr5">1</li>
<li class="hworkPortrait mt15 mr10">
<%= link_to(image_tag(url_to_avatar(student_work.user),:width =>"40",:height => "40"),user_activities_path(student_work.user)) %>
<%= link_to(image_tag(url_to_avatar(student_work.user),:width =>"40",:height => "40",:style => "display:block;"),user_activities_path(student_work.user)) %>
</li>
<div class="student_work_<%= student_work.id%>">
<li class="hworkName mt15 mr15 <%= @homework.homework_type == 2 ? '' : 'width165'%>" style="cursor: pointer;" onclick="show_student_work('<%= student_work_path(student_work)%>');">
<li class="hworkName mt12 pr10 <%= @homework.homework_type == 2 ? '' : 'width130'%>" style="cursor: pointer;" onclick="show_student_work('<%= student_work_path(student_work)%>');">
<% 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,"javascript:void(0)" ,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%>
</div>
</li>
<li>
<% if @homework.homework_type != 3 %>
<ul class="mt10 fl" style="cursor: pointer;" onclick="show_student_work('<%= student_work_path(student_work)%>');">
<li class="hworkStName mr10 mt16" title="<%= student_work.user.show_name%>">
<li class="hworkStName pr10" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
<%= student_work.user.show_name%>
</li>
<li class="hworkStID mt16" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>">
<li class="hworkStID pr10" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
</li>
</ul>
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
<ul class="mt10 fl">
<% if student_work.project.is_public || User.current.member_of?(student_work.project) || User.current.admin? %>
<li class="hworkPrName mr10 mt12" title="项目名称">
<li class="hworkPrName" title="项目名称">
<%= link_to( student_work.project.name, project_path(student_work.project.id))%>
</li>
<% else %>
<li class="hworkPrName mr10 mt12" title="该项目是私有的">
<li class="hworkPrName" title="该项目是私有的">
<%= student_work.project.name %>
</li>
<% end %>
</ul>
<% end %>
</li>
</div>
</ul>
</li>
<li class="hworkList130 c_grey student_work_<%= student_work.id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
<% if student_work.created_at && @homework.end_time%>
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>&nbsp;

View File

@ -6,30 +6,27 @@
<% 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 w465">
<ul>
<% if is_my_work%>
<li class="hworkList30 ml5 mr5">1</li>
<li class="hworkPortrait mt15 mr10">
<%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40") %>
<%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40", style: "display:block;") %>
</li>
<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%>
<li class="hworkName mt12 pr10 w250 student_work_<%= student_work.id%>">
<div>
<%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word w230"%>
<% 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 w250"%>
</div>
</li>
<li class="student_work_<%= student_work.id%>">
<div class="student_work_<%= student_work.id%>">
<% if @homework.homework_type != 3 %>
<ul class="mt10 fl" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
<li class="hworkStName mr10 mt16" title="<%= student_work.user.show_name%>">
<li class="hworkStName w80" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
<%= student_work.user.show_name%>
</li>
<li class="hworkStID mt16" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>">
<li class="hworkStID" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
</li>
</ul>
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
<ul class="mt10 fl">
<% if student_work.project.is_public || User.current.member_of?(student_work.project) || User.current.admin? %>
<li class="hworkPrName mr10 mt12" title="项目名称">
<%= link_to( student_work.project.name, project_path(student_work.project.id))%>
@ -39,41 +36,33 @@
<%= student_work.project.name %>
</li>
<% end %>
</ul>
<% end %>
</li>
</div>
<% else%>
<li class="hworkList30 ml5 mr5">1</li>
<li class="hworkPortrait mt15 mr10">
<%= image_tag(url_to_avatar(""),width:"40", height: "40") %>
<%= image_tag(url_to_avatar(""),width:"40", height: "40", style: "display:block;") %>
</li>
<li class="hworkName mt15 mr15 w230 student_work_<%= student_work.id%>">
<li class="hworkName mt12 pr10 w250 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 w230"%>
<%= link_to "匿名的作品", student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word w250"%>
</div>
</li>
<li onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;" class="student_work_<%= student_work.id%>">
<% if @homework.homework_type != 3 %>
<ul class="mt10 fl">
<li class="hworkStName mr10 mt16" title="姓名">
<li class="hworkStName w80" title="姓名" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
匿名
</li>
<li class="hworkStID mt16" title="学号">
<li class="hworkStID" title="学号">
--
</li>
</ul>
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
<ul class="mt10 fl">
<li class="hworkPrName mr10 mt12" title="项目名称">
<li class="hworkPrName mr10" title="项目名称" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
匿名
</li>
</ul>
<% end %>
</li>
<% end%>
</ul>
</li>
<li class="hworkList130 c_grey student_work_<%= student_work.id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
<li class="hworkList130 pl10 c_grey student_work_<%= student_work.id%>" 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")%>&nbsp;
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(format_time(student_work.created_at)).strftime("%Y-%m-%d") %>
<span class="c_red">[迟交]</span>
@ -89,7 +78,7 @@
<% end%>
<% my_score = student_work_score(student_work,User.current) %>
<li class="hworkList50 <%= my_score.nil? ? 'c_grey' : score_color(my_score.score)%> mr10 ml10" style="float:right; ">
<li class="hworkList50 <%= my_score.nil? ? 'c_grey' : score_color(my_score.score)%> mr10 ml10">
<%= 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>

View File

@ -51,14 +51,18 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;}
.hworkTip em {display:block; border-width:8px; position:absolute; bottom:4px; left:-16px; border-style:dashed solid dashed dashed; border-color:transparent #eaeaea transparent transparent; font-size:0; line-height:0;}
.hworkTip span {display:block; border-width:8px; position:absolute; bottom:4px; left:-15px; border-style:dashed solid dashed dashed; border-color:transparent #FFF transparent transparent; font-size:0; line-height:0;}
.hworkList340 {width:335px; text-align:left; height:50px; line-height:50px;padding-left:5px;}
.hworkList80 {width:80px; text-align:center;}
.hworkList30 {width:30px; text-align:center;}
.hworkList50 {width:50px; text-align:center;}
.hworkList60 {width:60px; text-align:center;}
.hworkList80 {width:80px; text-align:center;}
.hworkList130 {width:130px; text-align:center;}
.hworkList160 {width:160px; text-align:center;}
.hworkList260 {width:260px; text-align:left;}
.codeList{ float:right; font-size:12px; color:#484848; padding:0px 3px; width:714px; margin-bottom:10px; }
.hworkName {width:115px; float:left; line-height:18px;}
.hworkName {width:80px; float:left; line-height:18px;}
.hworkName div{max-height: 40px;overflow: hidden;}
.hworkStName {width:60px; max-width:60px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:18px; line-height:18px; font-size:12px; color:#888888; text-align:center;}
.hworkStID {width:80px; max-width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:18px; line-height:18px; font-size:12px; color:#888888; text-align:center;}
.hworkStName {width:60px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:65px; line-height:65px; vertical-align:middle; font-size:12px; color:#888888; text-align:center;}
.hworkStID {width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:65px; line-height:65px; vertical-align:middle; font-size:12px; color:#888888; text-align:center;}
.hworkDate {max-width:150px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:14px; line-height:14px; font-size:12px; color:#888888;}
.hworkMenu {width:100px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:10px 20px; left:-110px; font-size:12px; color:#888888; display:none; line-height:2; z-index:99;}
a.hworkExport {background:url(../images/homepage_icon2.png) -10px -401px no-repeat; padding-left:23px;}
@ -79,12 +83,14 @@ a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-re
.StudentName{display: table-cell;width: 115px;vertical-align: middle;text-align: left;height: 40px;}
.width385{width: 385px;}
.width505{width: 505px;}
.width130{width: 130px;}
.width165{width: 165px;}
.width180{width: 180px;}
.width525{width: 525px;}
.width285{width: 285px;}
.width255{width: 255px;}
.width530{width: 530px;}
.ml18 {margin-left:18px;}
.mr95{margin-right: 95px;}
.mr140 {margin-right: 140px;}
.ml100{margin-left: 100px;}
@ -1228,7 +1234,7 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
.ml7 {margin-left:7px;}
.tac {text-align:center;}
.proHelp {background:url(/images/course/hwork_icon.png) -5px -124px no-repeat; display:inline-block; width:15px; height:15px; display:inline-block;}
.hworkPrName {width:110px; max-width:110px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:18px; line-height:18px; font-size:12px; color:#888888; text-align:center;}
.hworkPrName {width:160px; max-width:160px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:65px; line-height:65px; vertical-align:middle; font-size:12px; color:#888888; text-align:center;}
.mr150 {margin-right:150px;}
.relatePInfo {text-align: left; position:absolute; background-color:#ffffff; padding:3px 8px; white-space:nowrap; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5); z-index:999; color:#585858; cursor:pointer; display:none;}
.captainName {max-width:75px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; display: inline-block;}

View File

@ -87,6 +87,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.ml100{ margin-left:100px;}
.ml110{ margin-left:110px;}
.ml125 { margin-left:125px;}
.ml200 {margin-left:200px;}
.ml320{ margin-left:320px;}
.ml150 { margin-left:150px;}
.mr-5 {margin-right:-5px;}
@ -144,7 +145,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.w50 {width:50px;}
.w60{ width:60px;}
.w70{ width:70px;}
.w80{ width:80px;}
.w80{ width:80px !important;}
.w90{ width:90px;}
.w100{width: 100px;}
.w125{width:125px;}
@ -154,6 +155,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.w170{width:170px;}
.w230{width:230px !important;}
.w235{ width:235px !important;}
.w250{ width:250px !important;}
.w280{ width:280px;}
.w265{ width: 265px;}
.w270{ width: 270px;}