Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
f308b24f5a
|
@ -341,7 +341,7 @@ class CoursesController < ApplicationController
|
|||
|
||||
def export_course_member_excel
|
||||
@all_members = student_homework_score(0,0,0,"desc")
|
||||
@homeworks = @course.homework_commons.order("created_at asc")
|
||||
@homeworks = @course.homework_commons.where("publish_time <= '#{Date.today}'").order("created_at asc")
|
||||
filename="#{@course.teacher.lastname.to_s + @course.teacher.firstname.to_s }_#{@course.name}_#{@course.time.to_s + @course.term}#{l(:excel_member_list)}";
|
||||
|
||||
respond_to do |format|
|
||||
|
|
|
@ -174,7 +174,7 @@ class News < ActiveRecord::Base
|
|||
if count == 0
|
||||
ws = WechatService.new
|
||||
content = strip_html self.author.try(:realname) + " 发布了通知:" + self.title.html_safe, 200
|
||||
ws.message_update_template m.user_id, "course_notice", self.id, "#{l(:label_new_notice_template)}", self.author.try(:realname) + " 发布了通知:" + content, format_time(self.created_on)
|
||||
ws.message_update_template m.user_id, "course_notice", self.id, "#{l(:label_new_notice_template)}", content, format_time(self.created_on)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,19 +8,19 @@
|
|||
|
||||
|
||||
.tscore_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; text-align: center; padding-top:5px;}
|
||||
.tscore_box{ width:350px; margin:15px auto;}
|
||||
.tscore_box{ width:370px; margin:15px auto;}
|
||||
.tscore_box li{ height:25px;}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="tscore_con" id="user_score">
|
||||
<h2><%= @member_score.user.name %> 历次作业积分</h2>
|
||||
<ul class="tscore_box">
|
||||
<ul class="tscore_box" style="max-height: 400px; overflow: auto;">
|
||||
<li ><span class="c_blue02 w280">作业名称</span><span class="c_blue02 w70">得分</span></li>
|
||||
<% @member_score.homework_common_list.each do |homework_common| %>
|
||||
<% @member_score.homework_common_list.each_with_index do |homework_common, index| %>
|
||||
<li>
|
||||
<span class="c_grey02 w280 hiddent">
|
||||
<%= homework_common.name %>
|
||||
作业<%=index + 1 %>:<%= homework_common.name %>
|
||||
</span>
|
||||
<span class="c_red w70">
|
||||
<% final_score = @member_score.homework_common_score(homework_common).first%>
|
||||
|
|
|
@ -69,16 +69,21 @@
|
|||
<ul class="menu_r">
|
||||
<li>
|
||||
<a href="javascript:void(0);" class="parent">
|
||||
<% @all_homework_commons.each_with_index do |homework_common,index |%>
|
||||
<% if @is_teacher %>
|
||||
<% hcommons = @all_homework_commons %>
|
||||
<% else %>
|
||||
<% hcommons = @homework_commons %>
|
||||
<% end %>
|
||||
<% hcommons.each_with_index do |homework_common,index |%>
|
||||
<% if homework_common.id == @homework.id %>
|
||||
<%="作业 #{@all_homework_commons.count - index}" %>
|
||||
<%="作业 #{hcommons.count - index}" %>
|
||||
<% end %>
|
||||
<% end%>
|
||||
</a>
|
||||
<ul>
|
||||
<% @all_homework_commons.each_with_index do |homework_common,index |%>
|
||||
<% hcommons.each_with_index do |homework_common,index |%>
|
||||
<li class="pr10">
|
||||
<%= link_to "作业#{@all_homework_commons.count - index}:#{homework_common.name}",student_work_index_path(:homework => homework_common.id)%>
|
||||
<%= link_to "作业#{hcommons.count - index}:#{homework_common.name}",student_work_index_path(:homework => homework_common.id)%>
|
||||
<%#= link_to "第#{@homework_commons.count - index}次作业",student_work_index_path(:homework => homework_common.id)%>
|
||||
</li>
|
||||
<% end%>
|
||||
|
|
Loading…
Reference in New Issue