课程相关优化
This commit is contained in:
parent
e02ad85bbb
commit
cca570e75c
|
@ -50,7 +50,7 @@
|
|||
</script>
|
||||
<style type="text/css">
|
||||
</style>
|
||||
<% course_activities.each do |activity| if course_activities %>
|
||||
<% course_activities.includes(:course_act).each do |activity| if course_activities %>
|
||||
<script>
|
||||
function expand_reply(container, btnid) {
|
||||
var target = $(container);
|
||||
|
|
|
@ -151,7 +151,7 @@
|
|||
<% else %>
|
||||
<% student_works = activity.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("score desc") %>
|
||||
<% end %>
|
||||
<% student_works.each_with_index do |sw, i| %>
|
||||
<% student_works.includes(:user).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 %>
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.children.reorder("created_on desc").each do |reply|%>
|
||||
<% activity.children.includes(:author).reorder("created_on desc").each do |reply|%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= reply.id %>');
|
||||
|
|
|
@ -155,7 +155,7 @@
|
|||
<% else %>
|
||||
<% student_works = homework_common.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("score desc") %>
|
||||
<% end %>
|
||||
<% student_works.each_with_index do |sw, i| %>
|
||||
<% student_works.includes(:user).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?(homework_common.course) || User.current.admin? || homework_common.is_open == 1 %>
|
||||
|
|
Loading…
Reference in New Issue