Merge branch 'develop' into rep_quality
This commit is contained in:
commit
b235b461a9
|
@ -184,14 +184,24 @@ class CoursesController < ApplicationController
|
|||
if params[:incourse]
|
||||
results = searchmember_by_name(student_homework_score(0,0,0,"desc"), q)
|
||||
elsif params[:ingroup]
|
||||
@group = CourseGroup.find(params[:search_group_id])
|
||||
results = searchmember_by_name(student_homework_score(@group.id,0,0,"desc"), q)
|
||||
if params[:search_group_id] == "-1"
|
||||
@group = -1
|
||||
results = searchmember_by_name(student_homework_score(-1,0,0,"desc"), q)
|
||||
else
|
||||
@group = CourseGroup.find(params[:search_group_id])
|
||||
results = searchmember_by_name(student_homework_score(@group.id,0,0,"desc"), q)
|
||||
end
|
||||
end
|
||||
@is_remote = true
|
||||
#@result_count = results.count
|
||||
#@results = paginateHelper results, 10
|
||||
@results = results
|
||||
@search_name = q
|
||||
@limit = 50
|
||||
@page = params[:page].nil? ? 1 : params['page'].to_i
|
||||
@members_count = @results.count
|
||||
@mem_pages = Paginator.new @members_count, @limit, @page
|
||||
@results = paginateHelper @results, @limit
|
||||
end
|
||||
|
||||
def addgroups
|
||||
|
@ -208,6 +218,12 @@ class CoursesController < ApplicationController
|
|||
@is_remote = true
|
||||
@members = student_homework_score(0,0, 10,@score_sort_by)
|
||||
@course_groups = @course.course_groups
|
||||
@limit = 50
|
||||
@page = params[:page].nil? ? 1 : params['page'].to_i
|
||||
@members_count = @members.count
|
||||
@no_group_count = @members_count - @course.members.where("course_group_id != 0").count
|
||||
@mem_pages = Paginator.new @members_count, @limit, @page
|
||||
@members = paginateHelper @members, @limit
|
||||
end
|
||||
|
||||
def deletegroup
|
||||
|
@ -219,6 +235,12 @@ class CoursesController < ApplicationController
|
|||
@score_sort_by = "desc"
|
||||
@members = student_homework_score(0,0, 10,@score_sort_by)
|
||||
@course_groups = @course.course_groups
|
||||
@limit = 50
|
||||
@page = params[:page].nil? ? 1 : params['page'].to_i
|
||||
@members_count = @members.count
|
||||
@no_group_count = @members_count - @course.members.where("course_group_id != 0").count
|
||||
@mem_pages = Paginator.new @members_count, @limit, @page
|
||||
@members = paginateHelper @members, @limit
|
||||
end
|
||||
|
||||
def updategroupname
|
||||
|
@ -232,6 +254,12 @@ class CoursesController < ApplicationController
|
|||
@is_remote = true
|
||||
@members = student_homework_score(0,0, 10,"desc")
|
||||
@course_groups = @course.course_groups
|
||||
@limit = 50
|
||||
@page = params[:page].nil? ? 1 : params['page'].to_i
|
||||
@members_count = @members.count
|
||||
@no_group_count = @members_count - @course.members.where("course_group_id != 0").count
|
||||
@mem_pages = Paginator.new @members_count, @limit, @page
|
||||
@members = paginateHelper @members, @limit
|
||||
end
|
||||
|
||||
def valid_ajax
|
||||
|
@ -268,6 +296,7 @@ class CoursesController < ApplicationController
|
|||
member.course_group_id = params[:course_group_id].to_i
|
||||
member.save
|
||||
@course_groups = @course.course_groups
|
||||
@no_group_count = @course.student.count - @course.members.where("course_group_id != 0").count
|
||||
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
|
||||
respond_to do |format|
|
||||
format.js
|
||||
|
@ -283,6 +312,7 @@ class CoursesController < ApplicationController
|
|||
@group = group
|
||||
|
||||
@course_groups = @course.course_groups
|
||||
@no_group_count = @course.student.count - @course.members.where("course_group_id != 0").count
|
||||
|
||||
search_group_members group
|
||||
end
|
||||
|
@ -294,6 +324,7 @@ class CoursesController < ApplicationController
|
|||
member.save
|
||||
@group = group
|
||||
@course_groups = @course.course_groups
|
||||
@no_group_count = @course.student.count - @course.members.where("course_group_id != 0").count
|
||||
|
||||
search_group_members group
|
||||
end
|
||||
|
@ -304,14 +335,22 @@ class CoursesController < ApplicationController
|
|||
@is_remote = true
|
||||
@sort_type = 'score'
|
||||
@score_sort_by = "desc"
|
||||
if params[:group_id] && params[:group_id] != "0"
|
||||
if params[:group_id] && params[:group_id] != "0" && params[:group_id] != "-1"
|
||||
@group = CourseGroup.find(params[:group_id])
|
||||
@results = student_homework_score(@group.id,0, 0,"desc")
|
||||
# @results = paginateHelper @results, 10
|
||||
elsif params[:group_id] && params[:group_id] == "-1"
|
||||
@group = -1
|
||||
@results = student_homework_score(-1, 0, 10,"desc")
|
||||
else
|
||||
page_from = params[:page].nil? ? 0 : (params[:page].to_i - 1)
|
||||
@results = student_homework_score(0,page_from, 10,"desc")
|
||||
end
|
||||
@limit = 50
|
||||
@page = params[:page].nil? ? 1 : params['page'].to_i
|
||||
@members_count = @results.count
|
||||
@mem_pages = Paginator.new @members_count, @limit, @page
|
||||
@results = paginateHelper @results, @limit
|
||||
end
|
||||
|
||||
def member
|
||||
|
@ -332,10 +371,15 @@ class CoursesController < ApplicationController
|
|||
@members = @all_members
|
||||
when '2'
|
||||
if @course.open_student == 1 || User.current.member_of_course?(@course) || User.current.admin?
|
||||
@limit = 50
|
||||
@subPage_title = l :label_student_list
|
||||
page = params[:page].nil? ? 0 : (params['page'].to_i - 1)
|
||||
@all_members = student_homework_score(0,page, 10,@score_sort_by,@sort_type)
|
||||
@members = @all_members
|
||||
@page = params[:page].nil? ? 1 : params['page'].to_i
|
||||
@all_members = student_homework_score(0, @page - 1, @limit, @score_sort_by, @sort_type)
|
||||
@members_count = @all_members.count
|
||||
@no_group_count = @members_count - @course.members.where("course_group_id != 0").count
|
||||
@mem_pages = Paginator.new @members_count, @limit, @page
|
||||
@members = paginateHelper @all_members, @limit
|
||||
@left_nav_type = 9
|
||||
else
|
||||
render_403
|
||||
return
|
||||
|
@ -378,25 +422,35 @@ class CoursesController < ApplicationController
|
|||
group_id = params[:group_id]
|
||||
if !@search_name.nil?
|
||||
if group_id == '0'
|
||||
page = params[:page].nil? ? 0 : (params['page'].to_i - 1)
|
||||
#page = params[:page].nil? ? 0 : (params['page'].to_i - 1)
|
||||
@results = searchmember_by_name(student_homework_score(0,0,0,@score_sort_by,@sort_type), @search_name)
|
||||
@result_count = @results.count
|
||||
# @results = paginateHelper @results, 10
|
||||
elsif group_id == '-1'
|
||||
@group = -1
|
||||
@results = searchmember_by_name(student_homework_score(-1,0,0,@score_sort_by,@sort_type), @search_name)
|
||||
else
|
||||
@group = CourseGroup.find(group_id)
|
||||
@results = searchmember_by_name(student_homework_score(group_id, 0, 0,@score_sort_by,@sort_type),@search_name)
|
||||
@result_count = @results.count
|
||||
# @results = paginateHelper @results, 10
|
||||
end
|
||||
else
|
||||
if group_id == '0'
|
||||
page = params[:page].nil? ? 0 : (params['page'].to_i - 1)
|
||||
@results = student_homework_score(0,page, 10,@score_sort_by,@sort_type)
|
||||
elsif group_id == '-1'
|
||||
@group = -1
|
||||
@results = student_homework_score(-1,0, 10,@score_sort_by,@sort_type)
|
||||
else
|
||||
@group = CourseGroup.find(group_id)
|
||||
@results = student_homework_score(group_id, 0, 0,@score_sort_by,@sort_type)
|
||||
end
|
||||
end
|
||||
@limit = 50
|
||||
@page = params[:page].nil? ? 1 : params['page'].to_i
|
||||
@members_count = @results.count
|
||||
@no_group_count = @members_count - @course.members.where("course_group_id != 0").count
|
||||
@mem_pages = Paginator.new @members_count, @limit, @page
|
||||
@results = paginateHelper @results, @limit
|
||||
end
|
||||
# 显示每个学生的作业评分详情
|
||||
def show_member_score
|
||||
|
@ -1149,7 +1203,7 @@ class CoursesController < ApplicationController
|
|||
|
||||
#统计
|
||||
def statistics_course
|
||||
@left_nav_type = 9
|
||||
@left_nav_type = 10
|
||||
respond_to do |format|
|
||||
format.html {render :layout => 'base_courses'}
|
||||
end
|
||||
|
@ -1223,7 +1277,6 @@ class CoursesController < ApplicationController
|
|||
|
||||
def student_homework_score(groupid,start_from, nums, score_sort_by, sort_type = 'score')
|
||||
start_from = start_from * nums
|
||||
sql_select = ""
|
||||
if groupid == 0
|
||||
sql_select = "SELECT members.*,(
|
||||
SELECT SUM(student_works.work_score)
|
||||
|
@ -1231,13 +1284,49 @@ class CoursesController < ApplicationController
|
|||
WHERE student_works.homework_common_id = homework_commons.id
|
||||
AND homework_commons.course_id = #{@course.id}
|
||||
AND student_works.user_id = members.user_id
|
||||
) AS score,(SELECT (message_num*2 + message_reply_num*1 + news_reply_num*1 + news_num*1 +
|
||||
) AS score,(SELECT max(message_num*2 + message_reply_num*1 + news_reply_num*1 + news_num*1 +
|
||||
resource_num*5 + journal_num*1 + homework_journal_num*1 ) FROM `course_contributor_scores` AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id
|
||||
) AS act_score
|
||||
) AS act_score,(SELECT SUM(exercise_users.score) FROM exercise_users,exercises WHERE exercise_users.exercise_id = exercises.id
|
||||
AND exercises.course_id = #{@course.id} AND exercise_users.user_id = members.user_id) AS ex_score,
|
||||
(SELECT max(student_id) FROM user_extensions WHERE user_extensions.user_id = members.user_id) AS student_id,
|
||||
(SELECT max(message_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_num,
|
||||
(SELECT max(message_reply_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_reply_num,
|
||||
(SELECT max(news_reply_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_reply_num,
|
||||
(SELECT max(news_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_num,
|
||||
(SELECT max(resource_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS resource_num,
|
||||
(SELECT max(journal_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS journal_num,
|
||||
(SELECT max(homework_journal_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS homework_journal_num,
|
||||
(SELECT COUNT(ss.id) FROM student_works AS ss ,homework_commons AS hc WHERE ss.homework_common_id = hc.id AND hc.course_id = #{@course.id} AND ss.work_status != 0 AND ss.user_id = members.user_id) AS homework_num,
|
||||
(SELECT COUNT(eu.id) FROM exercise_users AS eu,exercises WHERE eu.exercise_id = exercises.id AND exercises.course_id = #{@course.id} AND exercises.end_time >= eu.created_at AND eu.user_id = members.user_id) AS exercise_num
|
||||
FROM members
|
||||
JOIN students_for_courses
|
||||
ON students_for_courses.student_id = members.user_id AND students_for_courses.course_id = members.course_id
|
||||
WHERE members.course_id = #{@course.id} ORDER BY #{sort_type} #{score_sort_by}"
|
||||
elsif groupid == -1
|
||||
sql_select = "SELECT members.*,(
|
||||
SELECT SUM(student_works.work_score)
|
||||
FROM student_works,homework_commons
|
||||
WHERE student_works.homework_common_id = homework_commons.id
|
||||
AND homework_commons.course_id = #{@course.id}
|
||||
AND student_works.user_id = members.user_id
|
||||
) AS score,(SELECT max(message_num*2 + message_reply_num*1 + news_reply_num*1 + news_num*1 +
|
||||
resource_num*5 + journal_num*1 + homework_journal_num*1 ) FROM `course_contributor_scores` AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id
|
||||
) AS act_score,(SELECT SUM(exercise_users.score) FROM exercise_users,exercises WHERE exercise_users.exercise_id = exercises.id
|
||||
AND exercises.course_id = #{@course.id} AND exercise_users.user_id = members.user_id) AS ex_score,
|
||||
(SELECT max(student_id) FROM user_extensions WHERE user_extensions.user_id = members.user_id) AS student_id,
|
||||
(SELECT max(message_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_num,
|
||||
(SELECT max(message_reply_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_reply_num,
|
||||
(SELECT max(news_reply_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_reply_num,
|
||||
(SELECT max(news_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_num,
|
||||
(SELECT max(resource_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS resource_num,
|
||||
(SELECT max(journal_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS journal_num,
|
||||
(SELECT max(homework_journal_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS homework_journal_num,
|
||||
(SELECT COUNT(ss.id) FROM student_works AS ss ,homework_commons AS hc WHERE ss.homework_common_id = hc.id AND hc.course_id = #{@course.id} AND ss.work_status != 0 AND ss.user_id = members.user_id) AS homework_num,
|
||||
(SELECT COUNT(eu.id) FROM exercise_users AS eu,exercises WHERE eu.exercise_id = exercises.id AND exercises.course_id = #{@course.id} AND exercises.end_time >= eu.created_at AND eu.user_id = members.user_id) AS exercise_num
|
||||
FROM members
|
||||
JOIN students_for_courses
|
||||
ON students_for_courses.student_id = members.user_id AND students_for_courses.course_id = members.course_id
|
||||
WHERE members.course_id = #{@course.id} AND members.course_group_id = 0 ORDER BY #{sort_type} #{score_sort_by}"
|
||||
else
|
||||
sql_select = "SELECT members.*,(
|
||||
SELECT SUM(student_works.work_score)
|
||||
|
@ -1247,7 +1336,18 @@ class CoursesController < ApplicationController
|
|||
AND student_works.user_id = members.user_id
|
||||
) AS score,(SELECT (message_num*2 + message_reply_num*1 + news_reply_num*1 + news_num*1 +
|
||||
resource_num*5 + journal_num*1 + homework_journal_num*1 ) FROM `course_contributor_scores` AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id
|
||||
) AS act_score
|
||||
) AS act_score,(SELECT SUM(exercise_users.score) FROM exercise_users,exercises WHERE exercise_users.exercise_id = exercises.id
|
||||
AND exercises.course_id = #{@course.id} AND exercise_users.user_id = members.user_id) AS ex_score,
|
||||
(SELECT max(student_id) FROM user_extensions WHERE user_extensions.user_id = members.user_id) AS student_id,
|
||||
(SELECT max(message_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_num,
|
||||
(SELECT max(message_reply_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_reply_num,
|
||||
(SELECT max(news_reply_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_reply_num,
|
||||
(SELECT max(news_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_num,
|
||||
(SELECT max(resource_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS resource_num,
|
||||
(SELECT max(journal_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS journal_num,
|
||||
(SELECT max(homework_journal_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS homework_journal_num,
|
||||
(SELECT COUNT(ss.id) FROM student_works AS ss ,homework_commons AS hc WHERE ss.homework_common_id = hc.id AND hc.course_id = #{@course.id} AND ss.work_status != 0 AND ss.user_id = members.user_id) AS homework_num,
|
||||
(SELECT COUNT(eu.id) FROM exercise_users AS eu,exercises WHERE eu.exercise_id = exercises.id AND exercises.course_id = #{@course.id} AND exercises.end_time >= eu.created_at AND eu.user_id = members.user_id) AS exercise_num
|
||||
FROM members
|
||||
JOIN students_for_courses
|
||||
ON students_for_courses.student_id = members.user_id AND students_for_courses.course_id = members.course_id
|
||||
|
@ -1284,25 +1384,32 @@ class CoursesController < ApplicationController
|
|||
#sheet1.row(0).default_format = blue
|
||||
#sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_class),l(:excel_f_score),l(:excel_commit_time)])
|
||||
sheet1[0,0] = "课程编号"
|
||||
sheet1[0,1] = course.id
|
||||
sheet1[1,0] = "课程学期"
|
||||
sheet1[1,1] = course.time.to_s+"年"+course.term
|
||||
sheet1[2,0] = "课程名称"
|
||||
sheet1[2,1] = course.name
|
||||
sheet1[3,0] = "教师团队"
|
||||
sheet1[3,1] = (searchTeacherAndAssistant course).map{|member| member.user.show_name}.join('、')
|
||||
sheet1[4,0] = "主讲教师"
|
||||
sheet1[4,1] = course.teacher.show_name
|
||||
sheet1[5,0] = "排名"
|
||||
sheet1[5,1] = "学生姓名"
|
||||
sheet1[5,2] = "昵称"
|
||||
sheet1[5,3] = "学号"
|
||||
sheet1[0,1] = course.syllabus.id
|
||||
sheet1[1,0] = "课程名称"
|
||||
sheet1[1,1] = course.syllabus.title
|
||||
sheet1[2,0] = "班级编号"
|
||||
sheet1[2,1] = course.id
|
||||
sheet1[3,0] = "班级学期"
|
||||
sheet1[3,1] = course.time.to_s+"年"+course.term
|
||||
sheet1[4,0] = "班级名称"
|
||||
sheet1[4,1] = course.name
|
||||
sheet1[5,0] = "教师团队"
|
||||
sheet1[5,1] = (searchTeacherAndAssistant course).map{|member| member.user.show_name}.join('、')
|
||||
sheet1[6,0] = "主讲教师"
|
||||
sheet1[6,1] = course.teacher.show_name
|
||||
sheet1[7,0] = "排名"
|
||||
sheet1[7,1] = "学生姓名"
|
||||
sheet1[7,2] = "昵称"
|
||||
sheet1[7,3] = "学号"
|
||||
for i in 0 ... homeworks.count
|
||||
sheet1[5,i+4] = "第"+(i+1).to_s+"次"
|
||||
sheet1[7,i+4] = "第"+(i+1).to_s+"次"
|
||||
end
|
||||
sheet1[5,homeworks.count+4] = "总成绩"
|
||||
sheet1[5,homeworks.count+5] = "活跃度"
|
||||
count_row = 6
|
||||
sheet1[7,homeworks.count+4] = "作业得分"
|
||||
sheet1[7,homeworks.count+5] = "测评得分"
|
||||
sheet1[7,homeworks.count+6] = "社区得分"
|
||||
sheet1[7,homeworks.count+7] = "总得分"
|
||||
sheet1[7,homeworks.count+8] = "分班"
|
||||
count_row = 8
|
||||
members.each_with_index do |member, i|
|
||||
sheet1[count_row,0]= i+1
|
||||
sheet1[count_row,1] = member.user.lastname.to_s + member.user.firstname.to_s
|
||||
|
@ -1318,36 +1425,47 @@ class CoursesController < ApplicationController
|
|||
sheet1[count_row,j+4] = score <0 ? 0:score.round(2)
|
||||
end
|
||||
end
|
||||
sheet1[count_row,homeworks.count+4] = member.score.nil? ? 0:member.score.round(2)
|
||||
sheet1[count_row,homeworks.count+5] = member.act_score.nil? ? 0:member.act_score
|
||||
hw_score = member.score.nil? ? 0 : member.score
|
||||
ex_score = member.ex_score.nil? ? 0 : member.ex_score
|
||||
act_score = member.act_score.nil? ? 0 : member.act_score
|
||||
sum = hw_score + ex_score + act_score
|
||||
sheet1[count_row,homeworks.count+4] = hw_score.round(2)
|
||||
sheet1[count_row,homeworks.count+5] = ex_score
|
||||
sheet1[count_row,homeworks.count+6] = act_score
|
||||
sheet1[count_row,homeworks.count+7] = sum.round(2)
|
||||
sheet1[count_row,homeworks.count+8] = member.course_group_id == 0 ? "暂无" : member.course_group.name
|
||||
count_row += 1
|
||||
end
|
||||
|
||||
homeworks.each_with_index do |home, i|
|
||||
sheet = book.create_worksheet :name => "第#{i+1}次作业"
|
||||
sheet[0,0] = "课程编号"
|
||||
sheet[0,1] = course.id
|
||||
sheet[1,0] = "课程学期"
|
||||
sheet[1,1] = course.time.to_s+"年"+course.term
|
||||
sheet[2,0] = "课程名称"
|
||||
sheet[2,1] = course.name
|
||||
sheet[3,0] = "教师团队"
|
||||
sheet[3,1] = (searchTeacherAndAssistant course).map{|member| member.user.show_name}.join('、')
|
||||
sheet[4,0] = "主讲教师"
|
||||
sheet[4,1] = course.teacher.show_name
|
||||
sheet[4,0] = "作业批次"
|
||||
sheet[4,1] = "第#{i+1}次作业"
|
||||
sheet[4,0] = "作业名称"
|
||||
sheet[4,1] = home.name
|
||||
sheet[0,1] = course.syllabus.id
|
||||
sheet[1,0] = "课程名称"
|
||||
sheet[1,1] = course.syllabus.title
|
||||
sheet[2,0] = "班级编号"
|
||||
sheet[2,1] = course.id
|
||||
sheet[3,0] = "班级学期"
|
||||
sheet[3,1] = course.time.to_s+"年"+course.term
|
||||
sheet[4,0] = "班级名称"
|
||||
sheet[4,1] = course.name
|
||||
sheet[5,0] = "教师团队"
|
||||
sheet[5,1] = (searchTeacherAndAssistant course).map{|member| member.user.show_name}.join('、')
|
||||
sheet[6,0] = "主讲教师"
|
||||
sheet[6,1] = course.teacher.show_name
|
||||
sheet[6,0] = "作业批次"
|
||||
sheet[6,1] = "第#{i+1}次作业"
|
||||
sheet[6,0] = "作业名称"
|
||||
sheet[6,1] = home.name
|
||||
if home.homework_type == 1 #普通作业
|
||||
if home.anonymous_comment ==0
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
sheet.row(7).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),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
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
sheet.row(7).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),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 = 6
|
||||
count_row = 8
|
||||
items = home.student_works.order("work_score desc")
|
||||
items.each_with_index do |stu, j|
|
||||
sheet[count_row,0]= j + 1
|
||||
|
@ -1373,13 +1491,13 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
elsif home.homework_type == 2 #编程作业
|
||||
if home.anonymous_comment ==0
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
sheet.row(7).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
else
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
sheet.row(7).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
end
|
||||
count_row = 6
|
||||
count_row = 8
|
||||
items = home.student_works.order("work_score desc")
|
||||
items.each_with_index do |stu, j|
|
||||
sheet[count_row,0]= j + 1
|
||||
|
@ -1406,13 +1524,13 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
elsif home.homework_type == 3 #分组作业
|
||||
if home.anonymous_comment ==0
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
|
||||
sheet.row(7).concat([l(:excel_rank),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
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
|
||||
sheet.row(7).concat([l(:excel_rank),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 = 6
|
||||
count_row = 8
|
||||
items = home.student_works.order("work_score desc")
|
||||
items.each_with_index do |stu, j|
|
||||
sheet[count_row,0] = j + 1
|
||||
|
|
|
@ -47,6 +47,9 @@ class MessagesController < ApplicationController
|
|||
all_comments = []
|
||||
@replies = get_all_children(all_comments, @topic)
|
||||
@reply_count = @replies.count
|
||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
@limit = 10
|
||||
@replies = @replies[@page * @limit..@page * @limit + 9]
|
||||
@reply = Message.new(:subject => "RE: #{@message.subject}")
|
||||
if @course
|
||||
#@replies = @topic.children.
|
||||
|
@ -57,7 +60,11 @@ class MessagesController < ApplicationController
|
|||
#all
|
||||
#@replies = paginateHelper messages_replies,10
|
||||
@left_nav_type = 2
|
||||
render :action => "show", :layout => "base_courses"#by young
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html {render :layout => 'base_courses'}
|
||||
end
|
||||
#render :action => "show", :layout => "base_courses"#by young
|
||||
elsif @project
|
||||
#@reply_pages = Paginator.new @reply_count, REPLIES_PER_PAGE, page
|
||||
# @replies = @topic.children.
|
||||
|
@ -66,8 +73,10 @@ class MessagesController < ApplicationController
|
|||
# limit(@reply_pages.per_page).
|
||||
# offset(@reply_pages.offset).
|
||||
# all
|
||||
|
||||
render :action => "show", :layout => "base_projects"#by young
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html {render :layout => 'base_projects'}
|
||||
end
|
||||
else
|
||||
# @reply_pages = Paginator.new @reply_count, REPLIES_PER_PAGE, page
|
||||
# @replies = @topic.children.
|
||||
|
@ -78,7 +87,10 @@ class MessagesController < ApplicationController
|
|||
# all
|
||||
|
||||
@organization = @org_subfield.organization
|
||||
render :action => "show", :layout => "base_org"#by young
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html {render :layout => 'base_org'}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -171,6 +171,10 @@ class NewsController < ApplicationController
|
|||
result = cs.show_course_news params,User.current
|
||||
@news = result[:news]
|
||||
@comments = result[:comments]
|
||||
@comments_count = @comments.count
|
||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
@limit = 10
|
||||
@comments = @comments[@page * @limit..@page * @limit + 9]
|
||||
@comment = Comment.new
|
||||
#@comments = @news.comments
|
||||
#@comments.reverse! if User.current.wants_comments_in_reverse_order?
|
||||
|
@ -179,12 +183,23 @@ class NewsController < ApplicationController
|
|||
@course = Course.find(@news.course_id)
|
||||
if @course
|
||||
@left_nav_type = 4
|
||||
render :layout => 'base_courses'
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html {render :layout => 'base_courses'}
|
||||
end
|
||||
end
|
||||
elsif @project
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html {render :layout => 'base_projects'}
|
||||
end
|
||||
elsif @news.org_subfield_id
|
||||
@org_subfield = OrgSubfield.find(@news.org_subfield_id)
|
||||
@organization = @org_subfield.organization
|
||||
render :layout => 'base_org'
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html {render :layout => 'base_org'}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -625,7 +625,7 @@ class UsersController < ApplicationController
|
|||
visible_course_ids = visible_course.empty? ? "(-1)" : "(" + visible_course.map{|course| course.id}.join(",") + ")"
|
||||
@homeworks = HomeworkCommon.where("course_id in #{visible_course_ids} and publish_time <= '#{Date.today}'").order("#{@order} #{@b_sort}")
|
||||
end
|
||||
@type = params[:type]
|
||||
@type = params[:type] ? params[:type] : '1'
|
||||
@limit = 10
|
||||
@is_remote = true
|
||||
@hw_count = @homeworks.count
|
||||
|
@ -808,7 +808,7 @@ class UsersController < ApplicationController
|
|||
#@homeworks = @homeworks.where("homework_type = 3").reorder("#{@order} #{@b_sort}")
|
||||
end
|
||||
end
|
||||
@type = params[:type]
|
||||
@type = params[:type] ? params[:type] : '1'
|
||||
@property = params[:property]
|
||||
@is_import = params[:is_import]
|
||||
@limit = params[:is_import].to_i == 1 ? 15 : 10
|
||||
|
@ -1033,7 +1033,7 @@ class UsersController < ApplicationController
|
|||
update_org_activity(homework.class,homework.id)
|
||||
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
redirect_to student_work_index_url(:homework => params[:homework])
|
||||
redirect_to student_work_index_url(:homework => params[:homework], :tab => 2)
|
||||
else
|
||||
render_403
|
||||
end
|
||||
|
|
|
@ -3311,17 +3311,32 @@ def get_reply_parents_no_root parents_rely, comment
|
|||
parents_rely
|
||||
end
|
||||
|
||||
def get_all_children_ex result, jour
|
||||
if jour.kind_of? Message
|
||||
jour.children.includes(:author, :praise_tread_cache).each do |jour_child|
|
||||
result << jour_child
|
||||
get_all_children_ex result, jour_child
|
||||
end
|
||||
elsif (jour.kind_of? JournalsForMessage) || (jour.kind_of? BlogComment) || (jour.kind_of? OrgDocumentComment)
|
||||
jour.children.each do |jour_child|
|
||||
result << jour_child
|
||||
get_all_children_ex result, jour_child
|
||||
end
|
||||
end
|
||||
result
|
||||
end
|
||||
|
||||
#获取所有子节点
|
||||
def get_all_children result, jour
|
||||
if jour.kind_of? Message
|
||||
jour.children.includes(:author, :praise_tread_cache).each do |jour_child|
|
||||
result << jour_child
|
||||
get_all_children result, jour_child
|
||||
get_all_children_ex result, jour_child
|
||||
end
|
||||
elsif (jour.kind_of? JournalsForMessage) || (jour.kind_of? BlogComment) || (jour.kind_of? OrgDocumentComment)
|
||||
jour.children.each do |jour_child|
|
||||
result << jour_child
|
||||
get_all_children result, jour_child
|
||||
get_all_children_ex result, jour_child
|
||||
end
|
||||
end
|
||||
if jour.respond_to?(:created_on)
|
||||
|
|
|
@ -106,7 +106,8 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
<% all_comments = []%>
|
||||
<% count=get_all_children(all_comments, @article).count %>
|
||||
<% all_replies = get_all_children(all_comments, @article) %>
|
||||
<% count= all_replies.count %>
|
||||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复
|
||||
|
@ -119,8 +120,7 @@
|
|||
<div class="homepagePostReplyBannerTime"></div>
|
||||
</div>
|
||||
|
||||
<% all_comments = []%>
|
||||
<% comments = get_all_children(all_comments, @article) %>
|
||||
<% comments = all_replies %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= @article.id %>">
|
||||
<% comments.each do |comment| %>
|
||||
|
|
|
@ -46,12 +46,12 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<% all_comments = []%>
|
||||
<% count=get_all_children(all_comments, activity).count %>
|
||||
<% all_repies = get_all_children(all_comments, activity) %>
|
||||
<% count = all_repies.count %>
|
||||
<div class="homepagePostReply">
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :homepage => 1} %>
|
||||
|
||||
<% all_comments = []%>
|
||||
<% comments = get_all_children(all_comments, activity)[0..2] %>
|
||||
<% comments = all_repies[0..2] %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'BlogComment', :activity_id =>activity.id, :homepage => 1, :user_id => activity.author_id}%>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<div class="st_list">
|
||||
<div class="st_search" id="search_members">
|
||||
<div class="sy_class_fenban clear">
|
||||
<div id="search_members">
|
||||
<%= render :partial => 'searchmembers' %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="st_addclass" id="st_groups">
|
||||
<div id="st_groups">
|
||||
<%= render :partial => 'new_groups_name', :locals => {:course_groups => @course_groups} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
@ -12,5 +12,4 @@
|
|||
<div id="member_content">
|
||||
<%= render :partial => 'new_member_list', :locals => {:members => members} %>
|
||||
</div>
|
||||
</div> <!-- st_list end-->
|
||||
<div class="cl"></div>
|
||||
</div> <!-- st_list end-->
|
|
@ -1,56 +1,42 @@
|
|||
<ul>
|
||||
<li style=" color:#8b8b8b;">分班:</li>
|
||||
<li class="classbox" id="course_group_0">
|
||||
<li class="fl mt5" style="color:#8b8b8b;">分班:</li>
|
||||
<li class="fl sy_fenban_list mr10 mb10 ml10" id="course_group_0">
|
||||
<%= link_to l(:label_all), searchgroupmembers_course_path(@course,:group_id => 0), :onclick => "checkclass('course_group_0')", method: 'get', remote: true%>
|
||||
</li>
|
||||
<li class="fl sy_fenban_list mr10 mb10" id="course_group_1">
|
||||
<%= link_to "未分班", searchgroupmembers_course_path(@course,:group_id => -1), :onclick => "checkclass('course_group_0')", method: 'get', remote: true, :class => 'fl mr5'%>
|
||||
<span class="fl sy_cgrey">(<%=@no_group_count %>人)</span>
|
||||
</li>
|
||||
|
||||
<% unless course_groups.nil? %>
|
||||
<% course_groups.each do |group| %>
|
||||
<% group_name = " #{ group.name}( <span class='c_red'>#{group.members.count.to_s}人</span>)".html_safe %>
|
||||
<li class="classbox" style="margin-bottom: 5px;">
|
||||
<%= link_to group_name, searchgroupmembers_course_path(@course,:group_id => group.id), method: 'get', remote: true,:onclick => "checkclass('group_name_#{group.id}')"%>
|
||||
<%# group_name = " #{ group.name}( <span class='c_red'>#{group.members.count.to_s}人</span>)".html_safe %>
|
||||
<li class="fl sy_fenban_list clear mr10 mb10">
|
||||
<%= link_to group.name, searchgroupmembers_course_path(@course,:group_id => group.id), class: 'fl mr5', method: 'get', remote: true,:onclick => "checkclass('group_name_#{group.id}')"%>
|
||||
<span class="fl sy_cgrey mr5">(<%=group.members.count.to_s %>人)</span>
|
||||
<% if @canShowCode%>
|
||||
<a href="javascript:void(0)" class="sy_icons_edit fl" onclick="$('#edit_group_name').val('<%= group.name%>');$('#edit_group_id').val('<%= group.id%>');$('#edit_group_form').slideToggle();"></a>
|
||||
<% if group.members.empty?%>
|
||||
<%= link_to '', deletegroup_course_path(:group_id => group.id), :method => 'delete', :remote => true,
|
||||
:data => {confirm: l(:label_delete_group)},
|
||||
:class => 'f_1',
|
||||
:style => "width: 11px;height: 16px;margin-top:3px;margin-left:5px;background: url(/images/pic_del.gif) no-repeat 0 0;"
|
||||
%>
|
||||
:class => 'sy_icons_del fl'
|
||||
%>
|
||||
<% else%>
|
||||
<a href="javascript:" onClick="alert('温馨提示:已有学生加入该班级,不能删除该班级,仅可编辑班级名称。');" style="margin-right:4px;" >
|
||||
<img src="/images/pic_del.gif" width="11" height="12" alt="删除班级" title="删除该班级" />
|
||||
</a>
|
||||
<a href="javascript:void(0)" onClick="alert('温馨提示:已有学生加入该班级,不能删除该班级,仅可编辑班级名称。');" class="sy_icons_del fl"></a>
|
||||
<% end%>
|
||||
<a href="javascript:void(0)" class="f_l" style="padding-left: 5px;" onclick="$('#group_name_<%= group.id %>').val('<%= group.name%>');$('#edit_group_<%= group.id %>').slideToggle();$('#new_group_name').hide();">
|
||||
<img src="/images/pic_edit.png" width="14" height="15" alt="编辑班级" />
|
||||
</a>
|
||||
<% end %>
|
||||
</li>
|
||||
<!-- 编辑分班 -->
|
||||
<li>
|
||||
<% if @canShowCode%>
|
||||
<%= form_tag(updategroupname_course_path(@course,:group_id => group.id), method: 'get', remote:true, :id => 'update_group_'+group.id.to_s) do %>
|
||||
<span id="edit_group_<%= group.id %>" style="display:none; vertical-align: middle;" class=" f_l">
|
||||
<input type="text" id="group_name_<%= group.id%>" name="group_name" size="20" class="isTxt w90 f_l" maxlength="20" />
|
||||
<input type="button" class="submit f_l" onclick="edit_group('group_name_<%= group.id%>','<%= valid_ajax_course_path%>','<%= @course.id%>','<%= group.id%>');"/>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if @canShowCode %>
|
||||
<li style="margin-left:15px;margin-top: 2px;">
|
||||
<a href="javascript:void(0)" class="st_add f_l" onclick="$('#group_name').value='';$('#new_group_name').slideToggle();$('#edit_group_36').hide();">+添加分班</a>
|
||||
</li>
|
||||
<li >
|
||||
<span id="new_group_name" style="display:none; vertical-align: middle;" class="ml10 f_l">
|
||||
<%= form_tag( addgroups_course_path(@course), method: 'get',:remote=>true,:id => 'add_group_name') do %>
|
||||
<input type="text" id="group_name" name="group_name" size="20" class="isTxt w90 f_l" maxlength="20" />
|
||||
<input type="button" class="submit f_l" onclick="add_group('<%= valid_ajax_course_path%>','<%= @course.id%>');"/>
|
||||
<% end %>
|
||||
</span>
|
||||
<!-- 编辑分班 -->
|
||||
<% if @canShowCode%>
|
||||
<li id="edit_group_form" class="fl mr10 mb10 clear undis">
|
||||
<%= form_tag(updategroupname_course_path(@course), method: 'get', remote:true, :id => 'update_group_form') do %>
|
||||
<input type="hidden" name="group_id" id="edit_group_id"/>
|
||||
<input class="fl mr5 sy_fenban_input" id="edit_group_name"name="group_name" size="20" maxlength="20"/>
|
||||
<a href="javascript:void(0)" class="sy_btn_blue fl mr5" onclick="edit_group('edit_group_name','<%= valid_ajax_course_path%>','<%= @course.id%>','edit_group_id');">确定</a>
|
||||
<a href="javascript:void(0)" class="sy_btn_grey fl" onclick="$('#edit_group_form').hide(); $('#edit_group_id').val(''); $('#edit_group_name').val('');">取消</a>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
|
@ -1,123 +1,156 @@
|
|||
<!-- 加入分班 -->
|
||||
<div style="margin-left: 15px">
|
||||
<% if User.current.logged? && User.current.member_of_course?(@course) && @group %>
|
||||
<%= join_in_course_group(@course.course_groups,@group, User.current) unless @canShowCode %>
|
||||
<span style="font-size: 12px; float: left; margin-right: 5px">
|
||||
<%= l(:label_current_group)%>:
|
||||
<%= @group.name %>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<% if members.any? %>
|
||||
<% if @result_count %>
|
||||
<p style="font-size: 18px;">
|
||||
<%= l(:label_search_member_count) %>
|
||||
<%= @result_count %>
|
||||
<%= l(:label_member_people) %>
|
||||
<table class="sy_new_table clear sy_new_table_width" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr class="clear">
|
||||
<th class="sy_th7">序号</th>
|
||||
<th class="sy_th15">姓名</th>
|
||||
<th class="sy_th15">
|
||||
<%= link_to '学号', member_score_sort_course_path(:sort_type => 'student_id', :sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? (@group == -1 ? -1 : @group.id) : 0), :search_name => (@search_name ? @search_name : nil)), :result => members, method: 'get', remote: true, :style => 'color:#000000;'%>
|
||||
<% if @sort_type == "student_id" && @score_sort_by == 'desc' %>
|
||||
<a href="javascript:void(0)" class="sy_sortdownbtn"></a>
|
||||
<% elsif @sort_type == "student_id" && @score_sort_by == 'asc' %>
|
||||
<a href="javascript:void(0)" class="sy_sortupbtn"></a>
|
||||
<% end %>
|
||||
</th>
|
||||
<th class="sy_th0 sy_fenban_tap">
|
||||
<%= link_to '作业得分', member_score_sort_course_path(:sort_type => 'score', :sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? (@group == -1 ? -1 : @group.id) : 0), :search_name => (@search_name ? @search_name : nil)), :result => members, method: 'get', remote: true, :style => 'color:#000000;'%>
|
||||
<% if @sort_type == "score" && @score_sort_by == 'desc' %>
|
||||
<a href="javascript:void(0)" class="sy_sortdownbtn"></a>
|
||||
<% elsif @sort_type == "score" && @score_sort_by == 'asc' %>
|
||||
<a href="javascript:void(0)" class="sy_sortupbtn"></a>
|
||||
<% end %>
|
||||
<div class="sy_fenban_show undis" >
|
||||
<p>积分规则<br/>
|
||||
班级作业的得分总和</p>
|
||||
</div>
|
||||
</th>
|
||||
<th class="sy_th0 sy_fenban_tap">
|
||||
<%= link_to '测评得分', member_score_sort_course_path(:sort_type => 'ex_score', :sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? (@group == -1 ? -1 : @group.id) : 0), :search_name => (@search_name ? @search_name : nil)), :result => members, method: 'get', remote: true, :style => 'color:#000000;'%>
|
||||
<% if @sort_type == "ex_score" && @score_sort_by == 'desc' %>
|
||||
<a href="javascript:void(0)" class="sy_sortdownbtn"></a>
|
||||
<% elsif @sort_type == "ex_score" && @score_sort_by == 'asc' %>
|
||||
<a href="javascript:void(0)" class="sy_sortupbtn"></a>
|
||||
<% end %>
|
||||
<div class="sy_fenban_show undis" >
|
||||
<p>积分规则<br/>
|
||||
班级测验的得分总和</p>
|
||||
</div>
|
||||
</th>
|
||||
<th class="sy_th0 sy_fenban_tap">
|
||||
<%= link_to '社区得分', member_score_sort_course_path(:sort_type => 'act_score', :sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? (@group == -1 ? -1 : @group.id) : 0),:search_name => (@search_name ? @search_name : nil)) ,:result => members,method: 'get', remote: true, :style => 'color:#000000;'%>
|
||||
<% if @sort_type == "act_score" && @score_sort_by == 'desc' %>
|
||||
<a href="javascript:" class= "sy_sortdownbtn"></a>
|
||||
<% elsif @sort_type == "act_score" && @score_sort_by == 'asc' %>
|
||||
<a href="javascript:" class= "sy_sortupbtn"></a>
|
||||
<% end %>
|
||||
<div class="sy_fenban_show undis" >
|
||||
<p>积分规则<br/>
|
||||
资源发布:资源数 x 5 <br>
|
||||
问答发布:发帖数 x 2 <br>
|
||||
通知发布:通知数 x 1 <br>
|
||||
问答回复:回复数 x 1 <br>
|
||||
作业留言:留言数 x 1 <br>
|
||||
通知留言:留言数 x 1 <br>
|
||||
班级留言:留言数 x 1 <br>
|
||||
总得分为以上得分之和
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
||||
<div class="st_box">
|
||||
<ul class="st_box_top">
|
||||
<li class="ml50" style="padding-right: 5px;"><span class="fontGrey6 fb">姓名</span></li>
|
||||
<li class="ml10" style="padding-right: 15px;"><span class="fontGrey6 fb">学号</span></li>
|
||||
<% unless @course.course_groups.empty? %>
|
||||
<li style="padding-right: 55px; margin-left: 160px;"><span class="fontGrey6 fb">分班</span></li>
|
||||
<% end %>
|
||||
<li class="st_list_score <%= @course.course_groups.empty? ? 'ml250' : 'ml10' %>">
|
||||
<%= link_to '英雄榜', member_score_sort_course_path(:sort_type => 'score', :sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? @group.id : 0),:search_name => (@search_name ? @search_name : nil)) ,:result => members,method: 'get', remote: true, :class => 'ml35'%>
|
||||
<% if @sort_type == "score" && @score_sort_by == 'desc' %>
|
||||
<a id="pic" href="javascript:" class= "st_down"></a>
|
||||
<% elsif @sort_type == "score" && @score_sort_by == 'asc' %>
|
||||
<a id="pic" href="javascript:" class= "st_up"></a>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="st_list_score">
|
||||
<%= link_to '活跃度', member_score_sort_course_path(:sort_type => 'act_score', :sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? @group.id : 0),:search_name => (@search_name ? @search_name : nil)) ,:result => members,method: 'get', remote: true, :class => 'ml35'%>
|
||||
<% if @sort_type == "act_score" && @score_sort_by == 'desc' %>
|
||||
<a id="pic" href="javascript:" class= "st_down"></a>
|
||||
<% elsif @sort_type == "act_score" && @score_sort_by == 'asc' %>
|
||||
<a id="pic" href="javascript:" class= "st_up"></a>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="ml20"><span class="fontGrey6 fb">加入时间</span></li>
|
||||
</ul>
|
||||
<div class="cl"></div><!--st_box_top end-->
|
||||
|
||||
<% members.each do |member| %>
|
||||
<div class="st_boxlist">
|
||||
<a href="javascript:" class="st_img">
|
||||
<%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 32, :height => 32)) %>
|
||||
</a>
|
||||
<ul>
|
||||
<li>
|
||||
<%= link_to("#{l(:label_bidding_user_studentname)}:<span class='hidden st_info_block'>#{member.user.show_name}</span>".html_safe,user_path(member.user)) %>
|
||||
</li>
|
||||
<br/>
|
||||
<% unless member.user.user_extensions.student_id == ''%>
|
||||
<li><%= link_to("#{l(:label_bidding_user_studentcode)}:<span class='hidden st_info_block'>#{member.user.user_extensions.student_id}</span>".html_safe,user_path(member.user)) %></li>
|
||||
<% end%>
|
||||
</ul>
|
||||
<% unless @course.course_groups.empty? %>
|
||||
<% if User.current.allowed_to?(:as_teacher, @course) || User.current.admin? %>
|
||||
<% if @course.course_groups.nil? || @group %>
|
||||
<div class="select-class-option fl" style="margin-left: 5px;">
|
||||
<span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= form_tag({:controller => 'courses', :action => 'teacher_assign_group', :id => @course.id,:user_id => member.user_id},:remote=>'true', :method => 'post', :id=>"join_group_form_#{member.id}", :class => 'query_form') do %>
|
||||
<div class="select-class-option fl" style="margin-left: 5px;"><span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
<a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2 ml5"></a>
|
||||
</div>
|
||||
<%= select( :name,:group_id, course_group_option(@course),
|
||||
{ :include_blank => false,:selected => member.course_group_id},
|
||||
{:onchange=>"join_group_function('#join_group_form_#{member.id}');", :id =>"course_group_id", :name => "course_group_id",:class=>"w125 undis class-edit fl", :style => "margin-left: 5px;"}) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="select-class-option fl" style="margin-left: 5px;">
|
||||
<span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= link_to format("%0.2f",member.score.nil? ? 0 : member.score.to_s), {
|
||||
:action => 'show_member_score',
|
||||
:member_id => member.id,
|
||||
:remote => true},
|
||||
:class => "st_list_score c_red #{@course.course_groups.empty? ? 'ml130' : ''}" %>
|
||||
<%= link_to member.act_score.nil? ? 0 : member.act_score.to_s, {
|
||||
:action => 'show_member_act_score',
|
||||
:member_id => member.id,
|
||||
:remote => true},
|
||||
:class => 'st_list_score c_red' %>
|
||||
<span class="fr mr15 c_grey"><%= format_date(member.created_on)%></span>
|
||||
<%= call_hook(:view_projects_settings_members_table_row, { :course => @course, :member => member}) %>
|
||||
</div>
|
||||
</th>
|
||||
<th class="sy_th0 sy_fenban_tap">总得分
|
||||
<div class="sy_fenban_show undis" style="width:180px;">
|
||||
<p>积分规则<br/>
|
||||
作业得分+测评得分+社区得分</p>
|
||||
</div>
|
||||
</th>
|
||||
<th class="sy_th13">分班</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% members.each_with_index do |member, i| %>
|
||||
<tr class="clear">
|
||||
<% user = member.user %>
|
||||
<% hw_score = member.score.nil? ? 0 : member.score %>
|
||||
<% ex_score = member.ex_score.nil? ? 0 : member.ex_score %>
|
||||
<% act_score = member.act_score.nil? ? 0 : member.act_score %>
|
||||
<% sum = hw_score + ex_score + act_score %>
|
||||
<td><%= (@page - 1) * @limit + i + 1 %></td>
|
||||
<td>
|
||||
<%= link_to image_tag(url_to_avatar(user), :width => "30", :height => "30", :style => "display:block;"), user_path(member.user_id), :class => 'sy_class_users_st fl mt5 mr5' ,:alt => "用户头像" %>
|
||||
<span class="fl sy_class_users_st_name" title="<%= user.show_name %>"><%= user.show_name %></span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="sy_class_users_st_num" title="<%= user.user_extensions.student_id %>"><%= user.user_extensions.student_id %></span>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to format("%0.2f", hw_score), {
|
||||
:action => 'show_member_score',
|
||||
:member_id => member.id,
|
||||
:remote => true},
|
||||
:class => "" %>
|
||||
</td>
|
||||
<td><%= ex_score %></td>
|
||||
<td>
|
||||
<%= link_to act_score, {
|
||||
:action => 'show_member_act_score',
|
||||
:member_id => member.id,
|
||||
:remote => true},
|
||||
:class => '' %>
|
||||
</td>
|
||||
<td class="pr">
|
||||
<span class="sum_score_tip"><%= format("%0.2f", sum) %></span>
|
||||
<div class="sy_tips_box_inner undis" style="left: 215px; top: -60px; text-align: left;">
|
||||
<span style="top: 75px;"></span>
|
||||
<p >
|
||||
<font class="fb"><%= user.show_name %></font><br/>
|
||||
资源 发布数:<%= member.resource_num.nil? ? 0 : member.resource_num %><br/>
|
||||
<font class="mr15">问答 发布数:<%= member.message_num.nil? ? 0 : member.message_num %></font>回复数:<%= member.message_reply_num.nil? ? 0 : member.message_reply_num %><br/>
|
||||
<font class="mr15">通知 提交数:<%= member.news_num.nil? ? 0 : member.news_num %></font>留言数:<%= member.news_reply_num.nil? ? 0 : member.news_reply_num %><br/>
|
||||
<font class="mr15">作业 提交数:<%= member.homework_num.nil? ? 0 : member.homework_num %></font>留言数:<%= member.homework_journal_num.nil? ? 0 : member.homework_journal_num %><br/>
|
||||
班级 留言数:<%= member.journal_num.nil? ? 0 : member.journal_num %><br />
|
||||
测验 提交数:<%= member.exercise_num.nil? ? 0 : member.exercise_num %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end; reset_cycle %>
|
||||
</div>
|
||||
|
||||
<!--<ul class="wlist">
|
||||
<% #= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => @is_remote, :flag => true%>
|
||||
</ul>-->
|
||||
</td>
|
||||
<td>
|
||||
<% if User.current.allowed_to?(:as_teacher, @course) || User.current.admin? || User.current == user %>
|
||||
<% if @course.course_groups.empty? %>
|
||||
<%=member.course_group_id == 0 ? "暂无" : member.course_group.name %>
|
||||
<% else %>
|
||||
<%= form_tag({:controller => 'courses', :action => 'teacher_assign_group', :id => @course.id,:user_id => member.user_id},:remote=>'true', :method => 'post', :id=>"join_group_form_#{member.id}", :class => 'query_form') do %>
|
||||
<div class="select-class-option">
|
||||
<span class="hidden" style="display:inline-block; vertical-align:middle; max-width:70px;"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
<a href="javascript:void(0)" class="sy_icons_edit pic_edit_icon" alt="编辑" style="background-position:0 5px;"></a>
|
||||
</div>
|
||||
<%= select( :name,:group_id, course_group_option(@course),
|
||||
{ :include_blank => false,:selected => member.course_group_id},
|
||||
{:onchange=>"join_group_function('#join_group_form_#{member.id}');", :id =>"course_group_id", :name => "course_group_id",:class=>"w100 undis class-edit sy_fenban_select", :style => "margin-left: 5px;"}) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%=member.course_group_id == 0 ? "暂无" : member.course_group.name %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="text-align:center;">
|
||||
<div class="pages" style="width:auto; display:inline-block;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @mem_pages, @members_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<% else%>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
</p>
|
||||
<% end%>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
/*$(".select-class-option").mouseover(function(){
|
||||
$(this).children(".pic_edit2").css("display","inline-block");
|
||||
});
|
||||
$(".select-class-option").mouseout(function(){
|
||||
$(this).children(".pic_edit2").css("display","none");
|
||||
});*/
|
||||
$(".pic_edit2").click(function(){
|
||||
$(".pic_edit_icon").click(function(){
|
||||
$(this).parent().hide();
|
||||
$(this).parent().next().show();
|
||||
});
|
||||
|
@ -137,12 +170,33 @@
|
|||
$('.class-edit').css('display','none');
|
||||
$('.select-class-option').show();
|
||||
});
|
||||
$('.class-edit,.pic_edit2').bind('click',function(e){
|
||||
$('.class-edit,.pic_edit_icon').bind('click',function(e){
|
||||
stopPropagation(e);
|
||||
});
|
||||
});
|
||||
function join_group_function(id){
|
||||
$(id).submit();
|
||||
}
|
||||
|
||||
$(".sy_new_table tr").each(function(){
|
||||
$(this).mouseenter(function(){
|
||||
$(".sy_tips_box_inner").hide();
|
||||
$(this).children().eq(6).children().eq(1).stop();
|
||||
$(this).children().eq(6).children().eq(1).show();
|
||||
});
|
||||
$(this).mouseleave(function(){
|
||||
$(this).children().eq(6).children().eq(1).delay(500).hide(0);
|
||||
});
|
||||
});
|
||||
|
||||
$(".sy_tips_box_inner").each(function(){
|
||||
$(this).mouseover(function(){
|
||||
$(this).stop();
|
||||
$(this).show();
|
||||
});
|
||||
$(this).mouseout(function(){
|
||||
$(this).delay(500).hide(0);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,11 +1,35 @@
|
|||
<%= form_tag( searchmembers_course_path(@course), method: 'get',:class => "f_l",:remote=>true,:id => "search_student") do %>
|
||||
<%= text_field_tag 'name', params[:name], name: "name", :class => 'st_search_input', :placeholder => '输入学生登录名、姓名、学号进行搜索'%>
|
||||
<% if @group %>
|
||||
<%= hidden_field "search_group_id", params[:search_group_id],:value => "#{@group.id}", name: 'search_group_id' %>
|
||||
<input type="hidden" name="ingroup">
|
||||
<% else %>
|
||||
<input type="hidden" name="incourse">
|
||||
<div class="clear mb10">
|
||||
<% if @canShowCode %>
|
||||
<a href="javascript:void(0)" class="sy_btn_green fl mr10" onclick="$('#group_name').value='';$('#new_group_name').slideToggle();">添加分班</a>
|
||||
<div class="fl" id="new_group_name" style="display:none; vertical-align: middle;">
|
||||
<%= form_tag( addgroups_course_path(@course), method: 'get',:remote=>true,:id => 'add_group_name') do %>
|
||||
<input type="text" id="group_name" name="group_name" size="20" class="fl mr5 sy_fenban_input" placeholder="例如:A班" maxlength="20" />
|
||||
<a href="javascript:void(0)" class="sy_btn_blue fl mr5" onclick="add_group('<%= valid_ajax_course_path%>','<%= @course.id%>');">确定</a>
|
||||
<a href="javascript:void(0)" class="sy_btn_grey fl" onclick="$('#group_name').value='';$('#new_group_name').slideToggle();">取消</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="hw_search_box fr">
|
||||
<%= form_tag( searchmembers_course_path(@course), method: 'get',:class => "f_l",:remote=>true,:id => "search_student") do %>
|
||||
<input class="hw_search-input" name="name" id="search_member_input" placeholder="输入学生登录名/姓名/学号进行搜索" type="text">
|
||||
<% if @group %>
|
||||
<%= hidden_field "search_group_id", params[:search_group_id],:value => "#{@group == -1 ? -1 : @group.id}", name: 'search_group_id' %>
|
||||
<input type="hidden" name="ingroup">
|
||||
<% else %>
|
||||
<input type="hidden" name="incourse">
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<a href="javascript:" class="f_l" onclick="$('#search_student').submit();">搜索</a>
|
||||
<%= link_to l(:label_export_excel), export_course_member_excel_course_path(@course,:format => 'xls'),:class=>'xls'%>
|
||||
<a href="javascript:void(0)" class="hw_btn_search" onclick="$('#search_student').submit();"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
$("#search_member_input").keypress(function(e){
|
||||
var name = $.trim($('#search_member_input').val());
|
||||
if (e.keyCode == '13' && name != "" && name.length != 0) {
|
||||
$(this).parent().submit();
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
|
@ -45,7 +45,8 @@
|
|||
<%= link_to( "", new_exercise_path(:course_id => @course.id), :class => 'sy_class_add', :title =>"新建试卷") if is_teacher %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin? %>
|
||||
<% group_count = @course.course_groups.count %>
|
||||
<% if show_nav?(group_count) && ((User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin?) %>
|
||||
<li>
|
||||
<%=link_to "分班", course_member_path(@course, :role => 2) %>
|
||||
</li>
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
$("#st_groups").html("<%= escape_javascript( render :partial => 'new_groups_name', locals: {:course_groups => @course_groups})%>");
|
||||
$("#member_content").html("<%= escape_javascript( render :partial => 'new_member_list', :locals => {:members => @members})%>");
|
||||
$("#member_content").html("<%= escape_javascript( render :partial => 'new_member_list', :locals => {:members => @members})%>");
|
||||
$('#group_name').val('');
|
||||
$('#new_group_name').hide();
|
|
@ -1,17 +1,35 @@
|
|||
<div class="courseRSide fl" id="homework_page_right">
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2 fl"><%= @subPage_title%></h2>
|
||||
<% if User.current.allowed_to?(:as_teacher,@course) %>
|
||||
<span class="fr f14 fontGrey2" style="height: 40px; line-height: 40px; margin-right: 15px;">
|
||||
<%=link_to "成员管理", :controller => 'courses', :action => 'settings', :id => @course.id, :tab=>'member' %>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if @subPage_title == l(:label_student_list)%>
|
||||
<%= render :partial => 'course_student', :locals => {:members => @members} %>
|
||||
<% else%>
|
||||
<%= render :partial => 'course_teacher', :locals => {:members => @members} %>
|
||||
<% end%>
|
||||
<% if @role.to_i == 1 %>
|
||||
<div class="courseRSide fl" id="homework_page_right">
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2 fl"><%= @subPage_title%></h2>
|
||||
<% if User.current.allowed_to?(:as_teacher,@course) %>
|
||||
<span class="fr f14 fontGrey2" style="height: 40px; line-height: 40px; margin-right: 15px;">
|
||||
<%=link_to "成员管理", :controller => 'courses', :action => 'settings', :id => @course.id, :tab=>'member', :class => 'hw_more_li' %>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => 'course_teacher', :locals => {:members => @members} %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="sy_class_r sy_class_nobg fr ml10">
|
||||
<div class="sy_class_r_head mb10">
|
||||
<h3><%= @subPage_title %></h3>
|
||||
<div class="hw_more_box">
|
||||
<ul>
|
||||
<li class="hw_more_icons">
|
||||
<ul class="hw_more_txt">
|
||||
<li><%= link_to l(:label_export_excel), export_course_member_excel_course_path(@course,:format => 'xls'), :class => 'hw_more_li'%></li>
|
||||
<% if User.current.allowed_to?(:as_teacher,@course) %>
|
||||
<li>
|
||||
<%=link_to "成员管理", {:controller => 'courses', :action => 'settings', :id => @course.id, :tab => 'member'}, :class => 'hw_more_li' %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial => 'course_student', :locals => {:members => @members} %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="courseRSide fl" id="homework_page_right">
|
||||
<div class="project_r_h">
|
||||
<div class="project_r_h" style="width:730px;">
|
||||
<h2 class="project_h2"><%= l(:label_course_modify_settings)%></h2>
|
||||
</div>
|
||||
<script>
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
<div class="reTop mb5">
|
||||
<%= form_tag( search_course_files_path(@course), method: 'get',:class => "re_search",:remote=>true) do %>
|
||||
<%= text_field_tag 'name', params[:name], name: "name", :class => 'researchBox fl',:style=>"padding: 0px"%>
|
||||
<%= submit_tag "课内搜索", :class => "blueBtn mr5 fl",:name => "incourse",:id => "incourse" %>
|
||||
<%= submit_tag "班内搜索", :class => "blueBtn mr5 fl",:name => "incourse",:id => "incourse" %>
|
||||
<%#= submit_tag "全站搜索", :class => "blueBtn mr5 fl",:name => "insite",:id => "insite" %>
|
||||
<% if is_course_teacher(User.current,@course) || (@course.publish_resource==1 && User.current.member_of_course?(@course) ) %>
|
||||
<input class="blueBtn fr mr5" value="上传资源" onclick="course_files_upload();">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => homework_commons,:page => 0,:course_id => course_id} %>
|
||||
|
||||
<div style="width:210px; text-align:center; margin:0 auto;">
|
||||
<div style=" text-align:center;">
|
||||
<ul class="wlist" style=" border:none; display:inline-block; float:none; margin-top:10px;">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||
</ul>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<% elsif @homework.homework_type == 2 %>
|
||||
<p class="c_red mb5">已有<%=committed_work_count %>个学生提交作品,不允许再修改作业类型和测试集。</p>
|
||||
<% elsif @homework.homework_type == 3 %>
|
||||
<p class="c_red mb5">已有<%=committed_work_count %>个学生提交作品,不允许再修改作业类型和分组设置。</p>
|
||||
<p class="c_red mb5">已有<%=committed_work_count %>个学生提交作品,不允许再修改作业类型和分组设置(可扩大分组范围)。</p>
|
||||
<% end %>
|
||||
<% elsif stu_pro_count != 0 && @homework.homework_type == 3 %>
|
||||
<p class="c_red mb5">已有<%=stu_pro_count %>个学生关联项目,不允许再修改作业类型。</p>
|
||||
|
|
|
@ -10,10 +10,6 @@
|
|||
<div class=" fl ml5">
|
||||
<div class="issues_list_titlebox clear">
|
||||
<a href="<%= issue_path(activity) %>" class="issues_list_title fl" target="_blank" title="<%= activity.subject.to_s %>"><%= activity.subject.to_s %></a>
|
||||
<% if activity.journals.count > 0%>
|
||||
<span class="issues_icons_mes fl mr5 ml5"></span>
|
||||
<span class="fl mr5 mt3"><%= activity.journals.count %></span>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="issues_list_small">
|
||||
|
@ -58,7 +54,12 @@
|
|||
<li class="c_grey" style="width: 60px; padding-right: 10px" title="<%= activity.fixed_version %>"><%= activity.fixed_version %></li>
|
||||
<li class="issues_list_min c_grey" ><%= activity.status.name%></li>
|
||||
<li class="<%=(activity.done_ratio == 100 ? 'c_red' : 'c_green') %>"><%= activity.done_ratio %>%</li>
|
||||
<li class="issues_list_min">
|
||||
<li class="issues_list_min pr">
|
||||
<% if activity.journals.count > 0%>
|
||||
<span class="issues_icons_mes fl mr5" style="margin-top:-3px;"></span>
|
||||
<span class="fl mr5"><%= activity.journals.count %></span>
|
||||
<% end %>
|
||||
<div class="undis" style="position: absolute; <%= activity.journals.count >0 ? 'top:15px;' : 'top:-15px;' %>">
|
||||
<%= link_to "", issue_path(activity.id, :edit => 'true'), :class => 'sy_icons_edit fl mt15', :accesskey => accesskey(:edit) if activity.editable? && User.current.allowed_to?(:edit_issues, activity.project) %>
|
||||
<% if !defined?(project_id) && !defined?(user_id) %>
|
||||
<%= link_to "", issue_path(activity.id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'sy_icons_del fl mt15' if User.current.allowed_to?(:delete_issues, activity.project) %>
|
||||
|
@ -67,8 +68,32 @@
|
|||
<% elsif defined?(user_id) %>
|
||||
<%= link_to "", issue_path(activity.id, :page_classify => "user_page", :page_id => user_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'sy_icons_del fl mt15' if User.current.allowed_to?(:delete_issues, activity.project) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$(".issues_list_box").mouseover(function(){
|
||||
var iconOrder;
|
||||
var iconSize = $(this).children().eq(2).children().eq(5).children().size();
|
||||
if(iconSize > 1){
|
||||
iconOrder = 2;
|
||||
} else{
|
||||
iconOrder = 0;
|
||||
}
|
||||
$(this).children().eq(2).children().eq(5).children().eq(iconOrder).show();
|
||||
});
|
||||
$(".issues_list_box").mouseout(function(){
|
||||
var iconOrder;
|
||||
var iconSize = $(this).children().eq(2).children().eq(5).children().size();
|
||||
if(iconSize > 1){
|
||||
iconOrder = 2;
|
||||
} else{
|
||||
iconOrder = 0;
|
||||
}
|
||||
$(this).children().eq(2).children().eq(5).children().eq(iconOrder).hide();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -159,8 +159,8 @@
|
|||
<div class="issues_con_list" style="position: relative;">
|
||||
<ul id="issues_list_nav" >
|
||||
<li id="issues_list_nav_1" onclick="HoverLi(1);all_reset_form();">
|
||||
<a href="javascript:void(0);" onclick="all_reset_form();" id="issues_type_1" >所有
|
||||
<span id="issue_filter_all"><%= render :partial => "issues/issue_filter_all" %></span></a>
|
||||
<a href="javascript:void(0);" onclick="all_reset_form();" id="issues_type_1" >所有</a>
|
||||
<span id="issue_filter_all"><%= render :partial => "issues/issue_filter_all" %></span>
|
||||
</li>
|
||||
<!--li id="issues_list_nav_2" onclick="HoverLi(2);">
|
||||
<a href="javascript:void(0);" onclick="switch_assign_to(<%#= User.current.id %>)" id="issues_type_2" >指派给我
|
||||
|
|
|
@ -14,13 +14,14 @@
|
|||
<li class="navHomepageMenu fl">
|
||||
<%= link_to "题库", user_homeworks_user_path(User.current), :class => "c_white f16 db p10"%>
|
||||
</li>
|
||||
<!--<li class="navHomepageMenu fl mr30">-->
|
||||
<!--<%#= link_to "帮助中心", "https://#{Setting.host_name}/forums/1/memos/1168", :class =>"c_white f16 db p10" %>-->
|
||||
<!--</li>-->
|
||||
<li class="navHomepageMenu fl mr30">
|
||||
<%= link_to "帮助中心", "https://#{Setting.host_name}/forums/1/memos/1168", :class =>"c_white f16 db p10" %>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="navHomepageMenu fl mr40">
|
||||
<a href="<%= forums_path(:reorder_complex=>'desc')%>" target="_blank" class="c_white f16 db p10" >公共贴吧</a>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="navHomepageMenu fl mr40">
|
||||
<a href="<%= forums_path(:reorder_complex=>'desc')%>" target="_blank" class="c_white f16 db p10" > 贴吧交流</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<script>
|
||||
|
@ -62,6 +63,9 @@
|
|||
<li>
|
||||
<%= link_to "修改资料", my_account_path, :class => "menuGrey"%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to '我的课程',{:controller => "users", :action => "user_courselist", :id => User.current.id}, :class => "menuGrey" %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "我的组织", user_organizations_user_path(:id => User.current.id), :class => "menuGrey"%>
|
||||
</li>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<!--<%#= link_to "帮助中心", "https://#{Setting.host_name}/forums/1/memos/1168", :class =>"c_white f16 db p10" %>-->
|
||||
<!--</li>-->
|
||||
<li class="navHomepageMenu fl mr40">
|
||||
<a href="<%= forums_path(:reorder_complex=>'desc')%>" target="_blank" class="c_white f16 db p10" > 贴吧交流</a>
|
||||
<a href="http://forge.trustie.net/forums/1/memos/1168" target="_blank" class="c_white f16 db p10" >帮助中心</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -110,9 +110,16 @@
|
|||
<%= link_to( "", new_exercise_path(:course_id => @course.id), :class => 'sy_class_add', :title =>"新建试卷") if is_teacher %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% group_count = @course.course_groups.count %>
|
||||
<% if !show_nav?(group_count) && ((User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin?) %>
|
||||
<li id="sy_09" class="sy_icons_group">
|
||||
<a href="<%=course_member_path(@course, :role => 2) %>">分班<span><%=group_count %></span></a>
|
||||
<!--<a href="javascript:void(0);" class="sy_class_add"></a>-->
|
||||
</li>
|
||||
<% end %>
|
||||
<% statistics_count = 0 %>
|
||||
<% unless show_nav?(statistics_count) %>
|
||||
<li id="sy_09" class="sy_icons_st">
|
||||
<li id="sy_10" class="sy_icons_st">
|
||||
<a href="<%=statistics_course_course_path(@course) %>">统计<span></span></a>
|
||||
<!--<a href="javascript:void(0);" class="sy_class_add"></a>-->
|
||||
</li>
|
||||
|
|
|
@ -95,58 +95,8 @@
|
|||
</div>
|
||||
<%# all_comments = []%>
|
||||
<%# comments = get_all_children(all_comments, @topic) %>
|
||||
<div class="" id="reply_div_<%= @topic.id %>">
|
||||
<% @replies.each do |reply| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_message_description_<%= reply.id %>');
|
||||
autoUrl('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
|
||||
<%= render :partial => 'users/message_contents', :locals => {:comment => reply}%>
|
||||
|
||||
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||||
<%= reply.content.html_safe%>
|
||||
</div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
<span class="reply-right">
|
||||
<span id="reply_praise_count_<%= reply.id %>">
|
||||
<%= render :partial => "praise_tread/praise", :locals => {:activity => reply, :user_activity_id => reply.id, :type => "reply"} %>
|
||||
</span>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:action => 'quote', :id => reply},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<span id="reply_iconup_<%= reply.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:action => 'destroy', :id => reply},
|
||||
:method => :post,
|
||||
:id => "delete_reply_#{reply.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if reply.course_destroyable_by?(User.current) %>
|
||||
</span>
|
||||
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<p id="reply_message_<%= reply.id%>"></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="" id="reply_div_<%= @topic.id %>">
|
||||
<%= render :partial => "messages/course_show_replies" %>
|
||||
</div>
|
||||
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
<% @replies.each do |reply| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_message_description_<%= reply.id %>');
|
||||
autoUrl('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
|
||||
<%= render :partial => 'users/message_contents', :locals => {:comment => reply}%>
|
||||
|
||||
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||||
<%= reply.content.html_safe%>
|
||||
</div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
<span class="reply-right">
|
||||
<span id="reply_praise_count_<%= reply.id %>">
|
||||
<%= render :partial => "praise_tread/praise", :locals => {:activity => reply, :user_activity_id => reply.id, :type => "reply"} %>
|
||||
</span>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:action => 'quote', :id => reply},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<span id="reply_iconup_<%= reply.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:action => 'destroy', :id => reply},
|
||||
:method => :post,
|
||||
:id => "delete_reply_#{reply.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if reply.course_destroyable_by?(User.current) %>
|
||||
</span>
|
||||
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<p id="reply_message_<%= reply.id%>"></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @reply_count > @page * @limit + 10 %>
|
||||
<div id="more_message_replies">
|
||||
<div class="detail_cont_hide clearfix">
|
||||
<span class="orig_icon" >↓ </span>
|
||||
<span class="orig_icon" style="display:none;" > ↑</span>
|
||||
<%= link_to '点击展开更多回复', board_message_path(@topic.board_id, @topic, :page => @page),:remote=>true %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -0,0 +1,59 @@
|
|||
<% @replies.each_with_index do |reply, i| %>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
showNormalImage('reply_message_description_<%= reply.id %>');
|
||||
autoUrl('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33, :height => 33), user_path(reply.author) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<%= render :partial => 'users/message_contents', :locals => {:comment => reply} %>
|
||||
|
||||
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||||
<%= reply.content.html_safe %>
|
||||
</div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
<span class="reply-right">
|
||||
<span id="reply_praise_count_<%= reply.id %>">
|
||||
<%= render :partial => "praise_tread/praise", :locals => {:activity => reply, :user_activity_id => reply.id, :type => "reply"} %>
|
||||
</span>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:action => 'quote', :id => reply},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<span id="reply_iconup_<%= reply.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:action => 'destroy', :id => reply},
|
||||
:method => :post,
|
||||
:class => 'fr mr20',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if reply.course_destroyable_by?(User.current) %>
|
||||
</span>
|
||||
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<p id="reply_message_<%= reply.id %>"></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @reply_count > @page * @limit + 10 %>
|
||||
<div id="more_message_replies">
|
||||
<div class="detail_cont_hide clearfix">
|
||||
<span class="orig_icon" >↓ </span>
|
||||
<span class="orig_icon" style="display:none;" > ↑</span>
|
||||
<%= link_to '点击展开更多回复', board_message_path(@topic.board_id, @topic, :page => @page),:remote=>true %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -130,56 +130,7 @@
|
|||
<%# all_comments = [] %>
|
||||
<%# comments = get_all_children(all_comments, @topic) %>
|
||||
<div class="" id="reply_div_<%= @topic.id %>">
|
||||
<% @replies.each_with_index do |reply, i| %>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
showNormalImage('reply_message_description_<%= reply.id %>');
|
||||
autoUrl('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33, :height => 33), user_path(reply.author) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<%= render :partial => 'users/message_contents', :locals => {:comment => reply} %>
|
||||
|
||||
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||||
<%= reply.content.html_safe %>
|
||||
</div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
<span class="reply-right">
|
||||
<span id="reply_praise_count_<%= reply.id %>">
|
||||
<%= render :partial => "praise_tread/praise", :locals => {:activity => reply, :user_activity_id => reply.id, :type => "reply"} %>
|
||||
</span>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:action => 'quote', :id => reply},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<span id="reply_iconup_<%= reply.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:action => 'destroy', :id => reply},
|
||||
:method => :post,
|
||||
:class => 'fr mr20',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if reply.course_destroyable_by?(User.current) %>
|
||||
</span>
|
||||
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<p id="reply_message_<%= reply.id %>"></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= render :partial => "messages/org_show_replies" %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
|
|
@ -160,57 +160,7 @@
|
|||
<%# all_comments = []%>
|
||||
<%# comments = get_all_children(all_comments, @topic) %>
|
||||
<div class="" id="reply_div_<%= @topic.id %>">
|
||||
<% @replies.each_with_index do |reply,i| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_message_description_<%= reply.id %>');
|
||||
autoUrl('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
|
||||
<%= render :partial => 'users/message_contents', :locals => {:comment => reply}%>
|
||||
|
||||
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||||
<%= reply.content.html_safe%>
|
||||
</div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
<span class="reply-right">
|
||||
<span id="reply_praise_count_<%= reply.id %>">
|
||||
<%= render :partial => "praise_tread/praise", :locals => {:activity => reply, :user_activity_id => reply.id, :type => "reply"} %>
|
||||
</span>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:action => 'quote', :id => reply},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<span id="reply_iconup_<%= reply.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:action => 'destroy', :id => reply},
|
||||
:method => :post,
|
||||
:id => "delete_reply_#{reply.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if reply.destroyable_by?(User.current) %>
|
||||
</span>
|
||||
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<p id="reply_message_<%= reply.id%>"></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= render :partial => "messages/project_show_replies" %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
<% @replies.each_with_index do |reply,i| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_message_description_<%= reply.id %>');
|
||||
autoUrl('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
|
||||
<%= render :partial => 'users/message_contents', :locals => {:comment => reply}%>
|
||||
|
||||
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||||
<%= reply.content.html_safe%>
|
||||
</div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
<span class="reply-right">
|
||||
<span id="reply_praise_count_<%= reply.id %>">
|
||||
<%= render :partial => "praise_tread/praise", :locals => {:activity => reply, :user_activity_id => reply.id, :type => "reply"} %>
|
||||
</span>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:action => 'quote', :id => reply},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<span id="reply_iconup_<%= reply.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:action => 'destroy', :id => reply},
|
||||
:method => :post,
|
||||
:id => "delete_reply_#{reply.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if reply.destroyable_by?(User.current) %>
|
||||
</span>
|
||||
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<p id="reply_message_<%= reply.id%>"></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @reply_count > @page * @limit + 10 %>
|
||||
<div id="more_message_replies">
|
||||
<div class="detail_cont_hide clearfix">
|
||||
<span class="orig_icon" >↓ </span>
|
||||
<span class="orig_icon" style="display:none;" > ↑</span>
|
||||
<%= link_to '点击展开更多回复', board_message_path(@topic.board_id, @topic, :page => @page),:remote=>true %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -0,0 +1,7 @@
|
|||
<% if @project %>
|
||||
$("#more_message_replies").replaceWith("<%= escape_javascript(render :partial => 'messages/project_show_replies')%>");
|
||||
<% elsif @course %>
|
||||
$("#more_message_replies").replaceWith("<%= escape_javascript(render :partial => 'messages/course_show_replies')%>");
|
||||
<% else %>
|
||||
$("#more_message_replies").replaceWith("<%= escape_javascript(render :partial => 'messages/org_show_replies')%>");
|
||||
<% end %>
|
|
@ -1,6 +1,6 @@
|
|||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复
|
||||
<sapn class="mr15"><%= @comments.count>0 ? "(#{@comments.count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<sapn class="mr15"><%= @comments_count>0 ? "(#{@comments_count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=@news.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>@news, :user_activity_id=>@news.id,:type=>"activity"}%>
|
||||
</span>
|
||||
|
@ -8,60 +8,7 @@
|
|||
</div>
|
||||
<% unless @comments.empty? %>
|
||||
<div class="" id="reply_div_<%=@news.id %>">
|
||||
<% @comments.each_with_index do |comment,i| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_message_description_<%= comment.id %>');
|
||||
autoUrl('reply_message_description_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=comment.id %>').hide();">
|
||||
<%= render :partial => 'users/news_contents', :locals => {:comment => comment}%>
|
||||
|
||||
<% if !comment.content_detail.blank? %>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.content_detail.html_safe %>
|
||||
</div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
<span class="reply-right">
|
||||
<span id="reply_praise_count_<%=comment.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:controller => 'comments',:action => 'quote', :id => comment},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply))%>
|
||||
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:controller => 'comments',
|
||||
:action => 'destroy', :id => @news,
|
||||
:comment_id => comment},
|
||||
:method => :delete,
|
||||
:id => "delete_reply_#{comment.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if User.current.allowed_to?(:manage_news, object) %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<p id="reply_message_<%= comment.id%>"></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<%= render :partial => 'news/news_replies_detail', :locals => {:object => object} %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
<% @comments.each_with_index do |comment,i| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_message_description_<%= comment.id %>');
|
||||
autoUrl('reply_message_description_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=comment.id %>').hide();">
|
||||
<%= render :partial => 'users/news_contents', :locals => {:comment => comment}%>
|
||||
|
||||
<% if !comment.content_detail.blank? %>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.content_detail.html_safe %>
|
||||
</div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
<span class="reply-right">
|
||||
<span id="reply_praise_count_<%=comment.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:controller => 'comments',:action => 'quote', :id => comment},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply))%>
|
||||
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:controller => 'comments',
|
||||
:action => 'destroy', :id => @news,
|
||||
:comment_id => comment},
|
||||
:method => :delete,
|
||||
:id => "delete_reply_#{comment.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if ((object.kind_of? Organization) ? User.current.allowed_to?(:manage_news, object) : (User.current.admin_of_org?(object) || User.current == comment.author)) %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<p id="reply_message_<%= comment.id%>"></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if @comments_count > @page * @limit + 10 %>
|
||||
<div id="more_news_replies">
|
||||
<div class="detail_cont_hide clearfix">
|
||||
<span class="orig_icon" >↓ </span>
|
||||
<span class="orig_icon" style="display:none;" > ↑</span>
|
||||
<%= link_to '点击展开更多回复', news_path(@news, :page => @page), :remote=>true %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -72,7 +72,7 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="homepagePostReply">
|
||||
<%= render :partial => 'news/news_all_replies' %>
|
||||
<%= render :partial => 'news/news_all_replies', :locals => {:object => @organization} %>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<% if @project %>
|
||||
$("#more_news_replies").replaceWith("<%= escape_javascript(render :partial => 'news/news_replies_detail', :locals => {:object => @project})%>");
|
||||
<% elsif @course %>
|
||||
$("#more_news_replies").replaceWith("<%= escape_javascript(render :partial => 'news/news_replies_detail', :locals => {:object => @course})%>");
|
||||
<% elsif @organization %>
|
||||
$("#more_news_replies").replaceWith("<%= escape_javascript(render :partial => 'news/news_replies_detail', :locals => {:object => @organization})%>");
|
||||
<% end %>
|
|
@ -75,7 +75,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<% all_comments = []%>
|
||||
<% count=get_all_children(all_comments, @document).count %>
|
||||
<% all_replies = get_all_children(all_comments, @document) %>
|
||||
<% count = all_replies.count %>
|
||||
|
||||
<div class="homepagePostReply fl" style="background-color: #f1f1f1;" id="<%= @document.id %>">
|
||||
<%# if count > 0 %>
|
||||
|
@ -88,8 +89,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<% all_comments = []%>
|
||||
<% comments = get_all_children(all_comments, @document) %>
|
||||
<% comments = all_replies %>
|
||||
<div class="" id="reply_div_<%= @document.id %>">
|
||||
<% comments.each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -70,12 +70,12 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<% all_comments = []%>
|
||||
<% count=get_all_children(all_comments, activity).count %>
|
||||
<% all_replies = get_all_children(all_comments, activity) %>
|
||||
<% count = all_replies.count %>
|
||||
<div class="homepagePostReply">
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id,:is_course => 0,:is_board =>0} %>
|
||||
|
||||
<% all_comments = []%>
|
||||
<% comments = get_all_children(all_comments, activity)[0..2] %>
|
||||
<% comments = all_replies[0..2] %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'Message', :activity_id =>activity.id, :is_course => 0, :is_board =>0}%>
|
||||
|
|
|
@ -68,13 +68,13 @@
|
|||
</div>
|
||||
</div>
|
||||
<% all_comments = []%>
|
||||
<% count=get_all_children(all_comments, document).count %>
|
||||
<% all_replies = get_all_children(all_comments, document) %>
|
||||
<% count = all_replies.count %>
|
||||
|
||||
<div class="homepagePostReply fl" style="background-color: #f1f1f1;" id="<%= document.id %>">
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => document, :user_activity_id => act.id} %>
|
||||
|
||||
<% all_comments = []%>
|
||||
<% comments = get_all_children(all_comments, document)[0..2] %>
|
||||
<% comments = all_replies[0..2] %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= act.id %>">
|
||||
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => act.id, :type => 'OrgDocumentComment', :activity_id =>document.id}%>
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
<%= render :partial => 'dir_list' %>
|
||||
<% end %>
|
||||
|
||||
<a href="https://<%=Setting.host_name %>/forums/1/memos/1232" >如何提交代码</a>
|
||||
<a href="<%= Setting.protocol + "://" %><%=Setting.host_name %>/forums/1/memos/1232" >如何提交代码</a>
|
||||
<div class="fr">
|
||||
<a style="color: #7f7f7f;">导出统计结果:</a>
|
||||
<%= link_to "最近一周", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "week" } %> <a style="color: #7f7f7f;">|</a>
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
<% is_expand = st.student_work_projects.empty? %>
|
||||
<ul id="syllabus_course_ul">
|
||||
<li class="syllabus_class_list" style="line-height:44px; vertical-align:middle;">
|
||||
<div class="syllabus_class_w fontGrey3">
|
||||
<div class="syllabus_class_w fontGrey3 student_work_<%= st.id%>" style="<%=!is_expand ? '' : 'cursor: pointer;' %>" <%= !is_expand ? '' : "onclick = "+"show_student_work('"+"#{student_work_path(st)}"+"')" %>>
|
||||
<%= link_to(image_tag(url_to_avatar(st.user),:width =>"40",:height => "40", :style => "display:block;"),user_activities_path(st.user), :class => "fl") %>
|
||||
<% if !st.student_work_projects.empty? %>
|
||||
<% if !is_expand %>
|
||||
<span class="fl student_work_<%= st.id%>" style="width:135px;">
|
||||
<span class="fl hidden ml5" style="max-width:90px;"><%= st.user.show_name %></span>
|
||||
<span class="fl">(组长)</span>
|
||||
|
@ -11,10 +12,10 @@
|
|||
<span class="fontGrey2">学号</span>:<%= st.user.user_extensions.nil? ? "--" : st.user.user_extensions.student_id%>
|
||||
</span>
|
||||
<% else %>
|
||||
<span class="fl student_work_<%= st.id%>" style="width:135px; cursor: pointer;" onclick="show_student_work('<%= student_work_path(st)%>');">
|
||||
<span class="fl student_work_<%= st.id%>" style="width:135px;">
|
||||
<span class="fl hidden ml5" style="max-width:90px;"><%= st.user.show_name %></span>
|
||||
</span>
|
||||
<span class="fl student_work_<%= st.id%> mr15 hidden" style="width:90px; cursor: pointer;" onclick="show_student_work('<%= student_work_path(st)%>');">
|
||||
<span class="fl student_work_<%= st.id%> mr15 hidden" style="width:90px;">
|
||||
<span class="fontGrey2">学号</span>:<%= st.user.user_extensions.nil? ? "--" : st.user.user_extensions.student_id%>
|
||||
</span>
|
||||
<% end %>
|
||||
|
@ -46,28 +47,31 @@
|
|||
<div class="flex-cell">
|
||||
<% score = st.work_score %>
|
||||
<div class="<%= score_color score%> student_final_scor_info ml35 pr" style="display: inline">
|
||||
<% if is_expand %>
|
||||
<span style="position: absolute;top: -33px; color: #3b94d6; white-space:nowrap;" onclick = "show_student_work(<%= student_work_path(st)%>)">评分</span>
|
||||
<% end %>
|
||||
<%= score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
|
||||
<% unless score.nil?%>
|
||||
<div class="g_infoNi none width180">
|
||||
<div class="g_infoNi none width180" style="line-height: 18px;">
|
||||
作品最终评分为
|
||||
<span class="c_red"> <%= st.final_score%> </span>分。
|
||||
<span class="c_red"> <%= st.final_score%> </span>分<br/>
|
||||
迟交扣分
|
||||
<span class="c_red">
|
||||
<%= st.homework_common && st.homework_common.teacher_priority == 1 && st.teacher_score ? 0 : st.late_penalty %>
|
||||
</span>分,
|
||||
</span>分<br/>
|
||||
缺评扣分
|
||||
<span class="c_red">
|
||||
<%= st.homework_common && st.homework_common.teacher_priority == 1 && st.teacher_score ? 0 : st.absence_penalty%>
|
||||
</span>分,
|
||||
</span>分<br/>
|
||||
最终成绩为
|
||||
<span class="c_red"> <%= format("%.1f",score<0 ? 0 : score)%> </span>分。
|
||||
<span class="c_red"> <%= format("%.1f",score<0 ? 0 : score)%> </span>分
|
||||
</div>
|
||||
<% end%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hworkTip" style="display: none; left:700px; top:20px; white-space:nowrap; right:auto;" id="work_click_<%= st.id%>"><em></em><span></span><font class="fontGrey2"><%= !st.student_work_projects.empty? ? '大作品评分即组长的评分' : '点击查看详情' %></font></div>
|
||||
<div class="hworkTip" style="display: none; left:700px; top:20px; white-space:nowrap; right:auto;" id="work_click_<%= st.id%>"><em></em><span></span><font class="fontGrey2"><%= !st.student_work_projects.empty? ? '大作品评分即组长的评分' : '点击进行评分' %></font></div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -95,19 +95,19 @@
|
|||
<td class="hworkList70 <%= score_color score%> student_final_scor_info">
|
||||
<%= score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
|
||||
<% unless score.nil?%>
|
||||
<div class="infoNi none width180">
|
||||
<div class="infoNi none width180" style="line-height: 18px;">
|
||||
作品最终评分为
|
||||
<span class="c_red"> <%= student_work.final_score%> </span>分。
|
||||
<span class="c_red"> <%= student_work.final_score%> </span>分<br/>
|
||||
迟交扣分
|
||||
<span class="c_red">
|
||||
<%= student_work.homework_common && student_work.homework_common.teacher_priority == 1 && student_work.teacher_score ? 0 : student_work.late_penalty %>
|
||||
</span>分,
|
||||
</span>分<br/>
|
||||
缺评扣分
|
||||
<span class="c_red">
|
||||
<%= student_work.homework_common && student_work.homework_common.teacher_priority == 1 && student_work.teacher_score ? 0 : student_work.absence_penalty%>
|
||||
</span>分,
|
||||
</span>分<br/>
|
||||
最终成绩为
|
||||
<span class="c_red"> <%= format("%.1f",score<0 ? 0 : score)%> </span>分。
|
||||
<span class="c_red"> <%= format("%.1f",score<0 ? 0 : score)%> </span>分<br/>
|
||||
</div>
|
||||
<% end%>
|
||||
</td>
|
||||
|
|
|
@ -54,10 +54,6 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
if($("#homework_info_hidden").is(":hidden"))
|
||||
{
|
||||
$("#homework_info_show").show();
|
||||
}
|
||||
<% if !@is_evaluation && (!@is_teacher || params[:show_work_id].present?) || @message_student_work_id || (@is_evaluation && @is_focus == 1) %>
|
||||
<% if @message_student_work_id %>
|
||||
<% work = @homework.student_works.where("id =?", @message_student_work_id).first %>
|
||||
|
|
|
@ -38,6 +38,6 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
function clickOK() {
|
||||
window.location.href = '<%= student_work_index_url(:homework => @homework.id)%>';
|
||||
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/student_work?homework=" + "<%= @homework.id%>&tab=2"
|
||||
}
|
||||
</script>
|
|
@ -39,6 +39,6 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
function clickOK() {
|
||||
window.location.href = '<%= student_work_index_url(:homework => @homework.id)%>';
|
||||
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/student_work?homework=" + "<%= @homework.id%>&tab=2"
|
||||
}
|
||||
</script>
|
|
@ -57,29 +57,6 @@
|
|||
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
$('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed").css("border","3px solid #269ac9");
|
||||
}
|
||||
|
||||
function show_or_hide_info(){
|
||||
$("#homeworkInformation").toggle();
|
||||
$("#homework_info_hidden").toggle();
|
||||
$("#homework_info_show").toggle();
|
||||
}
|
||||
|
||||
$(function(){
|
||||
if($("#homework_description").height() > 54) {
|
||||
$("#homeworkDetailShow").show();
|
||||
}
|
||||
$("#homeworkDetailShow").click(function(){
|
||||
$("#homeworkDetail").toggleClass("max_h54");
|
||||
$("#homeworkDetailShow").hide();
|
||||
$("#homeworkDetailHide").show();
|
||||
});
|
||||
$("#homeworkDetailHide").click(function(){
|
||||
$("#homeworkDetail").toggleClass("max_h54");
|
||||
$("#homeworkDetailHide").hide();
|
||||
$("#homeworkDetailShow").show();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<div class="homepageRight mt0 ml10">
|
||||
|
|
|
@ -12,5 +12,5 @@ window.location.href = '<%= edit_student_work_url(@work)%>';
|
|||
|
||||
function clickCanel() {
|
||||
hideModal('#popbox02');
|
||||
window.location.href = '<%= student_work_index_url(:homework => @homework.id)%>';
|
||||
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/student_work?homework=" + "<%= @homework.id%>&tab=2"
|
||||
}
|
|
@ -41,12 +41,12 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<% all_comments = []%>
|
||||
<% count=get_all_children(all_comments, activity).count %>
|
||||
<% all_replies = get_all_children(all_comments, activity) %>
|
||||
<% count = all_replies.count %>
|
||||
<div class="homepagePostReply">
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
||||
|
||||
<% all_comments = []%>
|
||||
<% comments = get_all_children(all_comments, activity)[0..2] %>
|
||||
<% comments = all_replies[0..2] %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'JournalsForMessage', :activity_id =>activity.id}%>
|
||||
|
|
|
@ -81,12 +81,12 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<% all_comments = []%>
|
||||
<% count=get_all_children(all_comments, activity).count %>
|
||||
<% all_replies = get_all_children(all_comments, activity) %>
|
||||
<% count = all_replies.count %>
|
||||
<div class="homepagePostReply">
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id,:is_course => is_course,:is_board =>is_board} %>
|
||||
|
||||
<% all_comments = []%>
|
||||
<% comments = get_all_children(all_comments, activity)[0..2] %>
|
||||
<% comments = all_replies[0..2] %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'Message', :activity_id =>activity.id, :is_course => is_course, :is_board =>is_board}%>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<%= user_for_homework_common activity,is_teacher %>
|
||||
</div>
|
||||
<% work = cur_user_works_for_homework activity %>
|
||||
<% if activity.end_time < Date.today && !is_teacher && !work.nil? && work.user == User.current %>
|
||||
<% if !is_teacher && !work.nil? && work.user == User.current && activity.end_time < Date.today %>
|
||||
<div class="homepagePostSubmit">
|
||||
<%=link_to "追加附件", student_work_index_url_in_org(activity.id, 2, 1), :class => 'c_blue', :title => "可追加作品修订附件" %>
|
||||
</div>
|
||||
|
|
|
@ -82,14 +82,14 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<% all_comments = []%>
|
||||
<% count=get_all_children(all_comments, activity).count %>
|
||||
<% all_replies = get_all_children(all_comments, activity) %>
|
||||
<% count = all_replies.count %>
|
||||
<%# allow_delete = (activity.user == User.current || User.current.admin? || User.current.allowed_to?(:as_teacher,activity.course)) %>
|
||||
<%# count = fetch_user_leaveWord_reply(activity).count %>
|
||||
<div class="homepagePostReply">
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id,:is_course => is_course,:is_board =>is_board} %>
|
||||
|
||||
<% all_comments = []%>
|
||||
<% comments = get_all_children(all_comments, activity)[0..2] %>
|
||||
<% comments = all_replies[0..2] %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'Message', :activity_id =>activity.id, :is_course => is_course, :is_board =>is_board}%>
|
||||
|
|
|
@ -42,12 +42,12 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<% all_comments = []%>
|
||||
<% count=get_all_children(all_comments, activity).count %>
|
||||
<% all_replies = get_all_children(all_comments, activity) %>
|
||||
<% count = all_replies.count %>
|
||||
<div class="homepagePostReply">
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :homepage => 0} %>
|
||||
|
||||
<% all_comments = []%>
|
||||
<% comments = get_all_children(all_comments, activity)[0..2] %>
|
||||
<% comments = all_replies[0..2] %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'BlogComment', :activity_id =>activity.id, :homepage => 0, :user_id => activity.author_id}%>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<div id="groupHomework">
|
||||
<div> <span class="f14 mt5 fl fontGrey3 mr10">分组设置:</span>
|
||||
<div class="mr50 fl"> <span class="f14 fontGrey3 mr5">每组最小人数:</span>
|
||||
<input id="min_num" type="text" name="min_num" class="markInput" value="<%=(edit_mode && homework.is_group_homework?) ? homework.homework_detail_group.min_num : 2 %>" <%=not_allow_select ? 'disabled' : '' %>/>人
|
||||
<input id="min_num" type="text" name="min_num" class="markInput" value="<%=(edit_mode && homework.is_group_homework?) ? homework.homework_detail_group.min_num : 2 %>" <%=(not_allow_select && homework.is_group_homework?) ? "onchange = regex_scope(#{homework.homework_detail_group.min_num}, 1)" : '' %>/>人
|
||||
</div>
|
||||
<div class="fl"> <span class="f14 fontGrey3 mr5">每组最大人数:</span>
|
||||
<input id="max_num" type="text" name="max_num" class="markInput" value="<%=(edit_mode && homework.is_group_homework?) ? homework.homework_detail_group.max_num : 10 %>" <%=not_allow_select ? 'disabled' : '' %>/>人
|
||||
<input id="max_num" type="text" name="max_num" class="markInput" value="<%=(edit_mode && homework.is_group_homework?) ? homework.homework_detail_group.max_num : 10 %>" <%=(not_allow_select && homework.is_group_homework?) ? "onchange = regex_scope(#{homework.homework_detail_group.max_num}, 2)" : '' %>/>人
|
||||
</div>
|
||||
<span class="c_red undis ml20 mt7 fl" id="min_max_num_notice"></span>
|
||||
<div class="cl"></div>
|
||||
|
@ -21,7 +21,29 @@
|
|||
<div class="cl"></div>
|
||||
|
||||
<script>
|
||||
if($.trim($("#base_on_project").val()) == 1) {
|
||||
$("#base_on_project").attr('checked','checked');
|
||||
}
|
||||
$(function () {
|
||||
if($.trim($("#base_on_project").val()) == 1) {
|
||||
$("#base_on_project").attr('checked','checked');
|
||||
}
|
||||
<% if not_allow_select && homework.is_group_homework? %>
|
||||
$("#min_num").on('change', function() {
|
||||
var min_num = <%=homework.homework_detail_group.min_num %>;
|
||||
if(parseInt($(this).val()) > min_num) {
|
||||
$(this).val(min_num);
|
||||
$("#min_max_num_notice").html('分组范围不可缩小').show();
|
||||
} else {
|
||||
$("#min_max_num_notice").html('').hide();
|
||||
}
|
||||
});
|
||||
$("#max_num").on('change', function() {
|
||||
var max_num = <%=homework.homework_detail_group.max_num %>;
|
||||
if(parseInt($(this).val()) < max_num) {
|
||||
$(this).val(max_num);
|
||||
$("#min_max_num_notice").html('分组范围不可缩小').show();
|
||||
} else {
|
||||
$("#min_max_num_notice").html('').hide();
|
||||
}
|
||||
});
|
||||
<% end %>
|
||||
});
|
||||
</script>
|
|
@ -7,14 +7,14 @@
|
|||
var first_click = true;
|
||||
$(function(){
|
||||
$("#homework_type_option").on("change",function(){
|
||||
var type = $(this).children('option:selected').val()
|
||||
var type = $(this).children('option:selected').val();
|
||||
if(type == "1"){
|
||||
$("#homeworkSetting").addClass("undis");
|
||||
$("#homeworkSetting").html("");
|
||||
}else if(type == "2"){
|
||||
$("#homeworkSetting").removeClass("undis");
|
||||
$("#homeworkSetting").html("<%=escape_javascript(render :partial => 'users/user_programing_attr', :locals => {:edit_mode => edit_mode, :homework=>homework, :not_allow_select => not_allow_select}) %>");
|
||||
}else{
|
||||
}else if(type == "3"){
|
||||
$("#homeworkSetting").removeClass("undis");
|
||||
$("#homeworkSetting").html("<%=escape_javascript(render :partial => 'users/user_group_attr', :locals => {:edit_mode => edit_mode, :homework=>homework, :not_allow_select => not_allow_select}) %>");
|
||||
}
|
||||
|
|
|
@ -63,12 +63,12 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<% all_comments = []%>
|
||||
<% count=get_all_children(all_comments, activity).count %>
|
||||
<% all_replies = get_all_children(all_comments, activity) %>
|
||||
<% count = all_replies.count %>
|
||||
<div class="homepagePostReply">
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
||||
|
||||
<% all_comments = []%>
|
||||
<% comments = get_all_children(all_comments, activity)[0..2] %>
|
||||
<% comments = all_replies[0..2] %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'JournalsForMessage', :activity_id =>activity.id}%>
|
||||
|
|
|
@ -61,7 +61,7 @@ module Redmine
|
|||
end
|
||||
end
|
||||
|
||||
def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil)
|
||||
def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil, project_id)
|
||||
super
|
||||
@path_encoding = path_encoding.blank? ? 'UTF-8' : path_encoding
|
||||
end
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 4.2 KiB |
|
@ -46,6 +46,7 @@ function add_group(url,course_id) {
|
|||
function edit_group(id,url,course_id,group_id)
|
||||
{
|
||||
var group_name = $('#'+id).val();
|
||||
var group_id = $('#'+group_id).val();
|
||||
$.get(
|
||||
url,
|
||||
{
|
||||
|
@ -56,7 +57,7 @@ function edit_group(id,url,course_id,group_id)
|
|||
},
|
||||
function (data) {
|
||||
if (data.valid) {
|
||||
$("#update_group_"+group_id).submit();
|
||||
$("#update_group_form").submit();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -81,7 +81,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
|
|||
|
||||
/* Float & Clear */
|
||||
.clear{ zoom:1;}
|
||||
.clear:after {content:".";height:0;visibility:hidden;display:block;clear:both;}
|
||||
.clear:after {clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}
|
||||
.cl{ clear:both; overflow:hidden; }
|
||||
.fl{float:left;}
|
||||
.fr{float:right;}
|
||||
|
|
|
@ -530,7 +530,7 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
|
|||
.courseR {width:220px; padding:10px; background-color:#ffffff; margin-top:10px;}
|
||||
|
||||
/*20160310分班样式*/
|
||||
.select-class-option {width:125px;}
|
||||
.select-class-option {width:100px;}
|
||||
|
||||
/*20160520作品列表table*/
|
||||
.hwork-table-wrap {width:720px; border-collapse:collapse; vertical-align:middle; table-layout:fixed;}
|
||||
|
|
|
@ -798,8 +798,8 @@ a:hover.hw_btn_blue,a:active.hw_btn_blue{ background: #3b94d6; color:#fff;}
|
|||
input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;}
|
||||
.issues_data_img{ display:block; width:25px; height:33px; border:1px solid #c8c8c8; border-left:none; background: url("/images/public_icon.png") -29px 9px no-repeat; }
|
||||
/* 缺陷Tab */
|
||||
.issues_con_list{border:1px solid #c8c8c8; }
|
||||
#issues_list_nav {border-bottom:1px solid #d0d0d0;}
|
||||
.issues_con_list{border:1px solid #e5e3da; }
|
||||
#issues_list_nav {border-bottom:1px solid #e5e3da;}
|
||||
#issues_list_nav li {float:left; padding:10px 15px; text-align:center; }
|
||||
#issues_list_nav li a{font-size:12px; color:#444;}
|
||||
.issues_nav_hover{border-bottom:3px solid #3498db; font-weight:bold; }
|
||||
|
@ -816,9 +816,9 @@ input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;}
|
|||
input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;}
|
||||
.issues_data_img{ display:block; width:25px; height:28px; border:1px solid #c8c8c8; border-left:none; background: url("/images/public_icon.png") -29px 9px no-repeat; }
|
||||
|
||||
.issues_list_box{ padding:15px; padding-right: 0px; border-bottom:1px dashed #c8c8c8;}
|
||||
.issues_list_box{ padding:15px; padding-right: 0px; border-bottom:1px dashed #e5e3da;}
|
||||
.issues_list_titlebox{ font-size:14px; font-weight:bold; margin-bottom:8px;}
|
||||
a.issues_list_title{ color:#444; max-width:260px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap; }
|
||||
a.issues_list_title{ color:#444; max-width:300px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap; }
|
||||
a:hover.issues_list_title{color:#3b94d6;}
|
||||
.issues_list_titlebox span{ font-size: 12px;color: #888; font-weight: normal; }
|
||||
.issues_ciricons_01{ width: 22px; height: 22px; display: inline-block; background: url("/images/new_project/icons_issue.png") 0 0 no-repeat;}
|
||||
|
@ -827,7 +827,7 @@ a:hover.issues_list_title{color:#3b94d6;}
|
|||
.issues_list_name{ font-size: 12px;}
|
||||
.issues_list_name:hover{ color: #3b94d6;}
|
||||
.issues_list_small{ font-size: 12px; color: #666;}
|
||||
.issues_list_txt li{ height: 50px; line-height: 50px; float: left; font-size: 12px; width: 70px; text-align: center; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;}
|
||||
.issues_list_txt li{ height: 50px; float: left; font-size: 12px; width: 70px; text-align: center; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;}
|
||||
.issues_list_txt li.issues_list_min{ width: 52px;}
|
||||
|
||||
|
||||
|
|
|
@ -1404,6 +1404,7 @@ a:hover.comment_ding_link{ color:#269ac9;}
|
|||
.orig_icon{ color:#888; margin-right:10px; font-size:14px; font-weight:bold;}
|
||||
|
||||
.relateText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; display:inline-block; font-weight: bold;}
|
||||
.detail_cont_hide{ text-align:center; width:690px; display:block; font-size:14px; color:#333; border-bottom:1px solid #e3e3e3; padding:8px 0; margin: 0px auto;}
|
||||
|
||||
/* 未登录的提示信息 */
|
||||
.syllabusbox_tishi{
|
||||
|
|
|
@ -498,6 +498,11 @@ a:hover.sy_btn_orange{
|
|||
.accordion li.sy_icons_exercise:target > a:before,
|
||||
.accordion li.ssy_icons_exercise > a.active:before { background-position: -23px -290px; }
|
||||
|
||||
.accordion li.sy_icons_group > a:before { background-position: 7px -570px; }
|
||||
.accordion li.sy_icons_group:hover > a:before,
|
||||
.accordion li.sy_icons_group:target > a:before,
|
||||
.accordion li.sy_icons_group > a.active:before { background-position: -23px -570px; }
|
||||
|
||||
.accordion li.sy_icons_st > a:before { background-position: 5px -330px; }
|
||||
.accordion li.sy_icons_st:hover > a:before,
|
||||
.accordion li.sy_icons_st:target > a:before,
|
||||
|
@ -620,7 +625,7 @@ a:hover.sy_class_ltitle{ color:#333;}
|
|||
|
||||
/*20160918教师团队*/
|
||||
.sy_new_tablebox{ padding:15px; padding-bottom:none;}
|
||||
.sy_new_table{ width:100%; background:#fff; border:1px solid #e5e5e5; padding-bottom:30px;}
|
||||
.sy_new_table{ width:100%; background:#fff; border:1px solid #e5e5e5;}
|
||||
.sy_new_table thead tr{ height:40px; line-height:40px;}
|
||||
.sy_new_table thead tr th{ border-bottom:1px solid #e5e5e5;}
|
||||
.sy_new_table tbody tr:hover{ background:#f5f5f5;}
|
||||
|
@ -634,3 +639,40 @@ a:hover.sy_class_ltitle{ color:#333;}
|
|||
.sy_new_name{ display:block;max-width:120px; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
|
||||
.sy_new_long_name{ display:block;width:180px; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
|
||||
.mt12{ margin-top:12px;}
|
||||
|
||||
/*20160919分班*/
|
||||
.sy_class_nobg{ background-color:#eaebec;}
|
||||
.sy_class_r_head{ border: 1px solid #e7e7e7; background-color: #fff; padding:10px 15px; position: relative;}
|
||||
.sy_class_r_head h3{ font-size: 14px; color: #333;}
|
||||
.sy_class_r_more{ display: block;}
|
||||
.sy_class_fenban{border: 1px solid #e7e7e7; background-color: #fff; padding:15px;}
|
||||
.sy_fenban_input{ height: 28px; background-color: #fff; border: 1px solid #d1d1d1;-webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; border:1px solid #d3d3d3;padding-left:5px; color:#888; box-shadow: inset 0px 0px 5px #dcdcdc; }
|
||||
.sy_icons_edit{ display: inline-block; padding:9px;background:url(../images/sy/sy_icons02.png) 0 1px no-repeat; }
|
||||
.sy_icons_del{ padding:9px;background:url(../images/sy/sy_icons02.png) 0 -21px no-repeat;}
|
||||
.sy_icons_edit:hover{ background:url(../images/sy/sy_icons02.png) -20px 1px no-repeat; }
|
||||
.sy_icons_del:hover{ background:url(../images/sy/sy_icons02.png) -20px -21px no-repeat;}
|
||||
.sy_icons_tips{padding:9px;background:url(../images/sy/sy_icons02.png) 0 -66px no-repeat;}
|
||||
.sy_sortupbtn{display: inline-block; width:15px; height:18px;background:url(../images/sy/sy_icons02.png) 0 -39px no-repeat;}
|
||||
.sy_sortdownbtn{display: inline-block; width:15px; height:18px;background:url(../images/sy/sy_icons02.png) -22px -39px no-repeat;}
|
||||
.sy_fenban_list{-webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; border:1px solid #d2d8e6; padding:5px 10px;background: #f8f9fd}
|
||||
.sy_fenban_list a{ color:#3b94d6;}
|
||||
.sy_fenban_list a:hover{ color:#2788d0;}
|
||||
.sy_class_users_st{ width:30px; }
|
||||
.sy_class_users_st_name{ display: inline-block;width:70px; overflow:hidden;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
||||
.sy_class_users_st_num{ display: block;width:90px; overflow:hidden;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
||||
.sy_class_users_st img{ width:30px;height:30px; border: 1px solid #fff;-webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px;}
|
||||
.sy_fenban_select{height: 28px; background-color: #fff; border: 1px solid #d1d1d1;-webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; border:1px solid #d3d3d3;padding-left:5px; color:#888; box-shadow: inset 0px 0px 5px #dcdcdc; }
|
||||
.sy_new_table_width tr th.sy_th10{ width: 10%; }
|
||||
.sy_new_table_width tr th.sy_th0{ width: 12.5%; }
|
||||
.sy_new_table_width tr th.sy_th15{ width: 15%; }
|
||||
.sy_new_table_width tr th.sy_th7{ width: 7%;}
|
||||
.sy_new_table_width tr th.sy_th13{ width: 13%;}
|
||||
.sy_fenban_tap{ cursor: pointer; position: relative;}
|
||||
.sy_fenban_tap:hover .sy_fenban_show{ display: block;}
|
||||
.sy_fenban_show{ width:140px; z-index: 999;text-align: center; line-height:2.0; font-size:12px; font-weight: normal;color:#888;background-color:#fff; border:1px solid #eaeaea;border-radius:5px;position:absolute;left:20px; top:30px;padding:5px 0px;display:none; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);}
|
||||
.sy_tips_box{ position: relative; cursor: pointer;}
|
||||
.sy_tips_box:hover .sy_tips_box_inner{ display: block;}
|
||||
.sy_tips_box_inner{ position: absolute;line-height: 2.0;padding: 5px 10px; white-space: nowrap; background-color: #fff; left:30px; top: -5px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);}
|
||||
.sy_tips_box_inner span { display: block; border-width: 10px;position: absolute;top: 15px; left: -18px; border-style: dashed solid dashed dashed;border-color: transparent #fff transparent transparent;font-size: 0;line-height: 0;}
|
||||
.hw_search_box a.hw_btn_search{display:block; width:20px; height:20px; background:url(../images/hw/icons_hw.png) 0 -57px no-repeat; position:absolute; right:5px; top:5px;}
|
||||
|
||||
|
|
Loading…
Reference in New Issue