Merge branch 'Homework' of http://repository.trustie.net/xianbo/trustie2 into Homework
This commit is contained in:
commit
58295bc97a
|
@ -200,7 +200,7 @@ class BidsController < ApplicationController
|
|||
flash[:notice] = l(:label_bid_succeed)
|
||||
end
|
||||
end
|
||||
redirect_to respond_path(@homework)
|
||||
redirect_to course_for_bid_path(@homework)
|
||||
else
|
||||
@bid.safe_attributes = params[:bid]
|
||||
@courses = []
|
||||
|
|
|
@ -374,6 +374,7 @@ class HomeworkAttachController < ApplicationController
|
|||
@teaher_score = teacher_score_for_homework @homework
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js
|
||||
end
|
||||
else
|
||||
|
|
|
@ -138,7 +138,7 @@ module StoresHelper
|
|||
return [link_to('unkown', '#')]
|
||||
end
|
||||
bid_list = link_to l(:label_homework), homework_course_path(bid.courses.first)
|
||||
bid_item = link_to bid.name, respond_path(bid)
|
||||
bid_item = link_to bid.name, course_for_bid_path(bid)
|
||||
return project_link(bid.courses.first).push(bid_list, bid_item)
|
||||
else
|
||||
xxx
|
||||
|
|
|
@ -77,10 +77,10 @@
|
|||
<% end %>
|
||||
</span>
|
||||
<span class="font_lighter">
|
||||
<%= l(:label_x_responses, :count => bid.commit) %>
|
||||
<%= l(:label_students_responses) %>
|
||||
(
|
||||
<strong>
|
||||
<%= bid.commit %>
|
||||
<%= bid.commit.nil? ? bid.commit : 0 %>
|
||||
</strong>
|
||||
)
|
||||
</span>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div style="text-align: center;">评分:
|
||||
<div>评分:
|
||||
<%= rating_for homework, dimension: :quality, class: 'rateable div_inline' %>
|
||||
<span style="font-size: 11px">(您可以对作业进行多次评价,以最后一次评价为最终结果)</span>
|
||||
<!-- <span style="font-size: 11px">(您可以对作业进行多次评价,以最后一次评价为最终结果)</span>-->
|
||||
</div>
|
|
@ -11,10 +11,10 @@
|
|||
</font>)
|
||||
</span><span class="fr">
|
||||
按
|
||||
<%= link_to l(:label_work_rating), sort_homework_path(@bid, 'socre', @direction), {:remote => true}%>
|
||||
/
|
||||
<%= link_to l(:label_time), sort_homework_path(@bid, 'time', @direction), {:remote => true}%>
|
||||
<%= l(:label_sort) %>
|
||||
<%= link_to l(:label_work_rating), sort_homework_path(@bid, 'socre', @direction), {:remote => true}%>
|
||||
/
|
||||
<%= link_to l(:label_time), sort_homework_path(@bid, 'time', @direction), {:remote => true}%>
|
||||
<%= l(:label_sort) %>
|
||||
</span>
|
||||
</div>
|
||||
<% end %>
|
||||
|
@ -43,7 +43,7 @@
|
|||
<ul id="homework_li_<%= homework.id%>">
|
||||
<%= render :partial => 'homework_attach/homework',
|
||||
:locals => {:homework => homework, :is_student_batch_homework => is_student_batch_homework,
|
||||
:is_my_homework => is_my_homework, :is_teacher => is_teacher}%>
|
||||
:is_my_homework => is_my_homework, :is_teacher => is_teacher}%>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
@ -54,4 +54,4 @@
|
|||
<ul class="wlist">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => remote, :flag => true%>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,51 +1,58 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>作业评分弹框</title>
|
||||
<link href="css.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" language="javascript">
|
||||
<script type="text/javascript" language="javascript">
|
||||
//<!CDATA[
|
||||
function g(o){return document.getElementById(o);}
|
||||
function HoverLi(n){
|
||||
//如果有N个标签,就将i<=N;
|
||||
for(var i=6;i<=7;i++){g('ping_tb_'+i).className='ping_normaltab';g('tbc_0'+i).className='ping_undis';}g('tbc_0'+n).className='ping_dis';g('ping_tb_'+n).className='ping_hovertab';
|
||||
for(var i=1;i<=2;i++){g('ping_tb_'+i).className='ping_normaltab';g('tbc_0'+i).className='ping_undis';}g('tbc_0'+n).className='ping_dis';g('ping_tb_'+n).className='ping_hovertab';
|
||||
}
|
||||
//如果要做成点击后再转到请将<li>中的onmouseover 改成 onclick;
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="popbox">
|
||||
<!--<div class="alert" style="position: fixed;">-->
|
||||
<!--<div>-->
|
||||
|
||||
<!--<span class="close" style="display: block;" onclick="pupclose()"></span>-->
|
||||
<!--</div>-->
|
||||
<!--</div> <!–-- alert end--–>-->
|
||||
<div class="ping_con">
|
||||
<h2>科大校园助手最终提交文档及源码</h2>
|
||||
<h2><%= @homework.name %></h2>
|
||||
<ul>
|
||||
<li>参与人员:<span class="c_grey">gugu02</span></li>
|
||||
<li style=" margin-left:130px;">发布时间:<span class="c_grey" >2014-10-24</span></li>
|
||||
<li><%= l(:label_create_person) %>:<span class="c_grey"><%= link_to @homework.user, user_path(@homework.user)%></span></li>
|
||||
<li style=" margin-left:130px;"><%= l(:label_activity_time) %>:<span class="c_grey" ><%=format_time @homework.created_at %></span></li>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<p>我写了一个验证身份证号码的程序,它是以一定内存空间(大概100M)换取cpu消耗,然后它的运算量就降低了,前十四位的验证就相当于转换类型再查表一样,所以它的验证号码速度比一般的方式快。如果还不明白就说明你写框架写多了,或者你不了解java基础。测试结果只代表算法效率,测一个号码是因为正确号码运算次数基本相同,如果你们用自己的电脑测,13亿次循环应该不到1分钟。这种设计思路,也可以套式信息验证上去。</p>
|
||||
<p style=" border-bottom:none; color:#333; margin-top:8px;" ><strong>附件:</strong><span><a href="#">附件1</a>,<a href="#">附件2</a>,<a href="#">附件3</a>,<a href="#">附件4</a>,<a href="#">附件5</a>,</span></p>
|
||||
<% if @homework.users.count > 0 %>
|
||||
<div><%= l(:label_participation_person) %>:
|
||||
<% @homework.users.each do |homework_user| %>
|
||||
<span class="c_grey"><%= link_to homework_user, user_path(homework_user)%></span>
|
||||
<% if @homework.users.count > 1 && homework_user != @homework.users.last %>
|
||||
、
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<p>
|
||||
<% if @homework.description != nil && @homework.description != "" %>
|
||||
<%= @homework.description %>
|
||||
<% else %>
|
||||
<div style="font-size: 15px;color: #15BCCC;vertical-align:middle;padding-top: 10px;padding-left: 10px ">
|
||||
<strong><%= l(:label_homework_without_description) %></strong>
|
||||
</div>
|
||||
<% end %>
|
||||
</p>
|
||||
<p style=" border-bottom:none; color:#333; margin-top:8px;"><strong><%= l(:label_attachment) %>:
|
||||
</strong>
|
||||
<span>
|
||||
<% if @is_evaluation || is_teacher%>
|
||||
<% options = {:author => true } %>
|
||||
<%= render :partial => 'app_link', :locals => {:attachments => @homework.attachments, :options => options} %>
|
||||
<% else %>
|
||||
<%= l(:label_cant_download) %>
|
||||
<% end %>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<div class="ping_star">
|
||||
评分:
|
||||
<span class="star01"><a href="#"></a></span>
|
||||
<span class="star02"><a href="#"></a></span>
|
||||
<span class="star03"><a href="#"></a></span>
|
||||
<span class="star04"><a href="#"></a></span>
|
||||
<span class="star05"><a href="#"></a></span>
|
||||
评分:
|
||||
<%= rating_for @homework, dimension: :quality, class: 'rateable div_inline' %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<textarea id="ta_msg_content" name="content" placeholder="最多250个字" ></textarea>
|
||||
<textarea id="ta_msg_content" name="content" placeholder="最多250个字"></textarea>
|
||||
<a href="#" class="ping_sub">提交评论</a>
|
||||
<div class="cl"></div>
|
||||
</div><!---ping_con end--->
|
||||
|
@ -53,24 +60,20 @@
|
|||
<div class="ping_list">
|
||||
<div id="ping_tb_" class="ping_tb_">
|
||||
<ul>
|
||||
<li id="ping_tb_6" class="ping_hovertab" onmouseover="x:HoverLi(1);">
|
||||
<li id="ping_tb_1" class="ping_hovertab" onmouseover="x:HoverLi(1);">
|
||||
全部评论(<span class="c_red">30</span>)</li>
|
||||
<li id="ping_tb_7" class="ping_normaltab" onmouseover="i:HoverLi(2);">
|
||||
<li id="ping_tb_2" class="ping_normaltab" onmouseover="i:HoverLi(2);">
|
||||
教师评论(<span class="c_red">30</span>)</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="ping_ctt">
|
||||
<div class="ping_dis" id="tbc_06">
|
||||
<div class="ping_dis" id="tbc_01">
|
||||
<div class="ping_C">
|
||||
<div class="ping_dispic">
|
||||
<a href="#" target="_blank">
|
||||
<%= image_tag(url_to_avatar(User.current), :width => "46", :height => "46") %>
|
||||
</a>
|
||||
</div>
|
||||
<div class="ping_dispic"><a href="#" target="_blank"><img src="images/225905790.jpg" width="46" height="46"></a></div>
|
||||
<div class="ping_discon">
|
||||
<div class="ping_distop">
|
||||
<span><a href="#" target="_blank" style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" >gugu01</a></span><span style="color:#a6a6a6; margin-right:40px; margin-left:30px;" >2014-10-24</span><span style="font-weight:bold; color:#a6a6a6; " >评分:<a href="#"></a><a href="#"></a><a href="#"></a><a href="#"></a><a href="#"></a></span>
|
||||
<span><a href="#" target="_blank" style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;">gugu01</a></span><span style="color:#a6a6a6; margin-right:40px; margin-left:30px;">2014-10-24</span><span style="font-weight:bold; color:#a6a6a6; ">评分:<a href="#"></a><a href="#"></a><a href="#"></a><a href="#"></a><a href="#"></a></span>
|
||||
<div class="cl"></div>
|
||||
<p>我写了一个验证身份证号码的程序,它是以一定内存空间(大概100M)换取cpu消耗,然后它的运算量就降低了,前十四位的验证就相当于转换类型再查表一样,所以它的验证号码速度比一般的方式快。如果还不明白就说明你写框架写多了,或者</p>
|
||||
</div>
|
||||
|
@ -80,17 +83,17 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="ping_C">
|
||||
<div class="ping_dispic"><a href="#" target="_blank"><%= image_tag(url_to_avatar(User.current), :width => "46", :height => "46") %></a></div>
|
||||
<div class="ping_dispic"><a href="#" target="_blank"><img src="images/225905790.jpg" width="46" height="46"></a></div>
|
||||
<div class="ping_discon">
|
||||
<div class="ping_distop">
|
||||
<span><a href="#" target="_blank" style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" >gugu01</a></span><span style="color:#a6a6a6; margin-right:40px; margin-left:30px;" >2014-10-24</span><span style="font-weight:bold; color:#a6a6a6; " >评分:<a href="#"></a><a href="#"></a><a href="#"></a><a href="#"></a><a href="#"></a></span>
|
||||
<span><a href="#" target="_blank" style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;">gugu01</a></span><span style="color:#a6a6a6; margin-right:40px; margin-left:30px;">2014-10-24</span><span style="font-weight:bold; color:#a6a6a6; ">评分:<a href="#"></a><a href="#"></a><a href="#"></a><a href="#"></a><a href="#"></a></span>
|
||||
<div class="cl"></div>
|
||||
<p>我写了一个验证身份证号码的程序,它是以一定内存空间(大概100M)换取cpu消耗,然后它的运算量就降低了,前十四位的验证就相当于转换类型再查表一样,所以它的验证号码速度比一般的方式快。如果还不明白就说明你写框架写多了,或者</p>
|
||||
</div>
|
||||
<div class="ping_disfoot"><a href="#">删除</a><a href="#">回复</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="recall">
|
||||
<div class="recall_head"><a href="#" target="_blank"><%= image_tag(url_to_avatar(User.current), :width => "30", :height => "30") %></a></div>
|
||||
<div class="recall_head"><a href="#" target="_blank"><img src="images/225905790.jpg" width="30" height="30"></a></div>
|
||||
<div class="recall_con">
|
||||
<a href="#">jack</a> 回复 <a href="#">jack</a>:
|
||||
<p>我们尽快修复,此问题已发现原因,测试后我们尽快上线。谢谢反馈!!</p>
|
||||
|
@ -100,7 +103,7 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="recall">
|
||||
<div class="recall_head"><a href="#" target="_blank"><%= image_tag(url_to_avatar(User.current), :width => "30", :height => "30") %></a></div>
|
||||
<div class="recall_head"><a href="#" target="_blank"><img src="images/225905790.jpg" width="30" height="30"></a></div>
|
||||
<div class="recall_con">
|
||||
<a href="#">jack</a> 回复 <a href="#">jack</a>:
|
||||
<p>我们尽快修复,此问题已发现原因,测试后我们尽快上线。谢谢反馈!!</p>
|
||||
|
@ -115,10 +118,10 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="ping_C">
|
||||
<div class="ping_dispic"><a href="#" target="_blank"><%= image_tag(url_to_avatar(User.current), :width => "46", :height => "46") %></a></div>
|
||||
<div class="ping_dispic"><a href="#" target="_blank"><img src="images/225905790.jpg" width="46" height="46"></a></div>
|
||||
<div class="ping_discon">
|
||||
<div class="ping_distop">
|
||||
<span><a href="#" target="_blank" style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" >gugu01</a></span><span style="color:#a6a6a6; margin-right:40px; margin-left:30px;" >2014-10-24</span><span style="font-weight:bold; color:#a6a6a6; " >评分:<a href="#"></a><a href="#"></a><a href="#"></a><a href="#"></a><a href="#"></a></span>
|
||||
<span><a href="#" target="_blank" style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;">gugu01</a></span><span style="color:#a6a6a6; margin-right:40px; margin-left:30px;">2014-10-24</span><span style="font-weight:bold; color:#a6a6a6; ">评分:<a href="#"></a><a href="#"></a><a href="#"></a><a href="#"></a><a href="#"></a></span>
|
||||
<div class="cl"></div>
|
||||
<p>我写了一个验证身份证号码的程序,它是以一定内存空间(大概100M)换取cpu消耗,然后它的运算量就降低了,前十四位的验证就相当于转换类型再查表一样,所以它的验证号码速度比一般的方式快。如果还不明白就说明你写框架写多了,或者</p>
|
||||
</div>
|
||||
|
@ -131,12 +134,12 @@
|
|||
|
||||
</div><!--全部评论end-->
|
||||
|
||||
<div class="ping_undis" id="tbc_07">
|
||||
<div class="ping_undis" id="tbc_02">
|
||||
<div class="ping_C">
|
||||
<div class="ping_dispic"><a href="#" target="_blank"><%= image_tag(url_to_avatar(User.current), :width => "46", :height => "46") %></a></div>
|
||||
<div class="ping_dispic"><a href="#" target="_blank"><img src="images/225905790.jpg" width="46" height="46"></a></div>
|
||||
<div class="ping_discon">
|
||||
<div class="ping_distop">
|
||||
<span><a href="#" target="_blank" style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" >gugu01</a></span><span style="color:#a6a6a6; margin-right:40px; margin-left:30px;" >2014-10-24</span><span style="font-weight:bold; color:#a6a6a6; " >评分:<a href="#"></a><a href="#"></a><a href="#"></a><a href="#"></a><a href="#"></a></span>
|
||||
<span><a href="#" target="_blank" style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;">gugu01</a></span><span style="color:#a6a6a6; margin-right:40px; margin-left:30px;">2014-10-24</span><span style="font-weight:bold; color:#a6a6a6; ">评分:<a href="#"></a><a href="#"></a><a href="#"></a><a href="#"></a><a href="#"></a></span>
|
||||
<div class="cl"></div>
|
||||
<p>我写了一个验证身份证号码的程序,它是以一定内存空间(大概100M)换取cpu消耗,然后它的运算量就降低了,多了,或者</p>
|
||||
</div>
|
||||
|
@ -154,7 +157,3 @@
|
|||
</div>
|
||||
|
||||
</div><!---ping_list end--->
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'show') %>');
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'show',:locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework, :teaher_score => @teaher_score}) %>');
|
||||
showModal('ajax-modal', '503px');
|
||||
$('#ajax-modal').css('height','569px');
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<div class="homeworks panel panel-default ">
|
||||
<div class="homeworks panel-heading">
|
||||
<div class="panel-title">
|
||||
<%= link_to homework.name, respond_path(homework) %>(<%=homework.homeworks.count %>)<%#Bid%>
|
||||
<%= link_to homework.name, course_for_bid_path(homework) %>(<%=homework.homeworks.count %>)<%#Bid%>
|
||||
<%#= link_to "打包下载", zipdown_assort_path(obj_class: homework.class, obj_id: homework.id), :class => "btn btn-primary btn-sm" %><br/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<table border="0">
|
||||
|
||||
<tr>
|
||||
<td> <% if bid.reward_type.nil? or bid.reward_type == 1 %> <strong><%= l(:label_bids_reward_method) %><span style="color: #ed8924;font-family: 14px; font-family: 微软雅黑"><%= l(:label_call_bonus) %> <%= l(:label_RMB_sign) %><%= bid.budget%></span></strong> <% elsif bid.reward_type == 2 %> <strong><%= l(:label_bids_reward_method) %><span style="color: #15bccf;font-family: 14px; font-family: 微软雅黑"><%= bid.budget%></span></strong> <% else %> <!-- <strong><%= l(:label_bids_reward_method) %><span style="color: #00aa83;font-family: 14px; font-family: 微软雅黑"><%= l(:label_bids_credit) %> <%= bid.budget%> <%= l(:label_bids_credit_number) %></span></strong> --> <% end %> <!-- <td style="color: rgb(255, 0, 0);"><strong><%= l(:label_price) %><%= l(:label_RMB_sign) %><%= bid.budget%></strong></td> --></td>
|
||||
<td> <% if bid.reward_type.nil? or bid.reward_type == 1 %> <strong><%= l(:label_bids_reward_method) %><span style="color: #ed8924;font-family: 14px; font-family: 微软雅黑;"><%= l(:label_call_bonus) %> <%= l(:label_RMB_sign) %><%= bid.budget%></span></strong> <% elsif bid.reward_type == 2 %> <strong><%= l(:label_bids_reward_method) %><span style="color: #15bccf;font-family: 14px; font-family: 微软雅黑"><%= bid.budget%></span></strong> <% else %> <!-- <strong><%= l(:label_bids_reward_method) %><span style="color: #00aa83;font-family: 14px; font-family: 微软雅黑"><%= l(:label_bids_credit) %> <%= bid.budget%> <%= l(:label_bids_credit_number) %></span></strong> --> <% end %> <!-- <td style="color: rgb(255, 0, 0);"><strong><%= l(:label_price) %><%= l(:label_RMB_sign) %><%= bid.budget%></strong></td> --></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_lighter">
|
||||
|
|
|
@ -1844,4 +1844,7 @@ en:
|
|||
lable_school_list: List of schools
|
||||
button_delete_file: delete
|
||||
label_attachment: attachment
|
||||
label_max_length: A maximum of 250 characters
|
||||
label_max_length: A maximum of 250 characters
|
||||
label_create_person: Create personnel
|
||||
label_participation_person: The participation of personnel
|
||||
label_homework_without_description: The homework without any description!
|
|
@ -1487,10 +1487,7 @@ zh:
|
|||
one: 留言
|
||||
other: 留言
|
||||
#end
|
||||
label_x_responses: #modify by huang
|
||||
zero: 学生提问
|
||||
one: 学生提问
|
||||
other: 学生提问
|
||||
label_students_responses: 学生提问
|
||||
#end
|
||||
label_x_bids_responses: #modify by huang
|
||||
zero: 用户反馈
|
||||
|
@ -2179,3 +2176,6 @@ zh:
|
|||
label_time: 时间
|
||||
label_attachment: 附件
|
||||
label_max_length: 最多250个字
|
||||
label_create_person: 创建人员
|
||||
label_participation_person: 参与人员
|
||||
label_homework_without_description: 该作业无任何描述!
|
||||
|
|
|
@ -748,7 +748,7 @@ RedmineApp::Application.routes.draw do
|
|||
# added by young
|
||||
match 'calls', :to => 'bids#index'
|
||||
|
||||
#match 'calls/:id', :to => 'bids#show', :as => 'respond'
|
||||
match 'calls/:id', :to => 'bids#show', :as => 'respond'
|
||||
# modified by longjun
|
||||
# bids#contests is not exist
|
||||
# match 'contest', :to => 'bids#contests', :as => 'contest' #modified @20140403
|
||||
|
|
Loading…
Reference in New Issue