Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
Conflicts: app/helpers/courses_helper.rb
This commit is contained in:
commit
d17a9dabd8
|
@ -381,6 +381,7 @@ class StudentWorkController < ApplicationController
|
|||
@is_evaluation = @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status == 2 && !@is_teacher #是不是匿评
|
||||
@show_all = false
|
||||
|
||||
# 0表示没有分组的学生,-1表示所有分组的学生
|
||||
if @group
|
||||
if @group == "0"
|
||||
none_group_students = @course.members.select{ |member| member.course_group_id == 0 }
|
||||
|
@ -389,6 +390,13 @@ class StudentWorkController < ApplicationController
|
|||
else
|
||||
student_in_group = '(' + none_group_students.map{ |member| member.user_id }.join(',') + ')'
|
||||
end
|
||||
elsif @group == "-1"
|
||||
all_group_students = @course.members.select{ |member| member.course_group_id }
|
||||
if all_group_students.empty?
|
||||
student_in_group = '(0)'
|
||||
else
|
||||
student_in_group = '(' + all_group_students.map{ |member| member.user_id }.join(',') + ')'
|
||||
end
|
||||
else
|
||||
course_group = CourseGroup.find_by_id(@group)
|
||||
group_students = course_group.users
|
||||
|
|
|
@ -88,7 +88,7 @@ class SyllabusesController < ApplicationController
|
|||
end
|
||||
|
||||
def destroy
|
||||
if @syllabus && @syllabus.courses.empty?
|
||||
if @syllabus && @syllabus.courses.not_deleted.empty?
|
||||
@syllabus.destroy
|
||||
redirect_to user_courselist_user_path(User.current.id)
|
||||
end
|
||||
|
|
|
@ -132,12 +132,12 @@
|
|||
<div id="topic_editor" style="display: none;">
|
||||
<%if User.current.member_of_course?(course) %>
|
||||
<div class="mt10">
|
||||
<% if User.current.admin? %>
|
||||
<% if User.current.id == course.tea_id %>
|
||||
<%= f.check_box :sticky, :value => topic.sticky %>
|
||||
<%= label_tag 'message_sticky', l(:label_board_sticky) %>
|
||||
<% end %>
|
||||
<%= f.check_box :locked, :value => topic.locked %>
|
||||
<%= label_tag 'message_locked', l(:label_board_locked) %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<input type="hidden" value="<%= @type%>" name="type" id="user_activities_type">
|
||||
<div class="homepageRight mt0 ml10">
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">班级动态
|
||||
<div class="NewsBannerName">
|
||||
<%= get_acts_list_type @type %></div>
|
||||
<ul class="resourcesSelect">
|
||||
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<br>
|
||||
<div style='width:470px;text-align:center;font-family: "微软雅黑","宋体"' class="f14">
|
||||
<% if @syllabus.courses.empty? || @syllabus.courses.not_deleted.empty? %>
|
||||
<% if @syllabus.courses.not_deleted.empty? %>
|
||||
确认删除该课程吗?
|
||||
<% else %>
|
||||
该课程下已经存在班级,不能删除。
|
||||
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
</br>
|
||||
<div style='width:164px; margin:0 auto; text-align:center; font-family: "微软雅黑","宋体"'>
|
||||
<% if @syllabus.courses.empty?|| @syllabus.courses.not_deleted.empty? %>
|
||||
<% if @syllabus.courses.not_deleted.empty? %>
|
||||
<%=link_to '确认', syllabus_path(@syllabus), :class => 'Blue-btn fl', :method => 'delete'%>
|
||||
<a href='javascript:void(0);' class='Blue-btn fl' onclick='hideModal()'>关闭</a>
|
||||
<% else %>
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class AddStudentIdToApplyAddSchool < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :apply_add_schools, :user_id, :integer
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue