Merge branch 'develop' of https://bdgit.trustie.net/hushasha/bigdata into develop
This commit is contained in:
commit
f661d4d9f2
|
|
@ -1,3 +1,4 @@
|
|||
# encoding: utf-8
|
||||
class DiscussesController < ApplicationController
|
||||
include ApplicationHelper
|
||||
before_filter :find_dis_object, :except => [:destroy]
|
||||
|
|
@ -6,10 +7,40 @@ class DiscussesController < ApplicationController
|
|||
def create
|
||||
if @model
|
||||
if params[:reply_id].blank?
|
||||
notes = User.current.show_name.to_s + " 评论了你发布的实训:<a href='#{shixun_discuss_shixun_path(@model)}'>#{params[:content]}</a>"
|
||||
@model.discusses << Discuss.new(:content => params[:content], :user_id => User.current.id, :praise_count => 0, :challenge_id => params[:challenge_id])
|
||||
JournalsForMessage.create(
|
||||
:jour_id => @model.user_id,
|
||||
:jour_type => "Principal",
|
||||
:user_id => User.current.id,
|
||||
:reply_id => 0,
|
||||
:is_readed => 0,
|
||||
:private => 1,
|
||||
:notes => notes
|
||||
)
|
||||
else
|
||||
@model.discusses << Discuss.new(:content => params[:content], :user_id => User.current.id, :parent_id => params[:reply_id], :root_id => params[:reply_id], :praise_count => 0, :challenge_id => params[:challenge_id])
|
||||
notes = User.current.show_name.to_s + " 评论了你的回复:<a href='#{shixun_discuss_shixun_path(@model)}'>#{params[:content]}</a>"
|
||||
user_id = Discuss.find(params[:reply_id]).try(:user_id)
|
||||
@model.discusses << Discuss.new(
|
||||
:content => params[:content],
|
||||
:user_id => User.current.id,
|
||||
:parent_id => params[:reply_id],
|
||||
:root_id => params[:reply_id],
|
||||
:praise_count => 0,
|
||||
:challenge_id => params[:challenge_id]
|
||||
)
|
||||
JournalsForMessage.create(
|
||||
:jour_id => user_id,
|
||||
:jour_type => "Principal",
|
||||
:user_id => User.current.id,
|
||||
:reply_id => 0,
|
||||
:is_readed => 0,
|
||||
:private => 1,
|
||||
:notes => notes
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
if params[:dis_type] == "Shixun"
|
||||
redirect_to shixun_discuss_shixun_path(@model, :challenge_id => params[:challenge_id])
|
||||
end
|
||||
|
|
|
|||
|
|
@ -824,11 +824,13 @@ class ExerciseController < ApplicationController
|
|||
# 查作者是我,或者作者是当前课程的老师,且不在当前课程内的试卷 进行导入
|
||||
@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(',') + ")"
|
||||
@search = params[:search] ? params[:search].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(',') + ")"
|
||||
#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}")
|
||||
#@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}")
|
||||
@exercises = Exercise.where("user_id = #{User.current.id} and exercise_name like '%#{@search}%'").order("#{@order} #{@b_sort}")
|
||||
@course_id = params[:course_id]
|
||||
@is_remote = true
|
||||
@ex_count = @exercises.count
|
||||
|
|
@ -863,15 +865,15 @@ class ExerciseController < ApplicationController
|
|||
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)
|
||||
if params[:exercise_id]
|
||||
exercise = Exercise.find(params[:exercise_id])
|
||||
option = {
|
||||
:exercise_name => exercise.exercise_name,
|
||||
:exercise_status => 1,
|
||||
:user_id => User.current.id,
|
||||
:show_result => 1,
|
||||
:course_id => @course.id,
|
||||
:time => exercise.time,
|
||||
:time => -1,
|
||||
:exercise_description => exercise.exercise_description
|
||||
}
|
||||
@exercise = Exercise.create option
|
||||
|
|
@ -903,9 +905,6 @@ class ExerciseController < ApplicationController
|
|||
end
|
||||
@exercise.save
|
||||
end
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
|
|
@ -91,7 +91,13 @@ class GamesController < ApplicationController
|
|||
# git_repository_url @myshixun, "Myshixun"
|
||||
# @st 0 实践任务 1 选择题任务
|
||||
def show
|
||||
# 展示全部实训
|
||||
# g = Gitlab.client
|
||||
# g_name = g.project(@myshixun.gpid).try(:name)
|
||||
# if g_name.include?("-")
|
||||
# g.delete_project()
|
||||
# end
|
||||
# 展示全部实训
|
||||
# git_myshixun_url_ip @myshixun, user_id
|
||||
@is_subject = params[:is_subject]
|
||||
if @game.status == 1
|
||||
# 放置页面ajax数据还没获取就关闭
|
||||
|
|
|
|||
|
|
@ -335,11 +335,11 @@ class HomeworkCommonController < ApplicationController
|
|||
if @homework.homework_type == 4
|
||||
if @homework_detail_manual.answer_open_evaluation != params[:answer_open_evaluation].to_i
|
||||
@homework_detail_manual.answer_open_evaluation = params[:answer_open_evaluation].to_i
|
||||
# if @homework.end_time < Time.now
|
||||
# @homework.student_works.each do |student_work|
|
||||
# set_shixun_final_score @homework, student_work, @homework_detail_manual.answer_open_evaluation
|
||||
# end
|
||||
# end
|
||||
if @homework.end_time < Time.now
|
||||
@homework.student_works.each do |student_work|
|
||||
set_shixun_final_score @homework, student_work, @homework_detail_manual.answer_open_evaluation
|
||||
end
|
||||
end
|
||||
end
|
||||
@homework.score_open = params[:homework_score_open] ? 1 : 0
|
||||
else
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@ end
|
|||
@menu_type = 6
|
||||
@sub_type = 2
|
||||
@sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order]
|
||||
@department = ApplyAddDepartment.where(:status => 1)
|
||||
@department = Department.where(:is_auth => 1)
|
||||
search=params[:search]
|
||||
if search.blank?
|
||||
@department = @department
|
||||
|
|
@ -557,24 +557,28 @@ end
|
|||
def upload_logo
|
||||
@menu_type = 6
|
||||
@sub_type = 1
|
||||
@next_type = 1
|
||||
@school = School.find(params[:school])
|
||||
apply_schools = ApplyAddSchools.where("status = 0")
|
||||
apply_school_ids = apply_schools.empty? ? "(-1)" : "(" + apply_schools.map{|sc| sc.school_id}.join(',') + ")"
|
||||
if !params[:search].nil?
|
||||
search = "%#{params[:search].to_s.strip.downcase}%"
|
||||
@schools = School.where("id not in #{apply_school_ids} and #{School.table_name}.name like :p", :p => search)
|
||||
else
|
||||
@schools = School.where("id not in #{apply_school_ids}")
|
||||
end
|
||||
end
|
||||
|
||||
# 修改单位名称为其他
|
||||
def school_upload_logo
|
||||
school = School.where(:id => params[:applied_id]).first
|
||||
UserExtensions.where(:school_id => params[:applied_id]).update_all(:school_id => params[:school_id])
|
||||
Department.where(:school_id => params[:applied_id]).update_all(:school_id => params[:school_id])
|
||||
ApplyAddSchools.where(:school_id => params[:applied_id]).destroy_all
|
||||
ApplyAddDepartment.where(:school_id => params[:applied_id]).destroy_all
|
||||
before_apply_departments = Department.where(:school_id => params[:applied_id])
|
||||
after_apply_deparments = Department.where(:school_id => params[:school_id])
|
||||
before_apply_departments.each do |department|
|
||||
after_dep = Department.where(:school_id => params[:school_id], :name => department.name).first
|
||||
if after_dep
|
||||
UserExtensions.where(:school_id => params[:applied_id], :department_id => department.id).update_all(:department_id => after_dep.id)
|
||||
else
|
||||
new_department = Department.create(:name => department.name,:school_id =>params[:school_id], :is_auth => 1)
|
||||
UserExtensions.where(:school_id => params[:applied_id]).update_all(:department_id => new_department.id)
|
||||
end
|
||||
ApplyAddDepartment.where(:department_id => department.id).destroy_all
|
||||
department.destroy
|
||||
end
|
||||
UserExtensions.where(:school_id => params[:applied_id]).update_all(:school_id => params[:school_id])
|
||||
school.destroy
|
||||
redirect_to departments_part_managements_path
|
||||
end
|
||||
|
|
@ -583,8 +587,7 @@ end
|
|||
def school_message_update
|
||||
school = School.where(:name =>params[:schoolname]).first
|
||||
school_id = school.id
|
||||
School.where(:id => school_id).update_all(:province => params[:province],:city =>params[:city],:address => params[:address])
|
||||
ApplyAddSchools.where(:school_id => school_id).update_all(:province => params[:province],:city =>params[:city],:address => params[:address])
|
||||
School.where(:id => school_id).update_all(:province => params[:province],:city =>params[:city],:address => params[:address],:shool_code => params[:school_code])
|
||||
redirect_to departments_part_managements_path
|
||||
end
|
||||
|
||||
|
|
@ -654,6 +657,9 @@ end
|
|||
applied_department = ApplyAddDepartment.find(params[:id])
|
||||
applied_message = AppliedMessage.where(:applied_id => applied_department.id, :applied_type => "ApplyAddDepartment")
|
||||
applied_message.update_all(:status => 1)
|
||||
if applied_department.department
|
||||
applied_department.department.update_attributes(:is_auth => 1)
|
||||
end
|
||||
applied_department.update_attribute(:status, 1) unless applied_department.nil?
|
||||
AppliedMessage.create(:user_id => applied_department.user_id, :status => 1, :viewed => 0, :applied_id => applied_department.id, :applied_type => "ApplyAddDepartment", :name => applied_department.name )
|
||||
UserExtensions.where(:user_id => applied_department.user_id).update_all(:department_id => applied_department.department_id)
|
||||
|
|
@ -804,12 +810,12 @@ end
|
|||
# 单位审批修改
|
||||
def all_schools
|
||||
apply_schools = ApplyAddSchools.where("status = 0")
|
||||
apply_school_ids = apply_schools.empty? ? "(-1)" : "(" + apply_schools.map{|sc| sc.school_id}.join(',') + ")"
|
||||
apply_school_ids = apply_schools.empty? ? "(#{params[:school_id].to_i})" : "(" + apply_schools.map{|sc| sc.school_id}.join(',') + ")"
|
||||
if !params[:search].nil?
|
||||
search = "%#{params[:search].to_s.strip.downcase}%"
|
||||
@schools = School.where("id not in #{apply_school_ids} and #{School.table_name}.name like :p", :p => search)
|
||||
@schools = School.where("id not in #{apply_school_ids} and id != #{params[:school_id].to_i} and #{School.table_name}.name like :p", :p => search)
|
||||
else
|
||||
@schools = School.where("id not in #{apply_school_ids}")
|
||||
@schools = School.where("id not in #{apply_school_ids} and id != #{params[:school_id].to_i}")
|
||||
end
|
||||
@edit_id = params[:school_id]
|
||||
@search = params[:search]
|
||||
|
|
@ -835,6 +841,9 @@ end
|
|||
users.update_all(:school_id => school.id)
|
||||
|
||||
ApplyAddDepartment.where(:school_id => aas.school_id).update_all(:school_id => school.id)
|
||||
|
||||
|
||||
|
||||
Department.where(:school_id => aas.school_id).update_all(:school_id => school.id)
|
||||
aas.school.destroy
|
||||
aas.update_attribute(:school_id, school.id)
|
||||
|
|
@ -1251,6 +1260,7 @@ end
|
|||
@menu_type = 7
|
||||
@sub_type = 3
|
||||
@apply_action = School.where(:auto_users_trial => 1).order('updated_at desc')
|
||||
@auto_school_ids = @apply_action.empty? ? "(-1)" : "(" + @apply_action.map(&:id).join(",") + ")"
|
||||
@apply_action_count = @apply_action.count
|
||||
limit = 20
|
||||
@is_remote = true
|
||||
|
|
|
|||
|
|
@ -126,12 +126,22 @@ class SchoolController < ApplicationController
|
|||
chinese << char
|
||||
end
|
||||
end
|
||||
if(condition == '')
|
||||
@school = School.reorder('pinyin').page((params[:page].to_i || 1) - 1).per(100)
|
||||
@school_count = School.count
|
||||
if params[:no_school_ids]
|
||||
if(condition == '')
|
||||
@school = School.where("id not in #{params[:no_school_ids]}").reorder('pinyin').page((params[:page].to_i || 1) - 1).per(100)
|
||||
@school_count = School.count
|
||||
else
|
||||
@school = School.where("id not in #{params[:no_school_ids]} and name like '%#{chinese.join("")}%' and pinyin like '%#{pinyin.join("")}%'").reorder('pinyin').page((params[:page].to_i || 1) - 1).per(100)
|
||||
@school_count = School.where("id not in #{params[:no_school_ids]} and name like '%#{chinese.join("")}%' and pinyin like '%#{pinyin.join("")}%'").count
|
||||
end
|
||||
else
|
||||
@school = School.where("name like '%#{chinese.join("")}%' and pinyin like '%#{pinyin.join("")}%'").reorder('pinyin').page((params[:page].to_i || 1) - 1).per(100)
|
||||
@school_count = School.where("name like '%#{chinese.join("")}%' and pinyin like '%#{pinyin.join("")}%'").count
|
||||
if(condition == '')
|
||||
@school = School.reorder('pinyin').page((params[:page].to_i || 1) - 1).per(100)
|
||||
@school_count = School.count
|
||||
else
|
||||
@school = School.where("name like '%#{chinese.join("")}%' and pinyin like '%#{pinyin.join("")}%'").reorder('pinyin').page((params[:page].to_i || 1) - 1).per(100)
|
||||
@school_count = School.where("name like '%#{chinese.join("")}%' and pinyin like '%#{pinyin.join("")}%'").count
|
||||
end
|
||||
end
|
||||
|
||||
result = []
|
||||
|
|
@ -171,6 +181,8 @@ class SchoolController < ApplicationController
|
|||
school.name = params[:name].strip
|
||||
school.pinyin = Pinyin.t(params[:name].strip, splitter: '')
|
||||
school.province = params[:province]
|
||||
school.city = params[:city]
|
||||
school.address = params[:address]
|
||||
|
||||
#status 0未处理 1通过 2拒绝
|
||||
applyschool = ApplyAddSchools.new
|
||||
|
|
|
|||
|
|
@ -803,15 +803,20 @@ class ShixunsController < ApplicationController
|
|||
end
|
||||
|
||||
def shixun_discuss
|
||||
@discusses = @shixun.discusses.where(:parent_id => nil).reorder("created_at desc")
|
||||
@discusses = @shixun.discusses.reorder("created_at desc")
|
||||
@discusses_count = @discusses.count
|
||||
@limit = 15
|
||||
@is_remote = true
|
||||
@discusses_pages = Paginator.new @discusses_count, @limit, params['page'] || 1
|
||||
@offset ||= @discusses_pages.offset
|
||||
@discusses = paginateHelper @discusses, @limit
|
||||
#@limit = 15
|
||||
#@is_remote = true
|
||||
#@discusses_pages = Paginator.new @discusses_count, @limit, params['page'] || 1
|
||||
# @offset ||= @discusses_pages.offset
|
||||
#@discusses = paginateHelper @discusses, @limit
|
||||
#@game_challenge = params[:challenge_id].blank? ? Challenge.find(@discusses.challenge_id) : Challenge.find(params[:challenge_id])
|
||||
@game_challenge = Challenge.find(params[:challenge_id].to_i)
|
||||
challenge_id = params[:challenge_id].nil? ? @shixun.challenges.first.try(:id) : params[:challenge_id].to_i
|
||||
@game_challenge = Challenge.find(challenge_id)
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
|
|
|||
|
|
@ -1701,34 +1701,54 @@ class StudentWorkController < ApplicationController
|
|||
count_row += 1
|
||||
end
|
||||
elsif @homework.homework_type == 3 #分组作业
|
||||
if @homework.anonymous_comment ==0
|
||||
sheet1.row(0).concat([l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score),l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
else
|
||||
sheet1.row(0).concat([l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
end
|
||||
count_row = 1
|
||||
items.each do |homework|
|
||||
sheet1[count_row,0] = get_group_member_names homework
|
||||
sheet1[count_row,1] = homework.name
|
||||
sheet1[count_row,2] = (homework.project_id == 0 || homework.project_id.nil?) ? l(:excel_no_project) : homework.project.name
|
||||
sheet1[count_row,3] = strip_html homework.description
|
||||
sheet1[count_row,4] = homework.teacher_score.nil? ? l(:label_without_score) : homework.teacher_score.round(2)
|
||||
sheet1[count_row,5] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2)
|
||||
if @homework.anonymous_comment ==0
|
||||
sheet1.row(0).concat([l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score),l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
sheet1[count_row,6] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2)
|
||||
sheet1[count_row,7] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.absence_penalty
|
||||
sheet1[count_row,8] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
|
||||
sheet1[count_row,9] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
|
||||
sheet1[count_row,10] = format_time(homework.created_at)
|
||||
else
|
||||
sheet1.row(0).concat([l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
end
|
||||
count_row = 1
|
||||
items.each do |homework|
|
||||
sheet1[count_row,0] = get_group_member_names homework
|
||||
sheet1[count_row,1] = homework.name
|
||||
sheet1[count_row,2] = (homework.project_id == 0 || homework.project_id.nil?) ? l(:excel_no_project) : homework.project.name
|
||||
sheet1[count_row,3] = strip_html homework.description
|
||||
sheet1[count_row,4] = homework.teacher_score.nil? ? l(:label_without_score) : homework.teacher_score.round(2)
|
||||
sheet1[count_row,5] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2)
|
||||
if @homework.anonymous_comment ==0
|
||||
sheet1[count_row,6] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2)
|
||||
sheet1[count_row,7] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.absence_penalty
|
||||
sheet1[count_row,8] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
|
||||
sheet1[count_row,9] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
|
||||
sheet1[count_row,10] = format_time(homework.created_at)
|
||||
else
|
||||
sheet1[count_row,6] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
|
||||
sheet1[count_row,7] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
|
||||
sheet1[count_row,8] = format_time(homework.created_at)
|
||||
end
|
||||
count_row += 1
|
||||
sheet1[count_row,6] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
|
||||
sheet1[count_row,7] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
|
||||
sheet1[count_row,8] = format_time(homework.created_at)
|
||||
end
|
||||
count_row += 1
|
||||
end
|
||||
elsif @homework.homework_type == 4 #普通作业
|
||||
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),l(:excel_homework_complete_status),
|
||||
l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
count_row = 1
|
||||
shixun = @homework.homework_commons_shixuns.shixun
|
||||
items.each do |homework|
|
||||
sheet1[count_row,0]=homework.user.id
|
||||
sheet1[count_row,1] = homework.user.show_name
|
||||
sheet1[count_row,2] = homework.user.login
|
||||
sheet1[count_row,3] = homework.user.user_extensions.student_id
|
||||
sheet1[count_row,4] = homework.user.mail
|
||||
sheet1[count_row,5] = homework.name
|
||||
sheet1[count_row,6] = homework.work_status == 0 ? '--' : had_passed_changllenge_num(shixun, homework.user).to_s+"/"+shixun.challenges.count.to_s
|
||||
sheet1[count_row,7] = homework.teacher_score.nil? ? l(:label_without_score) : homework.teacher_score.round(2)
|
||||
sheet1[count_row,8] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2)
|
||||
sheet1[count_row,9] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
|
||||
sheet1[count_row,10] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
|
||||
sheet1[count_row,11] = format_time(homework.created_at)
|
||||
count_row += 1
|
||||
end
|
||||
end
|
||||
book.write xls_report
|
||||
xls_report.string
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ class SubjectsController < ApplicationController
|
|||
before_filter :find_subject, :except => [:index, :new, :create, :create_subject, :new_subject, :append_to_stage]
|
||||
|
||||
include ApplicationHelper
|
||||
include SubjectsHelper
|
||||
|
||||
def index
|
||||
@order = params[:order] || "myshixun_count"
|
||||
|
|
@ -33,6 +34,7 @@ class SubjectsController < ApplicationController
|
|||
|
||||
def show
|
||||
@stages = @subject.stages
|
||||
@is_manager = User.current.manager_of_subject?(@subject)
|
||||
end
|
||||
|
||||
def new
|
||||
|
|
|
|||
|
|
@ -3,4 +3,21 @@ module SubjectsHelper
|
|||
shixuns = Shixun.where(:id => subject.stage_shixuns.map(&:shixun_id))
|
||||
co_users = User.where(:id => shixuns.map(&:user_id)).where("id != #{subject.user_id}")
|
||||
end
|
||||
|
||||
def subject_data subject
|
||||
result = {}
|
||||
subject_choices = 0
|
||||
subject_shixuns = 0
|
||||
subject_score = 0
|
||||
subject.stage_shixuns.each do |stage_shixun|
|
||||
shixun = stage_shixun.shixun
|
||||
subject_choices += shixun.challenges.where(:st => [1, 2]).count
|
||||
subject_shixuns += shixun.challenges.where(:st => 0).count
|
||||
subject_score += shixun.shixun_score
|
||||
end
|
||||
result[:subject_choices] = subject_choices
|
||||
result[:subject_shixuns] = subject_shixuns
|
||||
result[:subject_score] = subject_score
|
||||
result
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
class School < ActiveRecord::Base
|
||||
default_scope :order => 'created_at desc'
|
||||
attr_accessible :name, :province, :pinyin, :city, :address, :logo_link,:auto_users_trial
|
||||
attr_accessible :name, :province, :pinyin, :city, :address, :logo_link,:auto_users_trial,:shool_code
|
||||
has_many :courses
|
||||
has_many :departments, :dependent => :destroy
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class StudentsForCourse < ActiveRecord::Base
|
|||
def create_exercise_users
|
||||
course = self.course
|
||||
str = ""
|
||||
exercises = course.exercises.where("exercise_status > 0")
|
||||
exercises = course.exercises.where("exercise_status > 1")
|
||||
if exercises.count != 0
|
||||
exercises.each do |ex|
|
||||
if ex.exercise_users.where("user_id = #{self.student_id}").count == 0
|
||||
|
|
|
|||
|
|
@ -593,7 +593,7 @@ class CoursesService
|
|||
|
||||
#多个角色加入课程
|
||||
def join_course_roles params,current_user
|
||||
course = Course.find_by_invite_code(params[:invite_code]) if params[:invite_code]
|
||||
course = Course.find_by_invite_code(params[:invite_code].strip) if params[:invite_code]
|
||||
go_coursegroup_flag = 0
|
||||
course_id = 0
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<div class="avatar-upload">
|
||||
<input class="avatar-src" name="avatar_src" type="hidden">
|
||||
<input class="avatar-data" name="avatar_data" type="hidden">
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue ml5" type="button" onClick="$('input[id=avatarInput]').click();">本地上传</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange ml5" type="button" onClick="$('input[id=avatarInput]').click();">本地上传</a>
|
||||
<span id="avatar-name"></span>
|
||||
<input class="avatar-input" style="display:none;" id="avatarInput" name="avatar_file" type="file">
|
||||
<input type="hidden" id="source_id" value="<%= @user.id %>"/>
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
testend = teststr.match(/[^\\]+\.[^\(]+/i); //直接完整文件名的
|
||||
filename.innerHTML = testend;
|
||||
$(filename).css("color", '#333');
|
||||
$(".avatar-save").removeClass("task-btn-grey").addClass("task-btn-blue");
|
||||
$(".avatar-save").removeClass("task-btn-grey").addClass("task-btn-orange");
|
||||
$(".avatar-save").on("click", save_avatar);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<% if @user.phone.blank? %>
|
||||
<li class="font-14 mt10 color-grey"><i class="fa fa-exclamation-circle color-orange mr5"></i>未绑定</li>
|
||||
<li class="font-14 mt10"> </li>
|
||||
<li><a href="<%= change_or_bind_path(:type => 'phone') %>" class="task-btn task-btn-blue">绑定</a></li>
|
||||
<li><a href="<%= change_or_bind_path(:type => 'phone') %>" class="task-btn task-btn-orange">绑定</a></li>
|
||||
<% else %>
|
||||
<li class="font-14 mt10 color-grey"><i class="fa fa-check-circle color-light-green mr5"></i>已绑定</li>
|
||||
<li class="font-14 mt10 t_l color-grey">您绑定的手机:<%= @user.user_phone %></li>
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
<% if @user.mail.blank? %>
|
||||
<li class="font-14 mt10 color-grey"><i class="fa fa-exclamation-circle color-orange mr5"></i>未绑定</li>
|
||||
<li class="font-14 mt10"> </li>
|
||||
<li><a href="<%= change_or_bind_path(:type => 'mail') %>" class="task-btn task-btn-blue">绑定</a></li>
|
||||
<li><a href="<%= change_or_bind_path(:type => 'mail') %>" class="task-btn task-btn-orange">绑定</a></li>
|
||||
<% else %>
|
||||
<li class="font-14 mt10 color-grey"><i class="fa fa-check-circle color-light-green mr5"></i>已绑定</li>
|
||||
<li class="font-14 mt10 t_l color-grey">您绑定的邮箱:<%= @user.user_mail %></li>
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
<!--<li class="font-20"><i class="fa fa-wechat color-grey font-16 mr5"></i>微信绑定</li>-->
|
||||
<!--<li class="font-14 mt10 color-grey"><i class="fa fa-exclamation-circle color-orange mr5"></i>未绑定</li>-->
|
||||
<!--<li class="font-14 mt10"> </li>-->
|
||||
<!--<li><a href="#" class=" task-btn task-btn-blue">绑定</a></li>-->
|
||||
<!--<li><a href="#" class=" task-btn task-btn-orange">绑定</a></li>-->
|
||||
<!--</ul>-->
|
||||
|
||||
<!--<ul class="panel-user-setting-ul clearfix">-->
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
<input type="text" class="task-form-90 task-height-40 panel-box-sizing fl edu-form-noborder" placeholder="我得说点儿什么,最多200个字符">
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" onclick="submit_reject_reason('<%= apply_user.id %>', this);" >确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fr" onclick="submit_reject_reason('<%= apply_user.id %>', this);" >确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn fr mr10" onclick="hide_reject_reason(this);" >取消</a>
|
||||
</li>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,56 +1,56 @@
|
|||
<div class="mt10">
|
||||
<span id="attachments_fields" class="attachments_fields">
|
||||
<% if defined?(container) && container && container.saved_attachments %>
|
||||
<% container.attachments.each_with_index do |attachment, i| %>
|
||||
<span id="attachments_p<%= i %>">
|
||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename link_file', :readonly=>'readonly')%>
|
||||
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
|
||||
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
|
||||
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
|
||||
<%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
|
||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<% container.saved_attachments.each_with_index do |attachment, i| %>
|
||||
<span id="attachments_p<%= i %>">
|
||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
|
||||
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
|
||||
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
|
||||
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
|
||||
<%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
|
||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => '_file',
|
||||
:class => ie8? ? '' : 'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => 'addInputFiles(this);',
|
||||
:style => ie8? ? '' : 'display:none',
|
||||
:data => {
|
||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js',:project =>nil),
|
||||
:description_placeholder => l(:label_optional_description),
|
||||
:field_is_public => l(:field_is_public),
|
||||
:are_you_sure => l(:text_are_you_sure),
|
||||
:file_count => l(:label_file_count),
|
||||
:lebel_file_uploding => l(:lebel_file_uploding),
|
||||
:delete_all_files => l(:text_are_you_sure_all)
|
||||
} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="mt5 fl">
|
||||
<!-- , user_import_resource_user_path(User.current.id,:homework_id=>container.id) -->
|
||||
<a href="javascript:void(0);" id="upload_file_local" class="AnnexBtn fl mt3 mr15" onclick="$('#_file').click();" title="请选择文件上传">上传附件</a>
|
||||
</div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'attachments' %>
|
||||
<div class="mt10">
|
||||
<span id="attachments_fields" class="attachments_fields">
|
||||
<% if defined?(container) && container && container.saved_attachments %>
|
||||
<% container.attachments.each_with_index do |attachment, i| %>
|
||||
<span id="attachments_p<%= i %>">
|
||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename link_file', :readonly=>'readonly')%>
|
||||
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
|
||||
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
|
||||
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
|
||||
<%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
|
||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<% container.saved_attachments.each_with_index do |attachment, i| %>
|
||||
<span id="attachments_p<%= i %>">
|
||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
|
||||
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
|
||||
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
|
||||
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
|
||||
<%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
|
||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => '_file',
|
||||
:class => ie8? ? '' : 'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => 'addInputFiles(this);',
|
||||
:style => ie8? ? '' : 'display:none',
|
||||
:data => {
|
||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js',:project =>nil),
|
||||
:description_placeholder => l(:label_optional_description),
|
||||
:field_is_public => l(:field_is_public),
|
||||
:are_you_sure => l(:text_are_you_sure),
|
||||
:file_count => l(:label_file_count),
|
||||
:lebel_file_uploding => l(:lebel_file_uploding),
|
||||
:delete_all_files => l(:text_are_you_sure_all)
|
||||
} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="mt5 fl">
|
||||
<!-- , user_import_resource_user_path(User.current.id,:homework_id=>container.id) -->
|
||||
<a href="javascript:void(0);" id="upload_file_local" class="AnnexBtn fl mt3 mr15" onclick="$('#_file').click();" data-tip-down="请选择文件上传">上传附件</a>
|
||||
</div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'attachments' %>
|
||||
<% end %>
|
||||
|
|
@ -10,8 +10,8 @@
|
|||
<p class="task-popup-text-center font-16" id="compare-tips-1">代码查重已完成,点击查看结果</p>
|
||||
</div>
|
||||
<div class="task-popup-submit clearfix" style="width: 174px;">
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fl" onclick = "compare_code_btn(<%=homework.id%>,<%=courseid%>)">重新查重</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" onclick = "see_last_compare_code(<%=courseid%>,<%=homework.id%>)">查看结果</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fl" onclick = "compare_code_btn(<%=homework.id%>,<%=courseid%>)">重新查重</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fr" onclick = "see_last_compare_code(<%=courseid%>,<%=homework.id%>)">查看结果</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<p class="task-popup-text-center font-16"><%=des%></p>
|
||||
</div>
|
||||
<div class="task-popup-sure clearfix">
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue" onclick="yes_btn(<%=status%>,<%=courseid%>,<%=homework.id%>)">确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange" onclick="yes_btn(<%=status%>,<%=courseid%>,<%=homework.id%>)">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
</li>
|
||||
<p id="none_checked_notice" class="color-red none f12" style="margin-left: 54px;">请至少选择一个身份</p>
|
||||
<li class="clearfix mt10">
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr mr60" onclick="submit_join_course();">确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fr mr60" onclick="submit_join_course();">确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn fr mr10" onclick="hideModal()">取消</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@
|
|||
</li>
|
||||
<li class=" clearfix pb20">
|
||||
<label class="panel-form-label label fl"> </label>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fl mr20" onclick="submit_new_course();">保存</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fl mr20" onclick="submit_new_course();">保存</a>
|
||||
<%= link_to '取消', courses_path, :class => 'task-btn fl' %>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@
|
|||
</li>
|
||||
<li class="mt20 clearfix pb20">
|
||||
<label class="panel-form-label label fl"> </label>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fl mr20" onclick="submit_edit_course(<%= @course.id%>);">保存</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fl mr20" onclick="submit_edit_course(<%= @course.id%>);">保存</a>
|
||||
<%= link_to '取消', course_path(@course), :class => 'task-btn fl ' %>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
</ul>
|
||||
|
||||
<a href="javascript:void(0);" class="pop_close task-btn" style="margin-top: 197px;">取消</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue" style="margin-top: 197px;" onclick="submit_add_teacher_form()">确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange" style="margin-top: 197px;" onclick="submit_add_teacher_form()">确定</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
</div>
|
||||
<% end %>
|
||||
<span class="color-orange fl none" id="change_manager_notice"><i class="fa fa-exclamation-circle mr5" ></i>请选择一个教师</span>
|
||||
<a href="javascript:void(0);" onclick="submit_change_manager_form();" class="task-btn task-btn-blue fr">确定</a>
|
||||
<a href="javascript:void(0);" onclick="submit_change_manager_form();" class="task-btn task-btn-orange fr">确定</a>
|
||||
<a href="javascript:void(0);" class="pop_close task-btn fr mr10">取消</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<div class="task-popup-submit02 clearfix" style="width:120px;">
|
||||
<a href="javascript:void(0);" id="choose_course_group_submit" class="task-btn task-btn-blue fr sure">确定</a>
|
||||
<a href="javascript:void(0);" id="choose_course_group_submit" class="task-btn task-btn-orange fr sure">确定</a>
|
||||
<a href="javascript:void(0);" class="pop_close task-btn fr mr10 cancel">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
<div class="cl"></div>
|
||||
|
||||
<span id="upload_file_count_notice" class="fl c_red none"></span>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" style="margin-right: 27px;" id="submit_resource" onclick="submit_course_resource();hideModal();">确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fr" style="margin-right: 27px;" id="submit_resource" onclick="submit_course_resource();hideModal();">确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn fr mr10" onclick="$('#datetimepicker_mask').datetimepicker('destroy');hideModal();">取消</a>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
<% end %>
|
||||
</form>
|
||||
</ul>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fl" onclick="$('#update_position').submit();" >保存</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fl" onclick="$('#update_position').submit();" >保存</a>
|
||||
<a href="javascript:void(0);" class="task-btn fl ml10" >取消</a>
|
||||
<div class="cl"></div>
|
||||
<script>
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
'<input type="text" style="width:300px;" class="task task-height-40 panel-box-sizing fl color-grey" id="subtopic_name">' +
|
||||
'<div class="cl"></div>' +
|
||||
'</div>' +
|
||||
'<a href="javascript:void(0);" onclick="create_subtopic();" class="task-btn task-btn-blue fr">确定</a>' +
|
||||
'<a href="javascript:void(0);" onclick="create_subtopic();" class="task-btn task-btn-orange fr">确定</a>' +
|
||||
'<a href="javascript:void(0);" onclick="hideModal();" class="task-btn fr mr10">取消</a>'+
|
||||
'</div>'+
|
||||
'</div>'
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" style="" onclick="submit_add_student_form()">确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fr" style="" onclick="submit_add_student_form()">确定</a>
|
||||
<a href="javascript:void(0);" class="pop_close task-btn fr mr10" onclick="hideModal();">取消</a>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
<a href='<%= praise_tread_praise_plus_path({:obj_id => discuss.id,
|
||||
:obj_type => discuss.class
|
||||
}) %>' data-remote="true" data-tip-down="点赞" class="fr mt5">
|
||||
<i class="fa fa-thumbs-up color_Purple_grey"></i>
|
||||
<i class="fa fa-thumbs-up mr5"></i>赞
|
||||
<%= discuss.praise_tread_cache ? (discuss.praise_tread_cache.praise_num == 0 ? "" : discuss.praise_tread_cache.praise_num ) : "" %>
|
||||
</a>
|
||||
<% else %>
|
||||
<a href='<%= praise_tread_praise_minus_path({:obj_id => discuss.id,
|
||||
:obj_type => discuss.class
|
||||
}) %>' data-remote="true" class="fr mt5" data-tip-down="取消点赞" >
|
||||
<i class="fa fa-thumbs-up color-light-green"></i>
|
||||
<i class="fa fa-thumbs-up mr5"></i>赞
|
||||
<%= discuss.praise_tread_cache ? (discuss.praise_tread_cache.praise_num == 0 ? "" : discuss.praise_tread_cache.praise_num ) : "" %>
|
||||
</a>
|
||||
<% end %>
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
<label class="fl" style="line-height: 40px;">分</label>
|
||||
<p class="fr">
|
||||
<span class="font-12 color-grey mb10" style="display: block;">温馨提示:[单选题]属于客观题将由系统自动评分,请设置标准答案</span>
|
||||
<a href="javascript:void(0)" class="fr task-btn task-btn-blue" onclick="edit_poll_question($(this),<%= exercise_question.id %>,1);">保存</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn task-btn-orange" onclick="edit_poll_question($(this),<%= exercise_question.id %>,1);">保存</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn mr10" onclick="$('#edit_poll_questions_<%=exercise_question.id %>').hide();$('#show_poll_questions_<%=exercise_question.id %>').show();">取消</a>
|
||||
</p>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
<label class="fl" style="line-height: 40px;">分</label>
|
||||
<p class="fr">
|
||||
<span class="font-12 color-grey mb10" style="display: block;">温馨提示:[多选题]属于客观题将由系统自动评分,请设置标准答案</span>
|
||||
<a href="javascript:void(0)" class="fr task-btn task-btn-blue" onclick="edit_poll_question($(this),<%= exercise_question.id %>,2);">保存</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn task-btn-orange" onclick="edit_poll_question($(this),<%= exercise_question.id %>,2);">保存</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn mr10" onclick="$('#edit_poll_questions_<%=exercise_question.id %>').hide();$('#show_poll_questions_<%=exercise_question.id %>').show();">取消</a>
|
||||
</p>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,26 @@
|
|||
<textarea id="mustBe" name="exercise[exercise_description]" class="panel-box-sizing panel-form-width-100" placeholder="试卷须知:共有选择、填空、简答3种题型,其中选择题包括单选题和多选题;您可以在此处填写本次试卷答题的相关说明"><%= @exercise.try(:exercise_description) %></textarea>
|
||||
</div>
|
||||
<p class="fr">
|
||||
<a href="javascript:void(0)" onclick="ex_head_submit($(this));" class="fr task-btn mr15 task-btn-blue">保存</a>
|
||||
<a href="javascript:void(0)" onclick="ex_head_submit($(this));" class="fr task-btn mr15 task-btn-orange">保存</a>
|
||||
<a href="javascript:void(0)" onclick="ex_head_cancel();" class="fr task-btn mr10">取消</a>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
$("#exercise_head_edit").on("keydown", "input[name='exercise[exercise_name]']", function(event){
|
||||
var code;
|
||||
if (!event) {
|
||||
event = window.event; //针对ie浏览器
|
||||
code = event.keyCode;
|
||||
}
|
||||
else {
|
||||
code = event.keyCode;
|
||||
}
|
||||
if(code == 13) {
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<p class="fr">
|
||||
<span class="font-12 color-grey" style="display: block;">温馨提示:[简答题]属于主观题需要人工评分,未作答的情况下系统将自动评分</span>
|
||||
<span class="font-12 color-grey mb10 ml50" style="display: block;"> 参考答案仅作为人工评分的参考</span>
|
||||
<a href="javascript:void(0)" class="fr task-btn task-btn-blue" onclick="edit_poll_question($(this),<%= exercise_question.id %>,4);">保存</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn task-btn-orange" onclick="edit_poll_question($(this),<%= exercise_question.id %>,4);">保存</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn mr10" onclick="$('#edit_poll_questions_<%=exercise_question.id %>').hide();$('#show_poll_questions_<%=exercise_question.id %>').show();">取消</a>
|
||||
</p>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
<label class="fl" style="line-height: 40px;">分</label>
|
||||
<p class="fr">
|
||||
<span class="font-12 color-grey mb10" style="display: block;">温馨提示:[填空题]属于客观题将由系统自动评分,请设置标准答案</span>
|
||||
<a href="javascript:void(0)" class="fr task-btn task-btn-blue"onclick="edit_poll_question($(this),<%= exercise_question.id %>,3);">保存</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn task-btn-orange"onclick="edit_poll_question($(this),<%= exercise_question.id %>,3);">保存</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn mr10" onclick="$('#edit_poll_questions_<%=exercise_question.id %>').hide();$('#show_poll_questions_<%=exercise_question.id %>').show();">取消</a>
|
||||
</p>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@
|
|||
<!--</div>-->
|
||||
|
||||
<div class="clearfix mt15 mb15 mr15 pr10 <%= edit_mode ? '' : 'none' %>" id="exam_setting_submit_block">
|
||||
<a href="javascript:void(0);" onclick="ex_setting_form_submit();" class="task-btn task-btn-blue fr">保存</a>
|
||||
<a href="javascript:void(0);" onclick="ex_setting_form_submit();" class="task-btn task-btn-orange fr">保存</a>
|
||||
<a href="javascript:void(0);" onclick="s_op_confirm_box('<%= student_exercise_list_exercise_path(@exercise) %>', '修改的内容将全部丢失<br/>是否确认取消保存')" class="task-btn fr mr10">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -79,7 +79,7 @@
|
|||
<% case exercise_question.question_type %>
|
||||
<% when 1 %>
|
||||
<div class="pl15 pr15 mb15">
|
||||
<% exercise_choices = @exercise.choice_random == 1 ? exercise_question.exercise_choices.shuffle : exercise_question.exercise_choices.reorder("choice_position") %>
|
||||
<% exercise_choices = exercise_question.exercise_choices.reorder("choice_position") %>
|
||||
<% exercise_choices.each_with_index do |exercise_choice,index| %>
|
||||
<li class="clearfix">
|
||||
<input name="exercise_choice_<%= exercise_question.id %>" class="magic-radio fl mt5 magic-checkbox_show" id="exercise_<%= exercise_choice.id %>_exercise_choice_id" type="radio" disabled <%= answer_be_selected?(exercise_choice,user) ? "checked" : "" %>>
|
||||
|
|
@ -94,7 +94,7 @@
|
|||
<% end %>
|
||||
<% when 2 %>
|
||||
<div class="pl15 pr15 mb15">
|
||||
<% exercise_choices = @exercise.choice_random == 1 ? exercise_question.exercise_choices.shuffle : exercise_question.exercise_choices.reorder("choice_position") %>
|
||||
<% exercise_choices = exercise_question.exercise_choices.reorder("choice_position") %>
|
||||
<% exercise_choices.each_with_index do |exercise_choice,index| %>
|
||||
<li class="clearfix">
|
||||
<input name="exercise_choice_<%= exercise_question.id %>" class="magic-checkbox fl mt5 magic-checkbox_show" id="exercise_<%= exercise_choice.id %>_exercise_choice_id" type="checkbox" disabled <%= answer_be_selected?(exercise_choice,user) ? "checked" : "" %>>
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@
|
|||
<label class="fl" style="line-height: 40px;">分</label>
|
||||
<p class="fr">
|
||||
<span class="font-12 color-grey mb10" style="display: block;">温馨提示:[单选题]属于客观题将由系统自动评分,请设置标准答案</span>
|
||||
<a href="javascript:void(0)" class="fr task-btn task-btn-blue" id="add_new_question">保存</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn mr10" onclick="$(this).parent().parent().parent().parent().remove();">取消</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn task-btn-orange" id="add_new_question">保存</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn mr10" onclick="$(this).parent().parent().parent().parent().parent().remove();">取消</a>
|
||||
</p>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@
|
|||
<label class="fl" style="line-height: 40px;">分</label>
|
||||
<p class="fr">
|
||||
<span class="font-12 color-grey mb10" style="display: block;">温馨提示:[多选题]属于客观题将由系统自动评分,请设置标准答案</span>
|
||||
<a href="javascript:void(0)" class="fr task-btn task-btn-blue" id="add_new_question">保存</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn mr10" onclick="$(this).parent().parent().parent().parent().remove();">取消</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn task-btn-orange" id="add_new_question">保存</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn mr10" onclick="$(this).parent().parent().parent().parent().parent().remove();">取消</a>
|
||||
</p>
|
||||
</li>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,6 @@
|
|||
<textarea id="mustBe" name="exercise[exercise_description]" class="panel-box-sizing panel-form-width-100" placeholder="试卷须知:共有选择、填空、简答3种题型,其中选择题包括单选题和多选题;您可以在此处填写本次试卷答题的相关说明"><%= @exercise.try(:exercise_description) %></textarea>
|
||||
</div>
|
||||
<p class="fr">
|
||||
<a href="javascript:void(0)" onclick="ex_head_submit($(this));" class="fr task-btn mr15 task-btn-blue">保存</a>
|
||||
<a href="javascript:void(0)" onclick="ex_head_submit($(this));" class="fr task-btn mr15 task-btn-orange">保存</a>
|
||||
</p>
|
||||
<% end %>
|
||||
|
|
@ -24,8 +24,8 @@
|
|||
<p class="fr">
|
||||
<span class="font-12 color-grey" style="display: block;">温馨提示:[简答题]属于主观题需要人工评分,未作答的情况下系统将自动评分</span>
|
||||
<span class="font-12 color-grey mb10 ml50" style="display: block;"> 参考答案仅作为人工评分的参考</span>
|
||||
<a href="javascript:void(0)" class="fr task-btn task-btn-blue" id="add_new_question">保存</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn mr10" onclick="$(this).parent().parent().parent().parent().remove();">取消</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn task-btn-orange" id="add_new_question">保存</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn mr10" onclick="$(this).parent().parent().parent().parent().parent().remove();">取消</a>
|
||||
</p>
|
||||
</li>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@
|
|||
<label class="fl" style="line-height: 40px;">分</label>
|
||||
<p class="fr">
|
||||
<span class="font-12 color-grey mb10" style="display: block;">温馨提示:[填空题]属于客观题将由系统自动评分,请设置标准答案</span>
|
||||
<a href="javascript:void(0)" class="fr task-btn task-btn-blue" id="add_new_question">保存</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn mr10" onclick="$(this).parent().parent().parent().parent().remove();">取消</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn task-btn-orange" id="add_new_question">保存</a>
|
||||
<a href="javascript:void(0)" class="fr task-btn mr10" onclick="$(this).parent().parent().parent().parent().parent().remove();">取消</a>
|
||||
</p>
|
||||
</li>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,48 +1,36 @@
|
|||
<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 class="task-popup" style="width:620px;">
|
||||
<div class="task-popup-title clearfix">
|
||||
<h3 class="fl color-grey3">试卷选用</h3>
|
||||
<a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
|
||||
</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 class="task-popup-content">
|
||||
<div class="clearfix mb15 test_nav_content">
|
||||
<a href="javascript:void(0)" class="edu-filter-cir-grey mr20 active fl">我的试卷</a>
|
||||
<!--<a href="javascript:void(0)" class="edu-filter-cir-grey mr20 fl">公共试卷</a>-->
|
||||
<div class="edu-find fr with40 mr20 pr">
|
||||
<div class="edu-find-input">
|
||||
<input type="text" class="with100 panel-box-sizing" name="search" maxlength="40" placeholder="输入试卷标题的关键字进行搜索" id="exercise_list_name_search">
|
||||
<span class="edu-close" onclick="colse_searchbox();" style="top:-4px" data-tip-down="关闭">×</span>
|
||||
</div>
|
||||
<a href="javascript:void(0);" style="top:-1px" class="edu-open font-16 color-grey" onclick="search_exercise_list();"><i class="fa fa-search"></i></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 mr15 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>
|
||||
<input type="hidden" name="course_id" value="<%= @course_id%>" />
|
||||
<div class="test_content" id="test_nav_1">
|
||||
<%= render :partial => "select_examination_list" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function submit_import_form(){
|
||||
var checkboxs = $("input[name='exercise_id[]']:checked");
|
||||
var checkboxs = $("input[name='exercise_id']:checked");
|
||||
if(checkboxs.length > 0) {
|
||||
$("#choose_exercise_notice").html("");
|
||||
$('#import_other_exercise_form').submit();
|
||||
|
|
@ -53,29 +41,39 @@
|
|||
}
|
||||
}
|
||||
|
||||
var lastSearchCondition = '';
|
||||
var count = 0;
|
||||
function search_exs(e){
|
||||
if($(e.target).val().trim() == lastSearchCondition && lastSearchCondition != '')
|
||||
{
|
||||
return;
|
||||
}
|
||||
lastSearchCondition = $(e.target).val().trim();
|
||||
function search_exercise_list(){
|
||||
$.ajax({
|
||||
url: '<%= url_for(:controller => 'exercise', :action => 'search_exercises') %>'+'?name='+ e.target.value+'&course_id=<%=course_id %>',
|
||||
type:'get'
|
||||
url: '/exercise/other_exercise?search='+ $("#exercise_list_name_search").val() +'&course_id=<%=@course_id %>',
|
||||
type: 'get',
|
||||
remote: true,
|
||||
success: function(data){
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function throttle(method,context,e){
|
||||
clearTimeout(method.tId);
|
||||
method.tId=setTimeout(function(){
|
||||
method.call(context,e);
|
||||
},500);
|
||||
//清空搜索框
|
||||
function colse_searchbox(){
|
||||
if($("#exercise_list_name_search").val().trim() == ""){
|
||||
return;
|
||||
}
|
||||
$("#exercise_list_name_search").val('');
|
||||
<% unless @search.blank? %>
|
||||
search_exercise_list();
|
||||
<% end %>
|
||||
}
|
||||
|
||||
//查询项目
|
||||
$("input[name='search']").on('input', function (e) {
|
||||
throttle(search_exs,window,e);
|
||||
$("input[name='search']").on("keydown", function(event){
|
||||
var code;
|
||||
if (!event) {
|
||||
event = window.event; //针对ie浏览器
|
||||
code = event.keyCode;
|
||||
}
|
||||
else {
|
||||
code = event.keyCode;
|
||||
}
|
||||
if(code == 13) {
|
||||
search_exercise_list();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<div class="mh400">
|
||||
<table class="edu-pop-table interval-td color-grey bor-grey-e" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<% @exercises.each do |exercise| %>
|
||||
<tr>
|
||||
<td class="pl5 pr5">
|
||||
<input type="radio" name="exercise_id" value="<%= exercise.id %>" id="exercise_<%= exercise.id %>" class="ml-3 mr5 magic-radio">
|
||||
<label style="top:0px;line-height: 27px;width: 544px;" class="task-hide color-grey3" for="exercise_<%= exercise.id %>"><%= exercise.exercise_name %></label>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="clearfix mt15">
|
||||
<p class="none c_red" id="choose_exercise_notice"></p>
|
||||
<div class="fl pages_little_show">
|
||||
<ul>
|
||||
<%= 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 class="fr">
|
||||
<a href="javascript:void(0)" class="task-btn task-btn-orange fr" onclick="submit_import_form();">确定</a>
|
||||
<a href="javascript:void(0)" class="task-btn fr pop_close mr10" onclick="hideModal();">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,9 +1 @@
|
|||
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) %>";
|
||||
}
|
||||
notice_box_redirect("<%= student_exercise_list_exercise_path(@exercise, :tab => 3) %>", "导入成功");
|
||||
|
|
@ -1,12 +1,5 @@
|
|||
<%= stylesheet_link_tag 'polls', :media => 'all' %>
|
||||
<script type="text/javascript">
|
||||
function close_searchbox(){
|
||||
if($("#exercise_name_search").val() != ""){
|
||||
$("#exercise_name_search").val("");
|
||||
$('#exercise_search_form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
function republish_exercise(exercise_id,index)
|
||||
{
|
||||
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>'+
|
||||
|
|
@ -59,6 +52,7 @@
|
|||
<p class="ml15 color-grey3 fl">试卷列表</p>
|
||||
<% if @is_teacher %>
|
||||
<a href="<%= new_exercise_path(:course_id => @course.id) %>" class="white-btn orange-btn fr mr20 mt3" title="新建">+ 新建</a>
|
||||
<a href="<%= other_exercise_exercise_index_path(:course_id => @course.id) %>" data-remote="true" class="white-btn orange-btn fr mr20 mt3">+ 试卷选用</a>
|
||||
<!--<a href="javascript:void(0)" class="white-btn orange-btn fr mr20 mt3" data-remote="true" title="题库选用">+ 题库选用</a>-->
|
||||
<!--<a href="javascript:void(0)" class="white-btn orange-btn fr mr20 mt3" data-remote="true" title="导出成绩">导出成绩</a>-->
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
<% 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);
|
||||
notice_box("您的其它班级下没有试卷可供导入");
|
||||
<% else %>
|
||||
var html_value = '<%= escape_javascript(render :partial => 'other_exercises',:locals => {:exercises => @exercises, :course_id=>@course_id}) %>';
|
||||
pop_box_new(html_value, 745, 600);
|
||||
<% unless params[:search] %>
|
||||
var html_value = '<%= escape_javascript(render :partial => 'other_exercises') %>';
|
||||
pop_box_new(html_value, 620, 568);
|
||||
<% else %>
|
||||
$("#test_nav_1").html("<%= j(render :partial => "select_examination_list") %>");
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
@ -370,7 +370,7 @@
|
|||
<!--</div>-->
|
||||
|
||||
<div class="clearfix mt15 mb15 mr15 pr10 <%= edit_mode ? '' : 'none' %>" id="exam_setting_submit_block">
|
||||
<a href="javascript:void(0);" onclick="ex_setting_form_submit();" class="task-btn task-btn-blue fr">保存</a>
|
||||
<a href="javascript:void(0);" onclick="ex_setting_form_submit();" class="task-btn task-btn-orange fr">保存</a>
|
||||
<a href="javascript:void(0);" onclick="s_op_confirm_box('<%= student_exercise_list_exercise_path(@exercise) %>', '修改的内容将全部丢失<br/>是否确认取消保存')" class="task-btn fr mr10">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@
|
|||
<% case exercise_question.question_type %>
|
||||
<% when 1 %>
|
||||
<div class="pl15 pr15 mb15">
|
||||
<% exercise_choices = @exercise.choice_random == 1 ? exercise_question.exercise_choices.shuffle : exercise_question.exercise_choices.reorder("choice_position") %>
|
||||
<% exercise_choices = exercise_question.exercise_choices.reorder("choice_position") %>
|
||||
<% exercise_choices.each_with_index do |exercise_choice,index| %>
|
||||
<li class="clearfix">
|
||||
<input name="exercise_choice_<%= exercise_question.id %>" class="magic-radio fl mt5 magic-checkbox_show" id="exercise_<%= exercise_choice.id %>_exercise_choice_id" type="radio">
|
||||
|
|
@ -181,7 +181,7 @@
|
|||
</div>
|
||||
<% when 2 %>
|
||||
<div class="pl15 pr15 mb15">
|
||||
<% exercise_choices = @exercise.choice_random == 1 ? exercise_question.exercise_choices.shuffle : exercise_question.exercise_choices.reorder("choice_position") %>
|
||||
<% exercise_choices = exercise_question.exercise_choices.reorder("choice_position") %>
|
||||
<% exercise_choices.each_with_index do |exercise_choice,index| %>
|
||||
<li class="clearfix">
|
||||
<input name="exercise_choice_<%= exercise_question.id %>" class="magic-checkbox fl mt5 magic-checkbox_show" id="exercise_<%= exercise_choice.id %>_exercise_choice_id" type="checkbox">
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
</p>
|
||||
|
||||
<div class="clearfix">
|
||||
<a href="javascript:void(0);" onclick ="upload_attachment_version(event);" onfocus = 'this.blur()' id='upload_files_submit_btn' class="task-btn task-btn-blue fr">确定</a>
|
||||
<a href="javascript:void(0);" onclick ="upload_attachment_version(event);" onfocus = 'this.blur()' id='upload_files_submit_btn' class="task-btn task-btn-orange fr">确定</a>
|
||||
<a href="javascript:void(0);" onclick="attachment_fresh_for_destroy()" class="task-btn fr mr10">取消</a>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" id="submit_file" onclick="submit_republish_file();">确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fr" id="submit_file" onclick="submit_republish_file();">确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn fr mr10" onclick="$('#datetimepicker_mask').datetimepicker('destroy');hideModal();">取消</a>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<span id="upload_file_count_notice" class="fl c_red none"></span>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" style="margin-right: 27px;" id="submit_resource" onclick="submit_course_resource();">确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fr" style="margin-right: 27px;" id="submit_resource" onclick="submit_course_resource();">确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn fr mr10" onclick="$('#datetimepicker_mask').datetimepicker('destroy');hideModal();">取消</a>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@
|
|||
<!--)-->
|
||||
<!--</span>-->
|
||||
<label class="panel-form-label fl"> </label>
|
||||
<a href="javascript:void(0);" class="fl" onclick="$('#_file').click();" title="请选择文件上传">
|
||||
<a href="javascript:void(0);" class="fl" onclick="$('#_file').click();" data-tip-down="请选择文件上传">
|
||||
<i class="fa fa-upload mr5"></i>
|
||||
<span>上传附件</span>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
<li class="clearfix mb5 pl30 pr30">
|
||||
<div class="mt5 clearfix">
|
||||
<label class="panel-form-label fl"> </label>
|
||||
<a href="javascript:void(0);" class="fl" onclick="$('#_file').click();" title="请选择文件上传">
|
||||
<a href="javascript:void(0);" class="fl" onclick="$('#_file').click();" data-tip-down="请选择文件上传">
|
||||
<i class="fa fa-upload mr5"></i>
|
||||
<span>上传附件</span>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
<%= memo.subject %>
|
||||
</a>
|
||||
<% if memo.sticky %>
|
||||
<span class="btn-top btn-cir-orange mt7 ml5 fl">顶</span>
|
||||
<span class="btn-top btn-cir-orange mt6 ml5 fl">顶</span>
|
||||
<% end %>
|
||||
</p>
|
||||
<div style="width: 1091px; height: 30px;" class="overellipsis color-dark-grey mb10"><%= memo.content.html_safe %></div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<span class="mt10 -flex c_grey ml15" id="time-consuming"></span>
|
||||
<!--<span class="mt10 mr15" style="color: #2dad96;" id="game_wating_time"></span>-->
|
||||
<% if @myshixun.shixun.try(:language) == "PHP/Web" %>
|
||||
<a href="<%= web_display_myshixun_game_path(@game, :myshixun_id => @myshixun) %>" target="_blank" class="shixun-task-btn task-btn-orange mr15 mt8">查看网页效果</a>
|
||||
<a href="<%= "http://106.75.96.108:" + (50000 + @game.myshixun_id).to_s + '/' + @game.challenge.path.strip %>" target="_blank" class="shixun-task-btn task-btn-orange mr15 mt8">
|
||||
查看网页效果
|
||||
</a>
|
||||
<!-- <a href="<%#= "http://106.75.96.108:" + (50000+4111).to_s + '/' + "src/step1/Helloworld.php" %>" target="_blank" class="shixun-task-btn task-btn-orange mr15 mt8">查看网页效果</a>-->
|
||||
<% end %>
|
||||
<% if @st == 0 %>
|
||||
<div id="reset_code_to_bengin" class="<%= @game.status == 2 ? "" : "undis" %>">
|
||||
|
|
@ -11,14 +14,14 @@
|
|||
<div id="prev_step_area">
|
||||
<% if @game.challenge.position > 1 %>
|
||||
<%= link_to "上一关 ", {:controller => 'games', :action => "prev_step", :id => @game, :myshixun_id => @myshixun},
|
||||
:class => "shixun-task-btn task-btn-blue mr15 mt8", :id => "prev_step", :remote => true %>
|
||||
:class => "shixun-task-btn task-btn-orange mr15 mt8", :id => "prev_step", :remote => true %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div id="code_test">
|
||||
<% if @st == 0 %>
|
||||
<a href="javascript:void(0)" class="shixun-task-btn task-btn-blue mr15 mt8" onclick="training_task_submmit();">评测</a>
|
||||
<a href="javascript:void(0)" class="shixun-task-btn task-btn-orange mr15 mt8" onclick="training_task_submmit();">评测</a>
|
||||
<% else %>
|
||||
<a href="javascript:void(0)" class="shixun-task-btn task-btn-blue mr15 mt8" onclick="choice_submmit();">评测</a>
|
||||
<a href="javascript:void(0)" class="shixun-task-btn task-btn-orange mr15 mt8" onclick="choice_submmit();">评测</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div id="code_estimate">
|
||||
|
|
@ -28,11 +31,11 @@
|
|||
<% if @had_done == 0 %>
|
||||
<% if show_next_stage?(@game, @myshixun.shixun.try(:status)) %>
|
||||
<%= link_to "下一关 ", {:controller => 'games', :action => "next_step", :id => @game, :myshixun_id => @myshixun},
|
||||
:class => "shixun-task-btn task-btn-blue mr15 mt8", :id => "next_step", :remote => true %>
|
||||
<!--<a href="javascript:void(0);" onclick="shixun_next_step();" class="task-btn task-btn-blue mr15 mt8">下 一 步</a>-->
|
||||
:class => "shixun-task-btn task-btn-orange mr15 mt8", :id => "next_step", :remote => true %>
|
||||
<!--<a href="javascript:void(0);" onclick="shixun_next_step();" class="task-btn task-btn-orange mr15 mt8">下 一 步</a>-->
|
||||
<% end %>
|
||||
<% else %>
|
||||
<a href="<%= shixun_path(@myshixun.shixun) %>" id="exit_shixun" class="shixun-task-btn task-btn-blue mt8 mr15">离开</a>
|
||||
<a href="<%= shixun_path(@myshixun.shixun) %>" id="exit_shixun" class="shixun-task-btn task-btn-orange mt8 mr15">离开</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<script>
|
||||
|
|
@ -42,6 +45,7 @@
|
|||
<% end %>
|
||||
// 渲染用户的HTML的CODE。
|
||||
function tpi_html_show(){
|
||||
$($(".blacktab_con")[0]).trigger("click");
|
||||
var contents = editor_CodeMirror.getValue();
|
||||
$("#data_param").val(contents);
|
||||
$("#html_form").attr("action", "/iframes/html_content");
|
||||
|
|
@ -197,8 +201,10 @@
|
|||
data.language,
|
||||
data.compile_success
|
||||
);
|
||||
$("#blacktab_nav_1").trigger("click");
|
||||
if(data.status == 2){
|
||||
if(data.language == "Html"){
|
||||
tpi_html_show();
|
||||
}
|
||||
clearInterval(cm);
|
||||
clearInterval(intId);
|
||||
var icon = $("#game_status_<%= @game_challenge.id %>"); // 实训列表的icon
|
||||
|
|
@ -213,28 +219,28 @@
|
|||
icon.find("i").attr("class", "fa fa-unlock fr font-18 mt5 color-light-green w20_center");
|
||||
icon.find("a:last").attr("title", "已完成");
|
||||
if( data.had_done == 0 ) {
|
||||
$("#code_estimate").html("<a href='<%= next_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-blue mr15 mt8' id='next_step' data-remote='true'>下一关</a><a href='<%= shixun_path(@myshixun.shixun) %>' class='task-btn task-btn-blue mt8 mr15' >离开</a>");
|
||||
$("#code_estimate").html("<a href='<%= next_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-orange mr15 mt8' id='next_step' data-remote='true'>下一关</a><a href='<%= shixun_path(@myshixun.shixun) %>' class='task-btn task-btn-orange mt8 mr15' >离开</a>");
|
||||
var htmlvalue = "<%= j (render :partial => 'games/pass_game_show', :locals => { :game=> @game, :myshixun => @myshixun, :had_done => 0}) %>";
|
||||
}else{
|
||||
$("#code_estimate").html("<a href='<%= shixun_path(@myshixun.shixun) %>' class='task-btn task-btn-blue mt8 mr15' >离开</a>");
|
||||
$("#code_estimate").html("<a href='<%= shixun_path(@myshixun.shixun) %>' class='task-btn task-btn-orange mt8 mr15' >离开</a>");
|
||||
var htmlvalue = "<%= j (render :partial => 'games/pass_game_show', :locals => { :game=> @game, :myshixun => @myshixun, :had_done => 1}) %>";
|
||||
}
|
||||
// 传递具体屏幕的宽高,实现不同浏览器与不同分辨率都能撑满屏幕
|
||||
pop_box_new2(htmlvalue, window.innerWidth, window.innerHeight);
|
||||
$("#reset_code_to_bengin").show(); // 显示加载上次通过的代码
|
||||
}
|
||||
var html = "<a href='javascript:void(0)' class='task-btn task-btn-blue mr15 mt8' onclick='training_task_submmit();'>评测</a>";
|
||||
var html = "<a href='javascript:void(0)' class='task-btn task-btn-orange mr15 mt8' onclick='training_task_submmit();'>评测</a>";
|
||||
$("#code_test").html(html); // 恢复评测
|
||||
if(data.position > 1){
|
||||
$("#prev_step_area").html("<a href='<%= prev_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-blue mr15 mt8' id='prev_step' data-remote='true'>上一关</a>")
|
||||
$("#prev_step_area").html("<a href='<%= prev_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-orange mr15 mt8' id='prev_step' data-remote='true'>上一关</a>")
|
||||
}
|
||||
var codeEstimate = $("#code_estimate").children("a").html();
|
||||
if(codeEstimate == undefined){
|
||||
return;
|
||||
}else if(codeEstimate.trim() == "下一关"){
|
||||
$("#code_estimate").html("<a href='<%= next_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-blue mr15 mt8' id='next_step' data-remote='true'>下一关</a><a href='<%= shixun_path(@myshixun.shixun) %>' class='task-btn task-btn-blue mt8 mr15' >离开</a>");
|
||||
$("#code_estimate").html("<a href='<%= next_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-orange mr15 mt8' id='next_step' data-remote='true'>下一关</a><a href='<%= shixun_path(@myshixun.shixun) %>' class='task-btn task-btn-orange mt8 mr15' >离开</a>");
|
||||
} else if(codeEstimate.trim() == "离开"){
|
||||
$("#code_estimate").html("<a href='<%= shixun_path(@myshixun.shixun) %>' class='task-btn task-btn-blue mt8 mr15' >离开</a>");
|
||||
$("#code_estimate").html("<a href='<%= shixun_path(@myshixun.shixun) %>' class='task-btn task-btn-orange mt8 mr15' >离开</a>");
|
||||
}
|
||||
}
|
||||
// 访问60次,即120s后后台还未改变状态即执行
|
||||
|
|
@ -250,12 +256,12 @@
|
|||
nAjaxLoading.hide();
|
||||
nInfoAjaxLoading.hide();
|
||||
if(data.position > 1){
|
||||
$("#prev_step_area").html("<a href='<%= prev_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-blue mr15 mt8' id='prev_step' data-remote='true'>上一关</a>")
|
||||
$("#prev_step_area").html("<a href='<%= prev_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-orange mr15 mt8' id='prev_step' data-remote='true'>上一关</a>")
|
||||
}
|
||||
if( data.had_done == 0 ) {
|
||||
$("#code_estimate").html("<a href='<%= next_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-blue mr15 mt8' id='next_step' data-remote='true'>下一关</a><a href='<%= shixun_path(@myshixun.shixun) %>' class='task-btn task-btn-blue mt8 mr15' >离开</a>");
|
||||
$("#code_estimate").html("<a href='<%= next_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-orange mr15 mt8' id='next_step' data-remote='true'>下一关</a><a href='<%= shixun_path(@myshixun.shixun) %>' class='task-btn task-btn-orange mt8 mr15' >离开</a>");
|
||||
}
|
||||
var html = "<a href='javascript:void(0)' class='task-btn task-btn-blue mr15 mt8' onclick='training_task_submmit();'>评测</a>";
|
||||
var html = "<a href='javascript:void(0)' class='task-btn task-btn-orange mr15 mt8' onclick='training_task_submmit();'>评测</a>";
|
||||
|
||||
var html_1 = "实训云平台繁忙(繁忙等级:88)";
|
||||
$("#code_test").html(html);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
</div>
|
||||
<div class="task-popup-submit clearfix">
|
||||
<a href="javascript:void(0);" onclick="hideModal();" class="task-btn fl">取消</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" onclick="<%= @viewed == 2 ? "minus_shixun_score();" : "" %>hideModal();">确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fr" onclick="<%= @viewed == 2 ? "minus_shixun_score();" : "" %>hideModal();">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -74,19 +74,25 @@
|
|||
</div>
|
||||
</div>
|
||||
<div id="tab_con_4" class="tab-info" style="display: none">
|
||||
<%#= render :partial => "games/shixun_comment_list" %>
|
||||
<div class="fit -scroll">
|
||||
<div class="-layout-v -fit">
|
||||
<div class="-flex -scroll panel-box-sizing new_li task-padding10" id="game_comment_show" style="padding: 0px;">
|
||||
<%#= render :partial => "games/shixun_comment_list" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="-layout-h -padding-h-16 -horizontal -footer-left" id="bottom_points" style = "position:relative;">
|
||||
<ul class="-task-ml80 -layout" style="overflow:hidden;align-items:flex-end;flex-wrap:wrap;">
|
||||
<ul class="-task-ml80 -layout df" style="overflow:hidden;align-items:flex-end;flex-wrap:wrap;">
|
||||
<%= render :partial => "games/shixun_comment_block" %>
|
||||
<li class="fl mt10 ml20 " style="width:54px;margin-bottom:10px;"><a href="javascript:void(0);" onclick="send_dis_to_shixun()" class="course-bth-blue color_white">发送</a></li>
|
||||
<li class="fl ml20 mt15" style="width:85px;margin-bottom:10px;">
|
||||
<span data-tip-left="<%= @praise.nil? ? "点赞" : "取消点赞" %>" onclick="game_praise('<%= @game_challenge.id %>', '<%= @game_challenge.class %>')" id="game_praise_tread" class="pt5 color-grey mr20">
|
||||
<!-- <li class="fl mt10 ml20 " style="width:54px;margin-bottom:10px;"><a href="javascript:void(0);" onclick="send_dis_to_shixun()" class="course-bth-blue color_white">发送</a></li>-->
|
||||
<li class="fl ml20 mt15 mb10 mr10" style="width:85px;">
|
||||
<span data-tip-top="<%= @praise.nil? ? "点赞" : "取消点赞" %>" onclick="game_praise('<%= @game_challenge.id %>', '<%= @game_challenge.class %>')" id="game_praise_tread" class="pt5 color-grey mr20">
|
||||
<i class="fa fa-thumbs-up font-20 mr3 <%= @praise.nil? ? "" : "color-light-green" %>" alt="赞" ></i><span class="font-12 font-bd" id="game_praise_count"><%= @praise_count %></span>
|
||||
</span>
|
||||
<span data-tip-right="<%= @tread.nil? ? "踩" : "取消踩" %>" onclick="game_tread('<%= @game_challenge.id %>')" id="game_tread" class="color-grey" style="padding-top:7px;">
|
||||
<span data-tip-top="<%= @tread.nil? ? "踩" : "取消踩" %>" onclick="game_tread('<%= @game_challenge.id %>')" id="game_tread" class="color-grey" style="padding-top:7px;">
|
||||
<i class="fa fa-thumbs-down font-20 mr3 <%= @tread.nil? ? "" : "color-orange" %>" ></i><span class="font-12 font-bd" id="game_tread_count"><%= @tread_count %></span>
|
||||
</span>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
</div>
|
||||
<div class=" clearfix mb20 mr15">
|
||||
<a href="javascript:void(0);" onclick="hideModal();" class="task-btn fr">取消</a>
|
||||
<a href="javascript:void(0);" onclick="problem_report('<%= User.current.id %>');" class="task-btn task-btn-blue fr mr10">确定</a>
|
||||
<a href="javascript:void(0);" onclick="problem_report('<%= User.current.id %>');" class="task-btn task-btn-orange fr mr10">确定</a>
|
||||
</div>
|
||||
<script>
|
||||
// 给导师和管理员发送error
|
||||
|
|
|
|||
|
|
@ -1,13 +1,27 @@
|
|||
<li class="comment-input fl" id="shixun_comment_block">
|
||||
<%= form_for('', :url => {:controller => 'discusses', :action => 'create', :dis_id => @shixun.id, :dis_type => "Shixun", :challenge_id => @game_challenge.try(:id)}, :method => "post", :remote => true, :html => {:id => 'new_comment_form'}) do |f| %>
|
||||
<textarea id="comment_news" name="content" placeholder="我想说点什么~" MultiLine = True ScrollBars = 2 type="text"></textarea>
|
||||
<input type="hidden" id="dis_reply_id" name="reply_id" value="">
|
||||
<% end %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<% end %>
|
||||
<li class="comment-input fl" id="shixun_comment_block" style="flex: 1">
|
||||
<!-- <%#= form_for('', :url => {:controller => 'discusses', :action => 'create', :dis_id => @shixun.id, :dis_type => "Shixun", :challenge_id => @game_challenge.try(:id)}, :method => "post", :remote => true, :html => {:id => 'new_comment_form'}) do |f| %>
|
||||
<textarea id="comment_news" name="content" placeholder="我想说点什么~" MultiLine = True ScrollBars = 2 type="text"></textarea>
|
||||
<input type="hidden" id="dis_reply_id" name="reply_id" value="">
|
||||
<%# end %>-->
|
||||
|
||||
<div nhname='new_message_<%= @shixun.id%>' class="fr" style="display:none; width: 99%;">
|
||||
<%= form_for('discuss', :url => {:controller => 'discusses', :action => 'create', :dis_id => @shixun.id, :dis_type => "Shixun", :challenge_id => @game_challenge.try(:id)}, :method => "post", :remote => true, :html => {:id => 'new_comment_form'}) do |f| %>
|
||||
<div nhname='toolbar_container_<%= @shixun.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @shixun.id %>' name="content"></textarea>
|
||||
<a id="new_message_submit_btn_<%= @shixun.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="mt10 task-btn task-btn-blue fr">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= @shixun.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
autoTextarea(document.getElementById("comment_news"),0,150);
|
||||
//autoTextarea(document.getElementById("comment_news"),0,150);
|
||||
sd_create_editor_from_shixun_data(<%= @shixun.id %>, null, "100%", "<%= @shixun.class.to_s %>");
|
||||
});
|
||||
var click = true;
|
||||
function send_dis_to_shixun(){
|
||||
|
|
|
|||
|
|
@ -1,93 +1,123 @@
|
|||
<div class="fit -scroll">
|
||||
<div class="-layout-v -fit">
|
||||
<div class="-flex -scroll panel-box-sizing new_li task-padding10" id="game_comment_show" style="padding: 10px 15px;">
|
||||
<div id="comments_content">
|
||||
<% if @shixun.discusses.blank? %>
|
||||
<%= render :partial => "welcome/no_data" %>
|
||||
<% else %>
|
||||
<% @discusses.each do |dis| %>
|
||||
<div class="comments_item_content comment_item_bottom clearfix mt5" onmouseover="$('#discuss_opr_<%= dis.id %>').show();$('#child_discuss_opr_<%= dis.id %>').show();" onmouseout="$('#discuss_opr_<%= dis.id %>').hide();$('#child_discuss_opr_<%= dis.id %>').hide();">
|
||||
<%= link_to image_tag(url_to_avatar(dis.user), :alt => "头像", :width => 35, :height => 35), user_path(dis.user),:class => "fl mt5", :target => '_blank' %>
|
||||
<div class="fl comment_item_one ml10">
|
||||
<p class="clearfix">
|
||||
<%= link_to dis.user.show_name, user_path(dis.user), :class => "fl link-color-grey mr20" ,:style => "display: block" %>
|
||||
<span class="fl color-grey font-12 mt3 mr20"><%= time_from_now dis.created_at %></span>
|
||||
<% if dis.try(:challenge_id).present? %>
|
||||
<span class="fl color-light-green font-12 mt3">[第<%= Challenge.find(dis.try(:challenge_id)).try(:position) %>关]</span>
|
||||
<% no_children_comments = get_no_children_comments_all @discusses %>
|
||||
<div class="panel-comment_item">
|
||||
<% if @discusses.blank? %>
|
||||
<%= render :partial => "welcome/no_data" %>
|
||||
<% else %>
|
||||
<% no_children_comments.each do |comment| %>
|
||||
<% unless comment.nil? %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="comment_item_cont df clearfix" style="padding:10px 10px">
|
||||
<div class="J_Comment_Face fl">
|
||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 50, :height => 50, :alt => "用户头像"), user_url_in_org(comment.creator_user), :target => '_blank' %>
|
||||
</div>
|
||||
<div class="t_content fl">
|
||||
<div class="J_Comment_Reply">
|
||||
<div class="comment_orig_content" style="margin:0px">
|
||||
<% if !comment.parent.nil? %>
|
||||
<% parents_rely = [] %>
|
||||
<% parents_rely = get_reply_parents parents_rely, comment %>
|
||||
<% length = parents_rely.length %>
|
||||
<div id="comment_reply_<%= comment.id %>" class="mb5">
|
||||
<% if length <= 5 %>
|
||||
<%=render :partial => 'shixuns/shixun_reply', :locals => {:comment => comment.parent, :parent_id => comment.id, :user_activity_id => @game_challenge.id, :type => @game_challenge.class.to_s} %>
|
||||
<% else %>
|
||||
<div class="orig_cont clearfix">
|
||||
<div class="orig_cont clearfix">
|
||||
<div class="orig_cont clearfix">
|
||||
<div class="orig_cont clearfix">
|
||||
<div class="orig_cont clearfix">
|
||||
<%=render :partial => 'shixuns/shixun_reply_detail', :locals => {:comment => parents_rely[length - 1], :type => @game_challenge.class.to_s, :user_activity_id => @game_challenge.id, :parent_id => comment.id} %>
|
||||
</div>
|
||||
<div class="orig_cont_hide clearfix">
|
||||
<i class="fa fa-long-arrow-down mr5"></i>
|
||||
<%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment, :type => comment.class, :user_activity_id => @game_challenge.id, :parent_id => comment.id),:remote=>true, :class => '' %>
|
||||
</div>
|
||||
<%=render :partial => 'shixuns/shixun_reply_detail', :locals => {:comment => parents_rely[3], :type => @game_challenge.class.to_s, :user_activity_id => @game_challenge.id, :parent_id => comment.id} %>
|
||||
</div>
|
||||
<%=render :partial => 'shixuns/shixun_reply_detail', :locals => {:comment => parents_rely[2], :type => @game_challenge.class.to_s, :user_activity_id => @game_challenge.id, :parent_id => comment.id} %>
|
||||
</div>
|
||||
<%=render :partial => 'shixuns/shixun_reply_detail', :locals => {:comment => parents_rely[1], :type => @game_challenge.class.to_s, :user_activity_id => @game_challenge.id, :parent_id => comment.id} %>
|
||||
</div>
|
||||
<%=render :partial => 'shixuns/shixun_reply_detail', :locals => {:comment => parents_rely[0], :type => @game_challenge.class.to_s, :user_activity_id => @game_challenge.id, :parent_id => comment.id} %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<span class="fr color-grey font-12 color_Purple_grey" id="dis_praise_<%= dis.id %>">
|
||||
<%= render :partial => "discusses/dis_praise", :locals => {:discuss => dis} %>
|
||||
</span>
|
||||
<span class="fr none mt5 mr10" id="discuss_opr_<%= dis.id %>">
|
||||
<% if User.current.manager_of_shixun?(@shixun) && dis.children.count == 0 %>
|
||||
<a href="javascript:void(0);" onclick="reply_to_dis('<%= dis.id %>', '<%= dis.user.show_name %>')" class="fr ml10 font-12 link-color-green" id = "reversion">回复</a>
|
||||
<% end %>
|
||||
<% if (User.current.manager_of_shixun?(@shixun) || User.current == dis.user) && dis.children.count == 0 %>
|
||||
<a href="javascript:void(0);" onclick="delete_confirm_box_2('<%= discuss_path(dis, :challenge_id => @game_challenge) %>', '确定要删除该条回复吗?')" class="fr font-12 link-color-green">删除</a>
|
||||
<% end %>
|
||||
</span>
|
||||
<!--onmouseover="$('#delete_reply_<%#=activity.id %>_<%#=comment.id %>').show();" onmouseout="$('#delete_reply_<%#=activity.id %>_<%#=comment.id %>').hide();"-->
|
||||
<div class="comment_content clearfix" >
|
||||
<div class="color-grey3"><%= comment.content.html_safe %></div>
|
||||
|
||||
</p>
|
||||
<p class="mb10"><%= dis.content %></p>
|
||||
|
||||
<div class="cl"></div>
|
||||
<% dis.children.each do |child| %>
|
||||
<div class="comments_return comment_item_top">
|
||||
<p class="clearfix comment_item_left_green return_item pl5">
|
||||
<span class="fl color-grey mr20">老师回复</span>
|
||||
<span class="fl color-grey font-12"><%= time_from_now child.created_at %></span>
|
||||
<span class="fr color-grey font-12 color_Purple_grey" id="dis_praise_<%= child.id %>">
|
||||
<%= render :partial => "discusses/dis_praise", :locals => {:discuss => child} %>
|
||||
</span>
|
||||
<span class="fr pl8 none mr10 mt5" id="child_discuss_opr_<%= dis.id %>">
|
||||
<% if User.current.manager_of_shixun?(@shixun) || (User.current == dis.user && dis.children.count == 0) %>
|
||||
<a href="javascript:void(0);" onclick="delete_confirm_box_2('<%= discuss_path(dis) %>', '确定要删除该条回复吗?')" class="fr font-12 link-color-green">删除</a>
|
||||
<% end %>
|
||||
</span>
|
||||
<div class="J_Comment_Info clearfix">
|
||||
<div class="t_info fl">
|
||||
<%= link_to comment.creator_user.show_real_name, user_url_in_org(comment.creator_user), :class => "content-username hide fl" %>
|
||||
<span class="t_area fl"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
|
||||
</div>
|
||||
<p class="fr mr10 orig_reply">
|
||||
<% if comment.creator_user == User.current || User.current.admin? || User.current.manager_of_shixun?(comment.dis_id) %>
|
||||
<a href="javascript:void(0);" class="color-grey" id="delete_reply_<%=@game_challenge.id %>_<%=comment.id %>" onclick="delete_confirm_box_2('<%= discuss_path(comment, :challenge_id => @game_challenge) %>', '确定要删除该条回复吗?')"><i class="fa fa-trash-o mr5"></i>删除</a>
|
||||
<% end %>
|
||||
<span class="ml5 mr5 color-grey">|</span>
|
||||
<%= link_to(
|
||||
'<i class="fa fa-mail-reply mr5"></i>回复'.html_safe,
|
||||
{:controller => 'users' ,:action => 'reply_to',:reply_id => comment.id, :type => @game_challenge.class.to_s, :user_activity_id => @game_challenge.id},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply),:class => "color-grey"
|
||||
) %>
|
||||
<span class="ml5 mr5 color-grey">|</span>
|
||||
<span class="reply_praise_count_<%= comment.id %>">
|
||||
<%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
</p>
|
||||
<p class="pl8 mb10"><%= child.content %></p>
|
||||
<!--<p class="fl pl8">
|
||||
<span class="fl color-grey"><%#= time_from_now child.created_at %></span>
|
||||
</p>
|
||||
<p class="fr pl8 none" id="child_discuss_opr_<%#= dis.id %>">
|
||||
<%# if User.current.manager_of_shixun?(@shixun) || (User.current == dis.user && dis.children.count == 0) %>
|
||||
<a href="javascript:void(0);" onclick="delete_confirm_box_2('<%#= discuss_path(dis) %>', '确定要删除该条回复吗?')" class="fr font-12 link-color-green">删除</a>
|
||||
<%# end %>
|
||||
</p>-->
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="">
|
||||
<div class="cl"></div>
|
||||
<div id="reply_message_<%= comment.id%>" class="reply_to_message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!--回复end-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div style="text-align:center;" class="new_expand">
|
||||
<div class="pages_user_show" style="width:auto; display:inline-block;margin: 18px 0;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @discusses_pages, @discusses_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<!--评论区域的分页-->
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function ThumbUp(item){
|
||||
$(item).toggleClass("orange-btn");
|
||||
$(item).toggleClass("orange-bg-btn");
|
||||
if($(item).attr("attr-thumb")=="0"){
|
||||
$(item).find("span").html(parseInt($(item).find("span").html())+1);
|
||||
$(item).attr("attr-thumb","1");
|
||||
}else{
|
||||
$(item).find("span").html(parseInt($(item).find("span").html())-1);
|
||||
$(item).attr("attr-thumb","0");
|
||||
}
|
||||
}
|
||||
|
||||
//二次回复的提示结构
|
||||
var $points = $("<div class = \"points-data-tip-top\">"+
|
||||
"<div class = \"data-tip-top1 \">请在此输入回复</div>"+
|
||||
"<div class = \"data-tip-top\">请在此输入回复</div>"+
|
||||
"</div>").appendTo("#bottom_points");
|
||||
$("#reversion").click(function(){
|
||||
$points.show();
|
||||
});
|
||||
$("#comment_news").bind("input propertychange",function(){
|
||||
if($("#comment_news").val() != ''){
|
||||
$points.hide();
|
||||
}
|
||||
$("#comment_news").blur(function(){
|
||||
$points.hide();
|
||||
});
|
||||
function shixun_editor_focus(id, dis_id){
|
||||
window.scrollTo(0,document.body.scrollHeight);
|
||||
$("textarea[nhname='new_message_textarea_"+id+"']").focus();
|
||||
$("#dis_reply_id").val(dis_id);
|
||||
}
|
||||
</script>
|
||||
|
|
@ -17,10 +17,10 @@
|
|||
// 选择题
|
||||
<% if params[:choose] == "true" %>
|
||||
<% if @had_done == 0 %>
|
||||
$("#code_estimate").html("<a href='<%= next_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-blue mr15 mt8' id='next_step' data-remote='true'>下一关</a>");
|
||||
$("#code_estimate").html("<a href='<%= next_step_myshixun_game_path(@game, :myshixun_id => @myshixun) %>' class='task-btn task-btn-orange mr15 mt8' id='next_step' data-remote='true'>下一关</a>");
|
||||
var htmlvalue = "<%= j (render :partial => 'games/pass_game_show', :locals => { :game=> @game, :myshixun => @myshixun, :had_done => 0}) %>";
|
||||
<% else %>
|
||||
$("#code_estimate").html("<a href='<%= shixun_path(@myshixun.shixun) %>' class='task-btn task-btn-blue mt8 mr15' >退出实训</a>");
|
||||
$("#code_estimate").html("<a href='<%= shixun_path(@myshixun.shixun) %>' class='task-btn task-btn-orange mt8 mr15' >退出实训</a>");
|
||||
var htmlvalue = "<%= j (render :partial => 'games/pass_game_show', :locals => { :game => @game, :myshixun => @myshixun, :had_done => 1}) %>";
|
||||
<% end %>
|
||||
// 传递具体屏幕的宽高,实现不同浏览器与不同分辨率都能撑满屏幕
|
||||
|
|
|
|||
|
|
@ -21,9 +21,10 @@
|
|||
<%= link_to '实训', homework_bank_index_path(:type => @type, :property => 4), :class => 'edu-filter-cir-grey mr5 font-12 fl', :id => 'homework_bank_pro_4', :remote => true %>
|
||||
<%#= link_to '试卷', homework_bank_path(:type => @type, :property => 5), :class => 'edu-filter-cir-grey mr5', :remote => true %>
|
||||
</p>
|
||||
<a href="javascript:void(0)" onclick="alert_choose_homework_bank_type()" class="task-btn task-btn-blue fr mr15 mt5">新建</a>
|
||||
<a href="javascript:void(0)" onclick="alert_choose_homework_bank_type()" class="task-btn task-btn-orange fr mr15 mt5">新建</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<div style="min-height: 380px;">
|
||||
<% if @hw_count != 0 %>
|
||||
<%= form_tag(choose_user_course_homework_bank_index_path(), :id => 'hb_search_course_h_form', :remote => true, :method => 'post') do %>
|
||||
|
|
@ -73,6 +74,12 @@
|
|||
<%= render :partial => 'welcome/no_data' %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if false %>
|
||||
<div class="identity_con" style="text-align: center;padding:180px 0px;">
|
||||
<p class="font-16 mb30">已经过职业认证的教师才能访问公共题库</p>
|
||||
<p><a href="javascript:void(0)" class="white-btn orange-btn">立即认证</a></p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<ul class="sy_classlist clearfix" style="border: none;height:64px;">
|
||||
<input class="magic-checkbox" type="checkbox" name="layout" id="homework_bank_all_select" class="fl">
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
%>
|
||||
</li>
|
||||
<li class="clearfix mt10">
|
||||
<a href="javascript:void(0);" onclick="submit_new_common_homework(1);" class="task-btn task-btn-blue fr">保存</a>
|
||||
<a href="javascript:void(0);" onclick="submit_new_common_homework(1);" class="task-btn task-btn-orange fr">保存</a>
|
||||
<% if edit_mode %>
|
||||
<%= link_to '取消', homework_bank_path(@homework), :class => 'task-btn fr mr10' %>
|
||||
<% else %>
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@
|
|||
%>
|
||||
</li>
|
||||
<li class="clearfix mt10">
|
||||
<a href="javascript:void(0);" onclick="submit_new_common_homework(3, true);" class="task-btn task-btn-blue fr">保存</a>
|
||||
<a href="javascript:void(0);" onclick="submit_new_common_homework(3, true);" class="task-btn task-btn-orange fr">保存</a>
|
||||
<% if edit_mode %>
|
||||
<%= link_to '取消', homework_bank_path(@homework), :class => 'task-btn fr mr10' %>
|
||||
<% else %>
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@
|
|||
%>
|
||||
</li>
|
||||
<li class="clearfix mt10">
|
||||
<a href="javascript:void(0);" onclick="submit_new_common_homework(2);" class="task-btn task-btn-blue fr">保存</a>
|
||||
<a href="javascript:void(0);" onclick="submit_new_common_homework(2);" class="task-btn task-btn-orange fr">保存</a>
|
||||
<% if edit_mode %>
|
||||
<%= link_to '取消', homework_bank_path(@homework), :class => 'task-btn fr mr10' %>
|
||||
<% else %>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
</div>
|
||||
<div class="clearfix">
|
||||
<div class="clearfix fr mt15">
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" onclick="new_shixun_homework_bank();">选择</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fr" onclick="new_shixun_homework_bank();">选择</a>
|
||||
<a href="javascript:void(0);" class="task-btn fr pop_close mr10" onclick="hideModal();">取消</a>
|
||||
</div>
|
||||
<div class="fl pages_right_min mt10">
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<% end %>
|
||||
<div>
|
||||
<span class="color-red undis fl" id="search_course_notice_h"></span>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" onclick="submit_send_hb_to_course();">确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fr" onclick="submit_send_hb_to_course();">确定</a>
|
||||
<a href="javascript:void(0);" class="pop_close task-btn fr mr10">取消</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@
|
|||
<span class="edu-filter-btn <%= homework_status_color allow_late %> ml10 fl mt3"><%= allow_late %></span>
|
||||
<% end %>
|
||||
|
||||
<% if false %>
|
||||
<span class="btn-top btn-cir-orange ml10 fl mt5">未提交</span>
|
||||
<% if !@is_teacher && User.current.member_of_course?(@course) && homework_common.student_works.where("user_id = #{User.current.id} and work_status > 0").blank? %>
|
||||
<span class="btn-top btn-cir-orange ml10 fl mt5">未提交</span>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
<!--<%#= render :partial => 'homework_common/reference_answers_attachments', :locals => {:container => @ref_answer} %>-->
|
||||
<!--</li>-->
|
||||
<li class="clearfix mt10 pl30 pr30">
|
||||
<a href="javascript:void(0);" onclick="submit_new_common_homework(1);" class="task-btn task-btn-blue fr">保存</a>
|
||||
<a href="javascript:void(0);" onclick="submit_new_common_homework(1);" class="task-btn task-btn-orange fr">保存</a>
|
||||
<% if edit_mode %>
|
||||
<%= link_to '取消', student_work_index_path(:homework => @homework.id), :class => 'task-btn fr mr10' %>
|
||||
<% else %>
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
<!--</a>-->
|
||||
<!--</li>-->
|
||||
<li class="clearfix mt10">
|
||||
<a href="javascript:void(0);" onclick="submit_new_common_homework(3, true);" class="task-btn task-btn-blue fr">保存</a>
|
||||
<a href="javascript:void(0);" onclick="submit_new_common_homework(3, true);" class="task-btn task-btn-orange fr">保存</a>
|
||||
<% if edit_mode %>
|
||||
<%= link_to '取消', student_work_index_path(:homework => @homework.id), :class => 'task-btn fr mr10' %>
|
||||
<% else %>
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@
|
|||
<!--</a>-->
|
||||
<!--</li>-->
|
||||
<li class="clearfix mt10">
|
||||
<a href="javascript:void(0);" onclick="submit_new_common_homework(2);" class="task-btn task-btn-blue fr">保存</a>
|
||||
<a href="javascript:void(0);" onclick="submit_new_common_homework(2);" class="task-btn task-btn-orange fr">保存</a>
|
||||
<% if edit_mode %>
|
||||
<%= link_to '取消', student_work_index_path(:homework => @homework.id), :class => 'task-btn fr mr10' %>
|
||||
<% else %>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
</div>
|
||||
<div class="clearfix">
|
||||
<div class="clearfix fr mt15">
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" onclick="new_shixun_homework();">选择</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fr" onclick="new_shixun_homework();">选择</a>
|
||||
<a href="javascript:void(0);" class="task-btn fr pop_close mr10" onclick="hideModal();">取消</a>
|
||||
</div>
|
||||
<div class="fl pages_right_min mt10">
|
||||
|
|
|
|||
|
|
@ -1,58 +1,58 @@
|
|||
<div>
|
||||
<span id="ref_attachments_fields_ref_file" class="attachments_fields">
|
||||
<% if defined?(container) && container && container.saved_attachments %>
|
||||
<% container.attachments.each_with_index do |attachment, i| %>
|
||||
<span id="attachments_p<%= i %>">
|
||||
<%= text_field_tag("ref_attachments[p#{i}][filename]", attachment.filename, :class => 'filename link_file', :readonly=>'readonly')%>
|
||||
<%= text_field_tag("ref_attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
|
||||
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
|
||||
<%= check_box_tag("ref_attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
|
||||
<%= link_to('<i class="fa fa-trash-o mr5"></i>'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
|
||||
<%= hidden_field_tag "ref_attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<% container.saved_attachments.each_with_index do |attachment, i| %>
|
||||
<span id="attachments_p<%= i %>">
|
||||
<%= text_field_tag("ref_attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
|
||||
<%= text_field_tag("ref_attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
|
||||
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
|
||||
<%= check_box_tag("ref_attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
|
||||
<%= link_to('<i class="fa fa-trash-o mr5"></i>'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
|
||||
<%= hidden_field_tag "ref_attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<%= file_field_tag 'ref_attachments[dummy][file]',
|
||||
:id => 'ref_file',
|
||||
:class => ie8? ? '' : 'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => 'addInputFiles(this);',
|
||||
:style => ie8? ? '' : 'display:none',
|
||||
:data => {
|
||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js',:project =>nil),
|
||||
:description_placeholder => l(:label_optional_description),
|
||||
:field_is_public => l(:field_is_public),
|
||||
:are_you_sure => l(:text_are_you_sure),
|
||||
:file_count => l(:label_file_count),
|
||||
:lebel_file_uploding => l(:lebel_file_uploding),
|
||||
:delete_all_files => l(:text_are_you_sure_all)
|
||||
} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="mt5 fl">
|
||||
<a href="javascript:void(0);" class="fl" onclick="$('#ref_file').click();" title="请选择文件上传">
|
||||
<i class="fa fa-upload mr5"></i>
|
||||
<span>上传附件</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'attachments' %>
|
||||
<div>
|
||||
<span id="ref_attachments_fields_ref_file" class="attachments_fields">
|
||||
<% if defined?(container) && container && container.saved_attachments %>
|
||||
<% container.attachments.each_with_index do |attachment, i| %>
|
||||
<span id="attachments_p<%= i %>">
|
||||
<%= text_field_tag("ref_attachments[p#{i}][filename]", attachment.filename, :class => 'filename link_file', :readonly=>'readonly')%>
|
||||
<%= text_field_tag("ref_attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
|
||||
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
|
||||
<%= check_box_tag("ref_attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
|
||||
<%= link_to('<i class="fa fa-trash-o mr5"></i>'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
|
||||
<%= hidden_field_tag "ref_attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<% container.saved_attachments.each_with_index do |attachment, i| %>
|
||||
<span id="attachments_p<%= i %>">
|
||||
<%= text_field_tag("ref_attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
|
||||
<%= text_field_tag("ref_attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
|
||||
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
|
||||
<%= check_box_tag("ref_attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
|
||||
<%= link_to('<i class="fa fa-trash-o mr5"></i>'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
|
||||
<%= hidden_field_tag "ref_attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<%= file_field_tag 'ref_attachments[dummy][file]',
|
||||
:id => 'ref_file',
|
||||
:class => ie8? ? '' : 'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => 'addInputFiles(this);',
|
||||
:style => ie8? ? '' : 'display:none',
|
||||
:data => {
|
||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js',:project =>nil),
|
||||
:description_placeholder => l(:label_optional_description),
|
||||
:field_is_public => l(:field_is_public),
|
||||
:are_you_sure => l(:text_are_you_sure),
|
||||
:file_count => l(:label_file_count),
|
||||
:lebel_file_uploding => l(:lebel_file_uploding),
|
||||
:delete_all_files => l(:text_are_you_sure_all)
|
||||
} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="mt5 fl">
|
||||
<a href="javascript:void(0);" class="fl" onclick="$('#ref_file').click();" data-tip-down="请选择文件上传">
|
||||
<i class="fa fa-upload mr5"></i>
|
||||
<span>上传附件</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'attachments' %>
|
||||
<% end %>
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="clearfix mt15 mb15 mr15 pl30 pr30 <%= edit_mode ? '' : 'none' %>" id="homework_setting_submit_block">
|
||||
<a href="javascript:void(0);" id="homework_setting_form_submit" class="task-btn task-btn-blue fr">确定</a>
|
||||
<a href="javascript:void(0);" id="homework_setting_form_submit" class="task-btn task-btn-orange fr">确定</a>
|
||||
<a href="javascript:void(0);" onclick="s_op_confirm_box('<%= student_work_index_path(:homework => @homework.id) %>', '修改的内容将全部丢失<br/>是否确认取消保存')" class="task-btn fr mr10">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -34,13 +34,16 @@
|
|||
<% when 5 %>
|
||||
竞赛
|
||||
<% when 6 %>
|
||||
<%= @sub_type == 1 ? "单位列表" :"单位部门列表" %>
|
||||
<% if @sub_type == 1%>
|
||||
<%= link_to '单位列表',departments_part_managements_path() %>
|
||||
<% if @next_type ==1 %>
|
||||
> <%= @school.name %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
单位部门列表
|
||||
<% end %>
|
||||
<% when 7 %>
|
||||
<%= @sub_type == 1 ? "用户列表" :(@sub_type == 2? "试用授权列表" : "自动授权列表") %>
|
||||
<!--<%# case @next_type %>-->
|
||||
<!--<%# when 1 %>-->
|
||||
<!--<%#= 111 %>-->
|
||||
<!--<%# end %>-->
|
||||
<% when 8 %>
|
||||
<%= @sub_type == 1 ? "作业回复":(@sub_type == 2? "实训反馈" : "课堂讨论区") %>
|
||||
<% when 9 %>
|
||||
|
|
|
|||
|
|
@ -39,8 +39,11 @@
|
|||
</li>
|
||||
<% end %>
|
||||
<li><a href="<%= collaborators_shixun_path(@shixun) %>" class="<%= params[:action] == "collaborators" ? "active" : "" %>">合作者</a></li>
|
||||
<% if @shixun.discusses.present? %>
|
||||
<li><a href="<%= shixun_discuss_shixun_path(@shixun) %>" class="<%= params[:action] == "shixun_discuss" ? "active" : "" %>">评论</a></li>
|
||||
<% end %>
|
||||
<% if @shixun.shixun_status == "已发布" %>
|
||||
<li><a href="<%= statistics_students_shixun_path(@shixun) %>"class="<%= params[:action] == "statistics_students" ? "active" : "" %>">学员统计</a></li>
|
||||
<li><a href="<%= statistics_students_shixun_path(@shixun) %>" class="<%= params[:action] == "statistics_students" ? "active" : "" %>">学员统计</a></li>
|
||||
<% end %>
|
||||
<% if User.current.manager_of_shixun?(@shixun) %>
|
||||
<li><a href="<%= settings_shixun_path(@shixun) %>" class="<%= params[:action] == "settings" ? "active" : "" %>">配置</a></li>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<span id="choose_courses_notice" class="c_red"></span>
|
||||
<div class="task-popup-submit clearfix ml25">
|
||||
<a href="javascript:void(0);" onclick="hideModal();" class="task-btn fl pop_close mr10">取消</a>
|
||||
<a href="javascript:void(0);" onfocus='this.blur();' onclick="school_submit();" class="task-btn task-btn-blue fr" >确定</a>
|
||||
<a href="javascript:void(0);" onfocus='this.blur();' onclick="school_submit();" class="task-btn task-btn-orange fr" >确定</a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
@ -41,10 +41,11 @@
|
|||
d_lastSearchCondition = $(e.target).val().trim();
|
||||
page = 1; //有新的搜索,页面重置为1
|
||||
$.ajax({
|
||||
url: '<%= url_for(:controller => 'school',:action => 'on_search') %>' + '?name=' + e.target.value + '&school_id=' + $("input[name='occupation']").val() + '&page=' + d_page,
|
||||
url: '<%= url_for(:controller => 'school',:action => 'on_search') %>' + '?name=' + e.target.value + '&school_id=' + $("input[name='occupation']").val() + '&page=' + d_page+"&no_school_ids=<%= @auto_school_ids %>",
|
||||
type: 'post',
|
||||
success: function (data) {
|
||||
d_schoolsResult = data.schools;
|
||||
console.log(d_schoolsResult)
|
||||
count = data.count;
|
||||
maxPage = Math.ceil(count / 100); //最大页码值
|
||||
if (d_schoolsResult.length != undefined && d_schoolsResult.length != 0) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<span id="choose_courses_notice" class="c_red ml35"></span>
|
||||
<div class="task-popup-submit clearfix ml25">
|
||||
<a href="javascript:void(0);" onclick="hideModal();" class="task-btn fl pop_close mr10">取消</a>
|
||||
<a href="javascript:void(0);" onfocus='this.blur();' onclick="department_submit();" class="task-btn task-btn-blue fr" >确定</a>
|
||||
<a href="javascript:void(0);" onfocus='this.blur();' onclick="department_submit();" class="task-btn task-btn-orange fr" >确定</a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<span id="choose_courses_notice" class="c_red"></span>
|
||||
<div class="task-popup-submit clearfix ml25">
|
||||
<a href="javascript:void(0);" onclick="hideModal();" class="task-btn fl pop_close mr10">取消</a>
|
||||
<a href="javascript:void(0);" onfocus='this.blur();' onclick="school_submit();" class="task-btn task-btn-blue fr" >确定</a>
|
||||
<a href="javascript:void(0);" onfocus='this.blur();' onclick="school_submit();" class="task-btn task-btn-orange fr" >确定</a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@
|
|||
'<div class="cl"></div>' +
|
||||
'<div class="task-popup-submit clearfix ml25">' +
|
||||
'<a href="javascript:void(0);" class="task-btn fl pop_close mr10">取消</a>' +
|
||||
'<a href="javascript:void(0);" onclick="submit_new_major('+ courselist_id +');" class="task-btn task-btn-blue fr" >确定</a>' +
|
||||
'<a href="javascript:void(0);" onclick="submit_new_major('+ courselist_id +');" class="task-btn task-btn-orange fr" >确定</a>' +
|
||||
'</div>' +
|
||||
'</div>'+
|
||||
'</div>';
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
<input type="text" class="task-form-90 task-height-40 panel-box-sizing fl edu-form-noborder" placeholder="我得说点儿什么,最多200个字符">
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" onclick="submit_reject_reason('<%= apply_user.id %>', this);" >确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fr" onclick="submit_reject_reason('<%= apply_user.id %>', this);" >确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn fr mr10" onclick="hide_reject_reason(this);" >取消</a>
|
||||
</li>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<span id="choose_courses_notice" class="c_red"></span>
|
||||
<div class="task-popup-submit clearfix ml25">
|
||||
<a href="javascript:void(0);" onclick="hideModal();" class="task-btn fl pop_close mr10">取消</a>
|
||||
<a href="javascript:void(0);" onfocus='this.blur();' onclick="school_submit();" class="task-btn task-btn-blue fr" >确定</a>
|
||||
<a href="javascript:void(0);" onfocus='this.blur();' onclick="school_submit();" class="task-btn task-btn-orange fr" >确定</a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,21 +11,21 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @department.each_with_index do |department,index| %>
|
||||
<% @department.each_with_index do |department,index| %>
|
||||
<tr id="apply_add_department_<%= department.id %>">
|
||||
<td><%= index + 1 %></td>
|
||||
<td class="edu-txt-left"><%= department.name %></td>
|
||||
<td class="edu-txt-left"><%= School.where(:id => department.school_id).first %></td>
|
||||
<td><%= UserExtensions.where(:department_id => department.department_id, :school_id => department.school_id ).count %></td>
|
||||
<td><%= ApplyUserAuthentication.where(:auth_type => 2, :status => 1, :user_id => UserExtensions.where(:department_id => department.department_id,:school_id => department.school_id).map(&:user_id)).count%></td>
|
||||
<td><%= UserExtensions.where(:department_id => department.id, :school_id => department.school_id ).count %></td>
|
||||
<td><%= ApplyUserAuthentication.where(:auth_type => 2, :status => 1, :user_id => UserExtensions.where(:department_id => department.id,:school_id => department.school_id).map(&:user_id)).count%></td>
|
||||
<td><%= format_time department.created_at %></td>
|
||||
<td>
|
||||
<% if UserExtensions.where(:department_id => department.department_id,:school_id => department.school_id ).count == 0 %>
|
||||
<a href="javascript:void(0);" onclick="delete_confirm_box_2('<%= department_path(department.department_id) %>', '确定要删除该部门吗?')">删除 </a>
|
||||
<% if UserExtensions.where(:department_id => department.id,:school_id => department.school_id ).count == 0 %>
|
||||
<a href="javascript:void(0);" onclick="delete_confirm_box_2('<%= department_path(department.id) %>', '确定要删除该部门吗?')">删除 </a>
|
||||
<% else %>
|
||||
--
|
||||
<% end %>
|
||||
<%= link_to '更改', update_department_managements_path(:school_id=> department.school_id,:department_id => department.department_id), :remote => true, :class => "application-default-link" %>
|
||||
<%= link_to '更改', update_department_managements_path(:school_id=> department.school_id,:department_id => department.id), :remote => true, :class => "application-default-link" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -3,13 +3,14 @@
|
|||
<tr>
|
||||
<th width="9%">ID</th>
|
||||
<th width="6%">LOGO</th>
|
||||
<th width="15%" class="edu-txt-left">单位名称</th>
|
||||
<th width="6%">地区</th>
|
||||
<th width="14%" class="edu-txt-left">单位名称</th>
|
||||
<th width="5%">地区</th>
|
||||
<th width="15%" class="edu-txt-left">详细地址</th>
|
||||
<th style="width: 5%;" >用户数</th>
|
||||
<th width="5%">部门数</th>
|
||||
<th width="13%" class="eud-pointer">创建于<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
|
||||
<th width="13%" class="eud-pointer">修改时间<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
|
||||
<th width="12%" class="eud-pointer">创建于<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
|
||||
<th width="12%" class="eud-pointer">修改时间<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
|
||||
<th width="8%">学校标识码</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -31,7 +32,8 @@
|
|||
<td><%= schools.departments.count %></td>
|
||||
<td><%= format_time schools.created_at %></td>
|
||||
<td><%= format_time schools.updated_at %></td>
|
||||
<td>
|
||||
<td><%= schools.shool_code %></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" onclick="delete_confirm_box('<%= delete_school_managements_path(:school => schools.id) %>', '确定要删除该部门吗?')">删除 </a>
|
||||
|
||||
<%#= link_to("修改", upload_logo_school_path(schools.id,:schools_name => @schools_name), :class => 'icon icon-copy') %>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
</form>
|
||||
</div>
|
||||
<div class="clearfix mb20 mr15">
|
||||
<a href="javascript:void(0);" id="update_mirror_form_submit" class="task-btn task-btn-blue fr">确定</a>
|
||||
<a href="javascript:void(0);" id="update_mirror_form_submit" class="task-btn task-btn-orange fr">确定</a>
|
||||
<a href="javascript:void(0);" onclick="hideModal();" class="task-btn fr mr10">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@
|
|||
|
||||
<input type="hidden" value="<%= @school_name%>" name="school_name" class="w150">
|
||||
<%= image_tag(@school.logo_link, id: "avatar_image", :class=>"school_avatar ml25")%>
|
||||
<a type="button" onclick="$('#file').click();" style="margin: 86px 0 0 0px;float: left;padding: 2px 5px;border: 1px solid #eaeaea;cursor: pointer;text-decoration: none;width: 70px;" class="task-btn task-btn-blue ">上传图片</a>
|
||||
<a type="button" onclick="$('#file').click();" style="margin: 86px 0 0 0px;float: left;padding: 2px 5px;border: 1px solid #eaeaea;cursor: pointer;text-decoration: none;width: 70px;" class="task-btn task-btn-orange ">上传图片</a>
|
||||
<%= file_field_tag 'logo',:style => "display:none;", :id => "file", :onchange => "showPreview(this)"%>
|
||||
<a type="button"style="margin: 86px 0 0 0px;float: left;padding: 2px 5px;border: 1px solid #eaeaea;cursor: pointer;text-decoration: none;width: 70px;" class="task-btn task-btn-blue ">删除图片</a>
|
||||
<a type="button"style="margin: 86px 0 0 0px;float: left;padding: 2px 5px;border: 1px solid #eaeaea;cursor: pointer;text-decoration: none;width: 70px;" class="task-btn task-btn-orange ">删除图片</a>
|
||||
|
||||
|
||||
<div class="task-popup" style="width: 575px;">
|
||||
|
|
@ -94,7 +94,7 @@
|
|||
</li>
|
||||
<li class="clearfix" style="margin-right:57px;">
|
||||
<a href="javascript:void(0);" onclick="hideModal();" id="cancel_school" class="task-btn fr mr10">取消</a>
|
||||
<a href="javascript:void(0);" id="apply_school" class="task-btn task-btn-blue fr">确定</a>
|
||||
<a href="javascript:void(0);" id="apply_school" class="task-btn task-btn-orange fr">确定</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@
|
|||
</div>
|
||||
<div class="task-popup-submit clearfix ml25">
|
||||
<a href="javascript:void(0);" onclick="hideModal();" class="task-btn fl pop_close mr10">取消</a>
|
||||
<a href="javascript:void(0);" onfocus='this.blur();' onclick="new_major_submit();" class="task-btn task-btn-blue fr" >确定</a>
|
||||
<a href="javascript:void(0);" onfocus='this.blur();' onclick="new_major_submit();" class="task-btn task-btn-orange fr" >确定</a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
<input type="text" class="task-form-90 task-height-40 panel-box-sizing fl edu-form-noborder" placeholder="我得说点儿什么,最多200个字符">
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" onclick="submit_reject_reason('<%= apply_user.id %>', this);" >确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fr" onclick="submit_reject_reason('<%= apply_user.id %>', this);" >确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn fr mr10" onclick="hide_reject_reason(this);" >取消</a>
|
||||
</li>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<input type="text" class="task-form-90 task-height-40 panel-box-sizing fl edu-form-noborder" placeholder="我得说点儿什么,最多200个字符">
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" onclick="shixun_submit_reject_reason('<%= authorization.id %>', this);" >确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fr" onclick="shixun_submit_reject_reason('<%= authorization.id %>', this);" >确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn fr mr10" onclick="shixun_hide_reject_reason(this);" >取消</a>
|
||||
</li>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<input type="text" class="task-form-90 task-height-40 panel-box-sizing fl edu-form-noborder" placeholder="我得说点儿什么,最多200个字符">
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" onclick="subject_submit_reject_reason('<%= authorization.id %>', this);" >确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fr" onclick="subject_submit_reject_reason('<%= authorization.id %>', this);" >确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn fr mr10" onclick="subject_hide_reject_reason(this);" >取消</a>
|
||||
</li>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
<input type="text" class="task-form-90 task-height-40 panel-box-sizing fl edu-form-noborder" placeholder="我得说点儿什么,最多200个字符">
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" onclick="submit_reject_reason('<%= authorization.id %>', this);" >确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange fr" onclick="submit_reject_reason('<%= authorization.id %>', this);" >确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn fr mr10" onclick="hide_reject_reason(this);" >取消</a>
|
||||
</li>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<span id="choose_courses_notice" class="color-red ml40"></span>
|
||||
<div class="task-popup-submit clearfix ml25">
|
||||
<a href="javascript:void(0);" onclick="hideModal();" class="task-btn fl pop_close mr10">取消</a>
|
||||
<a href="javascript:void(0);" onfocus='this.blur();' onclick="school_submit();" class="task-btn task-btn-blue fr" >确定</a>
|
||||
<a href="javascript:void(0);" onfocus='this.blur();' onclick="school_submit();" class="task-btn task-btn-orange fr" >确定</a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@
|
|||
</li>
|
||||
<li class="clearfix" style="margin-left:50%;">
|
||||
<a href="javascript:void(0);" class="task-btn mr10">取消</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue" onclick="submit_department()">确定</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-orange" onclick="submit_department()">确定</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<%= form_tag(url_for(applicable_course_managements_path),:id=>"classroom",:method => "post",:remote=>true) do %>
|
||||
<div class="edu-con-top clearfix xmt10">
|
||||
<input class="fl task-form-20 task-height-30 ml35 " name="search" maxlength="" placeholder="输入关键字进行搜索" type="text" style="height: 21px;" id="Look_name">
|
||||
<a href="javascript:void(0);" class="fl task-btn task-btn-blue ml5 " onclick="$('#classroom').submit();">搜索</a>
|
||||
<a href="javascript:void(0);" class="fl task-btn task-btn-orange ml5 " onclick="$('#classroom').submit();">搜索</a>
|
||||
<a href="javascript:clearSearchCondition()" class="fl task-btn ml5 " id="clear_contents">清除</a>
|
||||
<a href="javascript:void(0)" class="task-btn task-btn-green fr mr30" onclick="alert_new_major_type('<%= %>')">新增课程</a>
|
||||
</div>
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
'<div class="cl"></div>' +
|
||||
'<div class="task-popup-submit clearfix ml25">' +
|
||||
'<a href="javascript:void(0);" class="task-btn fl pop_close mr10">取消</a>' +
|
||||
'<a href="javascript:void(0);" onclick="submit_new_course();" class="task-btn task-btn-blue fr" >确定</a>' +
|
||||
'<a href="javascript:void(0);" onclick="submit_new_course();" class="task-btn task-btn-orange fr" >确定</a>' +
|
||||
'</div>' +
|
||||
'</div>'+
|
||||
'<% end %>';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="edu-class-top mt15 clearfix ">
|
||||
<div class="fl with30">
|
||||
<input type="text" name="research_contents" class="fl task-form-60 task-height-40 panel-box-sizing" placeholder="输入关键字进行搜索">
|
||||
<a href="javascript:void(0);" class="fl task-btn task-btn-blue ml5 mt5" onclick="$('#management_search_user').submit();">搜索</a>
|
||||
<a href="javascript:void(0);" class="fl task-btn task-btn-orange ml5 mt5" onclick="$('#management_search_user').submit();">搜索</a>
|
||||
<a href="javascript:void(0);" class="fl task-btn ml5 mt5" id="clear_contents">清除</a>
|
||||
</div>
|
||||
<a href="javascript:void(0)" class="task-btn task-btn-green fr mt6 mr30" onclick="add_auto_users_trial()">新增</a>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<option value="cla_name">实训套件名称搜索</option>
|
||||
</select>
|
||||
<input class="fl task-form-20 task-height-30" name="search" maxlength="" placeholder="输入关键字进行搜索" type="text" style="height: 21px;" id="cla_sx_Look_name">
|
||||
<a href="javascript:void(0);" class="fl task-btn task-btn-blue ml5" onclick="$('#class_publish_shixuns_search').submit();">搜索</a>
|
||||
<a href="javascript:void(0);" class="fl task-btn task-btn-orange ml5" onclick="$('#class_publish_shixuns_search').submit();">搜索</a>
|
||||
<a href="javascript:clearSearchCondition();" class="fl task-btn ml5 mt2 ">清除</a>
|
||||
<input name="sx_order" type="hidden">
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<option value="cla_name">实训套件名称搜索</option>
|
||||
</select>
|
||||
<input class="fl task-form-20 task-height-30" name="search" maxlength="" placeholder="输入关键字进行搜索" type="text" style="height: 21px;" id="cla_sx_Look_name" >
|
||||
<a href="javascript:void(0);" class="fl task-btn task-btn-blue ml5" onclick="$('#class_shixuns_search').submit();">搜索</a>
|
||||
<a href="javascript:void(0);" class="fl task-btn task-btn-orange ml5" onclick="$('#class_shixuns_search').submit();">搜索</a>
|
||||
<a href="javascript:clearSearchCondition()" class="fl task-btn ml5 mt2 ">清除</a>
|
||||
<input name="sx_order" type="hidden">
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<option value="cla_name">课程名称搜索</option>
|
||||
</select>
|
||||
<input class="fl task-form-20 task-height-30 mt20" name="search" maxlength="" placeholder="输入关键字进行搜索" type="text" style="height: 21px;" id="Look_name">
|
||||
<a href="javascript:void(0);" class="fl task-btn task-btn-blue ml5 mt20" onclick="$('#classroom').submit();">搜索</a>
|
||||
<a href="javascript:void(0);" class="fl task-btn task-btn-orange ml5 mt20" onclick="$('#classroom').submit();">搜索</a>
|
||||
<a href="javascript:clearSearchCondition()" class="fl task-btn ml5 mt2 mt20" id="clear_contents">清除</a>
|
||||
<span class="fr shixun_webssh">
|
||||
<input type="checkbox" class="mr5 magic-checkbox" name="support_shixuns_search_title" value="1" id="join_course_role_0">
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<option value="dep_name">创建者单位搜索</option>
|
||||
</select>
|
||||
<input class="task-form-20 task-height-30 fl" name="search" maxlength="" placeholder="输入关键字进行搜索" type="text" style="height: 21px;" id="Look_name" >
|
||||
<a href="javascript:void(0);" class=" task-btn task-btn-blue ml5 mt3 fl mb5 " onclick="$('#class_publish_shixuns_search').submit();">搜索</a>
|
||||
<a href="javascript:void(0);" class=" task-btn task-btn-orange ml5 mt3 fl mb5 " onclick="$('#class_publish_shixuns_search').submit();">搜索</a>
|
||||
<a href="javascript:clearSearchCondition();" class="task-btn ml5 mt3 fl mb5" id="clear_contents" >清除</a>
|
||||
<span class="fr shixun_webssh">
|
||||
<input type="checkbox" class="mr5 magic-checkbox" name="homepage_show" value="1" id="join_course_role_0">
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
:format => "xls"
|
||||
),
|
||||
:method => "POST",
|
||||
:class => "task-btn task-btn-blue ml5 mt3 fr mb5 mr30" %>
|
||||
:class => "task-btn task-btn-orange ml5 mt3 fr mb5 mr30" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@ $("#export_course_to_excel").html('<%= link_to "导出Excel",
|
|||
:format => "xls"
|
||||
),
|
||||
:method => "POST",
|
||||
:class => "task-btn task-btn-blue ml5 mt3 fr mb5 mr30"%>');
|
||||
:class => "task-btn task-btn-orange ml5 mt3 fr mb5 mr30"%>');
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue