|
|
|
@ -12,10 +12,10 @@
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= link_to activity.try(:user).try(:realname), user_url_in_org(activity.user_id), :class => "newsBlue mr15" %>
|
|
|
|
|
<% end %> TO <!--+"(课程名称)" -->
|
|
|
|
|
<%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
|
|
|
|
|
<%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_url_in_org(activity.course.id), :class => "newsBlue ml15"%>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostTitle hidden m_w505 fl"> <!--+"(作业名称)"-->
|
|
|
|
|
<%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey"%>
|
|
|
|
|
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :class => "postGrey"%>
|
|
|
|
|
</div>
|
|
|
|
|
<% if activity.homework_detail_manual%>
|
|
|
|
|
<% if activity.homework_detail_manual.comment_status == 1%>
|
|
|
|
@ -47,7 +47,7 @@
|
|
|
|
|
<% end%>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1%>
|
|
|
|
|
<span class="c_red">系统提示:该作业要求各组长<%=link_to "创建项目", new_project_path(:host=>Setting.host_name),:class=>"linkBlue",:title=>"新建项目",:style=>"text-decoration:underline;"%>,组成员加入项目,然后由组长关联项目。谢谢配合!</span>
|
|
|
|
|
<span class="c_red">系统提示:该作业要求各组长<%=link_to "创建项目", "https://www.trustie.net/projects/new",:class=>"c_red",:title=>"新建项目",:style=>"text-decoration:underline;"%>,组成员加入项目,然后由组长关联项目。谢谢配合!</span>
|
|
|
|
|
<% elsif activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 0%>
|
|
|
|
|
<span class="c_red">系统提示:该作业要求各组长提交作品,提交作品时请添加组成员。谢谢配合!</span>
|
|
|
|
|
<% end %>
|
|
|
|
@ -73,7 +73,7 @@
|
|
|
|
|
|
|
|
|
|
<% if activity.homework_type == 2 && is_teacher%>
|
|
|
|
|
<div class="homepagePostSubmit">
|
|
|
|
|
<%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: activity.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %>
|
|
|
|
|
<%= link_to "模拟答题", "https://www.trustie.net/new_user_commit_homework?homework_id="+activity.id.to_s + "&is_test=true", class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if activity.homework_type == 2%>
|
|
|
|
@ -129,7 +129,7 @@
|
|
|
|
|
<% if activity.student_works.count != 0 %>
|
|
|
|
|
<% sw = activity.student_works.reorder("created_at desc").first %>
|
|
|
|
|
<div class="mt10 homepagePostDeadline mb10">
|
|
|
|
|
# <%=time_from_now sw.created_at %><%= link_to sw.user.show_name, user_activities_path(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
|
|
|
|
|
# <%=time_from_now sw.created_at %><%= link_to sw.user.show_name, user_activities_url_in_org(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
@ -141,7 +141,7 @@
|
|
|
|
|
<% last_score = student_work_scores.first %>
|
|
|
|
|
<div>
|
|
|
|
|
<p class="mb10 fontGrey2"># <%=time_from_now last_score.created_at %>
|
|
|
|
|
<%= link_to last_score.user.show_name, user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品,优秀排行:
|
|
|
|
|
<%= link_to last_score.user.show_name, user_activities_url_in_org(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品,优秀排行:
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
@ -154,18 +154,8 @@
|
|
|
|
|
<% end %>
|
|
|
|
|
<% student_works.each_with_index do |sw, i| %>
|
|
|
|
|
<div class="fl mr10 w100" style="text-align:center;">
|
|
|
|
|
<a href="javascript:void(0);" class="linkBlue">
|
|
|
|
|
<% if User.current.member_of_course?(activity.course) || User.current.admin? || activity.is_open == 1 %>
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40"), student_work_index_path(:homework => activity.id), :alt => "学生头像" %>
|
|
|
|
|
<p class="w100 hidden">
|
|
|
|
|
<%= link_to sw.user.show_name, student_work_index_path(:homework => activity.id)%>
|
|
|
|
|
</p>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40", :title => '该作业的作品暂未公开') %>
|
|
|
|
|
<p class="w100 hidden">
|
|
|
|
|
<a href="javascript:void(0);" title="该作业的作品暂未公开"><%=sw.user.show_name %></a>
|
|
|
|
|
</p>
|
|
|
|
|
<% end %>
|
|
|
|
|
<a href="javascript:void(0);" class="linkBlue"><%= link_to image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40"), student_work_index_path(:homework => activity.id), :alt => "学生头像" %>
|
|
|
|
|
<p class="w100 hidden"><%= link_to sw.user.show_name, student_work_index_url_in_org(activity.id)%></p>
|
|
|
|
|
</a>
|
|
|
|
|
<% score = sw.respond_to?("score") ? sw.score : (sw.final_score || 0) - sw.absence_penalty - sw.late_penalty %>
|
|
|
|
|
<p class="fontGrey2">分数:<span class="c_red"><%=format("%.1f",score.to_i<0 ? 0 : score.to_i) %>分</span></p>
|
|
|
|
@ -175,7 +165,7 @@
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if student_works.count > 5 %>
|
|
|
|
|
<%= link_to "更多>>", student_work_index_path(:homework => activity.id),:class=>'linkGrey2 fl ml50',:style=>'margin-top:60px;'%>
|
|
|
|
|
<%= link_to "更多>>", student_work_index_url_in_org(activity.id),:class=>'linkGrey2 fl ml50',:style=>'margin-top:60px;'%>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
@ -187,7 +177,7 @@
|
|
|
|
|
<% sort_projects = project_sort_update projects %>
|
|
|
|
|
<div class="mt10 relatePWrap" id="relatePWrap_<%=user_activity_id %>">
|
|
|
|
|
<div class="mr5 fontGrey2">
|
|
|
|
|
# <%=time_from_now sort_projects.first.updated_at %><%= link_to User.find(sort_projects.first.user_id).show_name, user_activities_path(sort_projects.first.user_id), :class => "newsBlue ml5 mr5"%>更新了项目,最近更新:
|
|
|
|
|
# <%=time_from_now sort_projects.first.updated_at %><%= link_to User.find(sort_projects.first.user_id).show_name, user_activities_url_in_org(sort_projects.first.user_id), :class => "newsBlue ml5 mr5"%>更新了项目,最近更新:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<% sort_projects.each_with_index do |pro, i| %>
|
|
|
|
@ -204,7 +194,7 @@
|
|
|
|
|
|
|
|
|
|
<div class="mr10 mb10 mt10 fl w100 fontGrey2" style="text-align: center;">
|
|
|
|
|
<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像" %>
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_url_in_org(project.id),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像" %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius",:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像") %>
|
|
|
|
|
<% end %>
|
|
|
|
@ -237,17 +227,17 @@
|
|
|
|
|
<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),Setting.protocol + "://" + Setting.host_name + "/homework_common/" + activity.id.to_s + "/edit?", :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), Setting.protocol + "://" + Setting.host_name + "/homework_common/" + activity.id.to_s + "?is_in_course=-1&course_activity=" + course_activity.to_s,: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 => 0),:class => "postOptionLink", :remote => true) %>
|
|
|
|
|
<%= link_to("评分设置", Setting.protocol + "://" + Setting.host_name + "/homework_common/" + activity.id.to_s + "/score_rule_set?is_in_course=0&user_activity_id=" + user_activity_id.to_s,:class => "postOptionLink", :remote => true) %>
|
|
|
|
|
</li>
|
|
|
|
|
<% if activity.anonymous_comment == 0 %>
|
|
|
|
|
<li>
|
|
|
|
|
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(activity),:class => "postOptionLink", :remote => true) if activity.homework_detail_manual.comment_status == 1%>
|
|
|
|
|
<%= link_to("匿评设置", Setting.protocol + "://" + Setting.host_name + "/homework_common/" + activity.id.to_s + "/start_evaluation_set",:class => "postOptionLink", :remote => true) if activity.homework_detail_manual.comment_status == 1%>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<%= homework_anonymous_comment activity,-1,user_activity_id,course_activity %>
|
|
|
|
@ -255,17 +245,17 @@
|
|
|
|
|
<% 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("禁用匿评", Setting.host_name + "/homework_common/" + activity.id.to_s + "/alert_forbidden_anonymous_comment?user_activity_id=" + user_activity_id.to_s + "&course_activity=" + course_activity.to_s,: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("公开作品", Setting.protocol + "://" + Setting.host_name + "/homework_common/" + activity.id.to_s + "/alert_open_student_works?is_in_course=-1&user_activity_id=" + user_activity_id.to_s + "&course_activity=" + course_activity.to_s,: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("取消公开", Setting.protocol + "://" + Setting.host_name + "/homework_common/" + activity.id.to_s + "/alert_open_student_works?is_in_course=-1&user_activity_id=" + user_activity_id.to_s + "&course_activity=" + course_activity.to_s,:class => "postOptionLink", :remote => true)%>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
@ -356,7 +346,7 @@
|
|
|
|
|
<%= hidden_field_tag 'course_activity',params[:course_activity],:value =>course_activity %>
|
|
|
|
|
<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>
|
|
|
|
|
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
|
|
|
|
<% end%>
|
|
|
|
|