1、作品列表TAB切换

2、作品界面作业详细信息
3、到处Excel名称
This commit is contained in:
sw 2015-05-28 12:02:26 +08:00
parent ee0a9093d3
commit 8c6ea88504
6 changed files with 47 additions and 54 deletions

View File

@ -15,7 +15,7 @@ class StudentWorkController < ApplicationController
format.html
format.xls {
send_data(homework_to_xls(@stundet_works), :type => "text/excel;charset=utf-8; header=present",
:filename => "#{@course.teacher.lastname.to_s + @course.teacher.firstname}_#{@course.name}_#{@course.time.to_s + @course.term}_#{@homework.name}#{l(:excel_homework_list)}(#{l(:excel_not_rated)}).xls")
:filename => "#{@course.teacher.lastname.to_s + @course.teacher.firstname}_#{@course.name}_#{@course.time.to_s + @course.term}_#{@homework.name}#{l(:excel_homework_list)}.xls")
}
end
end

View File

@ -2270,4 +2270,25 @@ module ApplicationHelper
tag_list = attachment_tag_list all_attachments
tag_list
end
#获取匿评相关连接代码
def homework_anonymous_comment homework
if homework.homework_type == 1 && homework.homework_detail_manual #匿评作业
if homework.student_works.count >= 2 #作业份数大于2
case homework.homework_detail_manual.comment_status
when 1
link = link_to '启动匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_start_anonymous_comment", remote: true, disable_with: '加载中...',:class => 'fr mr10 work_edit'
when 2
link = link_to '关闭匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_stop_anonymous_comment", remote: true,:class => 'fr mr10 work_edit'
when 3
link = "<span class='fr pr_join_span mr10' title='匿评结束'>匿评结束</span>".html_safe
end
else
link = "<span class='fr mr10 pr_join_span ' title='学生提交作业数大于2时才可以启动匿评'>启动匿评</span>".html_safe
end
else
link = "<span class='fr mr10 pr_join_span ' title='未开启匿评作业不可以启动匿评'>启动匿评</span>".html_safe
end
link
end
end

View File

@ -1,26 +1,5 @@
# encoding: utf-8
module HomeworkCommonHelper
#获取匿评相关连接代码
def homework_anonymous_comment homework
if homework.homework_type == 1 && homework.homework_detail_manual #匿评作业
if homework.student_works.count >= 2 #作业份数大于2
case homework.homework_detail_manual.comment_status
when 1
link = link_to '启动匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_start_anonymous_comment", remote: true, disable_with: '加载中...',:class => 'fr mr10 work_edit'
when 2
link = link_to '关闭匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_stop_anonymous_comment", remote: true,:class => 'fr mr10 work_edit'
when 3
link = "<span class='fr pr_join_span mr10' title='匿评结束'>匿评结束</span>".html_safe
end
else
link = "<span class='fr mr10 pr_join_span ' title='学生提交作业数大于2时才可以启动匿评'>启动匿评</span>".html_safe
end
else
link = "<span class='fr mr10 pr_join_span ' title='未开启匿评作业不可以启动匿评'>启动匿评</span>".html_safe
end
link
end
def student_new_homework homework
work = cur_user_works_for_homework homework
if work.nil?

View File

@ -22,8 +22,8 @@
<div id="contentbox">
<div id="tb_" class="hwork_tb_">
<ul>
<li id="tb_1" class="hwork_hovertab" onclick="x:HoverLi(1);">全部作品</li>
<li id="tb_2" class="hwork_normaltab" onclick="i:HoverLi(2);">作业信息</li>
<li id="tb_1" class="hwork_hovertab" onclick="course_setting(1)">全部作品</li>
<li id="tb_2" class="hwork_normaltab" onclick="course_setting(2)">作业信息</li>
</ul>
</div>
<div class="cl"></div>
@ -97,43 +97,36 @@
<div class="undis" id="tbc_02">
<div class="problem_main mt10">
<a class="problem_pic fl"><img src="images/courses/pic_01.jpg" width="42" height="42" /></a>
<%= link_to(image_tag(url_to_avatar(@homework.user), :width => "42", :height => "42"), user_path(@homework.user), :class => "problem_pic fl") %>
<div class="problem_txt fl mt5">
<h4 class="r_txt_tit mb5"> 请以下同学重新提交作业ppt只要更新附件不要删除作否则否则否则评分就丢了</h4>
<a class="talk_edit fr mt3">编辑</a>
<span class="nolink_btn fr mr5">开启匿评</span>
<h4 class="r_txt_tit mb5">
<%= @homework.name%>
</h4>
<%= homework_anonymous_comment(@homework)%>
<%= link_to(l(:button_edit),edit_homework_common_path(@homework), :class => "fr mr10 work_edit") %>
<div class="cl"></div>
<p id="news_description" class="news_description mt5">项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题</p>
<a href="javascript:void(0);" class=" c_blue" onclick="show_more_msg02();">[展开]</a>
<div id="bid_description_<%= @homework.id%>" class="mt5 upload_img">
<%= @homework.description.html_safe %>
</div>
<div class="cl"></div>
<span class="fl">截止时间:2015-04-02</span>
<span class="fl">截止时间:<%= @homework.end_time%></span>
<div >
<form name="formnow" class="fr">
<input class="c_red " name="dd" type="text" style="border:0;" size="1" > 天
<input class="c_red " name="hh" type="text" style="border:0;" size="1"> 小时
<input class="c_red " name="mm" type="text" style="border:0;" size="1"> 分
<input class="c_red " name="ss" type="text" style="border:0;" size="1"> 秒
</form>
<p class="fr">作业提交还剩:</p>
<% if betweentime(@homework.end_time) < 0 %>
<span class='fr mr10 c_red '>
<%= l(:label_commit_limit)%>
</span>
<% else %>
<script type="text/javascript">
window.setInterval(function(){show_bid_dead_line(<%= @homework.end_time.year%>,<%= @homework.end_time.month%>,<%= @homework.end_time.day + 1%>,"bid_deadline_<%= @homework.id%>");},1000)
</script>
<div id="bid_deadline_<%= @homework.id%>">
</div>
<% end %>
</div>
</div> <!--problem_txt end-->
<div class="cl"></div>
</div><!--problem_main end-->
<div class="problem_main mt10" style="display:none;">
<a class="problem_pic fl"><img src="images/courses/pic_01.jpg" width="42" height="42" /></a>
<div class="problem_txt fl mt5">
<h4 class="r_txt_tit mb5"> 请以下同学重新提交作业ppt只要更新附件不要删除作否则否则否则评分就丢了</h4>
<a class="talk_edit fr mt3">编辑</a>
<a href="javascript:void(0);" class=" work_edit fr mr5">关闭匿评</a>
<div class="cl"></div>
<p class=" mt5">项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题个数显示问题项目问题个数显示问题项目问题个数显题个数显示问题<br /> 创建时间 2014-11-26 10:19</p>
<span class="fr c_red">已截止,但可补交。</span>
</div>
<div class="cl"></div>
</div><!--课程动态 end-->
</div><!---tbc_02 end-->

View File

@ -792,7 +792,7 @@ function clickOK(path)
}
});
}
//查询
function SearchByName(obj,url,event)
{
var keycode = (event.keyCode ? event.keyCode : event.which);

View File

@ -355,7 +355,7 @@ a:hover.st_add{ color:#ff8e15;}
.upload_box{ width:430px; margin:15px auto;}
a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
.r_txt_tit{width:500px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#09658c; font-size:14px;}
.r_txt_tit{max-width:480px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#09658c; font-size:14px;}
blockquote {background: #eeeeee;padding: 10px;margin-bottom: 10px;word-break: break-all;word-wrap: break-word;}
.respond-form{display: none;margin: auto;clear: both;}