diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index 7c0ad24bb..5695a9037 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -586,7 +586,7 @@ class AccountController < ApplicationController
def apply_trail
apply_action = ApplyAction.where(:user_id => User.current.id, :container_type => "TrialAuthorization", :status => 0).first
- if User.current.user_extensions.identity == 1 && !User.current.user_extensions.student_id.nil? && User.current.user_extensions.student_id != "" && !User.current.user_extensions.school.nil?
+ if User.current.user_extensions.identity == 1 && !User.current.user_extensions.student_id.nil? && User.current.user_extensions.student_id != "" && !User.current.user_extensions.school.nil? && [1579, 2438, 1587, 117].include?(User.current.user_extensions.school_id)
User.current.update_attributes(:certification => 1)
@tip = "申请成功,我们将在一分钟内完成审核"
if apply_action.blank?
diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb
index 42f1241bc..d23bd4e0f 100644
--- a/app/controllers/courses_controller.rb
+++ b/app/controllers/courses_controller.rb
@@ -220,6 +220,16 @@ class CoursesController < ApplicationController
join = cs.join_course_roles params,@user
@state = join[:state]
@course = join[:course]
+ if @state == 6
+ # 给课堂老师发留言
+ if params[:role].include?("7") || params[:role].include?("9")
+ notes = @user.show_real_name.to_s + " 申请以#{params[:role].include?('7') ? '教辅' : '教师'}的身份加入班级:#{@course.name} "
+ @course.course_teachers.each do |mem|
+ user = mem.user
+ user.journals_for_messages << JournalsForMessage.new(:user_id => @user.id, :notes => notes, :private => 1, :reply_id => 0)
+ end
+ end
+ end
else
@state = 5 #未登录
end
@@ -992,6 +1002,7 @@ class CoursesController < ApplicationController
@curr_page = '成员管理'
respond_to do |format|
+ format.js
format.html { render :layout => 'base_edu_course' }
format.api { render_validation_errors(@course) }
end
diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb
index f0a1b84a7..218fd4562 100644
--- a/app/controllers/homework_common_controller.rb
+++ b/app/controllers/homework_common_controller.rb
@@ -335,11 +335,11 @@ class HomeworkCommonController < ApplicationController
if @homework.homework_type == 4
if @homework_detail_manual.answer_open_evaluation != params[:answer_open_evaluation].to_i
@homework_detail_manual.answer_open_evaluation = params[:answer_open_evaluation].to_i
- if @homework.end_time < Time.now
- @homework.student_works.each do |student_work|
- set_shixun_final_score @homework, student_work, @homework_detail_manual.answer_open_evaluation
- end
- end
+ # if @homework.end_time < Time.now
+ # @homework.student_works.each do |student_work|
+ # set_shixun_final_score @homework, student_work, @homework_detail_manual.answer_open_evaluation
+ # end
+ # end
end
@homework.score_open = params[:homework_score_open] ? 1 : 0
else
diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb
index 8918d5e46..ccc118f54 100644
--- a/app/controllers/messages_controller.rb
+++ b/app/controllers/messages_controller.rb
@@ -406,7 +406,11 @@ class MessagesController < ApplicationController
def sticky_topic
(render_403; return false) unless (User.current.admin? || User.current.allowed_to?(:as_teacher, @course))
@topic.update_attributes(:sticky => @topic.sticky == 1 ? 0 : 1)
- redirect_to board_message_path(@topic.board_id, @topic)
+ if params[:is_board]
+ redirect_to course_boards_path(@course)
+ else
+ redirect_to board_message_path(@topic.board_id, @topic)
+ end
end
def quote
diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb
index 518ac6587..7f21c0544 100644
--- a/app/controllers/shixuns_controller.rb
+++ b/app/controllers/shixuns_controller.rb
@@ -142,10 +142,12 @@ class ShixunsController < ApplicationController
@mail = User.current.mail.blank?
@shixun_all_count = Shixun.where(:hidden => 0).count
@shixuns = Shixun.where("name like ? and hidden = 0", "%#{search}%")
- @shixuns.each do |shixun|
- shixun[:myshixunCount] = shixun.myshixuns.count
- end
- @shixuns = @shixuns.sort{|x, y| y[:myshixunCount] <=> x[:myshixunCount]}
+ # @shixuns.each do |shixun|
+ # shixun[:myshixunCount] = shixun.myshixuns.count
+ # end
+ # @shixuns = @shixuns.sort{|x, y| y[:myshixunCount] <=> x[:myshixunCount]}
+ @shixuns = @shixuns.select("shixuns.*, (select count(myshixuns.id) from myshixuns where myshixuns.shixun_id = shixuns.id group by shixuns.id) AS myshixunCount").reorder("status = 2 desc, myshixunCount desc")
+
@shixun_my_score = Experience.find_by_sql("SELECT sum(score) as score FROM `experiences` where user_id=#{User.current.id}").first.try(:score).to_i
@current_user_had_passed = Myshixun.find_by_sql("select count(*) as had_passed from myshixuns where status =1 and user_id=#{User.current.id}
and shixun_id in (SELECT id FROM `shixuns` where status > 1)").first.try(:had_passed).to_i
@@ -243,7 +245,7 @@ class ShixunsController < ApplicationController
bsort = params[:sort] || "desc"
@sort = bsort == "desc" ? "asc" : "desc"
if @order == "updated_at"
- order_str = "#{Shixun.table_name}.updated_at #{@sort}"
+ order_str = "#{Shixun.table_name}.updated_at #{bsort}"
else
order_str = "myshixun_count #{bsort}, #{Shixun.table_name}.updated_at #{bsort}"
end
@@ -303,14 +305,16 @@ class ShixunsController < ApplicationController
@shixuns =@shixuns.reorder(order_str)
else
# 最热排序
- @shixuns.each do |shixun|
- shixun[:myshixunCount] = shixun.myshixuns.count
- end
- if bsort == "desc"
- @shixuns = @shixuns.sort{|x, y| y[:myshixunCount] <=> x[:myshixunCount]}
- else
- @shixuns = @shixuns.sort{|x, y| x[:myshixunCount] <=> y[:myshixunCount]}
- end
+ # @shixuns.each do |shixun|
+ # shixun[:myshixunCount] = shixun.myshixuns.count
+ # end
+ @shixuns = @shixuns.select("shixuns.*, (select count(myshixuns.id) from myshixuns where myshixuns.shixun_id = shixuns.id group by shixuns.id) AS myshixunCount").reorder("status = 2 desc, myshixunCount #{bsort}")
+ #@shixuns = @shixuns.reorder("status = 2 #{bsort}, myshixunCount #{bsort}")
+ # if bsort == "desc"
+ # @shixuns = @shixuns.sort{|x, y| y[:myshixunCount] <=> x[:myshixunCount]}
+ # else
+ # @shixuns = @shixuns.sort{|x, y| x[:myshixunCount] <=> y[:myshixunCount]}
+ # end
end
# @shixuns = Shixun.where(:authentication => 1).reorder(order)
@shixuns_count = @shixuns.count
diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb
index 5a1366d2f..75c51dde5 100644
--- a/app/controllers/student_work_controller.rb
+++ b/app/controllers/student_work_controller.rb
@@ -359,8 +359,10 @@ class StudentWorkController < ApplicationController
end
end
##################################################################################################################
- if @homework.homework_type == 4 && @homework.homework_detail_manual.comment_status > 0 && (@homework.publish_time > Time.now || (@homework.publish_time <= Time.now && @homework.allow_late))
- update_shixun_work_status @homework
+ if params[:order].nil? && params[:sort].nil? && params[:name].nil? && params[:group].nil? && params[:comment].nil? && params[:status].nil?
+ if @homework.homework_type == 4 && @homework.homework_detail_manual.comment_status > 0 && @homework.homework_detail_manual.comment_status != 6 && (@homework.end_time > Time.now || (@homework.end_time <= Time.now && @homework.allow_late))
+ update_shixun_work_status @homework
+ end
end
@order,@b_sort,@name,@group,@comment,@status = params[:order] || "updated_at",params[:sort] || "desc",params[:name].to_s.strip || "",params[:group], params[:comment], params[:status]
@homework_commons = @course.homework_commons.where("publish_time <= ?",Time.now).order("created_at desc")
diff --git a/app/controllers/subjects_controller.rb b/app/controllers/subjects_controller.rb
index f14ec8017..45575406f 100644
--- a/app/controllers/subjects_controller.rb
+++ b/app/controllers/subjects_controller.rb
@@ -8,12 +8,17 @@ class SubjectsController < ApplicationController
include ApplicationHelper
def index
- @order = params[:order] || "updated_at"
- bsort = params[:sort] || "asc"
+ @order = params[:order] || "myshixun_count"
+ bsort = params[:sort] || "desc"
@sort = bsort == "desc" ? "asc" : "desc"
search = params[:search]
#ids = Subject.find_by_sql("select group_concat(id) as allId from subjects where id in (SELECT distinct(subject_id) FROM `stages`)")
- @subjects = Subject.where("hidden = 0").reorder("#{@order} #{bsort}")
+ if @order == "myshixun_count"
+ #@shixuns = @shixuns.select("shixuns.*, (select count(myshixuns.id) from myshixuns where myshixuns.shixun_id = shixuns.id group by shixuns.id) AS myshixunCount").reorder("status = 2 desc, myshixunCount desc")
+ @subjects = Subject.where("hidden = 0").select("subjects.*, (select count(myshixuns.id) from myshixuns, stage_shixuns where myshixuns.shixun_id = stage_shixuns.shixun_id and stage_shixuns.subject_id = subjects.id group by subjects.id) AS myshixunCount").reorder("status = 2 desc, myshixunCount #{bsort}")
+ else
+ @subjects = Subject.where("hidden = 0").reorder("#{@order} #{bsort}")
+ end
@subject_created_count = Subject.where(:user_id => User.current.id).count
@subjects_all_count = @subjects.count
#@subjects = Subject.where("name like ?", "%#{search}%").reorder("#{@order} #{@sort}")
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 075e897f3..3e5a0c0a3 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -790,14 +790,22 @@ class UsersController < ApplicationController
if integer_ids.include?(9)
cs = CoursesService.new
c = Course.find(@msg.course_id)
- cs.send_wechat_join_class_notice apply_user,c,9,0
+ #cs.send_wechat_join_class_notice apply_user,c,9,0
else
cs = CoursesService.new
c = Course.find(@msg.course_id)
- cs.send_wechat_join_class_notice apply_user,c,7,0
+ #cs.send_wechat_join_class_notice apply_user,c,7,0
end
end
+ apply_user = User.find @msg.course_message_id
+ notes = User.current.show_real_name.to_s + " 批准#{apply_user.show_real_name}以#{integer_ids.include?(7) ? '教辅' : '教师'}的身份加入班级:#{c.name} "
+ c.course_teachers.each do |mem|
+ user = mem.user
+ if user != User.current
+ user.journals_for_messages << JournalsForMessage.new(:user_id => User.current.id, :notes => notes, :private => 1, :reply_id => 0)
+ end
+ end
when 'N'
CourseMessage.create(:user_id => @msg.course_message_id, :course_id => @msg.course_id, :viewed => false,:course_message_id=>User.current.id,:content=>@msg.content,:course_message_type=>'CourseRequestDealResult',:status=>2)
@msg.update_attributes(:status=>2,:viewed=>1)
@@ -2058,14 +2066,16 @@ class UsersController < ApplicationController
@user_fanlist_count = fan_query.count()
@user_fanlist = fan_query.order("#{Watcher.table_name}.id desc").limit(12)
+ show_all = @user == User.current || User.current.admin?
+
# 我创建的实训数
- @create_num = (@user == User.current ? Shixun.where(:user_id => @user).count : Shixun.where(:user_id => @user).visible.count)
+ @create_num = (show_all ? Shixun.where(:user_id => @user).count : Shixun.where(:user_id => @user).visible.count)
# 我合作的实训数
coop_id = Shixun.find_by_sql("select shixun_id from shixun_members where user_id=#{@user.id} and role = 2").map(&:shixun_id) # 合作者的实训id
- @cooperative_num = (@user == User.current ? Shixun.where(:id => coop_id).count : Shixun.where(:id => coop_id).visible.count)
+ @cooperative_num = (show_all ? Shixun.where(:id => coop_id).count : Shixun.where(:id => coop_id).visible.count)
# 我挑战的实训数
ch_id = Shixun.find_by_sql("select id from shixuns where id in (select shixun_id from myshixuns where user_id = #{@user.id})")
- @challenge_num = (@user == User.current ? Shixun.where(:id => ch_id).count : Shixun.where(:id => ch_id).visible.count)
+ @challenge_num = (show_all ? Shixun.where(:id => ch_id).count : Shixun.where(:id => ch_id).visible.count)
# 我的所有课程数
@all_courses_count = @user.courses.not_deleted_not_end.count
# 我创建的课程数
@@ -2081,7 +2091,7 @@ class UsersController < ApplicationController
ids2 = ids2.map{|shixun| shixun.id} unless ids2.blank?
id = ids + ids2
id = id.uniq
- if @user == User.current
+ if show_all
@shixuns = Shixun.where(:id => id).order("updated_at desc")
else
@shixuns = Shixun.where(:status => [2, 3], :id => id).order("updated_at desc")
@@ -2243,13 +2253,13 @@ class UsersController < ApplicationController
if params[:filter] == "challenge"
# 已挑战过
id = Shixun.find_by_sql("select id from shixuns where id in (select shixun_id from myshixuns where user_id = #{@user.id})")
- if @user == User.current
+ if @user == User.current || User.current.admin?
@shixuns = Shixun.where(:id => id).order("updated_at desc")
else
@shixuns = Shixun.where(:id => id).visible.order("updated_at desc")
end
elsif params[:filter] == "create"
- if @user == User.current
+ if @user == User.current || User.current.admin?
@shixuns = Shixun.where(:user_id => @user).order("updated_at desc")
else
@shixuns = Shixun.where(:user_id => @user).visible.order("updated_at desc")
@@ -2257,7 +2267,7 @@ class UsersController < ApplicationController
elsif params[:filter] == "cooperative"
# 合作者的实训id
id = Shixun.find_by_sql("select shixun_id from shixun_members where user_id=#{@user.id} and role = 2").map(&:shixun_id)
- if @user == User.current
+ if @user == User.current || User.current.admin?
@shixuns = Shixun.where(:id => id).order("updated_at desc")
else
@shixuns = Shixun.where(:id => id).visible.order("updated_at desc")
@@ -2271,7 +2281,7 @@ class UsersController < ApplicationController
ids2 = ids2.map{|shixun| shixun.id} unless ids2.blank?
id = ids + ids2
id = id.uniq
- if @user == User.current
+ if @user == User.current || User.current.admin?
@shixuns = Shixun.where(:id => id).order("updated_at desc")
else
@shixuns = Shixun.where(:id => id).visible.order("updated_at desc")
@@ -2323,7 +2333,7 @@ class UsersController < ApplicationController
end
def user_experience
- @user_experiences = @user.experiences.reorder("created_at desc")
+ @user_experiences = @user.experiences.where("score > 0").reorder("created_at desc")
@limit = 20
@is_remote = true
@experiences_count = @user_experiences.count
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index c1ccda04a..e13cf05b8 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -3885,7 +3885,7 @@ module ApplicationHelper
if User.current.logged?
if User.current.member_of_course?(homework.course)
if is_teacher #老师显示作品数量
- link_to "作品(#{count})", student_work_index_url_in_org(homework.id, 2), :class => "c_blue homepagePostSubmit"
+ link_to "作品 (#{count})".html_safe, student_work_index_url_in_org(homework.id, 2), :class => "c_blue homepagePostSubmit"
else #学生显示提交作品、修改作品等按钮
work = cur_user_works_for_homework homework
project = cur_user_projects_for_homework homework
@@ -3930,10 +3930,10 @@ module ApplicationHelper
end
end
else
- link_to "作品(#{count})", "javascript:void(0)", :class => "c_blue homepagePostSubmit", :onclick => "notice_sure_box('您不是班级成员,不能提交作品 请先从老师处获取邀请码后加入班级,再提交作品')"
+ link_to "作品 (#{count})".html_safe, "javascript:void(0)", :class => "c_blue homepagePostSubmit", :onclick => "notice_sure_box('您不是班级成员,不能提交作品 请先从老师处获取邀请码后加入班级,再提交作品')"
end
else
- link_to "作品(#{count})", "javascript:void(0)", :class => "c_blue homepagePostSubmit", :onclick => "login_notice_box('#{signin_url_without_domain}');"
+ link_to "作品 (#{count})".html_safe, "javascript:void(0)", :class => "c_blue homepagePostSubmit", :onclick => "login_notice_box('#{signin_url_without_domain}');"
end
end
diff --git a/app/helpers/owner_type_helper.rb b/app/helpers/owner_type_helper.rb
index 9124a4f98..3239d9d8e 100644
--- a/app/helpers/owner_type_helper.rb
+++ b/app/helpers/owner_type_helper.rb
@@ -15,4 +15,5 @@ module OwnerTypeHelper
HOMEWORKREFERENCEANSWER = 14
STUDENTWORK = 15
HOMEWORKBANK = 16
+ SUBJECT = 17
end
\ No newline at end of file
diff --git a/app/helpers/student_work_helper.rb b/app/helpers/student_work_helper.rb
index 993e4d9eb..b016bbf61 100644
--- a/app/helpers/student_work_helper.rb
+++ b/app/helpers/student_work_helper.rb
@@ -3,11 +3,14 @@ include UserScoreHelper
module StudentWorkHelper
def update_shixun_work_status homework
- homework.student_works.where(:work_status => 0).each do |work|
- myshixun = Myshixun.where(:shixun_id => homework.homework_commons_shixuns.shixun_id, :user_id => work.user_id).first
- if myshixun
- work.update_attributes(:work_status => myshixun.created_at <= homework.end_time ? 1 : 2, :late_penalty => myshixun.created_at <= homework.end_time ? 0 : homework.late_penalty, :commit_time => myshixun.created_at, :myshixun_id => myshixun.id)
+ homework.student_works.each do |work|
+ if work.work_status == 0
+ myshixun = Myshixun.where(:shixun_id => homework.homework_commons_shixuns.shixun_id, :user_id => work.user_id).first
+ if myshixun
+ work.update_attributes(:work_status => myshixun.created_at <= homework.end_time ? 1 : 2, :late_penalty => myshixun.created_at <= homework.end_time ? 0 : homework.late_penalty, :commit_time => myshixun.created_at, :myshixun_id => myshixun.id)
+ end
end
+ set_shixun_final_score homework, work, homework.homework_detail_manual.answer_open_evaluation
end
end
@@ -88,9 +91,9 @@ module StudentWorkHelper
when 0
str = "未提交"
when 1
- str = "按时提交"
+ str = "按时提交 "
when 2
- str = "延时提交"
+ str = "延时提交 "
end
end
@@ -130,16 +133,19 @@ module StudentWorkHelper
link_to "继续实战", 'javascript:void(0);', :onclick => "sure_box_redirect('#{myshixun_reset_myshixun_path(myshixun)}', '实训已经更新啦,系统正在为您重置');", :class => "white-btn orange-btn fr mr10 mt8"
end
else
- work_ids = "(" + homework.student_works.has_committed.map(&:id).join(",") + ")"
- if homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 3 && User.current.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count > 0 #匿评作业,且作业状态不是在开启匿评之前
- link_to "匿评作品", student_work_index_url_in_org(homework.id, 2), :class => 'white-btn orange-btn fr mr10 mt8', :title => "开启匿评后不可修改作品"
- elsif homework.homework_detail_manual && homework.homework_detail_manual.comment_status > 3
- link_to "查看作品", student_work_path(work), :class => 'white-btn orange-btn fr mr10 mt8', :title => "匿评已结束"
- elsif homework.end_time >= Time.now && work.user_id == User.current.id
+ if homework.end_time >= Time.now && work.user_id == User.current.id
link_to "修改作品", edit_student_work_url_without_domain(work.id),:class => 'white-btn orange-btn fr mr10 mt8'
- else
- link_to "查看作品", student_work_path(work), :class => 'white-btn orange-btn fr mr10 mt8', :title => "作业截止后不可修改作品"
end
+ # work_ids = "(" + homework.student_works.has_committed.map(&:id).join(",") + ")"
+ # if homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 3 && User.current.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count > 0 #匿评作业,且作业状态不是在开启匿评之前
+ # link_to "匿评作品", student_work_index_url_in_org(homework.id, 2), :class => 'white-btn orange-btn fr mr10 mt8', :title => "开启匿评后不可修改作品"
+ # elsif homework.homework_detail_manual && homework.homework_detail_manual.comment_status > 3
+ # link_to "查看作品", student_work_path(work), :class => 'white-btn orange-btn fr mr10 mt8', :title => "匿评已结束"
+ # elsif homework.end_time >= Time.now && work.user_id == User.current.id
+ # link_to "修改作品", edit_student_work_url_without_domain(work.id),:class => 'white-btn orange-btn fr mr10 mt8'
+ # else
+ # link_to "查看作品", student_work_path(work), :class => 'white-btn orange-btn fr mr10 mt8', :title => "作业截止后不可修改作品"
+ # end
end
end
end
@@ -179,9 +185,9 @@ module StudentWorkHelper
#传入分数,获取对应颜色
def score_color score
if score
- color = score >= 90 ? "c_red" : "c_green"
+ color = score >= 90 ? "color-red-light" : "color-light-green"
else
- color = "c_grey"
+ color = "color-grey"
end
color
end
diff --git a/app/models/course.rb b/app/models/course.rb
index 534325464..5a169be09 100644
--- a/app/models/course.rb
+++ b/app/models/course.rb
@@ -244,6 +244,11 @@ class Course < ActiveRecord::Base
self.status == STATUS_ARCHIVED
end
+ # 课堂的老师不包括助教
+ def course_teachers
+ self.members.select{|m| m.roles.to_s.include?("Manager") || m.roles.to_s.include?("Teacher")}
+ end
+
def self.visible_condition(user, options={})
allowed_to_condition(user, :view_course, options)
end
diff --git a/app/models/students_for_course.rb b/app/models/students_for_course.rb
index b501db674..95157f2da 100644
--- a/app/models/students_for_course.rb
+++ b/app/models/students_for_course.rb
@@ -39,16 +39,16 @@ class StudentsForCourse < ActiveRecord::Base
if str != ""
str += ","
end
- if hw.homework_type == 4
- myshixun = Myshixun.where(:shixun_id => hw.homework_commons_shixuns.shixun_id, :user_id => self.student_id).first
- if myshixun
- str += "('#{hw.name}的作品提交',#{hw.id},#{self.student_id}, 1, #{myshixun.id}, '#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}', '#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}', '#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}')"
- else
- str += "('#{hw.name}的作品提交',#{hw.id},#{self.student_id}, 0, null, null, '#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}', '#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}')"
- end
- else
+ #if hw.homework_type == 4
+ #myshixun = Myshixun.where(:shixun_id => hw.homework_commons_shixuns.shixun_id, :user_id => self.student_id).first
+ # if myshixun
+ # str += "('#{hw.name}的作品提交',#{hw.id},#{self.student_id}, 1, #{myshixun.id}, '#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}', '#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}', '#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}')"
+ # else
+ # str += "('#{hw.name}的作品提交',#{hw.id},#{self.student_id}, 0, null, null, '#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}', '#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}')"
+ # end
+ #else
str += "('#{hw.name}的作品提交',#{hw.id},#{self.student_id}, 0, null, null, '#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}', '#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}')"
- end
+ #end
end
end
if str != ""
diff --git a/app/models/subject.rb b/app/models/subject.rb
index 7eb102bf5..fc4fa393c 100644
--- a/app/models/subject.rb
+++ b/app/models/subject.rb
@@ -35,6 +35,15 @@ class Subject < ActiveRecord::Base
count
end
+ def subject_users
+ count = 0
+ self.stage_shixuns.each do |stage_shixun|
+ shixun = stage_shixun.shixun
+ count += shixun.myshixuns.count
+ end
+ count
+ end
+
def subject_score
score = 0
self.stage_shixuns.each do |stage_shixun|
diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb
index 745f0e938..dce1176f2 100644
--- a/app/services/courses_service.rb
+++ b/app/services/courses_service.rb
@@ -682,18 +682,18 @@ class CoursesService
#----------------微信通知----------------------
- if role_ids.include?("7") || role_ids.include?("9")
- tea_user = User.find(course.tea_id)
- count = ShieldWechatMessage.where("container_type='User' and container_id=#{tea_user.id} and shield_type='Course' and shield_id=#{course.id}").count
- if count == 0
-
- rolename = role_ids.include?("7") ? "助教" : "教师"
- content = current_user.show_name + "申请以"+rolename+"身份加入班级,等待您的审批。"
- name = course.course_list.nil? ? course.name : course.course_list_name+" • "+course.name
- ws = WechatService.new
- ws.class_notice tea_user.id, "review_class_member", course.id, "班级成员审批通知。", name, tea_user.show_name, format_time(Time.now), content, "点击查看申请详情。",current_user.id
- end
- end
+ # if role_ids.include?("7") || role_ids.include?("9")
+ # tea_user = User.find(course.tea_id)
+ # count = ShieldWechatMessage.where("container_type='User' and container_id=#{tea_user.id} and shield_type='Course' and shield_id=#{course.id}").count
+ # if count == 0
+ #
+ # rolename = role_ids.include?("7") ? "助教" : "教师"
+ # content = current_user.show_name + "申请以"+rolename+"身份加入班级,等待您的审批。"
+ # name = course.course_list.nil? ? course.name : course.course_list_name+" • "+course.name
+ # ws = WechatService.new
+ # ws.class_notice tea_user.id, "review_class_member", course.id, "班级成员审批通知。", name, tea_user.show_name, format_time(Time.now), content, "点击查看申请详情。",current_user.id
+ # end
+ # end
#--------------------------------------------
if is_stu
diff --git a/app/views/boards/_course_new.html.erb b/app/views/boards/_course_new.html.erb
index 56014f062..91bb5c852 100644
--- a/app/views/boards/_course_new.html.erb
+++ b/app/views/boards/_course_new.html.erb
@@ -87,7 +87,7 @@
//paramsHeight = params.kindutil.removeUnit(this.height);
edit.iframe.height(150);
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) , 150));
- elocalStorage(message_content_editor,'topic_course_<%=course.id %>');
+ elocalStorage(message_content_editor,'topic_course_<%=course.id %>','des');
}
}).loadPlugin('paste');
return editor;
@@ -154,8 +154,8 @@
-
-
+
+
diff --git a/app/views/challenges/_choose_tab.html.erb b/app/views/challenges/_choose_tab.html.erb
index fb5015d25..3787f5985 100644
--- a/app/views/challenges/_choose_tab.html.erb
+++ b/app/views/challenges/_choose_tab.html.erb
@@ -2,9 +2,9 @@
本关任务
<% @challenge.challenge_chooses.each_with_index do |choose, index| %>
-
">
+ " style="<%= @index == index ? "width:110px" : "flex:1" %>">
<%= (index + 1).to_s + (choose.category == 1 ? ".单选题" : ".多选题") %>
-<% end %>
\ No newline at end of file
+<% end %>
diff --git a/app/views/challenges/_choose_type.html.erb b/app/views/challenges/_choose_type.html.erb
index 085a1e3e3..6bce64f2d 100644
--- a/app/views/challenges/_choose_type.html.erb
+++ b/app/views/challenges/_choose_type.html.erb
@@ -1,10 +1,12 @@
-
-
+
@@ -41,6 +43,7 @@
<%#= render :partial => 'single_or_multiple_question_show'%>
\ No newline at end of file
diff --git a/app/views/subjects/show.html.erb b/app/views/subjects/show.html.erb
index a3593101e..6a4adae39 100644
--- a/app/views/subjects/show.html.erb
+++ b/app/views/subjects/show.html.erb
@@ -20,7 +20,7 @@
- 第<%= s_index + 1 %> 章 <%= stage.name %>
+ <%= stage.name %>
<% if User.current.manager_of_subject?(@subject) %>
@@ -108,7 +108,7 @@
* 名称:
-
+
阶段名称不能为空
@@ -265,7 +265,7 @@
edithtml+="
<% if activity.try(:author).show_real_name == ' ' %>
- <%= link_to activity.try(:author).show_real_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
+ <%= link_to activity.try(:author).show_real_name, user_path(activity.author_id), :class => "newsBlue mr15 color-grey-b" %>
<% else %>
- <%= link_to activity.try(:author).show_real_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
+ <%= link_to activity.try(:author).show_real_name, user_path(activity.author_id), :class => "newsBlue mr15 color-grey-b" %>
<% end %>
TO
- <%= link_to "班级资源", course_files_path(activity.course), :class => "newsBlue ml15" %>
+ <%= link_to "班级资源", course_files_path(activity.course), :class => "newsBlue ml15 color-grey-b" %>
diff --git a/app/views/users/_course_boardlist.html.erb b/app/views/users/_course_boardlist.html.erb
index 15f4bc394..d63d958ad 100644
--- a/app/views/users/_course_boardlist.html.erb
+++ b/app/views/users/_course_boardlist.html.erb
@@ -50,9 +50,9 @@
<% if @topics.count > 0 %>
<% topics.each do |activity| %>
-
+
<%= link_to image_tag(url_to_avatar(activity.author), :width => "60", :height => "60", :class => "panel-list-img mr15"), user_path(activity.author), :alt => "用户",:style => "width:60px;height:60px;display: block;" %>
-
+
<%= link_to activity.subject.to_s.html_safe, User.current.logged? ? board_message_path(activity.board_id, activity) : signin_url_without_domain, :class => "panel-list-title hide fl mt5" %>
@@ -61,7 +61,7 @@
<% end %>
-
+
<%= link_to activity.author.show_real_name, user_path(activity.author), :class => "panel-name-small hide fl mr15 color-grey" %>
<%= time_from_now(activity.created_on) %>
@@ -72,12 +72,28 @@
最后回复<%= last_message.author.show_real_name %> <%= time_from_now(last_message.created_on) %>
<% end %>
-
+
<%= activity.visits %>
<%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "0" %>
<%= count %>
+
+
<% end %>
diff --git a/app/views/users/_course_create.html.erb b/app/views/users/_course_create.html.erb
index 09d766cc5..32ff0bb3f 100644
--- a/app/views/users/_course_create.html.erb
+++ b/app/views/users/_course_create.html.erb
@@ -10,13 +10,13 @@
<% if activity.try(:teacher).show_real_name == ' ' %>
- <%= link_to activity.try(:teacher), user_path(activity.teacher), :class => "newsBlue mr15" %>
+ <%= link_to activity.try(:teacher), user_path(activity.teacher), :class => "newsBlue mr15 color-grey-b" %>
<% else %>
- <%= link_to activity.try(:teacher).show_real_name, user_path(activity.teacher), :class => "newsBlue mr15" %>
+ <%= link_to activity.try(:teacher).show_real_name, user_path(activity.teacher), :class => "newsBlue mr15 color-grey-b" %>
<% end %>
TO
<% str = defined?(is_course) && is_course == 1 ? "班级" : "#{activity.name.to_s} | 班级" %>
- <%= link_to str, course_path(activity.id,:host=>Setting.host_course), :class => "newsBlue ml15" %>
+ <%= link_to str, course_path(activity.id,:host=>Setting.host_course), :class => "newsBlue ml15 color-grey-b" %>
diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb
index c4ca5a807..52c77e5bc 100644
--- a/app/views/users/_course_homework.html.erb
+++ b/app/views/users/_course_homework.html.erb
@@ -26,12 +26,12 @@
- <%= link_to activity.user.show_real_name, user_path(activity.user,:host=>Setting.host_user), :class => "newsBlue mr15" %>
+ <%= link_to activity.user.show_real_name, user_path(activity.user,:host=>Setting.host_user), :class => "newsBlue mr15 color-grey-b" %>
TO
<% if hw_status == 3 || hw_status == 2 %>
- <%= link_to "#{activity.homework_type_ch}作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course, :homework_type => activity.homework_type), :class => "newsBlue ml15"%>
+ <%= link_to "#{activity.homework_type_ch}作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course, :homework_type => activity.homework_type), :class => "newsBlue ml15 color-grey-b"%>
<% else %>
- <%= link_to activity.course.name.to_s+" | #{activity.homework_type_ch}作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course, :homework_type => activity.homework_type), :class => "newsBlue ml15"%>
+ <%= link_to activity.course.name.to_s+" | #{activity.homework_type_ch}作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course, :homework_type => activity.homework_type), :class => "newsBlue ml15 color-grey-b"%>
<% end %>
@@ -43,7 +43,7 @@
<%= render :partial => 'users/homework_opr', :locals => {:activity => activity, :is_teacher => is_teacher, :hw_status => hw_status, :user_activity_id => user_activity_id} %>
<% if !activity.end_time.nil? %>
-
提交截止时间:<%= format_time activity.end_time %>
+
提交截止时间:<%= format_time activity.end_time %>
<% end %>
<% if activity.homework_detail_manual.comment_status == 0 && !activity.publish_time.nil? %>
diff --git a/app/views/users/_course_journalsformessage.html.erb b/app/views/users/_course_journalsformessage.html.erb
index 1552093b3..5529c4b4d 100644
--- a/app/views/users/_course_journalsformessage.html.erb
+++ b/app/views/users/_course_journalsformessage.html.erb
@@ -6,11 +6,11 @@
- <%= link_to activity.user.show_name, user_path(activity.user), :class => "newsBlue mr15" %>
+ <%= link_to activity.user.show_name, user_path(activity.user), :class => "newsBlue mr15 color-grey-b" %>
TO
<% course=Course.find(activity.jour_id) %>
<% str = defined?(is_course) && is_course == 1 ? "班级留言" : "#{course.name.to_s} | 班级留言" %>
- <%= link_to str, course_feedback_path(course), :class => "newsBlue ml15" %>
+ <%= link_to str, course_feedback_path(course), :class => "newsBlue ml15 color-grey-b" %>
<% str = defined?(is_course) && is_course == 1 ? "班级通知" : "#{activity.course.name.to_s} | 班级通知" %>
- <%= link_to str, course_news_index_path(activity.course), :class => "newsBlue ml15" %>
+ <%= link_to str, course_news_index_path(activity.course), :class => "newsBlue ml15color-grey-b" %>
<%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %>
diff --git a/app/views/users/_course_poll.html.erb b/app/views/users/_course_poll.html.erb
index 56aa2fd48..8b7e495d1 100644
--- a/app/views/users/_course_poll.html.erb
+++ b/app/views/users/_course_poll.html.erb
@@ -11,14 +11,14 @@
<% if activity.try(:user).try(:realname) == ' ' %>
- <%= link_to activity.try(:user), user_path(activity.user), :class => "newsBlue mr15" %>
+ <%= link_to activity.try(:user), user_path(activity.user), :class => "newsBlue mr15 color-grey-b" %>
<% else %>
- <%= link_to activity.try(:user).try(:realname), user_path(activity.user), :class => "newsBlue mr15" %>
+ <%= link_to activity.try(:user).try(:realname), user_path(activity.user), :class => "newsBlue mr15 color-grey-b" %>
<% end %>
TO
<% course = Course.find(activity.polls_group_id) %>
<% str = defined?(is_course) && is_course == 1 ? "班级问卷" : "#{course.name.to_s} | 班级问卷" %>
- <%= link_to str, poll_index_path(:polls_type => "Course", :polls_group_id => activity.polls_group_id), :class => "newsBlue ml15" %>
+ <%= link_to str, poll_index_path(:polls_type => "Course", :polls_group_id => activity.polls_group_id), :class => "newsBlue ml15 color-grey-b" %>
diff --git a/app/views/users/_homework_base_info.html.erb b/app/views/users/_homework_base_info.html.erb
index 20f848480..9e3606c92 100644
--- a/app/views/users/_homework_base_info.html.erb
+++ b/app/views/users/_homework_base_info.html.erb
@@ -1,4 +1,4 @@
-
+
迟交扣分:<%= activity.late_penalty%>分
@@ -9,7 +9,7 @@
<% end %>
-
+
<% if activity.anonymous_comment == 0%>
缺评扣分:<%= activity.homework_detail_manual.absence_penalty%>分/作品
@@ -22,7 +22,7 @@
<% if activity.student_works.has_committed.count != 0 %>
<% sw = activity.student_works.has_committed.reorder("commit_time desc").first %>
-
+
# <%=time_from_now sw.commit_time %><%= link_to sw.user.show_real_name, user_activities_path(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
@@ -31,7 +31,7 @@
<% student_work_scores = StudentWorksScore.where("student_work_id in #{sw_id} and score is not null").reorder("created_at desc") %>
<% unless student_work_scores.empty? %>
<% last_score = student_work_scores.first %>
-
+
# <%=time_from_now last_score.created_at %><%= link_to last_score.reviewer_role == 3 && !is_teacher ? '学生匿名' : last_score.user.show_real_name, last_score.reviewer_role == 3 && !is_teacher ? "javascript:void(0)" : user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品,优秀排行:
@@ -55,7 +55,7 @@
<% end %>
<% score = sw.respond_to?("score") ? sw.score : sw.work_score %>
-
分数:<%=format("%.1f",score.to_f < 0 ? 0 : score.to_f) %>分
+
<%=format("%.1f",score.to_f < 0 ? 0 : score.to_f) %>分
<% end %>
<% if student_works.count == 7 %>
@@ -87,7 +87,7 @@
<% comment_status = activity.homework_detail_manual.comment_status %>
-
+
<% if activity.homework_type != 4 %>
diff --git a/app/views/users/_homework_opr.html.erb b/app/views/users/_homework_opr.html.erb
index 6376e34c3..6f7563d32 100644
--- a/app/views/users/_homework_opr.html.erb
+++ b/app/views/users/_homework_opr.html.erb
@@ -3,11 +3,11 @@
<% projects = cur_user_projects_for_homework activity %>
<% if work.nil? && projects.nil? %>
- <%=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=> '请各组长关联作业项目' %>
+ <%=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=> 'color_white', :title=> '请各组长关联作业项目' %>
<% elsif work.nil? %>
- <%=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=> '取消关联项目' %>
+ <%=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 => "color_white", :title=> '取消关联项目' %>
<% end %>
<% end %>
@@ -16,16 +16,16 @@
<% if activity.allow_late && activity.end_time < Time.now && (activity.homework_type == 1 || activity.homework_type == 3) && work && work.work_status != 0 && work.user == User.current && !is_teacher && activity.homework_detail_manual.comment_status < 6 %>
- <%=link_to "补交附件", student_work_path(work, :is_focus => 1), :class => 'c_blue', :title => "可追加作品修订附件" %>
+ <%=link_to "补交附件", student_work_path(work, :is_focus => 1), :class => 'color_white', :title => "可追加作品修订附件" %>
<% end %>
<% if activity.homework_type == 2 && is_teacher%>
- <%= link_to "模拟答题", new_student_work_path(homework: activity.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %>
+ <%= link_to "模拟答题", new_student_work_path(homework: activity.id, is_test: true), class: 'color_white test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %>
<% if activity.homework_detail_manual.comment_status != 0 %>
- <%= link_to "代码查重", work_canrepeat_student_work_index_path(homework: activity.id, course_id: activity.course.id), class: 'c_blue test-program-btn',:remote => true %>
+ <%= link_to "代码查重", work_canrepeat_student_work_index_path(homework: activity.id, course_id: activity.course.id), class: 'color_white test-program-btn',:remote => true %>
<% end %>
<% end %>
diff --git a/db/migrate/20170918090054_migrate_stage_name.rb b/db/migrate/20170918090054_migrate_stage_name.rb
new file mode 100644
index 000000000..0168c1452
--- /dev/null
+++ b/db/migrate/20170918090054_migrate_stage_name.rb
@@ -0,0 +1,14 @@
+#encoding: utf-8
+class MigrateStageName < ActiveRecord::Migration
+ def up
+ Stage.where("0=0").each do |stage|
+ str = "第" + stage.position.to_s + "章"
+ unless stage.name.index(str) && stage.name.index(str) == 0
+ stage.update_column('name', str + " " + stage.name)
+ end
+ end
+ end
+
+ def down
+ end
+end
diff --git a/lib/tasks/homework_publishtime.rake b/lib/tasks/homework_publishtime.rake
index a4fc83104..686803b80 100644
--- a/lib/tasks/homework_publishtime.rake
+++ b/lib/tasks/homework_publishtime.rake
@@ -97,7 +97,7 @@ namespace :homework_publishtime do
homework_commons.each do |homework|
homework_detail_manual = homework.homework_detail_manual
homework_detail_manual.update_column('comment_status', 6)
- if homework.homework_type == 4
+ if homework.homework_type == 4 && homework.allow_late
shixun = homework.homework_commons_shixuns.shixun
homework.student_works.where("work_status != 0").each do |student_work|
passed_count = homework.homework_detail_manual.answer_open_evaluation ? had_passed_changllenge_num_rake(student_work.myshixun) : had_passed_no_ans_changllenge_num_rake(student_work.myshixun)
diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js
index c5f8cf99f..f1fa69302 100644
--- a/public/assets/kindeditor/kindeditor.js
+++ b/public/assets/kindeditor/kindeditor.js
@@ -237,6 +237,8 @@ function _getBasePath() {
K.basePath = _getBasePath();
K.options = {
placeholder : '',
+ local_storage_mdu : '',
+ local_storage_id : '',
designMode : true,
fullscreenMode : false,
filterMode : true,
@@ -4784,7 +4786,7 @@ function _bindTabEvent() {
function _bindFocusEvent() {
var self = this;
K(self.edit.textarea[0], self.edit.win).focus(function(e) {
- if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*[\uFF1A][\u4e00-\u9fa5]*[\uFF0C][\u4e00-\u9fa5]*[\uFF0C][\u4e00-\u9fa5]*[\uFF0C][\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(self.edit.html())){
+ if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*[\,]*[\u4e00-\u9fa5]*[\。]*<\/\w*\>\s*$/.test(self.edit.html())){
self.edit.html('');
}
if(typeof self.options.enable_at === 'function'){
@@ -4795,7 +4797,10 @@ function _bindFocusEvent() {
}
}).blur(function(e) {
if(self.isEmpty()) {
- self.edit.html(self.placeholder);
+ if (self.placeholder != "") {
+ self.edit.html("
" + self.placeholder + " ");
+ }
+ // self.edit.html(self.placeholder);
// self.edit.html("
" + self.placeholder + " ");
}
if (self.afterBlur) {
@@ -5184,7 +5189,8 @@ KEditor.prototype = {
if (self.placeholder != "" && self.edit.html() == "") {
self.edit.html("
" + self.placeholder + " ");
}
- }
+ elocalStorage(self, self.local_storage_mdu, self.local_storage_id);
+ }
});
//statusbar.removeClass('statusbar').addClass('ke-statusbar')
// .append('
');
@@ -5323,7 +5329,12 @@ KEditor.prototype = {
}
},
isEmpty : function() {
- return _trim(this.text().replace(/\r\n|\n|\r/, '')) === '';
+ var self = this;
+ if(self.placeholder == ""){
+ return _trim(this.text().replace(/\r\n|\n|\r/, '')) === '';
+ } else{
+ return (_trim(this.text().replace(/\r\n|\n|\r/, '')) === '' || /^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*[\,]*[\u4e00-\u9fa5]*[\。]*<\/\w*\>\s*$/.test(self.edit.html()));
+ }
},
isDirty : function() {
return _trim(this.initContent.replace(/\r\n|\n|\r|t/g, '')) !== _trim(this.html().replace(/\r\n|\n|\r|t/g, ''));
diff --git a/public/images/task/task-su-btn-jie.png b/public/images/task/task-su-btn-jie.png
new file mode 100644
index 000000000..11dc7995f
Binary files /dev/null and b/public/images/task/task-su-btn-jie.png differ
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 76362007e..a02dc5c0d 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -1540,13 +1540,8 @@ function elocalStorage(editor,mdu,id){
editor2 = editor;
var oc = window.sessionStorage.getItem('content'+mdu);
if(oc !== null ){
- if(arguments[2]){
- var h = '您上次有已保存的数据,是否
恢复 ? /
不恢复 ';
- $("#e_tips_"+id).html(h);
- }else{
- var h = '您上次有已保存的数据,是否
恢复 ? /
不恢复 ';
- $("#e_tips").html(h);
- }
+ var h = '您上次有已保存的数据,是否
恢复 ? /
不恢复 ';
+ $("#e_tips_"+id).html(h);
}
setInterval(function() {
d = new Date();
@@ -1559,8 +1554,9 @@ function elocalStorage(editor,mdu,id){
editor.sync();
if(!editor.isEmpty()){
add_data("content",mdu,editor.html());
- var id1 = arguments[2] ? "#e_tip_"+id : "#e_tip";
- var id2 = arguments[2] ? "#e_tips_"+id : "#e_tips";
+ var id1 = "#e_tip_"+id;
+ var id2 = "#e_tips_"+id;
+ console.log(id1 + h + ':' + m + ':' + s +" 保存 ");
$(id1).html(" 数据已于 " + h + ':' + m + ':' + s +" 保存 ");
$(id2).html("");
}
@@ -1581,8 +1577,8 @@ function rec_data(k,mdu,id){
}
function clear_data(k,mdu,id){
window.sessionStorage.removeItem(k+mdu);
- var id1 = arguments[2] ? "#e_tip_"+id : "#e_tip";
- var id2 = arguments[2] ? "#e_tips_"+id : "#e_tips";
+ var id1 = "#e_tip_"+id;
+ var id2 = "#e_tips_"+id;
if(k == 'content'){
$(id2).html("");
}else{
diff --git a/public/javascripts/edu/base_edu.js b/public/javascripts/edu/base_edu.js
index 34e761a12..cae5f4018 100644
--- a/public/javascripts/edu/base_edu.js
+++ b/public/javascripts/edu/base_edu.js
@@ -286,6 +286,16 @@ $(function(){
if($(this).is(':checked')){
$(this).parent().parent('ul').find('input[type="text"]').removeAttr('disabled');
$(this).parent().parent('ul').find('input[type="text"]').removeClass('disabled-bg');
+ if($("input[name='homework_end_time']").val().trim() != ""){
+ var my_date = new Date();
+ var end_date = new Date(Date.parse($("input[name='homework_end_time']").val().replace(/-/g, "/")));
+ var max_date = my_date > end_date ? my_date : end_date;
+ $("input[name='homework_evaluation_start']").val(formate_time(new Date(max_date.setDate(max_date.getDate()+7))));
+ $("input[name='homework_evaluation_end']").val(formate_time(new Date(max_date.setDate(max_date.getDate()+14))));
+ }
+ $("input[name='homework_evaluation_num']").val("3");
+ $("input[name='homework_absence_penalty']").val("2");
+ $("select[name='st_proportion']").removeAttr('disabled').removeClass('disabled-bg');
$("#anon_relate_setting_ul").show();
$("input[name='homework_anonymous_appeal']").attr("checked", "checked");
$("input[name='homework_appeal_time']").datetimepicker({
@@ -303,16 +313,6 @@ $(function(){
$("input[name='homework_appeal_time']").val(formate_time(new Date(max_date.setDate(max_date.getDate()+7))));
}
$("input[name='homework_appeal_penalty']").val("2");
- if($("input[name='homework_end_time']").val().trim() != ""){
- var my_date = new Date();
- var end_date = new Date(Date.parse($("input[name='homework_end_time']").val().replace(/-/g, "/")));
- var max_date = my_date > end_date ? my_date : end_date;
- $("input[name='homework_evaluation_start']").val(formate_time(new Date(max_date.setDate(max_date.getDate()+7))));
- $("input[name='homework_evaluation_end']").val(formate_time(new Date(max_date.setDate(max_date.getDate()+14))));
- }
- $("input[name='homework_evaluation_num']").val("3");
- $("input[name='homework_absence_penalty']").val("2");
- $("select[name='st_proportion']").removeAttr('disabled').removeClass('disabled-bg');
} else{
$(this).parent().parent('ul').find('input[type="text"]').attr('disabled', 'disabled');
$(this).parent().parent('ul').find('input[type="text"]').addClass('disabled-bg');
@@ -842,8 +842,8 @@ function setting_cancel_edit(fn){
$(function(){
$("#comment_no_limit").live('click', function(){
- if(!$(this).hasClass("link-color-blue")){
- $(this).addClass("link-color-blue");
+ if(!$(this).hasClass("color-orange03")){
+ $(this).addClass("color-orange03");
$("input[name='comment[]']").attr("checked", false);
$.ajax({
url: '/student_work?homework='+$("#homework_id").val(),
@@ -872,8 +872,8 @@ $(function(){
});
});
$("#status_no_limit").live('click', function(){
- if(!$(this).hasClass("link-color-blue")){
- $(this).addClass("link-color-blue");
+ if(!$(this).hasClass("color-orange03")){
+ $(this).addClass("color-orange03");
$("input[name='status[]']").attr("checked", false);
$.ajax({
url: '/student_work?homework='+$("#homework_id").val(),
@@ -902,8 +902,8 @@ $(function(){
});
});
$("#group_no_limit").live('click', function(){
- if(!$(this).hasClass("link-color-blue")){
- $(this).addClass("link-color-blue");
+ if(!$(this).hasClass("color-orange03")){
+ $(this).addClass("color-orange03");
$("input[name='group[]']").attr("checked", false);
$.ajax({
url: '/student_work?homework='+$("#homework_id").val(),
@@ -1094,21 +1094,21 @@ function submit_new_subject(){
} else{
$("#new_subject_name_notice").hide();
}
- if(new_subject_description.isEmpty()){
+ if(subject_description_editor.isEmpty()){
check = false;
$("#new_subject_description_notice").show();
} else{
$("#new_subject_description_notice").hide();
}
- if(new_learning_notes.isEmpty()){
+ if(subject_learning_notes_editor.isEmpty()){
check = false;
$("#new_learning_notes_notice").show();
} else {
$("#new_learning_notes_notice").hide();
}
if(check){
- new_subject_description.sync();
- new_learning_notes.sync();
+ subject_description_editor.sync();
+ subject_learning_notes_editor.sync();
$("#new_subject").submit();
}
}
@@ -1121,19 +1121,21 @@ function submit_edit_subject(id){
} else{
$("#new_subject_name_notice").hide();
}
- if($("#new_subject_description").val().trim() == ""){
+ if(subject_description_editor.isEmpty()){
check = false;
$("#new_subject_description_notice").show();
} else{
$("#new_subject_description_notice").hide();
}
- if($("#new_learning_notes").val().trim() == ""){
+ if(subject_learning_notes_editor.isEmpty()){
check = false;
$("#new_learning_notes_notice").show();
} else {
$("#new_learning_notes_notice").hide();
}
if(check){
+ subject_description_editor.sync();
+ subject_learning_notes_editor.sync();
$("#edit_subject_"+id).submit();
}
}
\ No newline at end of file
diff --git a/public/javascripts/edu/course.js b/public/javascripts/edu/course.js
index 1d762ae42..4bfc9ffa2 100644
--- a/public/javascripts/edu/course.js
+++ b/public/javascripts/edu/course.js
@@ -43,25 +43,24 @@ $(function() {
$(".stud-class-set .news .container .member .people .left ul li").live('click', function(e) {
//$(".stud-class-set .news .container .member .people .left ul li").removeClass("sheet");
//$(this).addClass("sheet");
+ var $course_id = $(this).attr("data-course-id");
if($(this).attr("data-option") == "teacher") {
- $("#setting_teacher_list").show();
- $("#setting_student_list").html("");
+ $.get(
+ '/courses/'+$course_id+'/members'
+ )
}
if($(this).attr("data-option") == "allstudent") {
- var $course_id = $(this).attr("data-course-id");
$.get(
'/courses/'+$course_id+'/all_student_list'
)
}
if($(this).attr("data-option") == "noclass") {
- var $course_id = $(this).attr("data-course-id");
$.get(
'/courses/'+$course_id+'/no_group_student_list'
)
}
if($(this).attr("data-option") == "hasclass") {
- var $course_id = $(this).attr("data-course-id");
var $group_id = $(this).attr("data-group-id");
$.get(
'/courses/'+$course_id+'/has_group_student_list?group_id='+$group_id
@@ -188,7 +187,7 @@ function submit_new_group_form(id){
if($("#sy_08").length > 0){
window.location.href = "/courses/"+id+"/all_student_list";
} else{
- window.location.href = "/courses/"+id+"/members";
+ $(".stud-class-set .news .container .member .people .left ul li[data-option='allstudent']").click();
}
}
}
@@ -280,7 +279,7 @@ function submit_delete_group_form(course_id, group_id){
if($("#sy_08").length > 0){
window.location.href = "/courses/"+course_id+"/all_student_list";
} else{
- $(".stud-class-set .news .container .member .people .left ul li[data-option='teacher']").click();
+ $(".stud-class-set .news .container .member .people .left ul li[data-option='allstudent']").click();
}
}
});
@@ -398,7 +397,7 @@ $.fn.peSlider = function(settings){
input.next().next().html("未评分");
input.next().next().show();
} else{
- input.css("color", "#000");
+ input.css("color", "#29bd8b");
input.next().next().hide();
}
slider
@@ -410,7 +409,7 @@ $.fn.peSlider = function(settings){
input.next().next().html("未评分");
input.next().next().show();
} else {
- input.css("color", "#000");
+ input.css("color", "#29bd8b");
input.next().next().hide();
}
input.val(ui.value);
@@ -438,7 +437,7 @@ $.fn.peSlider = function(settings){
input.next().next().html("未评分");
input.next().next().show();
} else {
- input.css("color", "#000");
+ input.css("color", "#29bd8b");
input.next().next().hide();
}
slider.slider('value', inVal);
@@ -453,7 +452,7 @@ $.fn.peSlider = function(settings){
input.next().next().html("未评分");
input.next().next().show();
} else {
- input.css("color", "#000");
+ input.css("color", "#29bd8b");
input.next().next().hide();
}
slider.slider('value', inVal);
@@ -470,7 +469,7 @@ $.fn.peSlider = function(settings){
input.next().next().html("未评分");
input.next().next().show();
} else {
- input.css("color", "#000");
+ input.css("color", "#29bd8b");
input.next().next().hide();
}
});
diff --git a/public/stylesheets/css/edu-admin.css b/public/stylesheets/css/edu-admin.css
index 536338334..7936338e2 100644
--- a/public/stylesheets/css/edu-admin.css
+++ b/public/stylesheets/css/edu-admin.css
@@ -35,7 +35,6 @@ a.edu-txt-w100,.edu-txt-w100{ width:100px; display: inline-block;}
.edu-w245{ width: 245px; }
a.edu-btn{display: inline-block;border:none; padding:0 12px;color: #666!important;border:1px solid #ccc; text-align:center;font-size: 14px; height: 29px;line-height: 29px; border-radius:3px; font-weight: bold;letter-spacing:1px;}
a:hover.edu-btn{ border:1px solid #FF7500; color: #FF7500!important;}
-.edu-cir-grey{ display: inline-block; padding:0px 5px; color:#666; background:#eaeaea; text-align: center; border-radius:15px; font-size:12px; line-height:20px!important;}
/*a.edu-filter-cir-grey{display: inline-block; padding:0px 15px; color:#666; border:1px solid #ddd; text-align: center; border-radius:3px; font-size:12px; height:25px; line-height:25px;}
a:hover.edu-filter-cir-grey,a.edu-filter-cir-grey.active{ border:1px solid #3498db; color:#3498db; }*/
diff --git a/public/stylesheets/css/edu-class.css b/public/stylesheets/css/edu-class.css
index 07a95fc40..319793bc1 100644
--- a/public/stylesheets/css/edu-class.css
+++ b/public/stylesheets/css/edu-class.css
@@ -192,6 +192,7 @@ em{font-style:normal;}
.stud-class-set .news .container .member .people .left li .p1{position:relative;}
.stud-class-set .news .container .member .people .left li .p1 span{max-width:115px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;display:inline-block;float:left}
.edu-break-out{max-width:115px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;display:inline-block;float:left}
+.edu-break-outshort{max-width:105px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;display:inline-block;float:left}
.stud-class-set .news .container .member .people .left li .p1 em{margin-left:10px;font-size:12px;background:#e9e9e9;border-radius:8px;padding:2px 5px;}
.stud-class-set .news .container .member .people .left li .p1 i{color:#ddd;cursor: pointer;position:absolute;right:10px;top:17px;}
.stud-class-set .news .container .member .people .left li .p1 i:hover{color:#FF7500;}
diff --git a/public/stylesheets/css/edu-common.css b/public/stylesheets/css/edu-common.css
index 60af8ff89..f48c6dd91 100644
--- a/public/stylesheets/css/edu-common.css
+++ b/public/stylesheets/css/edu-common.css
@@ -1,5 +1,5 @@
@charset "utf-8";
-body{font-size:14px; line-height:2.0;}
+body{font-size:14px; line-height:2.0;background:#ffffff;}
html{height:100%;}
.newContainer{ min-height:100%; height: auto !important; height: 100%; /*IE6不识别min-height*/position: relative;}
.newMain{ margin: 0 auto; padding-bottom: 155px; }
@@ -12,7 +12,7 @@ div,img,tr,td,table{ border:0;}
table,tr,td{border:0;}
ol,ul,li{ list-style-type:none}
a:link,a:visited{text-decoration:none;color:#898989; }
-a:hover {color:#29bd8b;}
+a:hover {color:#FF7500;}
input,textarea,select{ background: #fff; border:1px solid #eee; color:#666;}
textarea{resize: none;}
/*侧滚动条*/
@@ -38,6 +38,7 @@ textarea{resize: none;}
.none{display: none}
/*通用文字功能样式*/
.font-bd{ font-weight: bold;}
+.color-red-light{color: #F00!important;}
.color-red{ color:#d2322d!important;}
.u-color-light-red{color: #FF6666}
.color-black{color:#333!important;}
@@ -60,11 +61,12 @@ a.color-orange05:hover,i.color-orange05:hover{color:#ff7500!important;}
a.color-grey:hover{color: #FF7500!important;}/*a标签,移入变橙色*/
.color-dark-grey{color:#666!important;}
.color-grey3{color:#333!important;}
+a.color-grey3:hover{color: #ff7500!important;}
.u-color-light-grey{color: #CCCCCC}
.color-light-grey-C{color: #CCCCCC!important;}
.color-light-grey-E{color: #EEEEEE}
.color-grey-bf{color:#bfbfbf!important;}
-.color-grey-bc{color:#bcbcbc;}
+.color-grey-b{color:#bbbbbb!important;}
.-text-danger{ color:#FF6545 }
.color_white{ color:#fff!important;}
@@ -96,7 +98,7 @@ a:hover.link-color-grey03{color:#3498db!important;}
.font-28{ font-size: 28px!important;}
.font-30{ font-size: 30px!important;}
/*通用内外边距*/
-.mt-10{ margin-top:-10px;}.mt2{ margin-top:2px;}.mt3{ margin-top:3px;}.mt5{ margin-top:5px;}.mt6{ margin-top:6px;}.mt7{ margin-top:7px;}.mt8{ margin-top:8px;}.mt10{ margin-top:10px;}.mt12{ margin-top:12px;}.mt15{ margin-top:15px;}.mt20{ margin-top:20px;}.mt25{ margin-top:25px;}.mt30{ margin-top:30px;}.mt50{ margin-top:50px;}
+.mt-10{ margin-top:-10px;}.mt2{ margin-top:2px;}.mt3{ margin-top:3px;}.mt5{ margin-top:5px;}.mt6{ margin-top:6px;}.mt7{ margin-top:7px;}.mt8{ margin-top:8px;}.mt10{ margin-top:10px;}.mt12{ margin-top:12px;}.mt15{ margin-top:15px;}.mt20{ margin-top:20px;}.mt25{ margin-top:25px;}.mt30{ margin-top:30px;}.mt50{ margin-top:50px;}.mt95{ margin-top:95px;}
.mb5{ margin-bottom: 5px;}.mb10{ margin-bottom: 10px;}.mb15{ margin-bottom: 15px;}.mb20{ margin-bottom: 20px;}.mb25{ margin-bottom: 25px;}.mb30{ margin-bottom: 30px;}.mb40{ margin-bottom: 40px;}.mb50{ margin-bottom: 50px;}
.ml-3{ margin-left: -3px;}.ml5{ margin-left: 5px;}.ml6{ margin-left: 6px;}.ml10{ margin-left: 10px;}.ml15{ margin-left: 15px;}.ml20{ margin-left: 20px;}.ml25{ margin-left: 25px;}.ml30{ margin-left: 30px;}.ml33{ margin-left: 33px;}.ml35{ margin-left:35px;}.ml40{margin-left:40px;}.ml42{margin-left:42px;}.ml50{ margin-left: 50px;}.ml75{ margin-left: 75px;}.ml95{ margin-left: 95px;}.ml115{margin-left: 115px}.ml230{ margin-left: 230px;}
.mr3{margin-right: 3px}.mr5{ margin-right: 5px;}.mr10{ margin-right: 10px;}.mr15{ margin-right: 15px;}.mr18{ margin-right: 18px;}.mr20{ margin-right: 20px;}.mr25{ margin-right: 25px;}.mr30{ margin-right:30px;}.mr40{margin-right:40px;}.mr50{ margin-right: 50px;}.mr60{ margin-right:60px;}
@@ -250,6 +252,7 @@ a:hover.edu-btn{ border:1px solid #5faee3; color: #5faee3!important;}
.edu-cir-grey{ display: inline-block; padding:0px 5px; color:#666; background:#f3f3f3; text-align: center; border-radius:15px; font-size:12px; line-height:20px!important;}
.edu-cir-grey1{ display: inline-block; padding:0px 5px; margin-left: 5px; color:#666; background:#ccc; text-align: center; border-radius:15px; font-size:12px; line-height:20px!important;}
.edu-cir-grey-q{ display: inline-block; padding:0px 7px; color:#666; background:#f3f3f3; text-align: center; border-radius:15px; font-size:12px; line-height:20px!important;}
+.edu-cir-orange{ display: inline-block; padding:0px 7px; color:#fff; background:#FF7500; text-align: center; border-radius:15px; font-size:12px; line-height:20px!important;}
/*a.edu-filter-cir-grey{display: inline-block; padding:0px 15px; color:#666; border:1px solid #ddd; text-align: center; border-radius:3px; font-size:12px; height:25px; line-height:25px;}
a:hover.edu-filter-cir-grey,a.edu-filter-cir-grey.active{ border:1px solid #3498db; color:#3498db; }*/
diff --git a/public/stylesheets/css/edu-popup.css b/public/stylesheets/css/edu-popup.css
index 022e114e7..6dd7ca7eb 100644
--- a/public/stylesheets/css/edu-popup.css
+++ b/public/stylesheets/css/edu-popup.css
@@ -11,15 +11,15 @@
/************实训弹窗****************/
.task-popup-warp{ width: 100%; height:100%; background:black; position:fixed;}
-.task-popup-box{ position: relative; margin:150px auto; }
+.task-popup-box{ position: relative; margin:150px auto 0px; }
.task-box1{ width:428px; height:420px;background:url(/images/task/task-success.png) 0px 0px no-repeat;}
-.task-box2{ width:496px; height:373px;background:url(/images/task/task-success02.png) 0px 50px no-repeat;}
+.task-box2{ width:496px; height:373px;position: relative;}/*background:url(/images/task/task-success02.png) 0px 50px no-repeat;*/
a.task-popup-close{ display: block; background:url(/images/task/task-close.png) 0px 0px no-repeat; width: 31px; height: 31px; position:absolute; right:5px; top:100px;}
a:hover.task-popup-close{background:url(/images/task/task-close.png) -40px 0px no-repeat; }
.task-su-con{ text-align: center; padding-top:285px;}
.task-su-p{ font-size: 20px; color:#ee4a1f; font-weight: bold;}
-a.task-su-btn{display: block;background:url(/images/task/task-su-btn.png) 0px -64px no-repeat; width: 138px; height: 57px;color:#ee4a1f; line-height: 50px; text-align: center; font-size: 16px; margin:20px auto;}
-a:hover.task-su-btn{background:url(/images/task/task-su-btn.png) 0px 0px no-repeat; }
+a.task-su-btn{display: block;background:url(/images/task/task-su-btn-jie.png) 0px -64px no-repeat; width: 138px; height: 53px;color:#ee4a1f; line-height: 50px; text-align: center; font-size: 16px; margin:20px auto;}
+a:hover.task-su-btn{background:url(/images/task/task-su-btn-jie.png) 0px 0px no-repeat;height: 53px;}
a.task-su-btn-white{ display: inline-block; padding:8px 25px; border:1px solid #fff; color:#fff; text-align: center; border-radius:5px; font-size:14px;}
a:hover.task-su-btn-white{ color: #ee4a1f; border:1px solid #ee4a1f; }
diff --git a/public/stylesheets/css/ketang.css b/public/stylesheets/css/ketang.css
index 6f5e0a6e6..1105b771a 100644
--- a/public/stylesheets/css/ketang.css
+++ b/public/stylesheets/css/ketang.css
@@ -4,7 +4,7 @@
.active-class .search .open{padding-top:6px;}
.active-class .search b{cursor:pointer;}
.active-class .search span input{border:none;outline:none;padding-right:80px;display:none;}
-.active-class .content .sub-con{width:23.7%;border:1px solid #eee;background:#fff;margin: 0 1.5% 1.5% 0px;box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);}
+.active-class .content .sub-con{width:23.69%;border:1px solid #eee;background:#fff;margin: 0 1.5% 1.5% 0px;box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);}
.active-class .content .sub-con:nth-child(4n+0){margin:0 0 1.5% 0;}
.active-class .content .sub-con:hover{box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.15);cursor: pointer;-webkit-animation: bounce-down 1s linear 1;animation: bounce-down 1s linear 1;}
.active-class .content .sub-con .top{height:154px;}
diff --git a/public/stylesheets/css/moduel.css b/public/stylesheets/css/moduel.css
index 8c702cdfe..35c74f477 100644
--- a/public/stylesheets/css/moduel.css
+++ b/public/stylesheets/css/moduel.css
@@ -88,7 +88,7 @@ textarea.muban_textarea{ width: 87%;border:1px solid #ddd; background:#fff; colo
.newupload_textarea{ width: 316px; padding:5px; border:1px solid #c8c8c8;}
#muban_popup_box label.newupload_innnerlabel{ width: auto; text-align: left;}
/*新版导入资源弹框20161107byLB*/
-.newupload_conbox{ background: #fff; padding:15px; padding-bottom: 0;}
+.newupload_conbox{ background: #fff;padding-bottom: 0;}
.newupload_navbox{border-bottom:1px solid #dbdbdb;}
.newupload_nav { height: 30px; line-height: 30px; background: #e7e7e7; }
.newupload_nav li {float:left; padding:0 15px; display: block; text-align:center; }
diff --git a/public/stylesheets/css/structure.css b/public/stylesheets/css/structure.css
index 3658fa9ab..270678131 100644
--- a/public/stylesheets/css/structure.css
+++ b/public/stylesheets/css/structure.css
@@ -184,20 +184,21 @@ a.postTypeGrey:hover {color:#3b94d6;}
.homepagePostBrief {width:965px; margin:0px auto; position:relative;}
.eduHomepagePostBrief {width:1200px; margin:0px auto; position:relative;}
.homepagePostPortrait {float:left; width:50px;}
+.homepagePostPortrait img{float: left;margin-top: 5px}
.homepagePostDes {float:left; width:890px; margin-left:15px; }
.eduHomepagePostDes {float:left; width:92%; margin-left:15px; }
-.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px; margin-right: 20px;}
-.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;}
-.homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 5px;}
-.homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;}
-.homepagePostSubmit:hover {background-color:#d8d8d8;}
+.homepagePostTo {font-size:14px; color:#bbbbbb; margin-bottom:12px; margin-right: 20px;}
+.homepagePostTitle {font-size:16px; color:#484848;}
+.homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 25px;}
+.homepagePostSubmit {font-size:14px; color:#fff!important; border:1px solid #FF7500; background-color:#FF7500; float:left; margin-right:15px; padding:0px 10px;}
+/*.homepagePostSubmit:hover {background-color:#d8d8d8;}*/
.homepagePostIntro {font-size:14px; color:#484848;overflow:hidden;}
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro a{color: #136ec2;}
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important;}
-.homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;}
+.homepagePostDeadline {font-size:12px; color:#333; float:left; margin-top: 2px;}
.homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;}
.homepagePostReply {width:965px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;}
.eduHomepagePostReply {width:1200px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;}
@@ -533,4 +534,10 @@ a.user_editinfo{border-top:1px solid #e5e5e5; height:30px; line-height:30px; tex
.homepageClickBackground{ background-color:#3b94d6; flex:1; text-align: center }
.flex-cell_homepage:hover{ background-color:#3b94d6;}
-.feedback_error p{display: inline;}
\ No newline at end of file
+.feedback_error p{display: inline;}
+.activities_btn{border: 1px solid #FF7500;}
+.activities_btn li{flex: 1;height: 50px;line-height: 50px;float: left;text-align: center;border-right: 1px solid #FF7500;}
+.activities_btn li:last-child{border: none;}
+.activities_btn li:hover{color:#fff!important;background: #FF7500;}
+.activities_btn li:hover a{color: #fff!important;}
+.activities_btn li:hover .edu-cir-orange{background: #fff;color: #FF7500}
\ No newline at end of file
diff --git a/public/stylesheets/css/taskstyle.css b/public/stylesheets/css/taskstyle.css
index baa656344..927835b6f 100644
--- a/public/stylesheets/css/taskstyle.css
+++ b/public/stylesheets/css/taskstyle.css
@@ -417,3 +417,7 @@ html>body #ajax-indicator-base { position: fixed; }
.empty{background: #494A4C;display: inline; margin: 0 2px; padding: 0 3px;}
.tab-key{background: #494A4C;display: inline; margin: 0 2px; padding: 0 6px;}
.nav_check_item li{padding: 0px 17px!important;}
+
+/*选择题tab切换*/
+.nav_option li{overflow: hidden;width: 110px; text-align: center;cursor: pointer;height: 38px;line-height: 38px;border-top-right-radius: 5px;border-top-left-radius: 5px;border:1px solid #e2e2e2;border-bottom: 0px;color: #FF7500;border-right: none;}
+.nav_option li:last-child{border-right: 1px solid #e2e2e2;}
\ No newline at end of file