|
|
|
@ -11,12 +11,20 @@
|
|
|
|
|
TO <!--+"(课程名称)" -->
|
|
|
|
|
<%=link_to activity.course.syllabus.title, syllabus_path(activity.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
|
|
|
|
|
<span class="fb" style="color: #269ac9"> • </span>
|
|
|
|
|
<%= link_to activity.course.name.to_s+" | 班级作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue"%>
|
|
|
|
|
<% if hw_status == 3 || hw_status == 5 %>
|
|
|
|
|
<%= link_to activity.course.name, course_path(activity.course_id), :class => "newsBlue"%>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= link_to activity.course.name.to_s+" | 班级作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue"%>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostTitle hidden fl m_w505"> <!--+"(作业名称)"-->
|
|
|
|
|
<%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey"%>
|
|
|
|
|
<% if hw_status == 3 || hw_status == 5 %>
|
|
|
|
|
<% index = get_hw_index(activity, is_teacher) %>
|
|
|
|
|
<%= link_to "<span class='fontBlue2'>作业#{index+1}:</span>".html_safe+activity.name,student_work_index_path(:homework => activity.id),:class => "postGrey"%>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey"%>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<%=get_hw_status(activity).html_safe %>
|
|
|
|
|
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
@ -31,12 +39,12 @@
|
|
|
|
|
<% works = cur_user_works_for_homework activity %>
|
|
|
|
|
<% if works.nil? && projects.nil? %>
|
|
|
|
|
<div class="homepagePostSubmit">
|
|
|
|
|
<%=link_to "关联项目",new_student_work_project_student_work_index_path(:homework => activity.id,:is_in_course=>-1,:user_activity_id=>user_activity_id,:course_activity=>course_activity),remote: true,:class=> 'c_blue', :title=> '请各组长关联作业项目' %>
|
|
|
|
|
<%#= relate_project(activity,is_teacher,-1,user_activity_id,course_activity) %>
|
|
|
|
|
<%=link_to "关联项目",new_student_work_project_student_work_index_path(:homework => activity.id,:hw_status=>hw_status,:user_activity_id=>user_activity_id),remote: true,:class=> 'c_blue', :title=> '请各组长关联作业项目' %>
|
|
|
|
|
<%#= relate_project(activity,is_teacher,-1,user_activity_id) %>
|
|
|
|
|
</div>
|
|
|
|
|
<% elsif works.nil? %>
|
|
|
|
|
<div class="homepagePostSubmit">
|
|
|
|
|
<%=link_to "取消关联",cancel_relate_project_student_work_index_path(:homework => activity.id,:is_in_course=>-1,:user_activity_id=>user_activity_id,:course_activity=>course_activity), :confirm => "您确定要取消关联吗?", remote: true,:class => "c_blue", :title=> '取消关联项目' %>
|
|
|
|
|
<%=link_to "取消关联",cancel_relate_project_student_work_index_path(:homework => activity.id,:hw_status=>hw_status,:user_activity_id=>user_activity_id), :confirm => "您确定要取消关联吗?", remote: true,:class => "c_blue", :title=> '取消关联项目' %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
@ -76,6 +84,11 @@
|
|
|
|
|
<% elsif activity.homework_detail_manual && activity.homework_detail_manual.comment_status >= 2 && activity.anonymous_comment == 0%>
|
|
|
|
|
<div class="homepagePostDeadline">匿评截止时间:<%= activity.homework_detail_manual.evaluation_end.to_s %> 23:59</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if activity.homework_detail_manual.comment_status == 0 && !activity.publish_time.nil? %>
|
|
|
|
|
<div class="homepagePostDeadline ml15">
|
|
|
|
|
<%= l(:label_publish_time)%>:<%= activity.publish_time%> 00:00
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.description} %>
|
|
|
|
|
|
|
|
|
@ -227,35 +240,35 @@
|
|
|
|
|
<li class="homepagePostSettingIcon">
|
|
|
|
|
<ul class="homepagePostSettiongText">
|
|
|
|
|
<li>
|
|
|
|
|
<%= link_to l(:button_edit),edit_homework_common_path(activity,:is_in_course => -1,:course_activity=>course_activity), :class => "postOptionLink"%>
|
|
|
|
|
<%= link_to l(:button_edit),edit_homework_common_path(activity, :hw_status => hw_status), :class => "postOptionLink"%>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<%= link_to(l(:label_bid_respond_delete), homework_common_path(activity,:is_in_course => -1,:course_activity=>course_activity),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
|
|
|
|
|
<%= link_to(l(:label_bid_respond_delete), homework_common_path(activity, :hw_status => hw_status),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<%= link_to("评分设置", score_rule_set_homework_common_path(activity,:user_activity_id => user_activity_id, :is_in_course => -1,:course_activity=>course_activity),:class => "postOptionLink", :remote => true) %>
|
|
|
|
|
<%= link_to("评分设置", score_rule_set_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "postOptionLink", :remote => true) %>
|
|
|
|
|
</li>
|
|
|
|
|
<% if activity.anonymous_comment == 0 %>
|
|
|
|
|
<li>
|
|
|
|
|
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(activity,:user_activity_id => user_activity_id, :is_in_course => -1,:course_activity=>course_activity),:class => "postOptionLink", :remote => true) if activity.homework_detail_manual.comment_status == 1%>
|
|
|
|
|
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "postOptionLink", :remote => true) if activity.homework_detail_manual.comment_status == 1%>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<%= homework_anonymous_comment activity,-1,user_activity_id,course_activity %>
|
|
|
|
|
<%= homework_anonymous_comment activity,hw_status,user_activity_id %>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if activity.anonymous_comment == 0 && (comment_status == 0 || comment_status == 1)%>
|
|
|
|
|
<li>
|
|
|
|
|
<%= link_to("禁用匿评", alert_forbidden_anonymous_comment_homework_common_path(activity,:user_activity_id => user_activity_id,:course_activity=>course_activity),:class => "postOptionLink",
|
|
|
|
|
<%= link_to("禁用匿评", alert_forbidden_anonymous_comment_homework_common_path(activity,:user_activity_id => user_activity_id),:class => "postOptionLink",
|
|
|
|
|
:title => "匿评是同学之间的双盲互评过程:每个同学将评阅系统分配给他/她的若干个作品", :remote => true)%>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if (activity.anonymous_comment == 1 && activity.is_open == 0) || (activity.anonymous_comment == 0 && comment_status == 3 && activity.is_open == 0) %>
|
|
|
|
|
<li>
|
|
|
|
|
<%= link_to("公开作品", alert_open_student_works_homework_common_path(activity,:user_activity_id => user_activity_id, :is_in_course => -1,:course_activity=>course_activity),:class => "postOptionLink", :remote => true)%>
|
|
|
|
|
<%= link_to("公开作品", alert_open_student_works_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "postOptionLink", :remote => true)%>
|
|
|
|
|
</li>
|
|
|
|
|
<% elsif activity.is_open == 1 %>
|
|
|
|
|
<li>
|
|
|
|
|
<%= link_to("取消公开", alert_open_student_works_homework_common_path(activity,:user_activity_id => user_activity_id, :is_in_course => -1,:course_activity=>course_activity),:class => "postOptionLink", :remote => true)%>
|
|
|
|
|
<%= link_to("取消公开", alert_open_student_works_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "postOptionLink", :remote => true)%>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
@ -269,12 +282,12 @@
|
|
|
|
|
|
|
|
|
|
<% count=activity.journals_for_messages.count %>
|
|
|
|
|
<div class="homepagePostReply">
|
|
|
|
|
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :is_in_course => -1,:course_activity=>course_activity} %>
|
|
|
|
|
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :hw_status => hw_status} %>
|
|
|
|
|
|
|
|
|
|
<% comments = activity.journals_for_messages.reorder("created_on desc").limit(3) %>
|
|
|
|
|
<% if count > 0 %>
|
|
|
|
|
<div class="" id="reply_div_<%= user_activity_id %>">
|
|
|
|
|
<%=render :partial => 'users/news_replies', :locals => {:comments => comments, :type => 'HomeworkCommon', :is_in_course => -1,:course_activity=>course_activity, :is_teacher => is_teacher, :user_activity_id => user_activity_id, :activity_id => activity.id} %>
|
|
|
|
|
<%=render :partial => 'users/news_replies', :locals => {:comments => comments, :type => 'HomeworkCommon', :hw_status => hw_status, :is_teacher => is_teacher, :user_activity_id => user_activity_id, :activity_id => activity.id} %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
@ -285,7 +298,7 @@
|
|
|
|
|
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
|
|
|
|
<%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_homework_message', :id => activity.id},:method => "post", :remote => true) do |f|%>
|
|
|
|
|
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
|
|
|
|
|
<%= hidden_field_tag 'course_activity',params[:course_activity],:value =>course_activity %>
|
|
|
|
|
<%= hidden_field_tag 'hw_status',params[:hw_status],:value =>hw_status %>
|
|
|
|
|
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
|
|
|
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="homework_message"></textarea>
|
|
|
|
|
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
|
|
|
|