Merge branch 'develop' into dev_newproject

This commit is contained in:
huang 2016-11-22 16:18:30 +08:00
commit bbf9ca075a
87 changed files with 1643 additions and 407 deletions

View File

@ -23,7 +23,7 @@ class CoursesController < ApplicationController
before_filter :can_show_course, :except => [] before_filter :can_show_course, :except => []
before_filter :logged_user_by_apptoken,:only => [:show,:feedback] before_filter :logged_user_by_apptoken,:only => [:show,:feedback]
before_filter :find_course, :except => [ :index, :search, :new,:join,:unjoin, :create, :new_join, :course,:join_private_courses, :join_course_multi_role] before_filter :find_course, :except => [ :index, :search, :new, :join, :unjoin, :create, :new_join, :course, :join_private_courses, :join_course_multi_role]
before_filter :authorize_course, :only => [:show, :settings, :update, :course] before_filter :authorize_course, :only => [:show, :settings, :update, :course]
before_filter :authorize_course_global, :only => [:new,:create] before_filter :authorize_course_global, :only => [:new,:create]
before_filter :toggleCourse, :only => [:finishcourse, :restartcourse] before_filter :toggleCourse, :only => [:finishcourse, :restartcourse]
@ -303,18 +303,21 @@ class CoursesController < ApplicationController
@member = Member.where(:course_id => @course.id, :user_id => params[:user_id]).first @member = Member.where(:course_id => @course.id, :user_id => params[:user_id]).first
@member.course_group_id = params[:course_group_id].to_i @member.course_group_id = params[:course_group_id].to_i
@member.save @member.save
if params[:group_id] && params[:group_id] != "-1" if params[:group_id] != "0"
@group = CourseGroup.find params[:group_id] if params[:group_id] == "-1"
results = student_homework_score(@group.id,0,0,"desc") @group = "-1"
@limit = 50 else
@page = params[:page].nil? ? 1 : params['page'].to_i @group = CourseGroup.find params[:group_id]
@members_count = results.count end
@mem_pages = Paginator.new @members_count, @limit, @page # results = student_homework_score(@group.id,0,0,"desc")
@results = paginateHelper results, @limit # @limit = 50
else # @page = params[:page].nil? ? 1 : params['page'].to_i
@course_groups = @course.course_groups # @members_count = results.count
@no_group_count = @course.student.count - @course.members.where("course_group_id != 0").count # @mem_pages = Paginator.new @members_count, @limit, @page
# @results = paginateHelper results, @limit
end end
@course_groups = @course.course_groups
@no_group_count = @course.student.count - @course.members.where("course_group_id != 0").count
@canShowCode = isCourseTeacher(User.current.id,@course) @canShowCode = isCourseTeacher(User.current.id,@course)
respond_to do |format| respond_to do |format|
format.js format.js
@ -561,6 +564,7 @@ class CoursesController < ApplicationController
def delete_member def delete_member
member = @course.members.find params[:member_id] member = @course.members.find params[:member_id]
student_role = member.member_roles.where("role_id = 10").first student_role = member.member_roles.where("role_id = 10").first
teacher_role = member.member_roles.where("role_id = 7 || role_id = 9").first
if member && member.deletable? && student_role if member && member.deletable? && student_role
user_admin = CourseInfos.where("user_id = ? and course_id = ?", member.user_id, @course.id) user_admin = CourseInfos.where("user_id = ? and course_id = ?", member.user_id, @course.id)
if user_admin.size > 0 if user_admin.size > 0
@ -569,8 +573,9 @@ class CoursesController < ApplicationController
joined = StudentsForCourse.where('student_id = ? and course_id = ?', member.user_id,@course.id) joined = StudentsForCourse.where('student_id = ? and course_id = ?', member.user_id,@course.id)
joined.destroy_all joined.destroy_all
if member.member_roles.count > 1 if member.member_roles.count > 1&& student_role && teacher_role
student_role.destroy student_role.destroy
teacher_role.update_attribute("is_current", 1)
member.update_attribute("course_group_id", 0) member.update_attribute("course_group_id", 0)
else else
member.destroy member.destroy
@ -829,11 +834,11 @@ class CoursesController < ApplicationController
end end
if @course if @course
#发送微信消息 #发送微信消息
# count = ShieldWechatMessage.where("container_type='User' and container_id=#{User.current.id} and shield_type='Course' and shield_id=#{@course.id}").count count = ShieldWechatMessage.where("container_type='User' and container_id=#{User.current.id} and shield_type='Course' and shield_id=#{@course.id}").count
# if count == 0 if count == 0
# ss = SyllabusesService.new ss = SyllabusesService.new
# ss.send_wechat_create_class_notice User.current,@course ss.send_wechat_create_class_notice User.current,@course
# end end
respond_to do |format| respond_to do |format|
flash[:notice] = l(:notice_successful_create) flash[:notice] = l(:notice_successful_create)
format.html {redirect_to course_url(@course)} format.html {redirect_to course_url(@course)}
@ -1303,6 +1308,21 @@ class CoursesController < ApplicationController
redirect_to user_url(User.current) redirect_to user_url(User.current)
end end
#归档班级
def archive_course
if params[:source] == "1"
@syllabus = @course.syllabus
end
if params[:type] == "0"
@course.delete!
else
@course.update_attribute(:is_delete, false)
end
respond_to do |format|
format.js
end
end
# 恢复已删除的课程 # 恢复已删除的课程
def renew def renew
if User.current.admin? if User.current.admin?

View File

@ -374,12 +374,13 @@ class ExerciseController < ApplicationController
=end =end
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin? @is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
@all_exercises = @course.exercises.where("exercise_status > 1").order("created_at desc") @all_exercises = @course.exercises.where("exercise_status > 1").order("created_at desc")
@exercise_count = @exercise.exercise_users.where('score is not NULL').count student_id = @course.student.blank? ? "(-1)" : "(" + @course.student.map{|student| student.student_id}.join(",") + ")"
if @is_teacher || (!@exercise.exercise_users.where(:user_id => User.current.id).empty? && @exercise.end_time <= Time.now) @exercise_count = @exercise.exercise_users.where("score is not NULL and user_id in #{student_id}").count
@exercise_users_list = @exercise.exercise_users.where('score is not NULL') if @is_teacher || (!@exercise.exercise_users.where("user_id = #{User.current.id} and user_id in #{student_id}").empty? && @exercise.end_time <= Time.now)
@exercise_users_list = @exercise.exercise_users.where("score is not NULL and user_id in #{student_id}")
@show_all = true; @show_all = true;
elsif !@exercise.exercise_users.where(:user_id => User.current.id).empty? && @exercise.end_time > Time.now elsif !@exercise.exercise_users.where("user_id = #{User.current.id} and user_id in #{student_id}").empty? && @exercise.end_time > Time.now
@exercise_users_list = @exercise.exercise_users.where("user_id = ? and score is not NULL",User.current.id) @exercise_users_list = @exercise.exercise_users.where("user_id = ? and score is not NULL and user_id in #{student_id}",User.current.id)
else else
@exercise_users_list = [] @exercise_users_list = []
end end
@ -537,7 +538,7 @@ class ExerciseController < ApplicationController
else else
# 更新提交状态 # 更新提交状态
cur_exercise_user = ExerciseUser.where("user_id =? and exercise_id=?", User.current, @exercise.id).first cur_exercise_user = ExerciseUser.where("user_id =? and exercise_id=?", User.current, @exercise.id).first
cur_exercise_user.update_attributes(:status => 1) cur_exercise_user.update_attributes(:status => 1, :commit_status => 1)
# 答题过程中需要统计完成量 # 答题过程中需要统计完成量
@uncomplete_question = get_uncomplete_question(@exercise, User.current) @uncomplete_question = get_uncomplete_question(@exercise, User.current)
# 获取改学生的考试得分 # 获取改学生的考试得分
@ -618,6 +619,95 @@ class ExerciseController < ApplicationController
score = score1 + score2 + score3 score = score1 + score2 + score3
end end
#导入试卷的弹框
def other_exercise
# 查作者是我,或者作者是当前课程的老师,且不在当前课程内的试卷 进行导入
@order,@b_sort = params[:order] || "created_at",params[:sort] || "desc"
@r_sort = @b_sort == "desc" ? "asc" : "desc"
courses = User.current.courses.not_deleted.select { |course| User.current.allowed_to?(:as_teacher,course)}
course_ids = courses.empty? ? "(-1)" : "(" + courses.map { |course| course.id}.join(',') + ")"
#none_courses = User.current.courses.where("is_delete = 1 or #{Course.table_name}.id = #{params[:course_id].to_i}")
#none_course_ids = none_courses.empty? ? "(-1)" : "(" + none_courses.map { |course| course.id}.join(',') + ")"
@exercises = Exercise.where("(user_id = #{User.current.id} or course_id in #{course_ids}) and course_id != #{params[:course_id].to_i}").order("#{@order} #{@b_sort}")
@course_id = params[:course_id]
@is_remote = true
@ex_count = @exercises.count
@ex_pages = Paginator.new @ex_count, 10, params['page'] || 1
@offset ||= @ex_pages.offset
@exercises = paginateHelper @exercises,10
respond_to do |format|
format.js
end
end
#搜索导入页面的试卷
def search_exercises
@order,@b_sort = params[:order] || "created_at",params[:sort] || "desc"
@r_sort = @b_sort == "desc" ? "asc" : "desc"
search = params[:name].to_s.strip.downcase
courses = User.current.courses.not_deleted.select { |course| User.current.allowed_to?(:as_teacher,course)}
course_ids = courses.empty? ? "(-1)" : "(" + courses.map { |course| course.id}.join(',') + ")"
@exercises = Exercise.where("(user_id = #{User.current.id} or course_id in #{course_ids}) and course_id != #{params[:course_id].to_i} and exercise_name like '%#{search}%'").order("#{@order} #{@b_sort}")
@is_remote = true
@ex_count = @exercises.count
@ex_pages = Paginator.new @ex_count, 10, params['page'] || 1
@offset ||= @ex_pages.offset
@exercises = paginateHelper @exercises,10
@course_id = params[:course_id]
respond_to do |format|
format.js
end
end
#将选择的试卷导入到班级
def import_other_exercise
course_id = params[:course_id]
@course = Course.find(course_id)
params[:exercise_id].each_with_index do |ex,i|
exercise = Exercise.find(ex)
option = {
:exercise_name => exercise.exercise_name,
:exercise_status => 1,
:user_id => User.current.id,
:show_result => 1,
:course_id => @course.id,
:time => exercise.time,
:exercise_description => exercise.exercise_description
}
@exercise = Exercise.create option
exercise.exercise_questions.each do |q|
option = {
:question_title => q[:question_title],
:question_type => q[:question_type] || 1,
:question_number => q[:question_number],
:question_score => q[:question_score]
}
@exercise_question = @exercise.exercise_questions.new option
for i in 1..q.exercise_choices.count
choice_option = {
:choice_position => i,
:choice_text => q.exercise_choices[i-1][:choice_text]
}
@exercise_question.exercise_choices.new choice_option
end
for i in 1..q.exercise_standard_answers.count
standard_answer_option = {
:exercise_choice_id => q.exercise_standard_answers[i-1][:exercise_choice_id],
:answer_text => q.exercise_standard_answers[i-1][:answer_text]
}
@exercise_question.exercise_standard_answers.new standard_answer_option
end
end
@exercise.save
end
respond_to do |format|
format.js
end
end
private private
#测验列表转换为excel #测验列表转换为excel
def exercise_to_xls items def exercise_to_xls items

View File

@ -261,20 +261,20 @@ class HomeworkCommonController < ApplicationController
work_ids = "(" + @homework.student_works.has_committed.map(&:id).join(",") + ")" work_ids = "(" + @homework.student_works.has_committed.map(&:id).join(",") + ")"
if @homework.homework_type != 3 if @homework.homework_type != 3
@homework.student_works.has_committed.each do |student_work| @homework.student_works.has_committed.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0 student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
student_work.save student_work.save
end end
else else
@homework.student_works.has_committed.each do |student_work| @homework.student_works.has_committed.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0 student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
student_work.save student_work.save
pros = student_work.student_work_projects.where("is_leader = 0") pros = student_work.student_work_projects.where("is_leader = 0")
user_ids = pros.empty? ? "(-1)" : "(" + pros.map{|stu|stu.user_id}.join(",") + ")" user_ids = pros.empty? ? "(-1)" : "(" + pros.map{|stu|stu.user_id}.join(",") + ")"
student_works = @homework.student_works.where("user_id in #{user_ids}") student_works = @homework.student_works.where("user_id in #{user_ids}")
student_works.each do |st_work| student_works.each do |st_work|
absence_penalty_count = st_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - st_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count absence_penalty_count = st_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - st_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
st_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0 st_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
st_work.save st_work.save
end end

View File

@ -769,7 +769,7 @@ class ProjectsController < ApplicationController
end end
end end
#配置成员弹框 # 配置成员弹框
def delete_member_pop def delete_member_pop
@member = Member.find(params[:member].to_i) @member = Member.find(params[:member].to_i)
respond_to do |format| respond_to do |format|

View File

@ -91,10 +91,11 @@ class PullRequestsController < ApplicationController
# 如果分支有改动 # 如果分支有改动
if compare_pull_request(source_branch, target_project_id, target_branch) if compare_pull_request(source_branch, target_project_id, target_branch)
# 如果传送了目标项目ID即向fork源项目发送请求 # 如果传送了目标项目ID即向fork源项目发送请求
if params[:forked_project_id] && params[:source_project] == "forked_project_name" # if params[:forked_project_id] && params[:source_project] == "forked_project_name"
if params[:target_project_id]
target_project_id = params[:forked_project_id].to_i target_project_id = params[:forked_project_id].to_i
request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch, :target_project_id => target_project_id) request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch, :target_project_id => target_project_id)
@fork_project_name = Project.find(@project.forked_from_project_id).try(:name) @fork_project_name = Project.find(target_project_id).try(:name)
@fork_pr_message = true if @fork_project_name @fork_pr_message = true if @fork_project_name
else else
request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch) request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch)

View File

@ -988,20 +988,20 @@ class StudentWorkController < ApplicationController
work_ids = "(" + @homework.student_works.has_committed.map(&:id).join(",") + ")" work_ids = "(" + @homework.student_works.has_committed.map(&:id).join(",") + ")"
if @homework.homework_type != 3 if @homework.homework_type != 3
@homework.student_works.has_committed.each do |student_work| @homework.student_works.has_committed.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0 student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0
student_work.save student_work.save
end end
else else
@homework.student_works.has_committed.each do |student_work| @homework.student_works.has_committed.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0 student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0
student_work.save student_work.save
pros = student_work.student_work_projects.where("is_leader = 0") pros = student_work.student_work_projects.where("is_leader = 0")
user_ids = pros.empty? ? "(-1)" : "(" + pros.map{|stu|stu.user_id}.join(",") + ")" user_ids = pros.empty? ? "(-1)" : "(" + pros.map{|stu|stu.user_id}.join(",") + ")"
student_works = @homework.student_works.where("user_id in #{user_ids}") student_works = @homework.student_works.where("user_id in #{user_ids}")
student_works.each do |st_work| student_works.each do |st_work|
absence_penalty_count = st_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - st_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count absence_penalty_count = st_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - st_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
st_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0 st_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0
st_work.save st_work.save
end end

View File

@ -96,8 +96,10 @@ class SyllabusesController < ApplicationController
end end
end end
#班级列表
#班级列表 list_type: 1 班级列表 2 归档班级列表
def syllabus_courselist def syllabus_courselist
@list_type = params[:list_type].to_i || 0
@order, @c_sort,@type = params[:order] || 1, params[:sort] || 1, params[:type] || 1 @order, @c_sort,@type = params[:order] || 1, params[:sort] || 1, params[:type] || 1
#确定 sort_type #确定 sort_type
@ -110,7 +112,7 @@ class SyllabusesController < ApplicationController
sort_name = "updated_on" sort_name = "updated_on"
sort_type = @c_sort == 1 ? "asc" : "desc" sort_type = @c_sort == 1 ? "asc" : "desc"
@courses = @syllabus.courses.where("is_delete = ?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS #{sort_name}").order("#{sort_name} #{sort_type}") @courses = @syllabus.courses.where("is_delete = ?", @list_type).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS #{sort_name}").order("#{sort_name} #{sort_type}")
#根据 作业+资源数排序 #根据 作业+资源数排序
if @order.to_i == 2 if @order.to_i == 2

View File

@ -90,11 +90,51 @@ class UsersController < ApplicationController
# order 排序条件 # order 排序条件
# subject 主题搜索用注意搜索和列表调用同一方法通过参数或者remote区分 # subject 主题搜索用注意搜索和列表调用同一方法通过参数或者remote区分
def user_issues def user_issues
subject = params[:subject] @subject = params[:subject]
author_id = params[:author_id] # author_id = params[:author_id]
@issues = Issue.where("author_id =? or assigned_to_id =? and subject like ?", (author_id ? author_id : @user.id) , @user, "%#{subject}%") params[:assigned_to_id].to_i == 0 ? @assigned_to = nil : @assigned_to = params[:assigned_to_id].to_i
params[:author_id].to_i == 0 ? author_id = nil : author_id = params[:author_id].to_i
params[:project_id].to_i == 0 ? @project_id = nil : @project_id = params[:project_id]
if @project_id.nil?
if @assigned_to.nil?
if author_id.nil?
@issues = Issue.where("(author_id =? or assigned_to_id =? ) and subject like ?",
@user.id , @user.id, "%#{@subject}%").order('updated_on desc')
else
@issues = Issue.where("author_id =? and subject like ?",
author_id , "%#{@subject}%").order('updated_on desc')
end
else
@issues = Issue.where("assigned_to_id =? and subject like ?", @assigned_to, "%#{@subject}%").order('updated_on desc')
end
else
if @assigned_to.nil?
if author_id.nil?
@issues = Issue.where("(author_id =? or assigned_to_id =? ) and project_id=? and subject like ?",
(author_id ? author_id : @user.id) , @user.id, @project_id, "%#{@subject}%").order('updated_on desc')
else
@issues = Issue.where("author_id =? and project_id=? and subject like ?",
author_id , @project_id, "%#{@subject}%").order('updated_on desc')
end
else
@issues = Issue.where("assigned_to_id =? and project_id=? and subject like ?",
@assigned_to, @project_id, "%#{@subject}%").order('updated_on desc')
end
end
@issues_filter = Issue.where("author_id =? or assigned_to_id =?", (author_id ? author_id : @user.id) , @user).order('updated_on desc')
@issues_assigned_count = Issue.where("assigned_to_id =? and subject like ?", @user.id, "%#{@subject}%").count
@issues_author_count = Issue.where("author_id =? and subject like ?", @user.id, "%#{@subject}%").count
@issue_open_count = Issue.where(" (author_id =? or assigned_to_id =?) and status_id in (1,2,3,4,6)", (author_id ? author_id : @user.id) , @user).count
@issue_close_count = Issue.where("(author_id =? or assigned_to_id =?) and status_id = 5", (author_id ? author_id : @user.id) , @user.id).count
@issue_count = @issues.count
@limit = 10
@is_remote = true
@issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1
@offset ||= @issue_pages.offset
@issues = paginateHelper @issues, @limit
respond_to do |format| respond_to do |format|
format.html{render :layout => 'new_base_user'} format.html{render :layout => 'static_base'}
format.api format.api
format.js format.js
end end

View File

@ -3727,6 +3727,9 @@ end
#作业类型 #作业类型
def homework_type_option def homework_type_option
type = [] type = []
option0 = []
option0 << "请选择作业类型"
option0 << 0
option1 = [] option1 = []
option1 << "普通作业" option1 << "普通作业"
option1 << 1 option1 << 1
@ -3736,6 +3739,7 @@ def homework_type_option
option3 = [] option3 = []
option3 << "分组作业" option3 << "分组作业"
option3 << 3 option3 << 3
type << option0
type << option1 type << option1
type << option2 type << option2
type << option3 type << option3

View File

@ -264,7 +264,9 @@ module ProjectsHelper
# Returns a set of options for a select field, grouped by project. # Returns a set of options for a select field, grouped by project.
def version_options_for_select(versions, selected=nil) def version_options_for_select(versions, selected=nil)
project_name = versions.blank? ? "" : versions.first.project.name
grouped = Hash.new {|h,k| h[k] = []} grouped = Hash.new {|h,k| h[k] = []}
grouped[project_name] << ["请选择里程碑", 0]
versions.each do |version| versions.each do |version|
grouped[version.project.name] << [version.name, version.id] grouped[version.project.name] << [version.name, version.id]
end end

View File

@ -29,6 +29,30 @@ module UsersHelper
["#{l(:status_locked)} (#{user_count_by_status[3].to_i})", '3']], selected.to_s) ["#{l(:status_locked)} (#{user_count_by_status[3].to_i})", '3']], selected.to_s)
end end
def issue_list(issues, &block)
ancestors = []
issues.each do |issue|
while (ancestors.any? && !issue.is_descendant_of?(ancestors.last))
ancestors.pop
end
yield issue, ancestors.size
ancestors << issue unless issue.leaf?
end
end
# 我的issue 来源
def options_for_issue_project_list( issues )
issues = issues.group_by{|issue| issue.project_id}
issues.map{ |issue| [Project.find(issue[0]).name, issue[0]]}.unshift(["来源", 0])
end
# 我的issue指派给我
def options_for_my_issue_list(issues)
# issues = issues.group_by{|issue| issue.assigned_to_id }
# issues.map{ |issue| [User.find(issue[0]).show_name, issue[0]]}.unshift(["指派给", 0])
end
def get_resource_type type def get_resource_type type
case type case type
when 'Course' when 'Course'

View File

@ -1,4 +1,5 @@
class ExerciseUser < ActiveRecord::Base class ExerciseUser < ActiveRecord::Base
#commit_status 0:未交 1:已交
include Redmine::SafeAttributes include Redmine::SafeAttributes
belongs_to :user belongs_to :user

View File

@ -15,7 +15,7 @@ class HomeworkCommon < ActiveRecord::Base
has_one :homework_detail_group, :dependent => :destroy has_one :homework_detail_group, :dependent => :destroy
has_many :student_work_projects, :dependent => :destroy has_many :student_work_projects, :dependent => :destroy
has_many :homework_tests, :dependent => :destroy has_many :homework_tests, :dependent => :destroy
has_many :student_works, :dependent => :destroy, :conditions => "is_test=0" has_many :student_works, :dependent => :destroy, :conditions => "is_test=0 and is_delete != 1"
has_many :student_works_evaluation_distributions, :through => :student_works #一个作业的分配的匿评列表 has_many :student_works_evaluation_distributions, :through => :student_works #一个作业的分配的匿评列表
has_many :journals_for_messages, :as => :jour, :dependent => :destroy has_many :journals_for_messages, :as => :jour, :dependent => :destroy
has_many :apply_homeworks, :dependent => :destroy has_many :apply_homeworks, :dependent => :destroy

View File

@ -4,7 +4,7 @@ class StudentWork < ActiveRecord::Base
belongs_to :homework_common belongs_to :homework_common
belongs_to :user belongs_to :user
has_many :student_work_projects has_many :student_work_projects, :dependent => :destroy
has_many :student_works_evaluation_distributions, :dependent => :destroy has_many :student_works_evaluation_distributions, :dependent => :destroy
has_many :student_works_scores, :dependent => :destroy has_many :student_works_scores, :dependent => :destroy
belongs_to :project belongs_to :project

View File

@ -9,11 +9,21 @@ class StudentsForCourse < ActiveRecord::Base
validates_uniqueness_of :student_id, :scope => :course_id validates_uniqueness_of :student_id, :scope => :course_id
after_destroy :delete_student_works after_destroy :delete_student_works
after_create :recovery_student_works
#退出班级或删除学生时隐藏学生的作品
def delete_student_works def delete_student_works
course = self.course course = self.course
homework_ids = course.homework_commons.blank? ? "(-1)" : "(" + course.homework_commons.map{|hw| hw.id}.join(",") + ")" homework_ids = course.homework_commons.blank? ? "(-1)" : "(" + course.homework_commons.map{|hw| hw.id}.join(",") + ")"
student_works = StudentWork.where("user_id = #{self.student_id} && homework_common_id in #{homework_ids}") student_works = StudentWork.where("user_id = #{self.student_id} && homework_common_id in #{homework_ids}")
student_works.destroy_all student_works.update_all(:is_delete => 1)
end
#加入班级时还原作品
def recovery_student_works
course = self.course
homework_ids = course.homework_commons.blank? ? "(-1)" : "(" + course.homework_commons.map{|hw| hw.id}.join(",") + ")"
student_works = StudentWork.where("user_id = #{self.student_id} && homework_common_id in #{homework_ids}")
student_works.update_all(:is_delete => 0)
end end
end end

View File

@ -452,12 +452,20 @@ class CoursesService
@state = 2 @state = 2
return @state return @state
end end
@member = Member.where('course_id = ? and user_id = ?', params[:object_id], user.id) @member = Member.where('course_id = ? and user_id = ?', params[:object_id], user.id).first
if @member.nil? || @member.count == 0 if @member.nil?
@state = 1 @state = 1
return @state return @state
end end
@member.first.destroy student_role = @member.member_roles.where("role_id = 10").first
teacher_role = @member.member_roles.where("role_id = 7 || role_id = 9").first
if @member.member_roles.count > 1 && student_role && teacher_role
student_role.destroy
teacher_role.update_attribute("is_current", 1)
@member.update_attribute("course_group_id", 0)
else
@member.destroy
end
joined = StudentsForCourse.where('student_id = ? and course_id = ?', user.id, params[:object_id]) joined = StudentsForCourse.where('student_id = ? and course_id = ?', user.id, params[:object_id])
joined.each do |join| joined.each do |join|
join.destroy join.destroy

View File

@ -20,10 +20,6 @@
{ {
params.contentmsg.text("描述不能为空"); params.contentmsg.text("描述不能为空");
params.contentmsg.css('color','#ff0000'); params.contentmsg.css('color','#ff0000');
}
else if(params.content.html().length >=20000){
params.contentmsg.text("描述最多20000个汉字(或40000个英文字符)");
params.contentmsg.css('color','#ff0000');
result=false; result=false;
} }
else else
@ -177,7 +173,7 @@
<span class="fr mr10 mt3">或</span> <span class="fr mr10 mt3">或</span>
<a href="javascript:void(0);" class="fr mr10 mt3" onclick="reset_topic();">取消</a> <a href="javascript:void(0);" class="fr mr10 mt3" onclick="reset_topic();">取消</a>
<% else %> <% else %>
<a href="javascript:void(0);" class="BlueCirBtnMini fr" id="new_message_submit_btn" onclick="submit_topic();">确定</a> <a href="javascript:void(0);" class="BlueCirBtnMini fr" id="new_message_submit_btn">确定</a>
<span class="fr mr10 mt3">或</span> <span class="fr mr10 mt3">或</span>
<%= link_to "取消",board_message_url(topic.board, topic.root, :r => (topic.parent_id && topic.id)), :class => "fr mr10 mt3"%> <%= link_to "取消",board_message_url(topic.board, topic.root, :r => (topic.parent_id && topic.id)), :class => "fr mr10 mt3"%>
<% end %> <% end %>

View File

@ -12,38 +12,59 @@
.cl{ clear:both; overflow:hidden; } .cl{ clear:both; overflow:hidden; }
a{ text-decoration:none !important; } a{ text-decoration:none !important; }
a:hover{ } a:hover{ }
.error_content{ width:550px; height:200px; margin:0 auto; padding:10px 0;}
.error_left{color:#15bccf; font-size:100px; font-weight:bold; font-style:oblique; width:200px; height:120px; padding-right:30px; float:left;}
.error_right{ width:240px; height:120px; float:left;color:#15bccf; font-size: 17px; font-weight:bold; padding-left:30px; margin-top:40px; border-left:1px dashed #CCC; }
.error_link{ margin-top:8px;}
.error_link a{ display:block; width:80px; height:28px; font-size:14px; font-weight:bold; color:#fff; text-align:center; background:#15bccf; float:left; margin-right:10px;}
.error_link a:hover{ background:#ff8417;}
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
if(window.history.length == 1) if(window.history.length == 1)
{ {
$("#history_back").css("background","#CCC"); $("#history_back").css("color","#CCC");
$("#history_back").css("cursor","default");
} }
$("#subject").keydown(function(){
var curLength=$("#subject").val().length;
if(curLength>50){
var num=$("#subject").val().substr(0,50);
$("#subject").val(num);
}
else{
$("#textCount").text(50-$("#subject").val().length)
}
}).keyup(function(){
var curLength=$("#subject").val().length;
if(curLength>50){
var num=$("#subject").val().substr(0,50);
$("#subject").val(num);
}
else{
$("#textCount").text(50-$("#subject").val().length)
}
});
}); });
</script> </script>
</head> </head>
<body> <body>
<div class="muban_conbox_max">
<div class="error_content"> <div class="pages_new_404">
<div class="error_left">403</div> <img src="/images/404/pic_403.jpg" >
<div class="error_right"> <p class="pages_new_404_txt mt40">
<p>ERROR FORBIDDEN<br /> 您没有访问权限,请先获取相应权限。
没有访问权限!建议您</p> <a href="javascript:history.back()" id="history_back" class="linkBlue2 ml5 mr10">返回上页>></a>
<div class="error_link"> <a href="javascript:void(0)" class="linkBlue2 ml5 mr10" onclick="$('#feedback_div').toggle();"> 给我留言>></a>
<!---<a href="http://forge.trustie.net/" target="_blank">返回首页</a>----> <a href="http://shang.qq.com/wpa/qunwpa?idkey=064e805dac955b8aea158c4b0dd3f033b8841bcee175fd619613f0e4ac4d8151" target="_blank" class="linkBlue2">QQ反馈>></a>
<a href="javascript:history.back()" id="history_back">后退一步</a> </p>
<a href="http://user.trustie.net/users/5/user_newfeedback">给我留言</a> <div style="display:none;" class="ml10 mt10" id="feedback_div">
<% get_memo %>
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
<%= f.text_area :subject, :id=>"subject", :class => "feedbackText mb5", :placeholder => "请在此输入平台的问题和建议您也可以通过QQ留言谢谢" %>
<%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
<span class="c_grey fl">还能输入<span id="textCount" class="c_orange">50</span>个字符</span>
<a href="javascript:void(0);" class="sy_btn_blue_mini f12 fr mr10" onclick="$('#new_memo').submit();">&nbsp;&nbsp;</a>
<a href="javascript:void(0);" class="sy_btn_grey_mini f12 fr mr10" onclick="$('#feedback_div').hide();">&nbsp;&nbsp;</a>
<div class="cl"></div>
<% end %>
</div> </div>
</div> </div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -12,30 +12,60 @@ ul,li{ list-style-type:none}
.cl{ clear:both; overflow:hidden; } .cl{ clear:both; overflow:hidden; }
a{ text-decoration:none; } a{ text-decoration:none; }
a:hover{ } a:hover{ }
.error_content{ width:550px; height:200px; margin:0 auto; padding:10px 0;}
.error_left{color:#15bccf; font-size:100px; font-weight:bold; font-style:oblique; width:200px; height:120px; padding-right:30px; float:left;}
.error_right{ width:240px; height:120px; float:left;color:#15bccf; font-size: 18px; font-weight:bold; padding-left:30px; margin-top:40px; border-left:1px dashed #CCC; }
.error_link{ margin-top:8px;}
.error_link a{ display:block; width:80px; height:28px; font-size:14px; font-weight:bold; color:#fff; text-align:center; background:#15bccf; float:left; margin-right:10px;}
.error_link a:hover{ background:#ff8417;}
</style> </style>
<script type="text/javascript">
$(function(){
if(window.history.length == 1)
{
$("#history_back").css("color","#CCC");
$("#history_back").css("cursor","default");
}
$("#subject").keydown(function(){
var curLength=$("#subject").val().length;
if(curLength>50){
var num=$("#subject").val().substr(0,50);
$("#subject").val(num);
}
else{
$("#textCount").text(50-$("#subject").val().length)
}
}).keyup(function(){
var curLength=$("#subject").val().length;
if(curLength>50){
var num=$("#subject").val().substr(0,50);
$("#subject").val(num);
}
else{
$("#textCount").text(50-$("#subject").val().length)
}
});
});
</script>
</head> </head>
<body> <body>
<div class="muban_conbox_max">
<div class="pages_new_404">
<img src="/images/404/pic_404.jpg" >
<p class="pages_new_404_txt mt40">
非常抱歉,您访问的页面不存在或已删除。
<a href="javascript:history.back()" id="history_back" class="linkBlue2 mr10">返回上页>></a>
<a href="javascript:void(0)" class="linkBlue2 mr10" onclick="$('#feedback_div').toggle();"> 给我留言>></a>
<a href="http://shang.qq.com/wpa/qunwpa?idkey=064e805dac955b8aea158c4b0dd3f033b8841bcee175fd619613f0e4ac4d8151" target="_blank" class="linkBlue2">QQ反馈>></a>
</p>
<div class="error_content"> <div style="display:none;" class="mt10" id="feedback_div">
<div class="error_left">404</div> <% get_memo %>
<div class="error_right"> <%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
<p><span style="font-size:24px;">ERROR PAGE</span><br /> <%= f.text_area :subject, :id=>"subject", :style => "width: 570px;", :class => "feedbackText mb5", :placeholder => "请在此输入平台的问题和建议您也可以通过QQ留言谢谢" %>
页面不见了!建议您</p> <%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
<div class="error_link"> <span class="c_grey fl">还能输入<span id="textCount" class="c_orange">50</span>个字符</span>
<!---<a href="http://forge.trustie.net/" target="_blank">返回首页</a>----> <a href="javascript:void(0);" class="sy_btn_blue_mini f12 fr mr10" onclick="$('#new_memo').submit();">&nbsp;&nbsp;</a>
<a href="javascript:history.back()">后退一步</a> <a href="javascript:void(0);" class="sy_btn_grey_mini f12 fr mr10" onclick="$('#feedback_div').hide();">&nbsp;&nbsp;</a>
<a href="http://user.trustie.net/users/5/user_newfeedback">给我留言</a> <div class="cl"></div>
<% end %>
</div> </div>
</div> </div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -120,7 +120,7 @@
<% if @course.course_groups.empty? %> <% if @course.course_groups.empty? %>
<%=member.course_group_id == 0 ? "暂无" : member.course_group.name %> <%=member.course_group_id == 0 ? "暂无" : member.course_group.name %>
<% else %> <% else %>
<%= form_tag({:controller => 'courses', :action => 'teacher_assign_group', :id => @course.id,:user_id => member.user_id, :group_id => @group && @group != -1 ? @group.id : -1},:remote=>'true', :method => 'post', :id=>"join_group_form_#{member.id}", :class => 'query_form') do %> <%= form_tag({:controller => 'courses', :action => 'teacher_assign_group', :id => @course.id,:user_id => member.user_id, :group_id => @group && @group != -1 ? @group.id : (@group && @group == -1 ? -1 : 0)},:remote=>'true', :method => 'post', :id=>"join_group_form_#{member.id}", :class => 'query_form') do %>
<div class="select-class-option"> <div class="select-class-option">
<span class="hidden" style="display:inline-block; vertical-align:middle; max-width:70px;"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span> <span class="hidden" style="display:inline-block; vertical-align:middle; max-width:70px;"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
<a href="javascript:void(0)" class="sy_icons_edit pic_edit_icon fr mt9 options_show_or_hide" alt="编辑" style="background-position:0 5px;"></a> <a href="javascript:void(0)" class="sy_icons_edit pic_edit_icon fr mt9 options_show_or_hide" alt="编辑" style="background-position:0 5px;"></a>

View File

@ -1,3 +1,4 @@
hideModal();
<% if object_id && @state != 6%> <% if object_id && @state != 6%>
$("#join_in_course_header").html("<%= escape_javascript(join_in_course_header(course, user)) %>"); $("#join_in_course_header").html("<%= escape_javascript(join_in_course_header(course, user)) %>");
<% end %> <% end %>

View File

@ -0,0 +1,17 @@
<% if params[:type] == "0" %>
var htmlvalue = '<div id="muban_popup_box" style="width:400px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear muban_popup_con"><div class="newupload_conbox newupload_tishi"><p>已归档</p>' +
'<a href="javascript:void(0);" class="btn btn-blue mt10" onclick="click_OK();">确定</a></div></div></div>';
<% else %>
var htmlvalue = '<div id="muban_popup_box" style="width:400px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear muban_popup_con"><div class="newupload_conbox newupload_tishi"><p>已恢复</p>' +
'<a href="javascript:void(0);" class="btn btn-blue mt10" onclick="click_OK();">确定</a></div></div></div>';
<% end %>
pop_box_new(htmlvalue, 400, 132);
function click_OK(){
hideModal();
<% if params[:source] == "1" %>
window.location.href = "<%=syllabus_courselist_syllabus_path(@syllabus, :list_type => params[:type].to_i) %>";
<% end %>
}

View File

@ -1,52 +1,87 @@
<% if @object_id && @state != 6 && @state !=4 %> <%# if @object_id && @state != 6 && @state !=4 %>
$("#join_in_course_header").html("<%= escape_javascript(join_in_course_header(@course, @user)) %>"); //$("#join_in_course_header").html("<%#= escape_javascript(join_in_course_header(@course, @user)) %>");
<% end %> <%# end %>
<% if @state %> <% if @state %>
<% if @state == 0 %> <% if @state == 0 %>
alert("加入成功"); var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
hideModal(); '<div class="clear mt15"><p class="text_c f14">加入成功</p><div class="cl"></div>'+
$("#try_join_course_link").replaceWith("<a href='<%=url_for(:controller => 'homework_common', :action => 'index',:course=>@course.id, :host=>Setting.host_course)%>' target='_blank' class='blue_n_btn fr mt20'>提交作品</a>"); '<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>" pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 1 %> <% elsif @state == 1 %>
alert("密码错误"); var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">密码错误</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 2 %> <% elsif @state == 2 %>
alert("班级已过期\n请联系班级管理员重启班级。(在配置班级处)"); var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">班级已过期<br/>请联系班级管理员重启班级。(在配置班级处)</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 3 %> <% elsif @state == 3 %>
alert("您已经加入了班级"); var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>" '<div class="clear mt15"><p class="text_c f14">您已经加入了班级</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 4 %> <% elsif @state == 4 %>
alert("您输入的邀请码错误"); var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您输入的邀请码错误</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 5 %> <% elsif @state == 5 %>
alert("您还未登录"); var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您还未登录</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 6 %> <% elsif @state == 6 %>
alert("申请成功,请等待审核"); var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
hidden_join_course_form(); '<div class="clear mt15"><p class="text_c f14">申请成功,请等待审核</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 7%> <% elsif @state == 7%>
alert("您已经发送过申请了,请耐心等待"); var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
hidden_join_course_form(); '<div class="clear mt15"><p class="text_c f14">您已经发送过申请了,请耐心等待</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 8%> <% elsif @state == 8%>
alert("您已经是该班级的教师了"); var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
hidden_join_course_form(); '<div class="clear mt15"><p class="text_c f14">您已经是该班级的教师了</p><div class="cl"></div>'+
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>" '<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 9%> <% elsif @state == 9%>
alert("您已经是该班级的教辅了"); var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
hidden_join_course_form(); '<div class="clear mt15"><p class="text_c f14">您已经是该班级的教辅了</p><div class="cl"></div>'+
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>" '<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 10%> <% elsif @state == 10%>
alert("您已经是该班级的管理员了"); var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
hidden_join_course_form(); '<div class="clear mt15"><p class="text_c f14">您已经是该班级的管理员了</p><div class="cl"></div>'+
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>" '<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 11%> <% elsif @state == 11%>
alert("该班级已被删除"); var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
hidden_join_course_form(); '<div class="clear mt15"><p class="text_c f14">该班级已被删除</p><div class="cl"></div>'+
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>" '<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 12 %> <% elsif @state == 12 %>
alert("您已经发送过申请了,请耐心等待"); var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>" '<div class="clear mt15"><p class="text_c f14">您已经发送过申请了,请耐心等待</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 13 %> <% elsif @state == 13 %>
alert("申请成功,请等待审核"); var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>" '<div class="clear mt15"><p class="text_c f14">申请成功,请等待审核</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% else %> <% else %>
alert("未知错误,请稍后再试"); var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">未知错误,请稍后再试</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% end %> <% end %>
<% end %> <% end %>
function refresh_current_course(){
hideModal();
<% if @course %>
window.location.href= "<%=course_path(@course.id) %>";
<% end %>
}

View File

@ -9,7 +9,7 @@
<% if @syllabus.nil? %> <% if @syllabus.nil? %>
<%= select_tag :syllabus_id,options_for_select(course_syllabus_option,@course.syllabus_id), {:id=>"new_syllabus_id", :class=>"syllabus_input w300 h28"} %> <%= select_tag :syllabus_id,options_for_select(course_syllabus_option,@course.syllabus_id), {:id=>"new_syllabus_id", :class=>"syllabus_input w300 h28"} %>
<% else %> <% else %>
<span><%=@syllabus.title %></span> <span id="course_syllabus_title"><%=@syllabus.title %></span>
<input style="display: none;" name="syllabus_id" value="<%=@syllabus.id %>" /> <input style="display: none;" name="syllabus_id" value="<%=@syllabus.id %>" />
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>

View File

@ -1,8 +1,9 @@
<% if @group %> <% if params[:group_id] != "0" %>
$("#member_li_<%=@member.id %>").html(""); $("#member_li_<%=@member.id %>").html("");
<% end %>
<% if @group && @group != "-1" %>
//$("#member_content").html("<%#= escape_javascript( render :partial => 'new_member_list', :locals => {:members => @results})%>"); //$("#member_content").html("<%#= escape_javascript( render :partial => 'new_member_list', :locals => {:members => @results})%>");
$("#join_or_add").html("<%= escape_javascript( render :partial => 'join_or_add')%>"); $("#join_or_add").html("<%= escape_javascript( render :partial => 'join_or_add')%>");
<% else %>
$("#st_groups").html("<%=escape_javascript(render :partial => 'new_groups_name', :locals => {:course_groups => @course_groups}) %>");
<% end %> <% end %>
$("#st_groups").html("<%=escape_javascript(render :partial => 'new_groups_name', :locals => {:course_groups => @course_groups}) %>");
$("#group_children_list").html("<%= escape_javascript( render :partial => 'layouts/group_children_list', :locals => {:course => @course})%>"); $("#group_children_list").html("<%= escape_javascript( render :partial => 'layouts/group_children_list', :locals => {:course => @course})%>");

View File

@ -0,0 +1,30 @@
<table class="newupload_table" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th class="newupload_td01">&nbsp;</th>
<th class="pr">
<%= link_to "试卷标题", search_exercises_exercise_index_path(:course_id => course_id, :order => "exercise_name", :sort => @r_sort), :remote => true%>
<% if order == "exercise_name" %>
<%= link_to "", search_exercises_exercise_index_path(:course_id => course_id, :order => "exercise_name", :sort => @r_sort), :class => "#{@r_sort == 'desc' ? 'sortupbtn' : 'sortdownbtn'}", :style => "position: absolute; top: 8px; left: 172px;", :remote => true %>
<% end %>
</th>
<th class="newupload_td03" style="color: #7f7f7f;">来源</th>
<th class="newupload_td04 pr">
<%= link_to "创建时间", search_exercises_exercise_index_path(:course_id => course_id, :order => "created_at", :sort => @r_sort), :remote => true%>
<% if order == "created_at" %>
<%= link_to "", search_exercises_exercise_index_path(:course_id => course_id, :order => "created_at", :sort => @r_sort), :class => "#{@r_sort == 'desc' ? 'sortupbtn' : 'sortdownbtn'}", :style => "position: absolute; top: 8px; left: 75px;", :remote => true %>
<% end %>
</th>
</tr>
</thead>
<tbody>
<% exercises.each do |exercise| %>
<tr class="">
<td class="newupload_td01"><input type="checkbox" name="exercise_id[]" value="<%=exercise.id %>"/></td>
<td class="newupload_td02"><p><%=exercise.exercise_name %></p></td>
<td class="newupload_td02"><p><%=exercise.course.name %></p></td>
<td class="newupload_td04"><%=format_date(exercise.created_at) %></td>
</tr>
<% end %>
</tbody>
</table>

View File

@ -1,74 +1,101 @@
<%# has_commit = has_commit_poll?(poll.id ,User.current)%> <%# has_commit = has_commit_poll?(poll.id ,User.current)%>
<% exercise_name = exercise.exercise_name.empty? ? l(:label_poll_new) : exercise.exercise_name%> <% exercise_name = exercise.exercise_name.empty? ? l(:label_poll_new) : exercise.exercise_name%>
<% if @is_teacher%> <% if @is_teacher%>
<li title="<%= exercise.exercise_name %>"> <div>
<div style="width: 310px;float: left;"> <div title="<%= exercise.exercise_name %>">
<%# if has_commit %> <div style="width: 500px;float: left;">
<%#= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_w fl c_dblue"%> <%= link_to (index.to_i+1).to_s+". "+exercise_name, exercise_path(exercise.id), :class => "polls_title polls_title_w fl c_dblue mw450", :title => "#{exercise_name}" %>
<%# else %> <% if exercise.exercise_status == 1 %>
<%#= link_to poll_name, exercise_path(poll.id), :class => "polls_title polls_title_w fl c_dblue" %> <span class="exercise_status_nop fl mt3"></span>
<%# end %> <% elsif exercise.exercise_status == 2 %>
<%= link_to (index.to_i+1).to_s+". "+exercise_name, exercise_path(exercise.id), :class => "polls_title polls_title_w fl c_dblue" %> <span class="exercise_status_pub fl mt3"></span>
<% else %>
<span class="exercise_status_end fl mt3"></span>
<% end%>
</div>
</div>
<% if exercise.exercise_status == 1 %>
<% end_time_status = exercise.end_time.nil? ? 1 : (exercise.end_time <= Time.now ? 2 : 3) %>
<div><a href="javascript:" class="pollsbtn btn_pu fr mr10 ml5" onclick="exercise_submit(<%=end_time_status %>,<%= exercise.id%>,<%= exercise.exercise_name.length %>,<%=index.to_i %>);">发布试卷</a></div>
<% elsif exercise.exercise_status == 2%>
<div><a href="javascript:" class="pollsbtn btn_de fr mr10 ml5" onclick="republish_exercise(<%= exercise.id%>,<%=index.to_i %>);">取消发布</a></div>
<% else%>
<div class="pollsbtn fr mr10 pollsbtn_grey ml5">发布试卷</div>
<% end%>
<% if exercise.exercise_status == 1%>
<div class="pollsbtn fr mr10 pollsbtn_grey">统计结果</div>
<% else %>
<div><%= link_to l(:label_statistical_results), student_exercise_list_exercise_path(exercise.id,:course_id => @course.id), :class => "pollsbtn fr mr10"%></div>
<% end%>
</div>
<div class="cl"></div>
<div class="mt10">
<span class="c_grey fl mr15">测试时长:<%= exercise.time.nil? || exercise.time == -1 ? '不限' : exercise.time.to_s + "分钟" %></span>
<span class="c_grey fl mr15">截止时间:<%= exercise.end_time.nil? ? '未设置' : format_time(exercise.end_time) %></span>
<span class="c_grey fl mr15">发布时间:<%= exercise.publish_time.nil? ? '未设置' : format_time(exercise.publish_time) %></span>
<% if @is_teacher && exercise.exercise_status > 1 %>
<span class="c_grey fl mr15">已提交:<span class="c_blue"><%= exercise.exercise_users.where("commit_status = 1").count %></span></span>
<span class="c_grey fl mr15">未提交:<span class="c_blue"><%= exercise.course.student.count - exercise.exercise_users.where("commit_status = 1").count %></span></span>
<% end %>
<div id="exercise_opr_<%=exercise.id %>" class="none fr">
<a href="javascript:void(0)" onClick="delete_exercise(<%=exercise.id %>);" title="删除试卷" class="ex_icon_de mt0"></a>
<% if exercise.exercise_status == 1 %>
<%= link_to '', edit_exercise_path(exercise.id), :title => "编辑试卷", :class => "ex_icon_edit mt0"%>
<% end%>
</div> </div>
</li> <div class="clear"></div>
</div>
<%# if exercise.exercise_status == 2 %>
<!--<li><a class="polls_de fr ml5" onclick="" href="javascript:">关闭</a></li>-->
<%# else %>
<!--<li class="polls_de_grey fr ml5" title="发布的问卷才能进行关闭">关闭</li>-->
<%# end%>
<%# if exercise.exercise_status == 1%>
<!--<li class="polls_de_grey fr ml5">导出</li>-->
<%# elsif exercise.exercise_status == 2 || exercise.exercise_status == 3 %>
<!--<li><%#= link_to "导出", export_exercise_exercise_path(exercise.id,:format => "xls"), :class => "polls_de fr ml5"%></li>-->
<%# end%>
<% if exercise.exercise_status == 1 %>
<li><a href="javascript:" class="pollsbtn btn_pu fr mr10 ml5" onclick="exercise_submit(<%= exercise.id%>,<%= exercise.exercise_name.length %>,<%=index.to_i %>);">发布试卷</a></li>
<% elsif exercise.exercise_status == 2%>
<li><a href="javascript:" class="pollsbtn btn_de fr mr10 ml5" onclick="republish_exercise(<%= exercise.id%>,<%=index.to_i %>);">取消发布</a></li>
<% else%>
<li class="pollsbtn fr mr10 pollsbtn_grey ml5">发布试卷</li>
<% end%>
<% if exercise.exercise_status == 1%>
<li class="pollsbtn fr mr10 pollsbtn_grey">统计结果</li>
<% else %>
<li><%= link_to l(:label_statistical_results), student_exercise_list_exercise_path(exercise.id,:course_id => @course.id), :class => "pollsbtn fr mr10"%></li>
<% end%>
<%= link_to(l(:button_delete), exercise,:method => :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "polls_de fr ml5 mr10") %>
<% if exercise.exercise_status == 1 %>
<li><%= link_to l(:button_edit), edit_exercise_path(exercise.id), :class => "polls_de fr ml10"%></li>
<li class="polls_date fr"><%=exercise.publish_time.nil? ? "未发布" : "将于"+format_time(exercise.publish_time.to_s)+"发布"%></li>
<% elsif exercise.exercise_status == 2 %>
<li class="polls_de_grey fr ml10" title="未发布的试卷才能进行编辑">编辑</li>
<li class="polls_date fr">已发布</li>
<% else %>
<li class="polls_de_grey fr ml10" title="未发布的试卷才能进行编辑">编辑</li>
<li class="polls_date fr">已截止</li>
<% end%>
<% else%> <% else%>
<% if exercise.exercise_status != 1%> <% if exercise.exercise_status != 1%>
<%# if has_commit%>
<!--li><%#= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_st fl c_dblue" %></li>
<li class="pollsbtn_tip fl ml5">已答</li-->
<%#else%>
<%= link_to (index.to_i+1).to_s+". "+exercise_name, exercise_path(exercise.id), :class => "polls_title polls_title_st fl c_dblue"%>
<% eu = ExerciseUser.where("exercise_id=? and user_id=? and status=?",exercise.id, User.current.id, true).first %> <% eu = ExerciseUser.where("exercise_id=? and user_id=? and status=?",exercise.id, User.current.id, true).first %>
<% if exercise.end_time <= Time.now && eu && exercise.end_time >= eu.created_at %> <div>
<li class="pollsbtn_tip fl ml5">已答</li> <%= link_to (index.to_i+1).to_s+". "+exercise_name, exercise_path(exercise.id), :title => "#{exercise_name}", :class => "polls_title polls_title_st fl c_dblue "%>
<% end %> <% if exercise.exercise_status == 1 %>
<%#end%> <span class="exercise_status_nop fl"></span>
<% elsif exercise.exercise_status == 2 %>
<span class="exercise_status_pub fl"></span>
<% else %>
<span class="exercise_status_end fl"></span>
<% end%>
<% if eu && exercise.end_time >= eu.created_at %>
<span class="exercise_status_com fl ml5"></span>
<% else %>
<span class="exercise_status_nocom fl ml5"></span>
<% end %>
</div>
<div class="cl"></div>
<div class="mt10">
<span class="c_grey fl mr15">测试时长:<%= exercise.time.nil? || exercise.time == -1 ? '不限' : exercise.time.to_s + "分钟" %></span>
<span class="c_grey fl mr15">截止时间:<%= exercise.end_time.nil? ? '未设置' : format_time(exercise.end_time) %></span>
<span class="c_grey fl mr15">发布时间:<%= exercise.publish_time.nil? ? '未设置' : format_time(exercise.publish_time) %></span>
<% exercise_end = exercise.end_time > Time.now
if exercise.time == -1 || exercise.time.nil?
can_edit_excercise = exercise_end
else
can_edit_excercise = !has_commit_exercise?(exercise.id,User.current.id)&& exercise_end
end%>
<% if can_edit_excercise && eu %>
<a href="<%=exercise_path(exercise.id) %>" class="pollsbtn btn_pu fr mr10 ml5">继续答题</a>
<% elsif can_edit_excercise %>
<a href="<%=exercise_path(exercise.id) %>" class="pollsbtn btn_pu fr mr10 ml5">开始答题</a>
<% else %>
<a href="<%=exercise_path(exercise.id) %>" class="pollsbtn btn_pu fr mr10 ml5">查看答题</a>
<% end %>
<% if exercise.show_result == 1 %>
<% if exercise.end_time <= Time.now %>
<%= link_to l(:label_statistical_results), student_exercise_list_exercise_path(exercise.id,:course_id => @course.id), :class => "pollsbtn fr mr10"%>
<% else %>
<div class="pollsbtn fr mr10 pollsbtn_grey" title="截止时间还未到,暂不可查看统计结果">统计结果</div>
<%end%>
<% end %>
<div class="clear"></div>
</div>
<% end%> <% end%>
<li class="polls_date fr mr10">截止时间:<%= format_time(exercise.end_time.to_s)%></li>
<% if exercise.show_result == 1 %>
<% if exercise.end_time <= Time.now %>
<li><%= link_to l(:label_statistical_results), student_exercise_list_exercise_path(exercise.id,:course_id => @course.id), :class => "pollsbtn fr mr10"%></li>
<% else %>
<li class="pollsbtn fr mr10 pollsbtn_grey" title="截止时间未到,暂不能查看统计结果">统计结果</li>
<%end%>
<% end %>
<% end%> <% end%>

View File

@ -3,15 +3,15 @@
<span><%= @obj_count%></span> <span><%= @obj_count%></span>
</h2> </h2>
<% if @is_teacher%> <% if @is_teacher%>
<%#= link_to "导入", other_poll_poll_index_path(:polls_group_id => @course.id), :remote=>true,:class => "newbtn"%>
<%= link_to "新建试卷 ", new_exercise_path(:course_id => @course.id), :class => "newbtn" %> <%= link_to "新建试卷 ", new_exercise_path(:course_id => @course.id), :class => "newbtn" %>
<%= link_to "导入试卷", other_exercise_exercise_index_path(:course_id => @course.id), :remote=>true,:class => "newbtn"%>
<% end%> <% end%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<div id="polls_list" class="polls_list"> <div id="polls_list" class="polls_list">
<% @exercises.each_with_index do |exercise,index|%> <% @exercises.each_with_index do |exercise,index|%>
<ul id="exercises_<%= exercise.id %>" class="polls_list_ul"> <ul id="exercises_<%= exercise.id %>" class="exercise_list_div" onmouseover="$('#exercise_opr_<%=exercise.id %>').show();" onmouseout="$('#exercise_opr_<%=exercise.id %>').hide();">
<%= render :partial => 'exercise', :locals => {:exercise => exercise,:index => index} %> <%= render :partial => 'exercise', :locals => {:exercise => exercise,:index => index} %>
</ul> </ul>
<div class="cl"></div> <div class="cl"></div>

View File

@ -0,0 +1,81 @@
<div id="muban_popup_box" style="width:745px;">
<div class="muban_popup_top">
<h3 class="fl">选择试卷导入本班级</h3>
<a href="javascript:void(0);" class="muban_icons_close fr"></a>
<div class="cl"></div>
</div>
<div class="muban_popup_con">
<div class="newupload_conbox">
<div class="newupload_search_box mb10">
<input class="newupload_search_input" placeholder="输入试卷标题的关键词进行搜索" name="search" type="text">
<a href="javascript:void(0);" class="newupload_btn_search"></a>
</div>
</div>
<%=form_tag import_other_exercise_exercise_index_path,
method: :post,
remote: true,
id: "import_other_exercise_form" do %>
<input type="hidden" name="course_id" value="<%= course_id%>" />
<div class="ml15">
<div id="all_import_exercises">
<%=render :partial => 'all_import_exercises', :locals => {:exercises => exercises, :course_id => course_id, :order => @order} %>
</div>
<div class="clear">
<p class="none c_red" id="choose_exercise_notice"></p>
<div class="clear fl mt10">
<a href="javascript:void(0)" class="btn btn-blue fr" onclick="submit_import_form();">确定</a>
<a href="javascript:void(0)" class="btn fr mr5" onclick="hideModal();">取消</a>
</div>
<div class="fr mr10">
<div class="pages" style="width:auto; display:inline-block;">
<ul id="exercise_ref_pages">
<%= pagination_links_full @ex_pages, @ex_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
</ul>
<div class="cl"></div>
</div>
</div>
</div>
</div>
<% end %>
</div>
</div>
</div>
<script>
function submit_import_form(){
var checkboxs = $("input[name='exercise_id[]']:checked");
if(checkboxs.length > 0) {
$("#choose_exercise_notice").html("");
$('#import_other_exercise_form').submit();
hideModal();
} else{
$("#choose_exercise_notice").html("请至少选择一个试卷");
$("#choose_exercise_notice").show();
}
}
var lastSearchCondition = '';
var count = 0;
function search_exs(e){
if($(e.target).val().trim() == lastSearchCondition && lastSearchCondition != '')
{
return;
}
lastSearchCondition = $(e.target).val().trim();
$.ajax({
url: '<%= url_for(:controller => 'exercise', :action => 'search_exercises') %>'+'?name='+ e.target.value+'&course_id=<%=course_id %>',
type:'get'
});
}
function throttle(method,context,e){
clearTimeout(method.tId);
method.tId=setTimeout(function(){
method.call(context,e);
},500);
}
//查询项目
$("input[name='search']").on('input', function (e) {
throttle(search_exs,window,e);
});
</script>

View File

@ -23,9 +23,9 @@
<td class="hworkStName130 pr10 student_work_<%= exercise.id%>" title="姓名" id="student_name_<%= exercise.id%>" style="cursor:pointer;"> <td class="hworkStName130 pr10 student_work_<%= exercise.id%>" title="姓名" id="student_name_<%= exercise.id%>" style="cursor:pointer;">
<%=exercise.user.show_name %> <%=exercise.user.show_name %>
</td> </td>
<td class="hworkStID130 pr10 student_work_<%= exercise.id%> float-none" title="学号" id="student_id_<%= exercise.id%>" style="cursor:pointer;"> <td class="hworkStID130 pr10 student_work_<%= exercise.id%> float-none" title="学号" id="student_id_<%= exercise.id%>" style="cursor:pointer;">
<span class="hidden fl" style="width:130px;"><%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%></span> <span class="hidden fl" style="width:130px;"><%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%></span>
</td> </td>
<td class="hworkStID130 student_work_<%= exercise.id%> float-none" title="班级" id="student_class_<%= exercise.id%>" style="cursor:pointer;"> <td class="hworkStID130 student_work_<%= exercise.id%> float-none" title="班级" id="student_class_<%= exercise.id%>" style="cursor:pointer;">
-- --
</td> </td>
@ -33,7 +33,7 @@
<td class="hworkList130 c_grey"> <td class="hworkList130 c_grey">
<% if exercise.created_at%> <% if exercise.created_at%>
<%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>&nbsp; <%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>&nbsp;
<% if @exercise.end_time <= exercise.created_at %> <% if exercise.commit_status == 0 %>
<span class="c_red">[未答]</span> <span class="c_red">[未答]</span>
<% end %> <% end %>
<% end %> <% end %>

View File

@ -1 +1,2 @@
hideModal();
$("#exercise").html("<%= escape_javascript(render :partial => 'exercises_list') %>"); $("#exercise").html("<%= escape_javascript(render :partial => 'exercises_list') %>");

View File

@ -0,0 +1,9 @@
var htmlvalue = '<div id="muban_popup_box" style="width:400px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear muban_popup_con"><div class="newupload_conbox newupload_tishi"><p>试卷已导入<br/>但需要您设置发布时间和截止时间,以激活相应的试卷<br/></p>' +
'<a href="javascript:void(0);" class="btn btn-blue mt10" onclick="click_OK();">知道了</a></div></div></div>';
pop_box_new(htmlvalue, 400, 152);
function click_OK(){
hideModal();
window.location.href = "<%= exercise_index_path(:course_id => @course.id) %>";
}

View File

@ -5,31 +5,16 @@
}); });
function republish_exercise(exercise_id,index) function republish_exercise(exercise_id,index)
{ {
$('#ajax-modal').html("<div id='popbox02'>" + var htmlvalue = '<div id="muban_popup_box" style="width:400px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
"<div class='upload_con'>" + '<div class="clear muban_popup_con"><div class="newupload_conbox newupload_tishi"><p>取消发布后学生答题将会被清空<br />是否确定取消发布该试卷?</p>' +
"<div class='upload_box'>" + '<a href="javascript:void(0);" class="btn btn-grey mt10 mr10" onclick="hideModal();">取&nbsp;&nbsp;消</a>' +
"<p class='polls_box_p'>取消发布后学生答题将会被清空<br />是否确定取消发布该测验?</p>" + '<a href="/exercise/'+ exercise_id +'/republish_exercise?index='+ index +'" class="btn btn-blue mt10" onclick="hideModal();" data-remote="true">确&nbsp;&nbsp;定</a></div></div></div>';
"<div class='polls_btn_box'>" + pop_box_new(htmlvalue, 400, 152);
"<a href='/exercise/"+ exercise_id +"/republish_exercise?index="+index+"' class='upload_btn' onclick='clickCanel();' data-remote='true'>确&nbsp;&nbsp;定</a>" +
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取&nbsp;&nbsp;消</a>" +
"</div>" +
"<div class='cl'></div>" +
"</div>" +
"</div>" +
"</div>");
showModal('ajax-modal', '310px');
$('#ajax-modal').css('height','120px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
} }
function clickCanel(){hideModal("#popbox02");} function clickCanel(){hideModal("#popbox02");}
function exercise_submit(exercise_id,exercise_name,index) function exercise_submit(status, exercise_id,exercise_name,index)
{ {
if(exercise_name == 0) if(exercise_name == 0)
{ {
@ -37,29 +22,31 @@
} }
else else
{ {
$('#ajax-modal').html("<div id='popbox02'>" + if (status == 1){
"<div class='upload_con'>" + var htmlvalue = '<div id="muban_popup_box" style="width:400px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
"<div class='upload_box'>" + '<div class="clear muban_popup_con"><div class="newupload_conbox newupload_tishi"><p>您还没有设置截止时间,请先设置截止时间再发布</p>' +
"<p class='polls_box_p'>测验发布后将不能对测验进行修改,<br />是否确定发布该测验?</p>" + '<a href="javascript:void(0);" class="btn btn-blue mt10" onclick="hideModal();">知道了</a></div></div></div>';
"<div class='polls_btn_box'>" + pop_box_new(htmlvalue, 400, 152);
"<a href='/exercise/"+ exercise_id +"/publish_exercise?index="+index+"' class='upload_btn' onclick='clickCanel();' data-remote='true'>确&nbsp;&nbsp;定</a>" + } else if(status == 2){
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取&nbsp;&nbsp;消</a>" + var htmlvalue = '<div id="muban_popup_box" style="width:400px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
"</div>" + '<div class="clear muban_popup_con"><div class="newupload_conbox newupload_tishi"><p>您设置的截止时间已过期,请重新设置</p>' +
"<div class='cl'></div>" + '<a href="javascript:void(0);" class="btn btn-blue mt10" onclick="hideModal();">知道了</a></div></div></div>';
"</div>" + pop_box_new(htmlvalue, 400, 152);
"</div>" + } else{
"</div>"); var htmlvalue = '<div id="muban_popup_box" style="width:400px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
showModal('ajax-modal', '310px'); '<div class="clear muban_popup_con"><div class="newupload_conbox newupload_tishi"><p>发布后不能再对试卷进行修改<br/>是否确定发布</p>' +
$('#ajax-modal').css('height','120px'); '<a href="javascript:void(0);" class="btn btn-grey mt10 mr10" onclick="hideModal();">取&nbsp;&nbsp;消</a>' +
$('#ajax-modal').siblings().remove(); '<a href="/exercise/'+ exercise_id +'/publish_exercise?index='+ index +'" class="btn btn-blue mt10" onclick="hideModal();" data-remote="true">确&nbsp;&nbsp;定</a></div></div></div>';
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" + pop_box_new(htmlvalue, 400, 152);
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>"); }
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
} }
} }
function delete_exercise(id){
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您是否确定删除</p><div class="cl"></div><a href="/exercise/'+ id +'" class="fr sy_btn_blue mr90 mt10" data-method="delete" data-remote="true">确定</a>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10 mr10" onclick="hideModal();">取消</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
}
</script> </script>
<div class="courseRSide fl" id="homework_page_right"> <div class="courseRSide fl" id="homework_page_right">
<div class="polls_content02" id="exercise" style="width: 730px;"> <div class="polls_content02" id="exercise" style="width: 730px;">

View File

@ -0,0 +1,8 @@
<% if @exercises.blank? %>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您的其它班级下没有试卷可供导入</p><div class="cl"></div><a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 122px;" onclick="hideModal();">确定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% else %>
var html_value = '<%= escape_javascript(render :partial => 'other_exercises',:locals => {:exercises => @exercises, :course_id=>@course_id}) %>';
pop_box_new(html_value, 745, 600);
<% end %>

View File

@ -1,10 +1,5 @@
$("#exercises_<%= @exercise.id %>").html("<%= escape_javascript(render :partial => 'exercise',:locals => {:exercise => @exercise,:index =>@index}) %>"); $("#exercises_<%= @exercise.id %>").html("<%= escape_javascript(render :partial => 'exercise',:locals => {:exercise => @exercise,:index =>@index}) %>");
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_memo_create_succ)}) %>"); var htmlvalue = '<div id="muban_popup_box" style="width:400px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
showModal('ajax-modal', '250px'); '<div class="clear muban_popup_con"><div class="newupload_conbox newupload_tishi"><p>发布成功</p>' +
//$('#ajax-modal').css('height','111px'); '<a href="javascript:void(0);" class="btn btn-blue mt10" onclick="hideModal();">知道了</a></div></div></div>';
$('#ajax-modal').siblings().remove(); pop_box_new(htmlvalue, 400, 152);
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='close_alert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("poll_alert_form");

View File

@ -1,10 +1,5 @@
$("#exercises_<%= @exercise.id %>").html("<%= escape_javascript(render :partial => 'exercise',:locals => {:exercise => @exercise,:index => @index}) %>"); $("#exercises_<%= @exercise.id %>").html("<%= escape_javascript(render :partial => 'exercise',:locals => {:exercise => @exercise,:index => @index}) %>");
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_poll_republish_success)}) %>"); var htmlvalue = '<div id="muban_popup_box" style="width:400px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
showModal('ajax-modal', '250px'); '<div class="clear muban_popup_con"><div class="newupload_conbox newupload_tishi"><p>取消成功</p>' +
//$('#ajax-modal').css('height','80px'); '<a href="javascript:void(0);" class="btn btn-blue mt10" onclick="hideModal();">知道了</a></div></div></div>';
$('#ajax-modal').siblings().remove(); pop_box_new(htmlvalue, 400, 152);
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='close_alert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("poll_alert_form");

View File

@ -0,0 +1,3 @@
$("#all_import_exercises").html('<%= escape_javascript(render :partial => 'all_import_exercises', :locals => {:exercises => @exercises, :course_id => @course_id, :order => @order})%>');
$("#exercise_ref_pages").html('<%= pagination_links_full @ex_pages, @ex_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>');
$("#choose_exercise_notice").html("");

View File

@ -12,6 +12,8 @@
$("#homework_end_time_span").text(""); $("#homework_end_time_span").text("");
$("#homework_course_id_span").text(""); $("#homework_course_id_span").text("");
$("#homework_editor").toggle(); $("#homework_editor").toggle();
//$("#select_type_nitice").show();
document.getElementById("homework_type_option").options[0].selected = true;
} }
$(function(){ $(function(){

View File

@ -160,9 +160,9 @@
} }
// 里程碑添加默认选项 // 里程碑添加默认选项
$("#issue_fixed_version_id option[value='']").remove(); $("#issue_fixed_version_id option[value='']").remove();
<% if params[:action] == "new" %> <%# if params[:action] == "new" %>
$('#issue_fixed_version_id').prepend("<option value='0' selected='selected'>选择里程碑</option>") // $('#issue_fixed_version_id').prepend("<option value='0' selected='selected'>选择里程碑</option>");
<% else %> <%# else %>
$('#issue_fixed_version_id').prepend("<option value='0'>选择里程碑</option>") // $('#issue_fixed_version_id').prepend("<option value='0'>选择里程碑</option>");
<% end %> <%# end %>
</script> </script>

View File

@ -69,13 +69,13 @@
<li class="<%= (activity.done_ratio == 100 ? 'c_green issues_list_min mr5' : 'c_red issues_list_min mr5') %>"><%= activity.done_ratio %>%</li> <li class="<%= (activity.done_ratio == 100 ? 'c_green issues_list_min mr5' : 'c_red issues_list_min mr5') %>"><%= activity.done_ratio %>%</li>
<li class="issues_list_min"> <li class="issues_list_min">
<% if activity.journals.count > 0 %> <% if activity.journals.count > 0 %>
<span class="issues_icons_mes fl mr5"></span> <span class="issues_icons_mes fl mr5" style="margin-top:15px;" ></span>
<span class="fl mr5"><%= activity.journals.count %></span> <span class="fl mr5"><%= activity.journals.count %></span>
<% end %> <% end %>
<div class="undis" style="position: absolute; <%= activity.journals.count > 0 ? 'top:25px;' : 'top:0px' %>"> <div class="undis" style="position: absolute; <%= activity.journals.count > 0 ? 'top:25px;' : 'top:7px' %>">
<%= link_to "", issue_path(activity.id, :edit => 'true'), :class => 'sy_icons_edit fl mt15', :accesskey => accesskey(:edit) if activity.editable? && User.current.allowed_to?(:edit_issues, activity.project) %> <%= link_to "", issue_path(activity.id, :edit => 'true'), :class => 'sy_icons_edit fl mt15', :style => "margin-top:25px;", :accesskey => accesskey(:edit) if activity.editable? && User.current.allowed_to?(:edit_issues, activity.project) %>
<% if !defined?(project_id) && !defined?(user_id) %> <% if !defined?(project_id) && !defined?(user_id) %>
<%= link_to "", issue_path(activity.id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'sy_icons_del fl mt15' if User.current.allowed_to?(:delete_issues, activity.project) %> <%= link_to "", issue_path(activity.id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'sy_icons_del fl mt15', :style => "margin-top:25px;" if User.current.allowed_to?(:delete_issues, activity.project) %>
<% elsif defined?(project_id) %> <% elsif defined?(project_id) %>
<%= link_to "", issue_path(activity.id, :page_classify => "project_page", :page_id => project_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'sy_icons_del fl mt15' if User.current.allowed_to?(:delete_issues, activity.project) %> <%= link_to "", issue_path(activity.id, :page_classify => "project_page", :page_id => project_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'sy_icons_del fl mt15' if User.current.allowed_to?(:delete_issues, activity.project) %>
<% elsif defined?(user_id) %> <% elsif defined?(user_id) %>

View File

@ -9,7 +9,6 @@
<div class="pro_new_top clear mb10"> <div class="pro_new_top clear mb10">
<div class="fl pro_new_name ml15 clear"> <div class="fl pro_new_name ml15 clear">
<% unless @project.is_public? %><span class="icons_newpro_lock fl "></span><% end %> <% unless @project.is_public? %><span class="icons_newpro_lock fl "></span><% end %>
<%=link_to "#{@project.owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
<%=link_to @project.name, project_path(@project), :class => "pro_new_username break_word" %> <%=link_to @project.name, project_path(@project), :class => "pro_new_username break_word" %>
</div> </div>

View File

@ -26,6 +26,18 @@
</li> </li>
</ul> </ul>
</div> </div>
<% elsif User.current.logged? && User.current.member_of_course?(@course) %>
<div class="sy_class_setting" >
<ul>
<li class="sy_class_setting_icon">
<ul class="sy_class_setting_text">
<li>
<a href="javascript:void(0)" onclick="delete_confirm();" class="sy_class_option">退出班级</a>
</li>
</ul>
</li>
</ul>
</div>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
@ -84,7 +96,7 @@
<% elsif is_teacher && is_ST %> <% elsif is_teacher && is_ST %>
<%= link_to '学生身份', switch_role_course_path(@course, :user_id => User.current.id, :curr_role => (is_TA ? 7 : 9), :tar_role => 10), :class => "sy_btn_orange mr10 fl", :title => "由教师身份切换至学生身份" %> <%= link_to '学生身份', switch_role_course_path(@course, :user_id => User.current.id, :curr_role => (is_TA ? 7 : 9), :tar_role => 10), :class => "sy_btn_orange mr10 fl", :title => "由教师身份切换至学生身份" %>
<% end %> <% end %>
<% unless (is_teacher || is_TA || is_TE) %> <% unless (is_teacher || is_TA || is_TE || is_ST) %>
<div id="join_in_course_header"><%= join_in_course_header(@course, User.current) %></div> <div id="join_in_course_header"><%= join_in_course_header(@course, User.current) %></div>
<% end %> <% end %>
</div> </div>

View File

@ -276,6 +276,13 @@
$("#expand_tools_expand a").addClass('active'); $("#expand_tools_expand a").addClass('active');
$("#navContentCourse").toggle(); $("#navContentCourse").toggle();
}); });
function delete_confirm(){
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您确认要退出该班级吗?</p><div class="cl"></div><a href="<%=join_path(:object_id => @course.id) %>" class="fr sy_btn_blue mr85 mt10" data-method="delete" data-remote="true">确&nbsp;&nbsp;定</a>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10 mr10" onclick="hideModal();">取&nbsp;&nbsp;消</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
}
</script> </script>
</html> </html>

View File

@ -7,7 +7,7 @@
<meta name="keywords" content="issue,bug,tracker" /> <meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %> <%= csrf_meta_tag %>
<%= favicon %> <%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/public','css/structure','css/courses','css/popup','prettify','syllabus','sy_public',:media => 'all'%> <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/public','css/structure','css/courses','css/popup','prettify','syllabus','sy_public','css/moduel',:media => 'all'%>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %> <%= javascript_heads %>
<%= javascript_include_tag "bootstrap","avatars","course",'attachments','prettify','syllabus','cookie'%> <%= javascript_include_tag "bootstrap","avatars","course",'attachments','prettify','syllabus','cookie'%>

View File

@ -7,7 +7,7 @@
<meta name="keywords" content="issue,bug,tracker" /> <meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %> <%= csrf_meta_tag %>
<%= favicon %> <%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan','prettify', :media => 'all' %> <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan','prettify','css/project', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %> <%= javascript_heads %>
<%= javascript_include_tag "jquery.leanModal.min",'prettify' %> <%= javascript_include_tag "jquery.leanModal.min",'prettify' %>

View File

@ -106,7 +106,7 @@
<input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="<%= @user.user_extensions.occupation %>" /> <input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="<%= @user.user_extensions.occupation %>" />
<% else %> <% else %>
<input nhname="tag" autocomplete="off" maxlength="36" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" id="province" name="province" class="w210 fl" type="text"value="<%= User.current.user_extensions.school %>" > <input nhname="tag" autocomplete="off" maxlength="36" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" id="province" name="province" class="w210 fl" type="text"value="<%= User.current.user_extensions.school %>" >
<input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="<%= @user.user_extensions.school.id %>" /> <!-- 单位名称的test框选中下拉列表框的id --> <input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="<%= @user.user_extensions.school.try(:id) %>" /> <!-- 单位名称的test框选中下拉列表框的id -->
<% end %> <% end %>
<p class="fl ml10"> <p class="fl ml10">
<!-- <span id="errortip" class="icons_warning fl mt5" style="display: none;"></span> --> <!-- <span id="errortip" class="icons_warning fl mt5" style="display: none;"></span> -->

View File

@ -1,14 +1,8 @@
<% if @polls.empty? %> <% if @polls.empty? %>
alert('您的其它班级下没有问卷可供导入'); var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您的其它班级下没有问卷可供导入</p><div class="cl"></div><a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 122px;" onclick="hideModal();">确定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% else %> <% else %>
var html_value = '<%= escape_javascript(render :partial => 'other_poll',:locals => {:polls => @polls,:polls_group_id=>@polls_group_id}) %>'; var html_value = '<%= escape_javascript(render :partial => 'other_poll',:locals => {:polls => @polls,:polls_group_id=>@polls_group_id}) %>';
pop_box_new(html_value, 510, 550); pop_box_new(html_value, 510, 550);
// $('#ajax-modal').html('<%= escape_javascript(render :partial => 'other_poll',:locals => {:polls => @polls,:polls_group_id=>@polls_group_id}) %>');
//
//
// showModal('ajax-modal', '513px');
// $('#ajax-modal').siblings().remove();
// $('#ajax-modal').before("<a href='javascript:void(0)' onclick='closeModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
// $('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
// $('#ajax-modal').parent().addClass("popbox_polls");
<% end %> <% end %>

View File

@ -7,14 +7,11 @@
<div class="sy_popup_con" style="width:380px;"> <div class="sy_popup_con" style="width:380px;">
<ul class="sy_popup_add center" > <ul class="sy_popup_add center" >
<%=l(:label_delete_confirm) %> <%=l(:label_delete_confirm) %>
<%# if member.deletable? %>
<%#= !User.current.admin? && member.include?(User.current) ? l(:text_own_membership_for_project_confirmation) : l(:label_delete_confirm) %>
<%# end %>
<li class="mt10"> <li class="mt10">
<label class="mr27">&nbsp;</label> <label class="mr27">&nbsp;</label>
<a href="javascript:void(0);" class="sy_btn_grey fl " onclick="hideModal()">取&nbsp;&nbsp;消</a> <a href="javascript:void(0);" class="sy_btn_grey fl " onclick="hideModal()">取&nbsp;&nbsp;消</a>
<!-- <a href="<%#= {:controller => 'repositories', :action => 'forked'} %>" class="sy_btn_blue fl ml20" onclick="hideModal();">确&nbsp;&nbsp;定</a>--> <!-- <a href="<%#= {:controller => 'repositories', :action => 'forked'} %>" class="sy_btn_blue fl ml20" onclick="hideModal();">确&nbsp;&nbsp;定</a>-->
<%= link_to "确 定", membership_path(member), :method => "delete", :class => "sy_btn_blue fl ml20", :onclick => "hideModal();" %> <%= link_to "确 定", membership_path(member), :method => "delete", :remote => true, :class => "sy_btn_blue fl ml20", :onclick => "hideModal();" %>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
</ul> </ul>

View File

@ -7,20 +7,17 @@
<% parents_rely = get_reply_parents_no_root parents_rely, comment %> <% parents_rely = get_reply_parents_no_root parents_rely, comment %>
<% length = parents_rely.length %> <% length = parents_rely.length %>
<div id="comment_reply_<%=comment.id %>"> <div id="comment_reply_<%=comment.id %>">
<% if length <= 3 %> <% if length <= 2 %>
<%=render :partial => 'projects/journal_comment_reply', :locals => {:comment => comment.parent} %> <%=render :partial => 'projects/journal_comment_reply', :locals => {:comment => comment.parent} %>
<% else %> <% else %>
<div class="orig_cont clearfix"> <div class="orig_cont clearfix">
<div class="orig_cont clearfix"> <div class="orig_cont clearfix">
<div> <%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => parents_rely[length - 1]} %>
<%=render :partial => 'projects/journal_comment_reply', :locals => {:comment => parents_rely[length - 1]} %>
</div>
<%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => parents_rely[length - 2]} %>
</div> </div>
<div class="orig_cont_hide clearfix"> <div class="orig_cont_hide_issue clearfix">
<span class="orig_icon" >&darr; </span> <span class="orig_icon" >&darr; </span>
<span class="orig_icon" style="display:none;" > &uarr;</span> <span class="orig_icon" style="display:none;" > &uarr;</span><span class="">已经隐藏<%=(length - 2).to_s %>个楼层</span>
<%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment, :type => comment.class),:remote=>true %> <%= link_to '[点击展开]', show_all_replies_users_path(:comment => comment, :type => comment.class), :remote=>true, :class => 'linkBlue2' %>
</div> </div>
<%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => parents_rely[0]} %> <%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => parents_rely[0]} %>
</div> </div>

View File

@ -1,2 +1,2 @@
var htmlvalue = "<%= escape_javascript(render :partial => 'projects/delete_member_pop', :locals => { :member => @member }) %>"; var htmlvalue = "<%= escape_javascript(render :partial => 'projects/delete_member_pop', :locals => { :member => @member }) %>";
pop_box_new(htmlvalue,320,316); pop_box_new(htmlvalue,460,316);

View File

@ -1,3 +1,3 @@
var htmlvalue = "<%= escape_javascript(render :partial => 'repositories/forked_popbox') %>"; var htmlvalue = "<%= escape_javascript(render :partial => 'repositories/forked_popbox') %>";
pop_box_new(htmlvalue,320,316); pop_box_new(htmlvalue,460,316);

View File

@ -12,7 +12,7 @@
<input type="text" style="display: none"/> <!--阻止表单自动填充 --> <input type="text" style="display: none"/> <!--阻止表单自动填充 -->
<input type="password" style="display: none"/> <!--阻止表单自动填充 --> <input type="password" style="display: none"/> <!--阻止表单自动填充 -->
<label><span class="c_red">*</span>&nbsp;<%= l(:label_projects_new_name)%>&nbsp;&nbsp;:</label> <label><span class="c_red">*</span>&nbsp;<%= l(:label_projects_new_name)%>&nbsp;&nbsp;:</label>
<input type="text" name="project[name]" id="project_name" class="project_new_input" maxlength="100" placeholder="例如:团队协作方法与机制研究" onkeyup="regex_project_name();"> <input type="text" name="project[name]" id="project_name" class="project_new_input project_new_input_project_new" maxlength="100" placeholder="例如:团队协作方法与机制研究" onkeyup="regex_project_name();">
<p class="c_orange ml70" id="project_name_notice" style="display: none;">项目名称不能为空</p> <p class="c_orange ml70" id="project_name_notice" style="display: none;">项目名称不能为空</p>
</li> </li>
<div class="cl"></div> <div class="cl"></div>

View File

@ -107,7 +107,7 @@
:class => "sy_btn_grey mr5", :class => "sy_btn_grey mr5",
:data => (!User.current.admin? && member.include?(User.current) ? {:confirm => l(:text_own_membership_for_project_confirmation)} : {confirm: l(:label_delete_confirm)}) if member.deletable? %> :data => (!User.current.admin? && member.include?(User.current) ? {:confirm => l(:text_own_membership_for_project_confirmation)} : {confirm: l(:label_delete_confirm)}) if member.deletable? %>
<% if member.deletable? %> <% if member.deletable? %>
<%= link_to "删除", { :controller => 'projects', :action => 'delete_member_pop', :member => member }, :remote => true, :class => "sy_btn_grey mr5"%> <%= link_to "删除", delete_member_pop_project_path(@project, :member => member), :remote => true, :class => "sy_btn_grey mr5"%>
<% end %> <% end %>
<% end %> <% end %>
</th> </th>

View File

@ -1,7 +1,7 @@
<!--新版项目头部结束--> <!--新版项目头部结束-->
<div class="pro_new_info mb10 break_word" style="padding-bottom: 5px" > <div class="ke-block pro_new_info mb10 break_word" style="padding-bottom: 5px" >
<div id="project_invite_code"><%= render :partial => 'projects/invite_code' %></div> <div id="project_invite_code"><%= render :partial => 'projects/invite_code' %></div>
<div id="project_description_code" > <div id="project_description_code" style="padding: 0 15px 10px 15px;">
<% if @project.description.blank? %> <% if @project.description.blank? %>
<p class="break_word" style="padding-top:5px"><%= @project.name %></p> <p class="break_word" style="padding-top:5px"><%= @project.name %></p>
<% else %> <% else %>

View File

@ -17,7 +17,7 @@
<label class="mr27">&nbsp;</label> <label class="mr27">&nbsp;</label>
<a href="javascript:void(0);" class="sy_btn_grey fl " onclick="hideModal()">取&nbsp;&nbsp;消</a> <a href="javascript:void(0);" class="sy_btn_grey fl " onclick="hideModal()">取&nbsp;&nbsp;消</a>
<!-- <a href="<%#= {:controller => 'repositories', :action => 'forked'} %>" class="sy_btn_blue fl ml20" onclick="hideModal();">确&nbsp;&nbsp;定</a>--> <!-- <a href="<%#= {:controller => 'repositories', :action => 'forked'} %>" class="sy_btn_blue fl ml20" onclick="hideModal();">确&nbsp;&nbsp;定</a>-->
<%= link_to "确 定", {:controller => 'repositories', :action => 'forked'}, :class => "sy_btn_blue fl ml20", :onclick => "hideModal();" %> <%= link_to "确 定", {:controller => 'repositories', :action => 'forked'}, :class => "sy_btn_blue fl ml20", :onclick => "hideModal();", :target => "_blank" %>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
</ul> </ul>

View File

@ -1,5 +1,6 @@
<div class="fl"><h2 class="project_h2_repository"> <div class="fl"><h2 class="project_h2_repository">
<div class="git_usr_title"> <div class="git_usr_title">
<%=link_to @project.owner, user_path(@project.owner), :class => "repository-title-dec" %> / <%= link_to @project.name, project_path(@project), :class => "repository-title-dec" %> <%=link_to @project.owner, user_path(@project.owner), :class => "repository-title-dec" %> /
<%=link_to @repository.identifier,({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => gitlab_repository(@project).try(:identifier)}), :class => "repository-title-dec" %>
</div></h2> </div></h2>
</div> </div>

View File

@ -1,16 +1,22 @@
<% if @courses.any? %> <% if @courses.any? %>
<div class="sy_category"> <div class="sy_category">
<span class="sy_cgrey ">排序:</span> <span class="sy_cgrey ">排序:</span>
<%= link_to "时间", {:controller => 'syllabuses', :action => 'syllabus_courselist', :id =>@syllabus, :type => @type, :sort => @c_sort, :order => 1 }, :class => "sy_cgrey fl", :remote => true %> <%= link_to "时间", {:controller => 'syllabuses', :action => 'syllabus_courselist', :id =>@syllabus, :type => @type, :sort => @c_sort, :order => 1, :list_type => @list_type}, :class => "sy_cgrey fl", :remote => true %>
<% if @type.to_i == 1 %> <% if @type.to_i == 1 %>
<%= link_to "", {:controller => 'syllabuses', :action => 'syllabus_courselist', :id =>@syllabus, :type => @type, :sort => @c_sort, :order => 1 }, :class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} mt15 fl", :remote => true %> <%= link_to "", {:controller => 'syllabuses', :action => 'syllabus_courselist', :id =>@syllabus, :type => @type, :sort => @c_sort, :order => 1, :list_type => @list_type}, :class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} mt15 fl", :remote => true %>
<% end %> <% end %>
<%= link_to "人气", {:controller => 'syllabuses', :action => 'syllabus_courselist', :id =>@syllabus, :type => @type, :sort => @c_sort, :order => 2 }, :class => "sy_cgrey fl #{@type == 1 ? '' : 'ml10'}", :remote => true %> <%= link_to "人气", {:controller => 'syllabuses', :action => 'syllabus_courselist', :id =>@syllabus, :type => @type, :sort => @c_sort, :order => 2, :list_type => @list_type}, :class => "sy_cgrey fl #{@type == 1 ? '' : 'ml10'}", :remote => true %>
<% if @type.to_i == 2 %> <% if @type.to_i == 2 %>
<%= link_to "", {:controller => 'syllabuses', :action => 'syllabus_courselist', :id =>@syllabus, :type => @type, :sort => @c_sort, :order => 2 }, :class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} mt15 fl", :remote => true %> <%= link_to "", {:controller => 'syllabuses', :action => 'syllabus_courselist', :id =>@syllabus, :type => @type, :sort => @c_sort, :order => 2, :list_type => @list_type}, :class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} mt15 fl", :remote => true %>
<% end %> <% end %>
<% if @syllabus.syllabus_members.map{|sm| sm.user_id}.include?(User.current.id) %> <% archive_courses = @syllabus.courses.where("is_delete = ?", 1).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS updated_time").order("updated_time desc") %>
<% if @list_type == 0 && @syllabus.syllabus_members.map{|sm| sm.user_id}.include?(User.current.id) %>
<%= link_to "新建班级", new_course_path(:host=> Setting.host_course, :syllabus_id => @syllabus.id), :class => "sy_btn_green fr mt10 mr15", :target => '_blank'%> <%= link_to "新建班级", new_course_path(:host=> Setting.host_course, :syllabus_id => @syllabus.id), :class => "sy_btn_green fr mt10 mr15", :target => '_blank'%>
<% unless archive_courses.blank? %>
<%= link_to "归档管理", syllabus_courselist_syllabus_path(@syllabus, :list_type => 1), :class => "linkBlue2 fr mr20 f14"%>
<% end %>
<% elsif @list_type == 1 && @syllabus.syllabus_members.map{|sm| sm.user_id}.include?(User.current.id) %>
<%= link_to "返回", syllabus_courselist_syllabus_path(@syllabus), :class => "linkBlue2 fr mr15 f14"%>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
@ -18,12 +24,12 @@
<% @courses.each do |course| %> <% @courses.each do |course| %>
<ul class="sy_classlist"> <ul class="sy_classlist">
<div class="fl"> <div class="fl">
<% if course.is_public == 0 && !User.current.member_of_course?(course) && !User.current.admin? %> <% if (course.is_public == 0 && !User.current.member_of_course?(course) && !User.current.admin?) || @list_type == 1 %>
<h3 class="sy_classlist_title fl"> <h3 class="sy_classlist_title fl" style="max-width: 530px;">
<%=course.name %><%=current_time_and_term_short(course) %> <%=course.name %><%=current_time_and_term_short(course) %>
</h3> </h3>
<% else %> <% else %>
<h3 class="sy_classlist_title fl"> <h3 class="sy_classlist_title fl" style="max-width: 530px;">
<%= link_to course.name+"("+current_time_and_term_short(course)+")", course_path(course.id,:host=>Setting.host_course), <%= link_to course.name+"("+current_time_and_term_short(course)+")", course_path(course.id,:host=>Setting.host_course),
:style => 'color:#000',:id => "show_course_#{course.id}", :target => '_blank', :title => (course.is_public? ? "公开班级:":"私有班级:")+course.name+""+current_time_and_term(course)+""%> :style => 'color:#000',:id => "show_course_#{course.id}", :target => '_blank', :title => (course.is_public? ? "公开班级:":"私有班级:")+course.name+""+current_time_and_term(course)+""%>
</h3> </h3>
@ -38,14 +44,14 @@
<% homework_num = course.homework_commons.where("publish_time <= '#{Date.today}'").count %> <% homework_num = course.homework_commons.where("publish_time <= '#{Date.today}'").count %>
<% end %> <% end %>
<span class=" mr15">作业: <span class=" mr15">作业:
<% if course.is_public == 0 && !User.current.member_of_course?(course) %> <% if (course.is_public == 0 && !User.current.member_of_course?(course)) || @list_type == 1 %>
<%=homework_num %> <%=homework_num %>
<% else %> <% else %>
<%= link_to homework_num, homework_common_index_path(:course => course.id), :class => "sy_cblue",:target => '_blank'%> <%= link_to homework_num, homework_common_index_path(:course => course.id), :class => "sy_cblue",:target => '_blank'%>
<% end %> <% end %>
</span> </span>
<span class=" mr15">资源: <span class=" mr15">资源:
<% if course.is_public == 0 && !User.current.member_of_course?(course) %> <% if (course.is_public == 0 && !User.current.member_of_course?(course)) || @list_type == 1 %>
<%=visable_attachemnts_incourse(course).count %> <%=visable_attachemnts_incourse(course).count %>
<% else %> <% else %>
<%= link_to visable_attachemnts_incourse(course).count, course_files_path(course), :class => "sy_cblue",:target => '_blank'%> <%= link_to visable_attachemnts_incourse(course).count, course_files_path(course), :class => "sy_cblue",:target => '_blank'%>
@ -55,10 +61,19 @@
<span class=" mr15">更新时间:<%= format_date(course.updated_on) %></span> <span class=" mr15">更新时间:<%= format_date(course.updated_on) %></span>
</p> </p>
</div> </div>
<% if User.current.member_of_course?(course) %> <% if @list_type == 0 %>
<%=link_to '进入班级', course_path(course), :class => 'btn_orange_big fr mt5', :target => '_blank' %> <% if User.current.member_of_course?(course) %>
<%=link_to '进入班级', course_path(course), :class => 'btn_orange_big fr mt5', :target => '_blank' %>
<% else %>
<%= link_to "加入班级",join_private_courses_courses_path,:remote => true,:class => "hw_btn_green fr mt5",:method => "post"%>
<% end %>
<% if User.current == course.teacher || User.current.admin? %>
<a href="javascript:void(0)" onclick="archive_course(<%=course.id %>, 0);" class="btn_grey_big fr mt5 mr5" style="width: 56px;">归档</a>
<% end %>
<% else %> <% else %>
<%= link_to "加入班级",join_private_courses_courses_path,:remote => true,:class => "hw_btn_green fr mt5",:method => "post"%> <% if User.current == course.teacher || User.current.admin? %>
<a href="javascript:void(0)" onclick="archive_course(<%=course.id %>, 1);" class="btn_grey_big fr mt5" style="width: 56px;">恢复</a>
<% end %>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
</ul> </ul>
@ -71,14 +86,31 @@
</div> </div>
</div> </div>
<% else %> <% else %>
<div class="icons_tishi"><img src="/images/sy/icons_tan.png" width="110" height="110" alt="" ></div> <% if !User.current.member_of_syl?(@syllabus) %>
<% if User.current.member_of_syl?(@syllabus) %> <div class="icons_tishi"><img src="/images/sy/icons_tan.png" width="110" height="110" alt="" ></div>
<p class="sy_tab_con_p">该课程还未创建班级,请
<%= link_to "新建班级", new_course_path(:host=> Setting.host_course, :syllabus_id => @syllabus.id), :class => "sy_corange", :target => '_blank'%>
,谢谢啦!<br/>只有创建班级后才可以开展在线教学哦~
</p>
<% else %>
<p class="sy_tab_con_p">该课程还未创建班级,敬请期待!</p> <p class="sy_tab_con_p">该课程还未创建班级,敬请期待!</p>
<% elsif @list_type == 0 %>
<% if @syllabus.courses.where("is_delete = ?", 1).count == 0 %>
<div class="icons_tishi"><img src="/images/sy/icons_tan.png" width="110" height="110" alt="" ></div>
<p class="sy_tab_con_p">该课程还未创建班级,请
<%= link_to "新建班级", new_course_path(:host=> Setting.host_course, :syllabus_id => @syllabus.id), :class => "sy_corange", :target => '_blank'%>
,谢谢啦!<br/>只有创建班级后才可以开展在线教学哦~
</p>
<% else %>
<div class="sy_category" style="border-bottom-color: #fff;">
<%= link_to "新建班级", new_course_path(:host=> Setting.host_course, :syllabus_id => @syllabus.id), :class => "sy_btn_green fr mt10 mr15", :target => '_blank'%>
<%= link_to "归档管理", syllabus_courselist_syllabus_path(@syllabus, :list_type => 1), :class => "linkBlue2 fr mr20 f14"%>
<div class="cl"></div>
</div>
<div class="icons_tishi"><img src="/images/sy/icons_tan.png" width="110" height="110" alt="" ></div>
<p class="sy_tab_con_p">该课程的班级已全部归档</p>
<% end %>
<% elsif @list_type == 1 %>
<div class="sy_category" style="border-bottom-color: #fff;">
<%= link_to "返回", syllabus_courselist_syllabus_path(@syllabus), :class => "linkBlue2 fr mr15 f14"%>
<div class="cl"></div>
</div><div class="icons_tishi"><img src="/images/sy/icons_tan.png" width="110" height="110" alt="" ></div>
<p class="sy_tab_con_p">该课程下无归档的班级</p>
<% end %> <% end %>
<% end %> <% end %>
@ -87,4 +119,19 @@
$(function() { $(function() {
$(".sy_con_l").css("min-height",$(".sy_con_r").height()); $(".sy_con_l").css("min-height",$(".sy_con_r").height());
}); });
function archive_course(id, type){
if(type == 0){
var htmlvalue = '<div id="muban_popup_box" style="width:400px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear muban_popup_con"><div class="newupload_conbox newupload_tishi"><p>您是否确定归档此班级</p>' +
'<a href="javascript:void(0);" class="btn btn-grey mt10 mr10" onclick="hideModal();">取&nbsp;&nbsp;消</a>' +
'<a href="/courses/'+ id +'/archive_course?source=1&type=0" class="btn btn-blue mt10" onclick="hideModal();" data-remote="true">确&nbsp;&nbsp;定</a></div></div></div>';
pop_box_new(htmlvalue, 400, 132);
} else{
var htmlvalue = '<div id="muban_popup_box" style="width:400px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear muban_popup_con"><div class="newupload_conbox newupload_tishi"><p>您和您的学生将可以重新在此班级中互动<br/>此班级的动态会在首页中显示<br/><br/>' +
'您是否确定恢复此班级</p><a href="javascript:void(0);" class="btn btn-grey mt10 mr10" onclick="hideModal();">取&nbsp;&nbsp;消</a>' +
'<a href="/courses/'+ id +'/archive_course?source=1&type=1" class="btn btn-blue mt10" onclick="hideModal();" data-remote="true">确&nbsp;&nbsp;定</a></div></div></div>';
pop_box_new(htmlvalue, 400, 200);
}
}
</script> </script>

View File

@ -0,0 +1,23 @@
<% issue_list(issues) do |issue| -%>
<script>
$(function () {
sd_create_editor_from_data(<%= issue.id%>, null, "100%", "<%= issue.class.name %>");
});
</script>
<%= render :partial => 'users/my_issue_list', :locals => {:activity => issue, :user_activity_id => issue.id} %>
<% end %>
<div style="text-align:left;">
<div style="width:auto; display:inline-block;">
<ul>
<a href="javascript:void(0)" class="hw_btn_blue ml10 mt10 mb10" style="visibility:hidden;" alt="导出EXCEL">导出EXCEL</a>
</ul>
</div>
<div class="pages fr" style="width:auto; display:inline-block;margin-top:10px">
<ul id="issue_list_pagination" class="fr">
<%= pagination_links_full @issue_pages, @issue_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
</ul>
<div class="cl"></div>
</div>
</div>

View File

@ -5,8 +5,9 @@
</li> </li>
<li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContent2' : 'homepageHomeworkContent' %> fl"> <li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContent2' : 'homepageHomeworkContent' %> fl">
<a href="javascript:void(0);" class="newsGrey"> <a href="javascript:void(0);" class="newsGrey">
<%= link_to User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "教辅"}", user_path(User.find(ma.course_message_id), :course_id => ma.course_id), <% content = User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "教辅"}" %>
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> <%= link_to content, user_path(User.find(ma.course_message_id), :course_id => ma.course_id),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank', :title => "#{content}" %>
<!--:onmouseover => "message_titile_show($(this),event)",--> <!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>--> <!--:onmouseout => "message_titile_hide($(this))" %>-->
</a> </a>

View File

@ -0,0 +1 @@
<span class="issues_nav_tag ml5" ><%= @issues_assigned_count %></span>

View File

@ -0,0 +1 @@
<span class="issues_nav_tag ml5" ><%= @issue_count %></span>

View File

@ -0,0 +1,98 @@
<% unless activity.author.nil? %>
<div class="issues_list_box clear" id="user_activity_<%= user_activity_id%>">
<div class="issues_ciricons fl ">
<% if activity.status_id.to_i == 5 %>
<span class="issues_ciricons_02"></span>
<% else %>
<span class="issues_ciricons_01"></span>
<% end %>
</div>
<div class=" fl ml5">
<div class="issues_list_titlebox clear">
<a href="<%= issue_path(activity) %>" class="issues_list_title fl" target="_blank" title="<%= activity.subject.to_s %>"><%= activity.subject.to_s %></a>
<div class="cl"></div>
</div>
<div class="issues_list_small">
<%# if activity.try(:author).try(:realname) == ' ' %>
<%#= link_to activity.try(:author), user_path(activity.author_id), :class => "fl issues_list_name" %>
<%# else %>
<%#= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "fl issues_list_name" %>
<%# end %>
<!--p class="fl ml10"> <span class="mr5"><%#=format_time(activity.created_on) %></span>发布</p-->
<p class="fl issues_list_name" ><span class="mr5"><%= format_time(activity.created_on) %> </span>发布</p>
<p class="fl ml10"> <span class="mr5"><%= format_time(activity.updated_on) %> </span>更新</p>
</div>
</div>
<ul class="issues_list_txt fr">
<li class=" c_grey issues_list_max mr5">
<%= Project.find(activity.project_id).name %>
</li>
<li class="c_grey">
<% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id)%>
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id)%>
<% end %>
</li>
<li class="issues_list_min c_grey">
<% case activity.tracker_id %>
<% when 1%>
缺陷
<% when 2%>
功能
<% when 3%>
支持
<% when 4%>
任务
<% when 5%>
周报
<% end %>
</li>
<li class="c_grey">
<% if !activity.assigned_to_id.nil? && activity.assigned_to_id != 0 %>
<% if activity.try(:assigned_to).try(:realname).empty? %>
<%= link_to activity.assigned_to, user_path(activity.assigned_to_id)%>
<% else %>
<%= link_to activity.try(:assigned_to).try(:realname), user_path(activity.assigned_to_id)%>
<% end %>
<% end %></li>
<li class="issues_list_min c_grey">
<%= activity.priority.name %>
</li>
<li class="c_grey issues_list_max" title="<%= activity.fixed_version %>"><%= activity.fixed_version %></li>
<li class="issues_list_min c_grey mr5" ><%= activity.status.name %></li>
<li class="<%= (activity.done_ratio == 100 ? 'c_green issues_list_min mr5' : 'c_red issues_list_min mr5') %>"><%= activity.done_ratio %>%</li>
<li class="issues_list_min">
<% if activity.journals.count > 0 %>
<span class="issues_icons_mes fl mr5 mt12"></span>
<span class="fl mr5"><%= activity.journals.count %></span>
<% end %>
</li>
</ul>
</div>
<% end %>
<script>
$(".issues_list_box").mouseover(function(){
var iconOrder;
var iconSize = $(this).children().eq(2).children().eq(7).children().size();
if(iconSize > 1){
iconOrder = 2;
} else{
iconOrder = 0;
}
$(this).children().eq(2).children().eq(7).children().eq(iconOrder).show();
});
$(".issues_list_box").mouseout(function(){
var iconOrder;
var iconSize = $(this).children().eq(2).children().eq(7).children().size();
if(iconSize > 1){
iconOrder = 2;
} else{
iconOrder = 0;
}
$(this).children().eq(2).children().eq(7).children().eq(iconOrder).hide();
});
</script>

View File

@ -4,19 +4,32 @@
<%= javascript_include_tag 'homework','baiduTemplate' %> <%= javascript_include_tag 'homework','baiduTemplate' %>
<script type="text/javascript"> <script type="text/javascript">
function homework_name_focus(){
$('#homework_editor').show();
var type = $("#homework_type_option").children('option:selected').val();
if(type == "0"){
$('#select_type_nitice').show();
}
}
var first_click = true; var first_click = true;
$(function(){ $(function(){
$("#homework_type_option").on("change",function(){ $("#homework_type_option").on("change",function(){
//$('#homework_editor').show();
var type = $(this).children('option:selected').val(); var type = $(this).children('option:selected').val();
if(type == "1"){ if(type == "0"){
$("#homeworkSetting").addClass("undis"); $('#select_type_nitice').show();
$("#homeworkSetting").html(""); }else{
}else if(type == "2"){ $('#select_type_nitice').hide();
$("#homeworkSetting").removeClass("undis"); if(type == "1"){
$("#homeworkSetting").html("<%=escape_javascript(render :partial => 'users/user_programing_attr', :locals => {:edit_mode => edit_mode, :homework=>homework, :not_allow_select => not_allow_select}) %>"); $("#homeworkSetting").addClass("undis");
}else if(type == "3"){ $("#homeworkSetting").html("");
$("#homeworkSetting").removeClass("undis"); }else if(type == "2"){
$("#homeworkSetting").html("<%=escape_javascript(render :partial => 'users/user_group_attr', :locals => {:edit_mode => edit_mode, :homework=>homework, :not_allow_select => not_allow_select}) %>"); $("#homeworkSetting").removeClass("undis");
$("#homeworkSetting").html("<%=escape_javascript(render :partial => 'users/user_programing_attr', :locals => {:edit_mode => edit_mode, :homework=>homework, :not_allow_select => not_allow_select}) %>");
}else if(type == "3"){
$("#homeworkSetting").removeClass("undis");
$("#homeworkSetting").html("<%=escape_javascript(render :partial => 'users/user_group_attr', :locals => {:edit_mode => edit_mode, :homework=>homework, :not_allow_select => not_allow_select}) %>");
}
} }
}); });
if($.trim($("#anonymous_comment").val()) == 1) { if($.trim($("#anonymous_comment").val()) == 1) {
@ -69,7 +82,10 @@
} }
var is_checked = false; var is_checked = false;
checked_val(); checked_val();
if(!regex_homework_name()){ if($("#homework_type_option").children('option:selected').val() == '0'){
$("#select_type_nitice").show();
}
else if(!regex_homework_name()){
$("#homework_name").focus(); $("#homework_name").focus();
} }
else if(!regex_homework_end_time()){ else if(!regex_homework_end_time()){
@ -176,7 +192,18 @@
<div class="HomeWorkCon"> <div class="HomeWorkCon">
<a id="submit_homework"></a> <a id="submit_homework"></a>
<div> <div>
<input type="text" name="homework_common[name]" id="homework_name" class="InputBox fl <%= edit_mode ? 'w701' : 'w603' %>" maxlength="255" onfocus="$('#homework_editor').show()" onkeyup="regex_homework_name();" placeholder="发布作业,请先输入作业标题" value="<%= homework.name%>" > <% group_pro = homework.homework_type == 3 && homework.student_work_projects.count != 0 %>
<select class="homework-type-option fl mr10" name="homework_type" <%=(not_allow_select || group_pro) ? 'disabled' : '' %> id="homework_type_option">
<%= options_for_select(homework_type_option,edit_mode ? homework.homework_type : 0) %>
</select>
<% if not_allow_select || group_pro %>
<input type="text" style="display: none" name="homework_type" value="<%=homework.homework_type %>"/>
<% end %>
<span class="c_red fl ml10 mt5 none" id="select_type_nitice">发布作业,请先选择作业类型</span>
</div>
<div class="cl"></div>
<div class="mt10">
<input type="text" name="homework_common[name]" id="homework_name" class="InputBox fl w701 <%= edit_mode ? 'w701' : 'w603' %>" maxlength="255" onfocus="homework_name_focus();" onkeyup="regex_homework_name();" placeholder="发布作业,请先输入作业标题" value="<%= homework.name%>" >
<%= link_to("从题库选用", user_import_homeworks_user_path(User.current.id,:select_course => defined?(select_course)),:class => "BlueCirBtn fr",:remote => true,:title=>"导入自己发布过的作业,或者共享题库中的作业") unless edit_mode%> <%= link_to("从题库选用", user_import_homeworks_user_path(User.current.id,:select_course => defined?(select_course)),:class => "BlueCirBtn fr",:remote => true,:title=>"导入自己发布过的作业,或者共享题库中的作业") unless edit_mode%>
<% unless edit_mode %> <% unless edit_mode %>
<input type="hidden" name="quotes" id="ref_homework_id" value=""/> <input type="hidden" name="quotes" id="ref_homework_id" value=""/>
@ -186,41 +213,34 @@
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<div class="mt10">
<% group_pro = homework.homework_type == 3 && homework.student_work_projects.count != 0 %>
<select class="homework-type-option fl mr10" name="homework_type" <%=(not_allow_select || group_pro) ? 'disabled' : '' %> id="homework_type_option">
<%= options_for_select(homework_type_option,homework.homework_type) %>
</select>
<% if not_allow_select || group_pro %>
<input type="text" style="display: none" name="homework_type" value="<%=homework.homework_type %>"/>
<% end %>
<label class="fl c_grey f14 mt5">截止日期:</label>
<div class="calendar_div fl mr10">
<input type="text" name="homework_common[end_time]" id="homework_end_time" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.end_time%>" >
<% if homework.homework_detail_manual.comment_status.to_i < 2 %>
<%= calendar_for('homework_end_time')%>
<% end %>
</div>
<label class="fl c_grey f14 mt5" style="margin-top: 4px;">发布日期(可选):</label>
<div class="calendar_div fl">
<% allow_edit = homework.student_works.has_committed.count == 0 && homework.student_work_projects.count ==0 %>
<input title="<%=allow_edit ? '' : '已有学生提交作品或关联项目,发布日期不可再编辑' %>" type="text" name="homework_common[publish_time]" id="homework_publish_time" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.publish_time%>" >
<% if allow_edit %>
<%= calendar_for('homework_publish_time')%>
<% end %>
</div>
<% if !edit_mode || edit_mode && homework.homework_detail_manual.comment_status < 2 %>
<div class="fr f14 ml10" style="margin-top: 4px;">
<input type="checkbox" name="homework_common[anonymous_comment]" value="<%=edit_mode ? homework.anonymous_comment : 1 %>" id="anonymous_comment"/>
<span class="f14 c_grey">启用匿评</span>
<!--<span id="anonymous_hint" style="display: none; font-size: 12px;" class="c_red">更改后评分比例将恢复默认值</span>-->
</div>
<% end %>
</div>
<div class="cl"></div>
<p id="homework_end_time_span" class="c_red mt5"></p>
<div class="cl"></div>
<div id="homework_editor" style="display: <%= edit_mode ? 'block':'none'%>"> <div id="homework_editor" style="display: <%= edit_mode ? 'block':'none'%>">
<div class="mt10">
<label class="fl c_grey f14 mt5">截止日期:</label>
<div class="calendar_div fl mr70">
<input type="text" name="homework_common[end_time]" id="homework_end_time" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.end_time%>" >
<% if homework.homework_detail_manual.comment_status.to_i < 2 %>
<%= calendar_for('homework_end_time')%>
<% end %>
</div>
<label class="fl c_grey f14 mt5" style="margin-top: 4px;">发布日期(可选):</label>
<div class="calendar_div fl">
<% allow_edit = homework.student_works.has_committed.count == 0 && homework.student_work_projects.count ==0 %>
<input title="<%=allow_edit ? '' : '已有学生提交作品或关联项目,发布日期不可再编辑' %>" type="text" name="homework_common[publish_time]" id="homework_publish_time" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.publish_time%>" >
<% if allow_edit %>
<%= calendar_for('homework_publish_time')%>
<% end %>
</div>
<% if !edit_mode || edit_mode && homework.homework_detail_manual.comment_status < 2 %>
<div class="fr f14 ml10" style="margin-top: 4px;">
<input type="checkbox" name="homework_common[anonymous_comment]" value="<%=edit_mode ? homework.anonymous_comment : 1 %>" id="anonymous_comment"/>
<span class="f14 c_grey">启用匿评</span>
<!--<span id="anonymous_hint" style="display: none; font-size: 12px;" class="c_red">更改后评分比例将恢复默认值</span>-->
</div>
<% end %>
</div>
<div class="cl"></div>
<p id="homework_end_time_span" class="c_red mt5"></p>
<div class="cl"></div>
<div class="mt10"> <div class="mt10">
<% if edit_mode %> <% if edit_mode %>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='homework_textarea' name="homework_common[description]"><%=homework.description %></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='homework_textarea' name="homework_common[description]"><%=homework.description %></textarea>
@ -257,7 +277,7 @@
<span class="fr mr10 mt3">或</span> <span class="fr mr10 mt3">或</span>
<%#= link_to "取消",user_homeworks_user_path(User.current.id),:class => "fr mr10 mt3"%> <%#= link_to "取消",user_homeworks_user_path(User.current.id),:class => "fr mr10 mt3"%>
<a href="javascript:void(0);" id="new_message_cancel_btn" class="fr mr10 mt3">取消</a> <a href="javascript:void(0);" id="new_message_cancel_btn" class="fr mr10 mt3">取消</a>
<% else %> <% else %>
<a href="javascript:void(0);" id="new_message_submit_btn" class="BlueCirBtnMini fr">发送</a> <a href="javascript:void(0);" id="new_message_submit_btn" class="BlueCirBtnMini fr">发送</a>
<span class="fr mr10 mt3">或</span> <span class="fr mr10 mt3">或</span>
<a href="javascript:void(0);" id="new_message_cancel_btn" class="fr mr10 mt3">取消</a> <a href="javascript:void(0);" id="new_message_cancel_btn" class="fr mr10 mt3">取消</a>

View File

@ -1,4 +1,3 @@
$("#subject_count_homework_<%=@homework.id %>").html(<%= @homework.quotes %>); $("#subject_count_homework_<%=@homework.id %>").html(<%= @homework.quotes %>);
hideModal();
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_post_notice') %>"; var htmlvalue = "<%= escape_javascript(render :partial => 'homework_post_notice') %>";
pop_box_new(htmlvalue,380,182); pop_box_new(htmlvalue,380,182);

View File

@ -1 +1,290 @@
11111 <%= content_for(:header_tags) do %>
<%= import_ke(enable_at: true,init_activity: true) %>
<% end %>
<script xmlns="http://www.w3.org/1999/html">
function add_style(){
// $("#proeject_id").val("来源");
if($("select[id='tracker_id']").val() != 0){
$("#tracker_id").addClass('issues_filter_active');
}
if($("select[id='author_id']").val() != 0){
$("#author_id").addClass('issues_filter_active');
}
if($("select[id='assigned_to_id']").val() !=0){
$("#assigned_to_id").addClass('issues_filter_active');
}
if($("select[id='priority_id']").val() !=0){
$("#priority_id").addClass('issues_filter_active');
}
if($("select[id='fixed_version_id']").val() !=0){
$("#fixed_version_id").addClass('issues_filter_active');
}
if($("select[id='status_id']").val() != 0 ){
$("#status_id").addClass('issues_filter_active');
}
if($("select[id='done_ratio']").val() != -1){
$("#done_ratio").addClass('issues_filter_active');
}
if($("select[id='test']").val() != 0 ){
$("#test").addClass('issues_filter_active');
}
if($("select[id='tracker_id']").val() == 0){
$("#tracker_id").removeClass('issues_filter_active');
}
if($("select[id='author_id']").val() == 0){
$("#author_id").removeClass('issues_filter_active');
}
if($("select[id='assigned_to_id']").val() ==0){
$("#assigned_to_id").removeClass('issues_filter_active');
}
if($("select[id='priority_id']").val() ==0){
$("#priority_id").removeClass('issues_filter_active');
}
if($("select[id='fixed_version_id']").val() ==0){
$("#fixed_version_id").removeClass('issues_filter_active');
}
if($("select[id='status_id']").val() == 0 ){
$("#status_id").removeClass('issues_filter_active');
}
if($("select[id='done_ratio']").val() == -1){
$("#done_ratio").removeClass('issues_filter_active');
}
if($("select[id='test']").val() == 0 ){
$("#test").removeClass('issues_filter_active');
}
};
//issues列表
function g(o){
return document.getElementById(o);
}
function HoverLi(n){
//如果有N个标签,就将i<=N;
for(var i=1;i<=3;i++){
g('issues_list_nav_'+i).className='issues_nav_nomal';
g('issues_list_content_'+i).className='undis';
}
g('issues_list_content_'+n).className='dis';
g('issues_list_nav_'+n).className='issues_nav_hover';
}
$(function(){
$("#RSide").removeAttr("id");
$("#Container").css("width","1000px");
$("input[nhname='date_show']").change(function(){
if($(this).val()=='创建日期起始' || $(this).val()=='创建日期结束')return;
$("input[nhname='date_val']",$(this).parent('div')).val($(this).val());
remote_function();
});
});
function remote_function() {
$("#issue_query_form").submit();
}
function remote_function_export(project_id) {
var tracker_id = $("#tracker_id").attr("value");
var subject = $("#v_subject").attr("value");
var assigned_to_id = $("#assigned_to_id").attr("value");
var fixed_version_id = $("#fixed_version_id").attr("value");
var status_id = $("#status_id").attr("value");
var done_ratio = $("#done_ratio").attr("value");
var test = $("#test").attr("value");
var author_id = $("#author_id").attr("value");
var priority_id = $("#priority_id").attr("value");
var issue_create_date_start = $("#issue_date_start_issue_export").attr("value");
var issue_create_date_end = $("#issue_date_end_issue_export").attr("value");
$("#sendexcel").attr("href","/projects/"+project_id+"/issues.xls?export=true&set_filter=1&tracker_id="+tracker_id+"&assigned_to_id="+assigned_to_id+"&fixed_version_id="+fixed_version_id+"&status_id="+status_id+"&done_ratio="+done_ratio+"&test="+test+"&author_id="+author_id+"&subject="+subject+"&issue_create_date_start="+issue_create_date_start+"&issue_create_date_end="+issue_create_date_end+"&priority_id="+priority_id);
///projects/1811/issues.xls?export=true&set_filter=1
}
function EnterPress(e){
var e = e || window.event;
if(e.keyCode == 13){
remote_function();
}
}
// 点击的时候让过滤条件选中assign_to
function switch_assign_to(assign) {
var assign = "option[value =" + assign + "]";
$("#issues_type_2").click(function(){
});
$("select[id='assigned_to_id']").find(assign).attr("selected", "selected");
$("select[id='author_id']").val('');
$("select[id='priority_id']").val('');
$("select[id='tracker_id']").val('');
$("select[id='fixed_version_id']").val('');
$("select[id='status_id']").val('');
$("select[id='done_ratio']").val('');
$("select[id='test']").val('');
$("#tracker_id").removeClass('issues_filter_active');
$("#author_id").removeClass('issues_filter_active');
$("#assigned_to_id").addClass('issues_filter_active');
$("#priority_id").removeClass('issues_filter_active');
$("#fixed_version_id").removeClass('issues_filter_active');
$("#status_id").removeClass('issues_filter_active');
$("#done_ratio").removeClass('issues_filter_active');
$("#test").removeClass('issues_filter_active');
remote_function();
}
// 点击的时候让过滤条件选中user_id
function createByMe(user_id) {
var user = "option[value =" + user_id + "]";
$("#createByMe").click(function(){
});
$("select[id='author_id']").find(user).attr("selected", "selected");
$("select[id='assigned_to_id']").val('');
$("select[id='priority_id']").val('');
$("select[id='tracker_id']").val('');
$("select[id='fixed_version_id']").val('');
$("select[id='status_id']").val('');
$("select[id='done_ratio']").val('');
$("select[id='test']").val('');
$("#tracker_id").removeClass('issues_filter_active');
$("#author_id").addClass('issues_filter_active');
$("#assigned_to_id").removeClass('issues_filter_active');
$("#priority_id").removeClass('issues_filter_active');
$("#fixed_version_id").removeClass('issues_filter_active');
$("#status_id").removeClass('issues_filter_active');
$("#done_ratio").removeClass('issues_filter_active');
$("#test").removeClass('issues_filter_active');
remote_function();
}
// 清楚表单所有选项
function all_reset_form() {
$("#issue_query_form")[0].reset();
$("select[id='author_id']").val('');
$("select[id='assigned_to_id']").val('');
$("input[nhname='date_val']").val('');
$("#tracker_id").removeClass('issues_filter_active');
$("#author_id").removeClass('issues_filter_active');
$("#assigned_to_id").removeClass('issues_filter_active');
$("#priority_id").removeClass('issues_filter_active');
$("#fixed_version_id").removeClass('issues_filter_active');
$("#status_id").removeClass('issues_filter_active');
$("#done_ratio").removeClass('issues_filter_active');
$("#test").removeClass('issues_filter_active');
remote_function();
}
</script>
<!--缺陷列表开始-->
<div id="myissues_con" class="myissues_con mb10">
<div class="myissues_head mb5">
<h2 class="ml15">我的Issue</h2>
</div>
<div class="clear mb5">
<div class="issues_statistics fl">
<ul>
<li>所有<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @issues_filter.count %></a></li>
<li>开启<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @issue_open_count %></a></li>
<li>关闭<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @issue_close_count %></a></li>
</ul>
</div><!--issues_statistics end-->
</div>
<%= form_tag( user_issues_user_path(@user), :remote=>'xls', :method => "post", :id=>"issue_query_form", :class => 'query_form') do %>
<div class="clear mb10">
<div class="hw_search_box fl ">
<input class="hw_search-input" placeholder="输入Issue名称进行搜索" type="text" id="v_subject" name="subject" onkeypress="EnterPress(event)" onkeydown="EnterPress()">
<a href="javascript:void(0);" class="hw_btn_search" onclick="remote_function();" ></a>
</div>
<a href="javascript:void(0);" class="sy_btn_grey fl ml5" onclick="all_reset_form();">清除</a>
<!-- <div class="issues_filter_data fr">
<input type="text" placeholder="开始日期" class="issues_calendar_input fl " ><a href="" class="issues_data_img fl" style="border-right:none;"></a>
<input type="text" placeholder="结束日期" class="issues_calendar_input fl " ><a href="" class="issues_data_img fl"></a>
</div>-->
</div>
<div class="issues_con_list" style="position: relative;">
<ul id="issues_list_nav" >
<li id="issues_list_nav_1" class="issues_nav_hover" onclick="HoverLi(1);all_reset_form();">
<a href="javascript:void(0);" id="issues_type_1" onclick="all_reset_form();" >搜索结果</a>
<span id="issue_filter_all"><%= render :partial => "users/my_issue_filter_all" %></span>
</li>
<li id="issues_list_nav_2" onclick="HoverLi(2);">
<a href="javascript:void(0);" id="issues_type_2" onclick="switch_assign_to(<%= User.current.id %>)">指派给我
<span id="issue_assigned_count"><%= render :partial => "users/my_issue_assigned_filter" %></span>
</a>
</li>
<li id="issues_list_nav_3" onclick="HoverLi(3);">
<a href="javascript:void(0);" id="issues_type_3" onclick="createByMe(<%= User.current.id %>)">我的发布<span class="issues_nav_tag ml5">
<%= @issues_author_count %>
</span></a>
</li>
<div class="cl"></div>
</ul>
<div class="issues_filter">
<div class="issues_form_filter mt5 mr5">
<!-- <select placeholder=" 来源" class="fl mr10" >
<option value="0" selected="selected">来源</option>
<option value="8166">123</option>
<option value="8166">123s</option>
</select>-->
<%= select( :project, :project_id, options_for_issue_project_list(@issues_filter),
{ :include_blank => false,:selected => @project_id ? @project_id : 0 },
{ :onchange => "remote_function();add_style();",:id => "proeject_id", :name => "project_id", :class => "fl", :style=>"width: 80px; margin-right:20px;"}
)%>
<select placeholder=" 发布人" class="fl my_issues_filter" disabled="disabled" style="padding:0px;width: 50px;margin-right: 15px;">
<option value="0" selected="selected">发布人</option>
</select>
<%= select( :issue, :user_id, [[@user.show_name, @user.id]].unshift(["发布人",0]),
{ :include_blank => false,:selected => @author_id ? @author_id : 0},
{:onchange => "remote_function();add_style();",:id => "author_id", :name => "author_id", :class => "fl", :style => "visibility:hidden;width: 0px;margin:0px;padding:0px;"}
)
%>
<select placeholder=" 类型" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px;width:35px; margin-right:10px;">
<option value="0" selected="selected">类型</option>
</select>
<select placeholder=" 指派给" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin-right: 15px;">
<option value="0" selected="selected">指派给</option>
</select>
<%= select( :issue, :user_id, [[@user.show_name, @user.id]].unshift(["指派给",0]),
{ :include_blank => false, :selected => @assigned_to ? @assigned_to : 0},
{:onchange=>"remote_function();add_style();",:id=>"assigned_to_id",:name=>"assigned_to_id",:class=>"fl", :style => "visibility:hidden; width:0px;margin:0px;padding:0px;"} )
%>
<select placeholder=" 优先度" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px">
<option value="0" selected="selected">优先度</option>
</select>
<select placeholder=" 里程碑" class="fl my_issues_filter" disabled="disabled" style="padding:0px;margin-left: 20px; margin-right: 10px">
<option value="0" selected="selected">里程碑</option>
</select>
<select placeholder=" 状态" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin-right:10px;width:35px;">
<option value="0" selected="selected">状态</option>
</select>
<select placeholder=" 完成度" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px">
<option value="0" selected="selected">完成度</option>
</select>
<select placeholder=" 排序" class="fl my_issues_filter" disabled="disabled" style="width:50px;visibility:hidden;margin-left: 0px;margin-right: 0px;">
<option value="0" selected="selected">排序</option>
</select>
</div>
<div class="cl"></div>
</div>
<% end %>
<% if @issues.empty? %>
<p class="nodata mt10"><%= l(:label_no_data) %></p>
<% else %>
<div id="issue_list">
<%= render :partial => 'users/all_issue_list', :locals => {:issues => @issues, :issue_pages => @issue_pages,:issue_count => @issue_count, :subject => @subject } %>
</div>
<% end %>
</div>
<div class="cl"></div>
</div><!--issues_filter end-->
<div id="issues_list_content_1">
</div><!--issues_list_content_1 end-->
<div id="issues_list_content_2" class="undis">
</div><!--issues_list_content_2 end-->
<div id="issues_list_content_3" class="undis">
</div><!--issues_list_content_3 end-->
<!--issues_con_list end-->
<!--缺陷列表结束-->
<!--缺陷列表结束-->

View File

@ -0,0 +1,3 @@
$("#issue_filter_all").html("<%= escape_javascript(render :partial => 'users/my_issue_filter_all') %>");
$("#issue_list").html("<%= escape_javascript(render :partial => 'users/all_issue_list',:locals => {:issues => @issues, :issue_pages=> @issue_pages, :issue_count => @issue_count })%>");
$("#issue_list_pagination").html('<%= pagination_links_full @issue_pages, @issue_count, :issues => @issues, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>');

View File

@ -16,5 +16,6 @@ homework_description_editor.html("<%= escape_javascript(@homework.description.ht
$("#homeworkSetting").removeClass("undis"); $("#homeworkSetting").removeClass("undis");
$("#homeworkSetting").html("<%=escape_javascript(render :partial => 'users/user_group_attr', :locals => {:edit_mode => true, :homework=>@homework, :not_allow_select => false}) %>"); $("#homeworkSetting").html("<%=escape_javascript(render :partial => 'users/user_group_attr', :locals => {:edit_mode => true, :homework=>@homework, :not_allow_select => false}) %>");
<% end %> <% end %>
$("#homework_type_option option[value='<%=@homework.homework_type %>']").attr("selected",true); document.getElementById("homework_type_option").options[<%=@homework.homework_type %>].selected = true;
$("#select_type_nitice").hide();
$("#homework_editor").show(); $("#homework_editor").show();

View File

@ -296,6 +296,9 @@ RedmineApp::Application.routes.draw do
collection do #生成路径为 /exercise/方法名 collection do #生成路径为 /exercise/方法名
delete 'delete_exercise_question' delete 'delete_exercise_question'
post 'update_exercise_question' post 'update_exercise_question'
get 'other_exercise'
post 'import_other_exercise'
get 'search_exercises'
end end
end end
@ -638,7 +641,7 @@ RedmineApp::Application.routes.draw do
get 'edit_brief_introduction' get 'edit_brief_introduction'
get "user_resource" get "user_resource"
get "user_issues", :to => 'users#user_issues', :via => :get, :as => "user_issues" match "user_issues", :to => 'users#user_issues', :via => [:get, :post], :as => "user_issues"
get "import_resources" get "import_resources"
get "import_resources_search" get "import_resources_search"
post "import_into_container" post "import_into_container"
@ -797,7 +800,7 @@ RedmineApp::Application.routes.draw do
post 'close' post 'close'
post 'reopen' post 'reopen'
get 'forked_pop' get 'forked_pop'
get 'delete_member_pop' get 'delete_member_pop', :to => 'projects#delete_member_pop', :via => :get, :as => "delete_member_pop"
get 'search_public_orgs_not_in_project' get 'search_public_orgs_not_in_project'
match 'copy', :via => [:get, :post] match 'copy', :via => [:get, :post]
match 'set_public_or_private', :via => [:post] match 'set_public_or_private', :via => [:post]
@ -1242,6 +1245,7 @@ RedmineApp::Application.routes.draw do
get 'search_not_group_member' get 'search_not_group_member'
post 'add_members' post 'add_members'
get 'delete_member' get 'delete_member'
get 'archive_course'
end end
collection do collection do
match 'join_private_courses', :via => [:get, :post] match 'join_private_courses', :via => [:get, :post]

View File

@ -0,0 +1,17 @@
class DeleteNullStudnetWorkProject < ActiveRecord::Migration
def up
count = StudentWorkProject.all.count / 30 + 2
transaction do
for i in 1 ... count do i
StudentWorkProject.page(i).per(30).each do |sp|
if !sp.student_work_id.nil? && sp.student_work.nil?
sp.destroy
end
end
end
end
end
def down
end
end

View File

@ -0,0 +1,5 @@
class AddIsDeleteToStudentWorks < ActiveRecord::Migration
def change
add_column :student_works, :is_delete, :integer, :default => 0
end
end

View File

@ -0,0 +1,15 @@
class AddColumnToExerciseUsers < ActiveRecord::Migration
def change
add_column :exercise_users, :commit_status, :integer, :default => 0
count = ExerciseUser.all.count / 30 + 2
transaction do
for i in 1 ... count do i
ExerciseUser.page(i).per(30).each do |eu|
if eu.exercise && eu.exercise.end_time < Time.now && eu.exercise.end_time > eu.created_at
eu.update_column('commit_status', 1)
end
end
end
end
end
end

View File

@ -11,7 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20161111081619) do ActiveRecord::Schema.define(:version => 20161117060138) do
create_table "activities", :force => true do |t| create_table "activities", :force => true do |t|
t.integer "act_id", :null => false t.integer "act_id", :null => false
@ -794,10 +794,11 @@ ActiveRecord::Schema.define(:version => 20161111081619) do
t.integer "exercise_id" t.integer "exercise_id"
t.integer "score" t.integer "score"
t.datetime "start_at" t.datetime "start_at"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.datetime "end_at" t.datetime "end_at"
t.integer "status" t.integer "status"
t.integer "commit_status", :default => 0
end end
create_table "exercises", :force => true do |t| create_table "exercises", :force => true do |t|
@ -1586,17 +1587,13 @@ ActiveRecord::Schema.define(:version => 20161111081619) do
t.boolean "hidden_repo", :default => false, :null => false t.boolean "hidden_repo", :default => false, :null => false
t.integer "attachmenttype", :default => 1 t.integer "attachmenttype", :default => 1
t.integer "user_id" t.integer "user_id"
t.integer "dts_test", :default => 0
t.string "enterprise_name" t.string "enterprise_name"
t.integer "organization_id" t.integer "organization_id"
t.integer "project_new_type" t.integer "project_new_type"
t.integer "gpid" t.integer "gpid"
t.integer "forked_from_project_id" t.integer "forked_from_project_id"
t.integer "forked_count" t.integer "forked_count"
t.integer "commits_count", :default => 0
t.integer "publish_resource", :default => 0 t.integer "publish_resource", :default => 0
t.integer "issues_count", :default => 0
t.integer "attachments_count", :default => 0
t.integer "boards_count", :default => 0 t.integer "boards_count", :default => 0
t.integer "news_count", :default => 0 t.integer "news_count", :default => 0
t.integer "acts_count", :default => 0 t.integer "acts_count", :default => 0
@ -1902,6 +1899,7 @@ ActiveRecord::Schema.define(:version => 20161111081619) do
t.float "work_score" t.float "work_score"
t.integer "work_status", :default => 0 t.integer "work_status", :default => 0
t.datetime "commit_time" t.datetime "commit_time"
t.integer "is_delete", :default => 0
end end
add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id" add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id"

View File

@ -24,8 +24,10 @@ namespace :exercise_publish do
course = exercise.course course = exercise.course
exercise.update_column('exercise_status', 3) exercise.update_column('exercise_status', 3)
course.student.each do |student| course.student.each do |student|
if ExerciseUser.where("user_id = ? && exercise_id = ?",student.student_id,exercise.id).empty? if ExerciseUser.where("user_id = ? && exercise_id = ?",student.student_id,exercise.id).blank?
ExerciseUser.create(:user_id => student.student_id, :exercise_id => exercise.id, :start_at => exercise.end_time, :status => true,:score=>0) ExerciseUser.create(:user_id => student.student_id, :exercise_id => exercise.id, :start_at => exercise.end_time, :status => true,:score=>0)
else
ExerciseUser.where("user_id = ? && exercise_id = ?",student.student_id,exercise.id).first.update_column('commit_status', 1)
end end
=begin =begin
s_score = calculate_student_score(exercise, student.student) s_score = calculate_student_score(exercise, student.student)

View File

@ -84,13 +84,13 @@ namespace :homework_evaluation do
work_ids = "(" + homework_common.student_works.has_committed.map(&:id).join(",") + ")" work_ids = "(" + homework_common.student_works.has_committed.map(&:id).join(",") + ")"
if homework_common.homework_type != 3 if homework_common.homework_type != 3
homework_common.student_works.has_committed.each do |student_work| homework_common.student_works.has_committed.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0 student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0
student_work.save student_work.save
end end
else else
homework_common.student_works.has_committed.each do |student_work| homework_common.student_works.has_committed.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0 student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0
student_work.save student_work.save
if student_work.absence_penalty != 0 if student_work.absence_penalty != 0
@ -98,7 +98,7 @@ namespace :homework_evaluation do
user_ids = pros.empty? ? "(-1)" : "(" + pros.map{|stu|stu.user_id}.join(",") + ")" user_ids = pros.empty? ? "(-1)" : "(" + pros.map{|stu|stu.user_id}.join(",") + ")"
student_works = homework_common.student_works.where("user_id in #{user_ids}") student_works = homework_common.student_works.where("user_id in #{user_ids}")
student_works.each do |st_work| student_works.each do |st_work|
absence_penalty_count = st_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - st_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count absence_penalty_count = st_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - st_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
st_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0 st_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
st_work.save st_work.save
end end

View File

@ -42,7 +42,7 @@ module Trustie
gproject = g.create_project(repository.identifier, gproject = g.create_project(repository.identifier,
path: repository.identifier, path: repository.identifier,
description: project.description, description: false,
wiki_enabled: false, wiki_enabled: false,
wall_enabled: false, wall_enabled: false,
issues_enabled: false, issues_enabled: false,
@ -88,7 +88,7 @@ module Trustie
# can use password # can use password
gproject = self.g.create_project(path, gproject = self.g.create_project(path,
path: path, path: path,
description: project.description, description: false,
wiki_enabled: false, wiki_enabled: false,
wall_enabled: false, wall_enabled: false,
issues_enabled: false, issues_enabled: false,

View File

@ -1,8 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"> "http://www.w3.org/TR/html4/loose.dtd">
<html> <html>
<head>
<title>Trustie 500 error</title> <title>Trustie 500 error</title>
<style type="text/css"> <link type="text/css" rel="stylesheet" href="/stylesheets/css/common.css" />
<link type="text/css" rel="stylesheet" href="/stylesheets/css/public.css" />
<script src="/javascripts/jquery-1.8.3-ui-1.9.2-ujs-2.0.3.js"></script>
<style type="text/css">
body { body {
font-family: Trebuchet MS, Georgia, "Times New Roman", serif; font-family: Trebuchet MS, Georgia, "Times New Roman", serif;
background: #fff; background: #fff;
@ -22,16 +27,49 @@
font-size: 24px; font-size: 24px;
color: #ff0077; color: #ff0077;
} }
</style> </style>
<script type="text/javascript">
$(function(){
if(window.history.length == 1)
{
$("#history_back").css("color","#CCC");
$("#history_back").css("cursor","default");
}
$("#subject").keydown(function(){
var curLength=$("#subject").val().length;
if(curLength>50){
var num=$("#subject").val().substr(0,50);
$("#subject").val(num);
}
else{
$("#textCount").text(50-$("#subject").val().length)
}
}).keyup(function(){
var curLength=$("#subject").val().length;
if(curLength>50){
var num=$("#subject").val().substr(0,50);
$("#subject").val(num);
}
else{
$("#textCount").text(50-$("#subject").val().length)
}
});
});
</script>
</head>
<body> <body>
<!-- <h1>Internal error</h1> <!-- <h1>Internal error</h1>
<p>An error occurred on the page you were trying to access.<br /> <p>An error occurred on the page you were trying to access.<br />
If you continue to experience problems please contact your Trustie administrator for assistance.</p> If you continue to experience problems please contact your Trustie administrator for assistance.</p>
<p>If you are the Trustie administrator, check your log files for details about the error.</p> --> <p>If you are the Trustie administrator, check your log files for details about the error.</p> -->
<div class="h_content"><img src="/images/twurn.com_.png" > <div class="muban_conbox_max">
<p class="font_h"><a href="javascript:history.back()" class="font_h">Back</a></p> <div class="pages_new_404">
</div> <img src="/images/404/pic_500.jpg" >
<p class="pages_new_404_txt" style="margin-top: 40px;">网站正在维护,请稍后重试。
<a href="javascript:history.back()" id="history_back" class="linkBlue2 mr10">返回上页>></a>
<a href="http://shang.qq.com/wpa/qunwpa?idkey=064e805dac955b8aea158c4b0dd3f033b8841bcee175fd619613f0e4ac4d8151" target="_blank" class="linkBlue2">QQ反馈>></a>
</p>
</div>
</div>
</body> </body>
</html> </html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1631,7 +1631,7 @@ function pop_box_new(value, Width, Height){
new Drag("popupWrap"); new Drag("popupWrap");
$("#popupWrap input, #popupWrap textarea").mousedown(function(event){ $("#popupWrap input, #popupWrap textarea, #popupWrap ul").mousedown(function(event){
event.stopPropagation(); event.stopPropagation();
new Drag("popupWrap"); new Drag("popupWrap");
}); });

View File

@ -81,7 +81,11 @@ function regex_course_name(str)
if($("#new_syllabus_id").length > 0){ if($("#new_syllabus_id").length > 0){
syl_title = $("#new_syllabus_id").find("option:selected").text(); syl_title = $("#new_syllabus_id").find("option:selected").text();
} else{ } else{
syl_title = $("#edit_syllabus_id").html(); if(str == "edit"){
syl_title = $("#edit_syllabus_id").html();
} else{
syl_title = $("#course_syllabus_title").html();
}
} }
if(name.length < 2) if(name.length < 2)
{ {
@ -762,6 +766,12 @@ function submit_homework(id){
//验证新建作业的名字 //验证新建作业的名字
function regex_homework_name() function regex_homework_name()
{ {
var type = $("#homework_type_option").children('option:selected').val();
if(type == "0"){
$('#select_type_nitice').show();
return false;
}
var name = $.trim($("#homework_name").val()); var name = $.trim($("#homework_name").val());
if(name=="") if(name=="")

View File

@ -169,6 +169,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
.mr70{margin-right: 70px;} .mr70{margin-right: 70px;}
.mr75{margin-right: 75px;} .mr75{margin-right: 75px;}
.mr80{margin-right: 80px;} .mr80{margin-right: 80px;}
.mr85{margin-right: 85px;}
.mr95 {margin-right:95px !important;} .mr95 {margin-right:95px !important;}
.mr100 {margin-right:100px !important;} .mr100 {margin-right:100px !important;}
.mr118 {margin-right:118px !important;} .mr118 {margin-right:118px !important;}
@ -181,6 +182,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
.mw20{ margin: 0 20px;} .mw20{ margin: 0 20px;}
.mw380 {max-width: 380px !important;} .mw380 {max-width: 380px !important;}
.mw400 {max-width: 400px !important;} .mw400 {max-width: 400px !important;}
.mw450 {max-width: 450px !important;}
.mt-20 {margin-top:-20px;} .mt-20 {margin-top:-20px;}
.mt-10 {margin-top:-10px;} .mt-10 {margin-top:-10px;}
.mt-4 {margin-top:-4px;} .mt-4 {margin-top:-4px;}
@ -549,6 +551,24 @@ a:hover.BlueCirBtnMini{ background:#3598db; color:#fff;}
a.BlueCirBtnMiddle{ display:block;width:50px; height:24px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} a.BlueCirBtnMiddle{ display:block;width:50px; height:24px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
a:hover.BlueCirBtnMiddle{ background:#3598db; color:#fff;} a:hover.BlueCirBtnMiddle{ background:#3598db; color:#fff;}
/* 按钮*/ /* 按钮*/
a.btn_grey_big{
display: inline-block;
border: 1px solid #ccc;
color: #747474;
text-align: center;
font-size: 14px;
padding:0 10px;
height: 30px;
line-height: 30px;
-webkit-border-radius:3px;
-moz-border-radius:3px;
-o-border-radius:3px;
border-radius:3px;
}
a:hover.btn_grey_big{
background: #c3c3c3;
color: #fff;
}
a.btn_orange_big{ a.btn_orange_big{
display:inline-block; display:inline-block;
border: 1px solid #ee4a1f; border: 1px solid #ee4a1f;
@ -615,6 +635,36 @@ a.sy_btn_blue{
border-radius:3px; border-radius:3px;
} }
a:hover.sy_btn_blue{ background: #2788d0;} a:hover.sy_btn_blue{ background: #2788d0;}
a.sy_btn_blue_mini{
display:inline-block;
color: #fff;
background: #3b94d6;
text-align: center;
font-size: 12px;
padding:0 10px;
height: 26px;
line-height: 26px;
-webkit-border-radius:3px;
-moz-border-radius:3px;
-o-border-radius:3px;
border-radius:3px;
}
a:hover.sy_btn_blue_mini{ background: #2788d0;}
a.sy_btn_grey_mini{
display:inline-block;
color: #333;
background: #e1e1e1;
text-align: center;
font-size: 12px;
padding:0 10px;
height: 26px;
line-height: 26px;
-webkit-border-radius:3px;
-moz-border-radius:3px;
-o-border-radius:3px;
border-radius:3px;
}
a:hover.sy_btn_grey_mini{ background: #c3c3c3;}
a.sy_btn_green{ a.sy_btn_green{
display:inline-block; display:inline-block;
color: #fff; color: #fff;
@ -677,3 +727,99 @@ a:hover.hw_btn_blue,a:active.hw_btn_blue{ background: #3b94d6; color:#fff;}
/*禁用*/ /*禁用*/
.disabled {background-color:#f5f5f5;} .disabled {background-color:#f5f5f5;}
#popupWrap ul{cursor: default;}
.bg_checked{background-color: #64bdd9;}
/* 搜索 与课程相同 */
.hw_search_box{ position:relative; }
.hw_search_box input.hw_search-input{ width:293px; height:28px; border:none; border:1px solid #e7e7e7; background:#fff; padding-left:5px;}
.hw_search_box a.hw_btn_search{display:block; width:20px; height:20px; background:url(../images/hw/icons_hw.png) 0 -57px no-repeat; position:absolute; right:5px; top:5px; cursor:pointer;}
.hw_search_box a:hover.hw_btn_search{background:url(../images/hw/icons_hw.png) -40px -57px no-repeat;}
.hw_files_icon{display:block; width:17px; height:14px; background:url(../images/hw/icons_hw.png) 0 -135px no-repeat;}
/* 编辑删除 与课程相同 */
.sy_icons_edit{ display: inline-block; padding:9px;background:url(../images/sy/sy_icons02.png) 0 1px no-repeat; }
.sy_icons_del{ padding:9px;background:url(../images/sy/sy_icons02.png) 0 -21px no-repeat;}
.sy_icons_edit:hover{ background:url(../images/sy/sy_icons02.png) -20px 1px no-repeat; }
.sy_icons_del:hover{ background:url(../images/sy/sy_icons02.png) -20px -21px no-repeat;}
/* 翻页 与课程相同*/
.pages a{
display:block;
border:1px solid #d1d1d1;
color:#888;
float:left;
width:30px;
text-align:center;
padding:3px 0;
line-height:1.9;
margin-right:5px;
}
.pages a:hover{
background-color:#3b94d6;
border:1px solid #3b94d6;
color:#fff;
}
a.pages-big{
width:50px;
}
.pages .active{
background-color:#3b94d6;
border:1px solid #3b94d6;
color:#fff;
}
.pages{
width:330px;
margin:20px auto 10px;
}
.sy_corange{ color: #ee4a1f;}
.sy_new_orange{font-size: 12px;padding: 0 5px;border-radius: 3px;line-height: 14px;color: #ff4a1b;border: 1px solid #ff4a1b;}
.sy_cgrey{ color: #888;}
a.sy_cgrey{ color: #888;}
.sy_corange{ color: #ee4a1f;}
a.sy_corange{ color: #ee4a1f;}
a.sy_cblue{ color: #3b94d6;}
/* 新增粉色关注按钮*/
a.sy_btn_pink{
display: inline-block;
color: #fff;
background: #ff7d7d;
text-align: center;
font-size: 12px;
padding:0 15px;
height: 30px;
line-height: 30px;
-webkit-border-radius:3px;
-moz-border-radius:3px;
-o-border-radius:3px;
border-radius:3px;
}
a:hover.sy_btn_pink{ background: #e64c4c;}
/* 我的缺陷列表*/
.myissues_con{ width:968px; padding:15px; border:1px solid #ddd; background-color:#fff; color:#444; margin: 0 auto; }
.myissues_head{ width: 100%; height: 40px; line-height: 40px; background: #f4f4f4; }
.myissues_head h2{ font-size: 14px;}
select.issues_filter_active { font-weight: bold; color: #333;}
.issues_form_filter select.issues_filter_select_min02{width:60px; }
.issues_form_filter select.issues_filter_select_max{width:90px; }
.issues_list_txt li.issues_list_max{ width:90px }
.btn_newpro_grey{display: inline-block;color: #7b7b7b; border:1px solid #dbdbdb;background:#fff;text-align: center;font-size: 12px; padding:0 15px; height:24px; line-height: 24px; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px;}
a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;}
.my_issues_form_filter{ position: absolute; top:0; right: 0;}
.my_issues_form_filter select{ width:70px; height:30px; border:none; font-size:14px; border:none;border-right:none; color: #888; font-size: 12px; line-height: 30px; text-align:center}
.my_issues_form_filter select.issues_filter_select_min{width:50px; }
.my_issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none;}
.ke-block pre{
font-size:9pt;
font-family:Courier New,Arial;
border:1px solid #ddd;
border-left:5px solid #6CE26C;
background:#f6f6f6;
padding:5px;
}
.ke-block ol li{list-style-type: decimal;margin-left: 40px;}
.ke-block ul li{list-style-type: disc;margin-left: 40px;}

View File

@ -548,7 +548,7 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
#worksDescription p {word-wrap:break-word;} #worksDescription p {word-wrap:break-word;}
/*20160907作业详情更改*/ /*20160907作业详情更改*/
.homework-type-option {border:1px solid #d9d9d9; width:98px; height:28px; color:#888; font-size:14px;} .homework-type-option {border:1px solid #d9d9d9; width:138px; height:28px; color:#888; font-size:14px;}
.homework-detail-tab {font-size:14px; color:#484848; overflow:hidden;} .homework-detail-tab {font-size:14px; color:#484848; overflow:hidden;}
.homework-detail-tab li {float:left; width:100px; text-align:center; padding:3px 0; border-bottom:2px solid #ddd;} .homework-detail-tab li {float:left; width:100px; text-align:center; padding:3px 0; border-bottom:2px solid #ddd;}
.homework-detail-tab li.selected {border-bottom:2px solid #f00;} .homework-detail-tab li.selected {border-bottom:2px solid #f00;}
@ -586,3 +586,15 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
.group_work_tip_box {width:200px; position:absolute; padding:5px 10px; white-space:nowrap; background-color:#fff; right:-255px; top:-90px; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);} .group_work_tip_box {width:200px; position:absolute; padding:5px 10px; white-space:nowrap; background-color:#fff; right:-255px; top:-90px; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
.group_work_tip_box em {display:block; border-width:10px; position:absolute;top:26px; left:-20px; border-style:dashed solid dashed dashed; border-color:transparent #eaeaea transparent transparent; font-size:0; line-height:0;} .group_work_tip_box em {display:block; border-width:10px; position:absolute;top:26px; left:-20px; border-style:dashed solid dashed dashed; border-color:transparent #eaeaea transparent transparent; font-size:0; line-height:0;}
.group_work_tip_box span {display:block; border-width:10px; position:absolute;top:26px; left:-18px; border-style:dashed solid dashed dashed; border-color:transparent #fff transparent transparent; font-size:0; line-height:0;} .group_work_tip_box span {display:block; border-width:10px; position:absolute;top:26px; left:-18px; border-style:dashed solid dashed dashed; border-color:transparent #fff transparent transparent; font-size:0; line-height:0;}
/*试卷*/
.exercise_list_div{ padding-left:10px; border-bottom:1px dashed #c9c9c9; height:62px; padding-top:8px;}
.exercise_status_nop{ display:block; width:33px; height:22px; background:url(/images/sy/icons_sy.png) 0 -636px no-repeat; color:#fff; font-size:12px; padding-left:10px; line-height: 22px;}
.exercise_status_pub{ display:block; width:33px; height:22px; background:url(/images/sy/icons_sy.png) 0 -613px no-repeat; color:#fff; font-size:12px; padding-left:10px; line-height: 22px;}
.exercise_status_end{ display:block; width:33px; height:22px; background:url(/images/sy/icons_sy.png) 0 -659px no-repeat; color:#fff; font-size:12px; padding-left:10px; line-height: 22px;}
.exercise_status_com{ display:block; width:33px; height:22px; background:url(/images/sy/icons_sy.png) 0 -681px no-repeat; color:#fff; font-size:12px; padding-left:10px; line-height: 22px;}
.exercise_status_nocom{ display:block; width:33px; height:22px; background:url(/images/sy/icons_sy.png) 0 -705px no-repeat; color:#fff; font-size:12px; padding-left:10px; line-height: 22px;}
a.ex_icon_de{ background:url(/images/course/icons.png) 0px -342px no-repeat; width:16px; height:27px; display:block;float:right;}
a:hover.ex_icon_de{ background:url(/images/course/icons.png) -20px -342px no-repeat;}
.ex_icon_edit{ background:url(/images/course/icons.png) 0px -276px no-repeat; width:16px; height:27px; display:block;float:right; margin-right:10px;}
a:hover.ex_icon_edit{ background:url(/images/course/icons.png) -21px -276px no-repeat;}

View File

@ -21,6 +21,8 @@ input.radio-width90{ width: 90px; }
/*模板buttons 20161013byLB*/ /*模板buttons 20161013byLB*/
.btn{display: inline-block;border:none; padding:0 10px;color: #333;background: #e1e1e1; text-align:center;font-size: 12px; height: 30px;line-height: 30px;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; } .btn{display: inline-block;border:none; padding:0 10px;color: #333;background: #e1e1e1; text-align:center;font-size: 12px; height: 30px;line-height: 30px;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
.btn:hover{background: #c3c3c3; color: #333;} .btn:hover{background: #c3c3c3; color: #333;}
.btn-grey{background: #d9d9d9; color: #656565;}
.btn-grey:hover{background: #717171; color: #fff;}
.btn-green{background: #60b25e; color: #fff;} .btn-green{background: #60b25e; color: #fff;}
.btn-green:hover{background: #51a74f; color: #fff;} .btn-green:hover{background: #51a74f; color: #fff;}
.btn-blue{background: #3b94d6; color: #fff;} .btn-blue{background: #3b94d6; color: #fff;}
@ -63,10 +65,58 @@ a:hover.sub_btn{ background:#b5e2fa; color:#000; border:1px solid #3c7fb1;}
/*模板form 20161013byLB*/ /*模板form 20161013byLB*/
textarea.muban_textarea{ width: 98.5%;border:1px solid #ddd; background:#fff; color:#666; padding:5px;} textarea.muban_textarea{ width: 98.5%;border:1px solid #ddd; background:#fff; color:#666; padding:5px;}
/*模板图标20161020byLB*/ /*模板图标20161020byLB*/
.muban-icons-clock{ background: url("../images/project/icons_issue.png") 0 -224px no-repeat; display: inline-block; width: 19px; height: 13px;} .muban-icons-clock{ background: url("/images/project/icons_issue.png") 0 -224px no-repeat; display: inline-block; width: 19px; height: 13px;}
/*提示条20161020byLB*/ /*提示条20161020byLB*/
.alert{ padding:10px;border: 1px solid transparent; text-align: center;} .alert{ padding:10px;border: 1px solid transparent; text-align: center;}
.alert-blue{ background-color: #d9edf7;border-color: #bce8f1; color: #3a87ad;} .alert-blue{ background-color: #d9edf7;border-color: #bce8f1; color: #3a87ad;}
.alert-orange{ background-color: #fff9e9;border-color: #f6d0b1; color:#ee4a20;} .alert-orange{ background-color: #fff9e9;border-color: #f6d0b1; color:#ee4a20;}
.close{padding: 0;cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; font-size: 21px; font-weight: bold;line-height: 1; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.3;} .close{padding: 0;cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; font-size: 21px; font-weight: bold;line-height: 1; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.3;}
.close:hover{opacity: 0.5;} .close:hover{opacity: 0.5;}
/*新版上传资源弹框20161103byLB*/
.newuploadbox li{ line-height: 30px;}
.icons_new_file{display:block; width:16px; height:16px; background: url("/images/icons_newpublic.png") 0px 0px no-repeat; }
.icons_new_del{display:block; width:16px; height:17px; background: url("/images/icons_newpublic.png") 0px -26px no-repeat; }
.newupload_txt{ display: block; max-width:280px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
#muban_popup_box select.newupload_select{ width: 164px; height: 30px;}
.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_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; }
.newupload_nav li:last-child{ border-right: none;}
.newupload_nav li a{font-size:12px; color:#444;}
.newupload_nav_hover{ background: #3498db; }
.newupload_nav_nomal { }
.newupload_nav_hover a{color: #fff !important; }
.lightheight28{ line-height: 28px;}
/* 搜索 */
.newupload_search_box{ position:relative; }
#muban_popup_box input.newupload_search_input{ width:683px; height:38px; border:none; border:1px solid #d3d8e7; background:#fff; padding-left:5px; padding-right:25px;}
.newupload_search_box a.newupload_btn_search{display:block; width:20px; height:20px; background:url(/images/hw/icons_hw.png) 0 -57px no-repeat; position:absolute; right:5px; top:10px; cursor:pointer;}
.newupload_search_box a:hover.newupload_btn_search{background:url(/images/hw/icons_hw.png) -40px -57px no-repeat;}
/*表格*/
.newupload_table{ width:715px; background:#fff; border:1px solid #e5e5e5; border-bottom: none; text-align: center;}
.newupload_table thead tr,.sy_new_table tbody tr{ height:30px; line-height:30px; border-bottom:1px solid #e5e5e5;}
.newupload_table thead tr th{ border-bottom:1px solid #e5e5e5; font-weight: bold; background-image: linear-gradient(#fcfcfc, #eee);}
.newupload_table tbody tr:hover{ background:#f5f5f5;}
.newupload_table tbody tr td{ height:30px; border-bottom:1px solid #e5e5e5; color:#888;}
.newupload_table td{ padding:0 5px;}
.newupload_td01{ }
.newupload_td02{width:285px; text-align: left; }
.newupload_td02 p{ width:285px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis; display: inline-block;}
.newupload_td03{width:200px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.newupload_td04{width:100px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.icons_rslock{ width:13px; height:13px; background:url("/images/icons_newpublic.png") 0px -52px no-repeat; display: inline-block;}
.icons_uploadfiles{width:18px; height:15px; background:url("/images/icons_newpublic.png") 0px -75px no-repeat; display: inline-block;}
.upload_select_box{ width: 337px; height:240px; overflow-y:scroll; padding: 10px; background:#f7f9fd; color: #333; }
#muban_popup_box label.upload_select_label{ width:275px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis; text-align: left; display: inline-block; }
.newupload_tishi{ text-align: center; font-size: 14px;}
.newupload_label_name{ display: inline-block;max-width:130px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.newupload_table_name{ display: inline-block;max-width:90px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.newupload_table_name02{ display: inline-block;max-width:90px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.newupload_td06{max-width:200px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}

View File

@ -742,14 +742,15 @@ a:hover.hw_btn_blue,a:active.hw_btn_blue{ background: #3b94d6; color:#fff;}
.issues_statistics ul li a{ font-size:12px; margin:5px; color:#888; } .issues_statistics ul li a{ font-size:12px; margin:5px; color:#888; }
.issues_statistics ul li a.act{} .issues_statistics ul li a.act{}
.issues_form_filter select{ width:84px; height:35px; font-size:14px; border:1px solid #c8c8c8; border-right:none; background-color:#fff; margin-bottom: 10px; color: #888;} .issues_form_filter select{ width:84px; height:35px; font-size:14px; border:1px solid #c8c8c8; border-right:none; background-color:#fff; margin-bottom: 10px; color: #888;}
.issues_form_filter input{ height:33px;width:91px; border:1px solid #c8c8c8;background-color:#fff;} .issues_form_filter input{ height:33px;width:91px; border:1px solid #c8c8c8;background-color:#fff;}
.issues_form_filter select:focus,.issues_form_filter input:focus{border:1px solid #c8c8c8; border-right:none;} .issues_form_filter select:focus,.issues_form_filter input:focus{border:1px solid #c8c8c8; border-right:none;}
.issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none; background: url("/images/new_project/arrow.png") no-repeat scroll right center transparent;} .issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none; background: url("../images/project/arrow.png") no-repeat scroll right center transparent;}
input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;} input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;}
.issues_data_img{ display:block; width:25px; height:33px; border:1px solid #c8c8c8; border-left:none; background:url("/images/public_icon.png") -29px 9px no-repeat; } .issues_data_img{ display:block; width:25px; height:33px; border:1px solid #c8c8c8; border-left:none; background: url("../images/public_icon.png") -29px 9px no-repeat; }
/* 缺陷Tab */ /* 缺陷Tab */
.issues_con_list{border:1px solid #dbdbdb; } .issues_con_list{border:1px solid #c8c8c8; }
#issues_list_nav {border-bottom:1px solid #d0d0d0;} #issues_list_nav {border-bottom:1px solid #d0d0d0;}
#issues_list_nav li {float:left; padding:10px 15px; text-align:center; } #issues_list_nav li {float:left; padding:10px 15px; text-align:center; }
#issues_list_nav li a{font-size:12px; color:#444;} #issues_list_nav li a{font-size:12px; color:#444;}
@ -764,12 +765,13 @@ input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;}
.issues_form_filter select:focus,.issues_form_filter input:focus{border:none; } .issues_form_filter select:focus,.issues_form_filter input:focus{border:none; }
.issues_filter_data input{height:28px;width:91px; border:1px solid #c8c8c8;background-color:#fff;} .issues_filter_data input{height:28px;width:91px; border:1px solid #c8c8c8;background-color:#fff;}
.issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none; background: url("/images/new_project/arrow.png") no-repeat scroll right center transparent;} .issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none; background: url("/images/new_project/arrow.png") no-repeat scroll right center transparent;}
.issues_form_filter select.my_issues_filter{ background:none; width:50px; margin-left: 10px;margin-right: 10px;}
input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;} input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;}
.issues_data_img{ display:block; width:25px; height:28px; border:1px solid #c8c8c8; border-left:none; background: url("/images/public_icon.png") -27px 7px no-repeat; } .issues_data_img{ display:block; width:25px; height:28px; border:1px solid #c8c8c8; border-left:none; background: url("../images/public_icon.png") -29px 9px no-repeat; }
.issues_list_box{ padding:15px; padding-right: 0px; border-bottom:1px dashed #c8c8c8;} .issues_list_box{ padding:15px; padding-right: 0px; border-bottom:1px dashed #c8c8c8;}
.issues_list_titlebox{ font-size:14px; font-weight:bold; margin-bottom:8px;} .issues_list_titlebox{ font-size:14px; font-weight:bold; margin-bottom:8px;}
a.issues_list_title{ color:#444; max-width:380px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap; } a.issues_list_title{ color:#444; max-width:260px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap; }
a:hover.issues_list_title{color:#3b94d6;} a:hover.issues_list_title{color:#3b94d6;}
.issues_list_titlebox span{ font-size: 12px;color: #888; font-weight: normal; } .issues_list_titlebox span{ font-size: 12px;color: #888; font-weight: normal; }
.issues_ciricons_01{ width: 22px; height: 22px; display: inline-block; background: url("/images/new_project/icons_issue.png") 0 0 no-repeat;} .issues_ciricons_01{ width: 22px; height: 22px; display: inline-block; background: url("/images/new_project/icons_issue.png") 0 0 no-repeat;}
@ -778,10 +780,9 @@ a:hover.issues_list_title{color:#3b94d6;}
.issues_list_name{ font-size: 12px;} .issues_list_name{ font-size: 12px;}
.issues_list_name:hover{ color: #3b94d6;} .issues_list_name:hover{ color: #3b94d6;}
.issues_list_small{ font-size: 12px; color: #666;} .issues_list_small{ font-size: 12px; color: #666;}
.issues_list_txt li{ height: 24px; line-height: 24px; float: left; font-size: 12px; width: 70px; text-align: center; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;} .issues_list_txt li{ height: 50px; line-height: 50px; float: left; font-size: 12px; width: 70px; text-align: center; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;}
.issues_list_txt li.issues_list_min{ width: 50px;} .issues_list_txt li.issues_list_min{ width: 50px;}
/* 搜索 与课程相同 */ /* 搜索 与课程相同 */
.hw_search_box{ position:relative; } .hw_search_box{ position:relative; }
.hw_search_box input.hw_search-input{ width:293px; height:28px; border:none; border:1px solid #e7e7e7; background:#fff; padding-left:5px;padding-right: 25px;} .hw_search_box input.hw_search-input{ width:293px; height:28px; border:none; border:1px solid #e7e7e7; background:#fff; padding-left:5px;padding-right: 25px;}
@ -832,7 +833,7 @@ a.sy_corange{ color: #ee4a1f;}
a.sy_cblue{ color: #3b94d6;} a.sy_cblue{ color: #3b94d6;}
/* 我的缺陷列表*/ /* 我的缺陷列表*/
.myissues_con{ width:968px; padding:15px; border:1px solid #ddd; background-color:#fff; color:#444; } .myissues_con{ width:968px; padding:15px; border:1px solid #ddd; background-color:#fff; color:#444;}
.myissues_head{ width: 100%; height: 40px; line-height: 40px; background: #f4f4f4; } .myissues_head{ width: 100%; height: 40px; line-height: 40px; background: #f4f4f4; }
.myissues_head h2{ font-size: 14px;} .myissues_head h2{ font-size: 14px;}
select.issues_filter_active { font-weight: bold; color: #333;} select.issues_filter_active { font-weight: bold; color: #333;}
@ -887,7 +888,7 @@ a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;}
/*项目简介*/ /*项目简介*/
.pro_new_info{ border:1px solid #ddd; background-color:#fff; width: 998px;} .pro_new_info{ border:1px solid #ddd; background-color:#fff; width: 998px;}
.pro_new_info h2{ background: #fff; font-size: 14px; color: #333; height: 40px; line-height: 40px; padding-left: 15px; border-bottom:1px solid #e5e5e5;} .pro_new_info h2{ background: #fff; font-size: 14px; color: #333; height: 40px; line-height: 40px; padding-left: 15px; border-bottom:1px solid #e5e5e5;}
.pro_new_info p{ padding-bottom:2px; padding-left: 15px; color: #666; padding-right: 5px} /*.pro_new_info p{ padding-bottom:2px; padding-left: 15px; color: #666; padding-right: 5px}*/
.pro_new_info_weight{ font-size: 16px; font-weight: bold;} .pro_new_info_weight{ font-size: 16px; font-weight: bold;}
/* 新版项目配置*/ /* 新版项目配置*/
.pro_new_setting_leftnav{ width: 162px; border:1px solid #ddd; background-color:#fff; padding:3px; padding-bottom: 0;} .pro_new_setting_leftnav{ width: 162px; border:1px solid #ddd; background-color:#fff; padding:3px; padding-bottom: 0;}

View File

@ -1530,6 +1530,7 @@ a.syllabusbox_a_blue{
.simulation-title {position:absolute; background-color:#fff; padding:5px 10px; z-index:99; white-space:nowrap; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); display:none; color:#666; border:1px solid #666; line-height:1;} .simulation-title {position:absolute; background-color:#fff; padding:5px 10px; z-index:99; white-space:nowrap; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); display:none; color:#666; border:1px solid #666; line-height:1;}
/*项目创建*/ /*项目创建*/
.project_new_input {border: 1px solid #ddd;height: 20px;width: 794px;background: #fff;padding: 5px;} .project_new_input {border: 1px solid #ddd;height: 20px;width: 794px;background: #fff;padding: 5px;}
.project_new_input_project_new:focus {border: 1px solid #ddd;height: 20px;width: 794px;background: #fff;padding: 5px;}
/*新版项目列表新增*/ /*新版项目列表新增*/
.new_project_title{ font-size:16px; color:#333; max-width:480px; font-weight:normal;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .new_project_title{ font-size:16px; color:#333; max-width:480px; font-weight:normal;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@ -1537,4 +1538,10 @@ a.syllabusbox_a_blue{
.icons_project_favorite {background: url(/images/syllabus/sy_icons_star.png) 0px 0px no-repeat; width:20px; height:20px; display:block; float:left;} .icons_project_favorite {background: url(/images/syllabus/sy_icons_star.png) 0px 0px no-repeat; width:20px; height:20px; display:block; float:left;}
.icons_project_star{background: url(/images/syllabus/sy_icons_star.png) 0px -27px no-repeat; width:20px; height:20px; display:block; float:left;} .icons_project_star{background: url(/images/syllabus/sy_icons_star.png) 0px -27px no-repeat; width:20px; height:20px; display:block; float:left;}
.new_projectlist_more{ text-align:center;} .new_projectlist_more{ text-align:center;}
.new_projectlist_more a:hover{ color:#3b94d6;} .new_projectlist_more a:hover{ color:#3b94d6;}
/*403、404、500界面*/
.muban_conbox_max{width: 998px; background-color: #fff; color: #333; margin:0 auto;}
.pages_new_404{ margin:160px 209px 0px 209px; height: 580px;}
.pages_new_404_txt{ font-size: 16px; color: #888; text-align: center;}
.feedbackText{box-shadow:none; width:550px; height:80px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;overflow:auto; background-attachment:fixed;border-style:solid;}