2015-05-19 17:12:43 +08:00
|
|
|
|
<div class="project_r_h">
|
|
|
|
|
<h2 class="project_h2">
|
|
|
|
|
<%= l(:label_homework)%>
|
|
|
|
|
</h2>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="talk_top">
|
|
|
|
|
<p class="fl">
|
|
|
|
|
<%= l(:label_totle)%>
|
|
|
|
|
<span><%= @obj_count%></span>
|
|
|
|
|
<%= l(:label_homework_count)%>
|
|
|
|
|
</p>
|
|
|
|
|
<%= link_to( l(:label_course_homework_new), new_homework_common_path(:course => @course.id), :class => 'problem_new_btn fl c_dorange') if @is_teacher %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<% @homeworks.each do |homework|%>
|
|
|
|
|
<div class="problem_main">
|
|
|
|
|
<%= 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">
|
2015-06-05 14:39:37 +08:00
|
|
|
|
<%= link_to(homework.user.lastname+homework.user.firstname, user_path(homework.user),:class => 'problem_name fl',:target => "_blank") %>
|
2015-05-19 17:12:43 +08:00
|
|
|
|
<span class="fl"> <%= l(:label_user_create_project_homework) %>:</span>
|
2015-06-05 14:39:37 +08:00
|
|
|
|
<%= link_to(homework.name, student_work_index_path(:homework => homework.id), :class => 'problem_tit fl fb c_dblue',:target => "_blank") %>
|
2015-05-19 17:12:43 +08:00
|
|
|
|
<div class="cl mb5"></div>
|
|
|
|
|
<p class="fl ">
|
|
|
|
|
<%= l(:lebel_homework_commit)%>
|
|
|
|
|
( <%= link_to homework.student_works.count, student_work_index_path(:homework => homework.id), :class => 'c_red'%> )
|
|
|
|
|
</p>
|
|
|
|
|
<% if @is_teacher%>
|
|
|
|
|
<%= homework_anonymous_comment(homework)%>
|
2015-05-28 14:13:47 +08:00
|
|
|
|
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %>
|
2015-05-19 17:12:43 +08:00
|
|
|
|
<%= link_to(l(:button_edit),edit_homework_common_path(homework), :class => "fr mr10 work_edit") %>
|
|
|
|
|
<% elsif @is_student%>
|
|
|
|
|
<%= student_anonymous_comment homework %>
|
|
|
|
|
<%= student_new_homework homework %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<script>
|
2015-06-02 16:45:44 +08:00
|
|
|
|
$(function(){if($("#bid_description_<%= homework.id%>_content").height()>360){$("#bid_show_more_des_button<%= homework.id%>").show();}});
|
2015-05-19 17:12:43 +08:00
|
|
|
|
</script>
|
|
|
|
|
<div id="bid_description_<%= homework.id%>" class="news_description mt5">
|
|
|
|
|
<div id="bid_description_<%= homework.id%>_content" class="upload_img">
|
|
|
|
|
<%= homework.description.html_safe %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2015-06-30 10:18:46 +08:00
|
|
|
|
<div class="cl"></div>
|
2015-06-10 16:37:18 +08:00
|
|
|
|
|
2015-06-30 10:18:46 +08:00
|
|
|
|
<div class="news_foot currentDd fr" id="bid_show_more_des_button<%= homework.id%>" onclick="bid_show_more_des(<%= homework.id%>);" style="cursor:pointer;display: none;">
|
2015-06-10 16:37:18 +08:00
|
|
|
|
[展开]
|
2015-05-19 17:12:43 +08:00
|
|
|
|
</div>
|
2015-06-03 09:59:15 +08:00
|
|
|
|
<div class="cl"></div>
|
2015-06-30 10:18:46 +08:00
|
|
|
|
|
2015-06-03 09:59:15 +08:00
|
|
|
|
<div class="mt5">
|
|
|
|
|
<% unless homework.attachments.empty?%>
|
|
|
|
|
<span class="tit_fb" style="width: auto;"> 附件:</span>
|
|
|
|
|
<div class="fl mb5">
|
|
|
|
|
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => homework.attachments} %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end%>
|
|
|
|
|
</div>
|
2015-07-04 11:37:43 +08:00
|
|
|
|
<div class="cl"></div>
|
2015-06-03 09:59:15 +08:00
|
|
|
|
|
2015-07-04 11:37:43 +08:00
|
|
|
|
<div class="mt5">
|
|
|
|
|
<span class="tit_fb" style="width: auto;"> 扣分标准:</span>
|
|
|
|
|
<div class="fl mb5 c_red">
|
|
|
|
|
迟交扣分
|
|
|
|
|
<%= homework.late_penalty%>
|
|
|
|
|
分
|
|
|
|
|
<% if homework.homework_type == 1%>
|
|
|
|
|
,缺评一个作品扣
|
|
|
|
|
<%= homework.homework_detail_manual.absence_penalty%>
|
|
|
|
|
分
|
|
|
|
|
<% else%>
|
|
|
|
|
。
|
|
|
|
|
<% end%>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2015-06-03 09:59:15 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
2015-05-19 17:12:43 +08:00
|
|
|
|
<span class="fl"><%= l(:label_end_time)%>:<%= homework.end_time%></span>
|
|
|
|
|
<% 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 class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<% end%>
|
|
|
|
|
|
|
|
|
|
<ul class="wlist">
|
|
|
|
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
|
|
|
|
</ul>
|
|
|
|
|
<div class="cl"></div>
|