Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
b76dd30b6d
|
@ -56,7 +56,7 @@ class ExerciseController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
|
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
|
||||||
exercise_end = @exercise.end_time > Time.now
|
exercise_end = @exercise.end_time.nil? ? false : @exercise.end_time > Time.now
|
||||||
if @exercise.time == -1
|
if @exercise.time == -1
|
||||||
@can_edit_excercise = exercise_end
|
@can_edit_excercise = exercise_end
|
||||||
else
|
else
|
||||||
|
|
|
@ -237,7 +237,8 @@ class IssuesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
@jour_reply = Journal.new
|
@jour_reply = Journal.new
|
||||||
@journals = @issue.journals.includes(:user, :details).reorder("#{Journal.table_name}.id ASC").all
|
@journals = @issue.journals.includes(:user, :details).reorder("#{Journal.table_name}.id desc").all
|
||||||
|
@journals = get_no_children_comments_all @journals
|
||||||
@journals.each_with_index {|j,i| j.indice = i+1}
|
@journals.each_with_index {|j,i| j.indice = i+1}
|
||||||
@journals.reject!(&:private_notes?) unless User.current.allowed_to?(:view_private_notes, @issue.project)
|
@journals.reject!(&:private_notes?) unless User.current.allowed_to?(:view_private_notes, @issue.project)
|
||||||
@journals.reverse! if User.current.wants_comments_in_reverse_order?
|
@journals.reverse! if User.current.wants_comments_in_reverse_order?
|
||||||
|
|
|
@ -351,6 +351,18 @@ class StudentWorkController < ApplicationController
|
||||||
# 作品评论消息状态更新
|
# 作品评论消息状态更新
|
||||||
journals_for_teacher = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =?", User.current.id, @homework.course, "JournalsForMessage", 0)
|
journals_for_teacher = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =?", User.current.id, @homework.course, "JournalsForMessage", 0)
|
||||||
journals_for_teacher.update_all(:viewed => true)
|
journals_for_teacher.update_all(:viewed => true)
|
||||||
|
#匿评申诉消息状态更新
|
||||||
|
if params[:show_work_id]
|
||||||
|
work = @homework.student_works.where("id = #{params[:show_work_id].to_i}").first
|
||||||
|
if work && !work.student_works_scores.where("reviewer_role = 3 and appeal_status != 0").blank?
|
||||||
|
score_ids = "(" + work.student_works_scores.where("reviewer_role = 3 and appeal_status != 0").map{|score| score.id}.join(",") + ")"
|
||||||
|
score_appeal_ids = StudentWorksScoresAppeal.where("student_works_score_id in #{score_ids}").blank? ? "(-1)" : "(" + StudentWorksScoresAppeal.where("student_works_score_id in #{score_ids}").map{|score_appeal| score_appeal.id}.join(",") + ")"
|
||||||
|
anonymous_appeal =AppliedMessage.where("user_id =? and applied_id in #{score_appeal_ids} and applied_type =? and viewed =?", User.current.id, 'StudentWorksScoresAppeal', 0)
|
||||||
|
anonymous_appeal.update_all(:viewed => true)
|
||||||
|
appeal_message = CourseMessage.where("user_id =? and course_id =? and course_message_id in #{score_appeal_ids} and course_message_type =? and viewed =?", User.current.id, @homework.course, "StudentWorksScoresAppeal", 0)
|
||||||
|
appeal_message.update_all(:viewed => true)
|
||||||
|
end
|
||||||
|
end
|
||||||
##################################################################################################################
|
##################################################################################################################
|
||||||
@order,@b_sort,@name,@group = params[:order] || "score",params[:sort] || "desc",params[:name].to_s.strip || "",params[:group]
|
@order,@b_sort,@name,@group = params[:order] || "score",params[:sort] || "desc",params[:name].to_s.strip || "",params[:group]
|
||||||
@homework_commons = @course.homework_commons.where("publish_time <= ?",Time.now.strftime("%Y-%m-%d")).order("created_at desc")
|
@homework_commons = @course.homework_commons.where("publish_time <= ?",Time.now.strftime("%Y-%m-%d")).order("created_at desc")
|
||||||
|
@ -697,6 +709,16 @@ class StudentWorkController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
#匿评申诉消息状态更新
|
||||||
|
if @work && !@work.student_works_scores.where("reviewer_role = 3 and appeal_status != 0").blank?
|
||||||
|
score_ids = "(" + @work.student_works_scores.where("reviewer_role = 3 and appeal_status != 0").map{|score| score.id}.join(",") + ")"
|
||||||
|
score_appeal_ids = StudentWorksScoresAppeal.where("student_works_score_id in #{score_ids}").blank? ? "(-1)" : "(" + StudentWorksScoresAppeal.where("student_works_score_id in #{score_ids}").map{|score_appeal| score_appeal.id}.join(",") + ")"
|
||||||
|
anonymous_appeal =AppliedMessage.where("user_id =? and applied_id in #{score_appeal_ids} and applied_type =? and viewed =?", User.current.id, 'StudentWorksScoresAppeal', 0)
|
||||||
|
anonymous_appeal.update_all(:viewed => true)
|
||||||
|
appeal_message = CourseMessage.where("user_id =? and course_id =? and course_message_id in #{score_appeal_ids} and course_message_type =? and viewed =?", User.current.id, @homework.course, "StudentWorksScoresAppeal", 0)
|
||||||
|
appeal_message.update_all(:viewed => true)
|
||||||
|
end
|
||||||
|
|
||||||
@score = student_work_score @work,User.current
|
@score = student_work_score @work,User.current
|
||||||
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
|
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
|
||||||
if @homework.homework_detail_manual.comment_status == 2 && !@is_teacher && @work.user != User.current
|
if @homework.homework_detail_manual.comment_status == 2 && !@is_teacher && @work.user != User.current
|
||||||
|
@ -853,7 +875,7 @@ class StudentWorkController < ApplicationController
|
||||||
end
|
end
|
||||||
when 3 #学生评分 学生评分显示平均分
|
when 3 #学生评分 学生评分显示平均分
|
||||||
#@work.student_score = @work.student_works_scores.where(:reviewer_role => 3).average(:score).try(:round, 2).to_f
|
#@work.student_score = @work.student_works_scores.where(:reviewer_role => 3).average(:score).try(:round, 2).to_f
|
||||||
stu_score = StudentWorksScore.find_by_sql("SELECT AVG(score) AS score FROM (SELECT * FROM (SELECT * FROM student_works_scores WHERE student_work_id = #{@work.id} AND reviewer_role = 3 ORDER BY created_at DESC) AS t GROUP BY user_id) AS a")
|
stu_score = StudentWorksScore.find_by_sql("SELECT AVG(score) AS score FROM (SELECT * FROM (SELECT * FROM student_works_scores WHERE student_work_id = #{@work.id} AND reviewer_role = 3 AND appeal_status != 3 ORDER BY created_at DESC) AS t GROUP BY user_id) AS a")
|
||||||
@work.student_score = stu_score.first.score.try(:round, 2).to_f
|
@work.student_score = stu_score.first.score.try(:round, 2).to_f
|
||||||
if @is_group_leader
|
if @is_group_leader
|
||||||
add_score_to_member @work, @homework, @new_score
|
add_score_to_member @work, @homework, @new_score
|
||||||
|
@ -995,6 +1017,26 @@ class StudentWorkController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
unless (params[:anonymous_appeal].to_i == 1 && @homework.anonymous_appeal == 1 && params[:appeal_penalty].to_i == homework_detail_manual.homework_detail_manual) || (params[:anonymous_appeal].to_i == 0 && @homework.anonymous_appeal == 0)
|
||||||
|
if params[:anonymous_appeal].to_i == 0 && @homework.anonymous_appeal != 0
|
||||||
|
homework_detail_manual.appeal_penalty = 0
|
||||||
|
StudentWork.where("homework_common_id = #{@homework.id} and work_status != 0").each do |student_work|
|
||||||
|
student_work.update_attribute('appeal_penalty', 0)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
homework_detail_manual.appeal_penalty = params[:appeal_penalty].to_i
|
||||||
|
work_ids = "(" + @homework.student_works.has_committed.map(&:id).join(",") + ")"
|
||||||
|
@homework.student_works.where("work_status != 0").each do |student_work|
|
||||||
|
appeal_penalty_count = student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and appeal_status = 3").count
|
||||||
|
student_work.appeal_penalty = appeal_penalty_count > 0 ? appeal_penalty_count * params[:appeal_penalty].to_i : 0
|
||||||
|
student_work.save
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@homework.anonymous_appeal = params[:anonymous_appeal].to_i
|
||||||
|
homework_detail_manual.save if homework_detail_manual
|
||||||
|
end
|
||||||
|
|
||||||
no_anon_penalty = params[:no_anon_penalty] ? 0 : 1
|
no_anon_penalty = params[:no_anon_penalty] ? 0 : 1
|
||||||
if no_anon_penalty != homework_detail_manual.no_anon_penalty
|
if no_anon_penalty != homework_detail_manual.no_anon_penalty
|
||||||
homework_detail_manual.no_anon_penalty = no_anon_penalty
|
homework_detail_manual.no_anon_penalty = no_anon_penalty
|
||||||
|
@ -1059,6 +1101,62 @@ class StudentWorkController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def appeal_anonymous_score
|
||||||
|
@student_work_score = StudentWorksScore.where("id = #{params[:score_id].to_i}").first
|
||||||
|
@is_last = params[:is_last]
|
||||||
|
if @student_work_score
|
||||||
|
@student_work_score.update_column('appeal_status', 1)
|
||||||
|
score_appeal = StudentWorksScoresAppeal.create(:user_id => User.current.id, :student_works_score_id => @student_work_score.id, :comment => params[:appeal][:comment], :appeal_status => 1)
|
||||||
|
course = @student_work_score.student_work.homework_common.course
|
||||||
|
course.members.includes(:member_roles).where("member_roles.role_id in (3, 7, 9)").each do |member|
|
||||||
|
AppliedMessage.create(:user_id => member.user_id, :status => 0, :viewed => 0, :applied_id => score_appeal.id, :applied_type => 'StudentWorksScoresAppeal', :applied_user_id => User.current.id)
|
||||||
|
end
|
||||||
|
CourseMessage.create(:user_id => @student_work_score.user_id, :course_id => course.id, :viewed => false,:course_message_id=> score_appeal.id,:course_message_type=>'StudentWorksScoresAppeal',:status=>1)
|
||||||
|
end
|
||||||
|
@homework = @student_work_score.student_work.homework_common
|
||||||
|
@is_teacher = User.current.allowed_to?(:as_teacher, course) || User.current.admin?
|
||||||
|
end
|
||||||
|
|
||||||
|
def alert_appeal_box
|
||||||
|
@student_work_score = StudentWorksScore.where("id = #{params[:score_id].to_i}").first
|
||||||
|
@is_last = params[:is_last]
|
||||||
|
end
|
||||||
|
|
||||||
|
def deal_appeal_score
|
||||||
|
@student_work_score = StudentWorksScore.where("id = #{params[:score_id].to_i}").first
|
||||||
|
@is_last = params[:is_last]
|
||||||
|
if @student_work_score
|
||||||
|
@student_work_score.update_column('appeal_status', params[:status].to_i)
|
||||||
|
score_appeal = @student_work_score.student_works_scores_appeal
|
||||||
|
score_appeal.applied_messages.update_all(:status => params[:status].to_i == 2 ? 3 : (params[:status].to_i == 3 ? 1 : 2))
|
||||||
|
if params[:status].to_i == 3 || params[:status].to_i == 4
|
||||||
|
homework = @student_work_score.student_work.homework_common
|
||||||
|
if params[:status].to_i == 3
|
||||||
|
# 申诉成功后 扣匿评学生的违规匿评扣分
|
||||||
|
sw = homework.student_works.where("user_id = #{@student_work_score.user_id}").first
|
||||||
|
sw.update_attribute("appeal_penalty", homework.homework_detail_manual.appeal_penalty + sw.appeal_penalty)
|
||||||
|
|
||||||
|
# 申诉成功 重新计算申诉者的匿评分
|
||||||
|
work = @student_work_score.student_work
|
||||||
|
if work.student_works_scores.where("reviewer_role = 3 AND appeal_status != 3").count > 0
|
||||||
|
stu_score = StudentWorksScore.find_by_sql("SELECT AVG(score) AS score FROM (SELECT * FROM (SELECT * FROM student_works_scores WHERE student_work_id = #{@student_work_score.student_work_id} AND reviewer_role = 3 AND appeal_status != 3 ORDER BY created_at DESC) AS t GROUP BY user_id) AS a")
|
||||||
|
work.student_score = stu_score.first.score.try(:round, 2).to_f
|
||||||
|
else
|
||||||
|
work.student_score = nil
|
||||||
|
end
|
||||||
|
@student_work_score.student_work.save
|
||||||
|
end
|
||||||
|
course = homework.course
|
||||||
|
CourseMessage.create(:user_id => @student_work_score.user_id, :course_id => course.id, :viewed => false,:course_message_id=> score_appeal.id,:course_message_type=>'StudentWorksScoresAppeal',:status=>params[:status].to_i,:apply_result =>User.current.id)
|
||||||
|
CourseMessage.create(:user_id => score_appeal.user_id, :course_id => course.id, :viewed => false,:course_message_id=> score_appeal.id,:course_message_type=>'StudentWorksScoresAppeal',:status=>params[:status].to_i,:apply_result =>User.current.id)
|
||||||
|
end
|
||||||
|
@homework = @student_work_score.student_work.homework_common
|
||||||
|
@is_teacher = User.current.allowed_to?(:as_teacher, course) || User.current.admin?
|
||||||
|
@work = @student_work_score.student_work
|
||||||
|
@is_group_leader = !@work.student_work_projects.empty?
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def forbidden_anonymous_comment
|
def forbidden_anonymous_comment
|
||||||
@homework.update_column('anonymous_comment', @homework.anonymous_comment == 0 ? 1 : 0)
|
@homework.update_column('anonymous_comment', @homework.anonymous_comment == 0 ? 1 : 0)
|
||||||
homework_detail_manual = @homework.homework_detail_manual
|
homework_detail_manual = @homework.homework_detail_manual
|
||||||
|
@ -1558,7 +1656,7 @@ class StudentWorkController < ApplicationController
|
||||||
student_work.final_score = format("%.2f",final_score.to_f)
|
student_work.final_score = format("%.2f",final_score.to_f)
|
||||||
end
|
end
|
||||||
if student_work.final_score
|
if student_work.final_score
|
||||||
score = student_work.final_score - student_work.absence_penalty - student_work.late_penalty
|
score = student_work.final_score - student_work.absence_penalty - student_work.late_penalty - student_work.appeal_penalty
|
||||||
student_work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) if score
|
student_work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) if score
|
||||||
else
|
else
|
||||||
student_work.work_score = nil
|
student_work.work_score = nil
|
||||||
|
@ -1577,7 +1675,7 @@ class StudentWorkController < ApplicationController
|
||||||
student_work.final_score = format("%.2f",final_score.to_f)
|
student_work.final_score = format("%.2f",final_score.to_f)
|
||||||
end
|
end
|
||||||
if student_work.final_score
|
if student_work.final_score
|
||||||
score = student_work.final_score - student_work.absence_penalty - student_work.late_penalty
|
score = student_work.final_score - student_work.absence_penalty - student_work.late_penalty - student_work.appeal_penalty
|
||||||
student_work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) if score
|
student_work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) if score
|
||||||
else
|
else
|
||||||
student_work.work_score = nil
|
student_work.work_score = nil
|
||||||
|
@ -1587,7 +1685,7 @@ class StudentWorkController < ApplicationController
|
||||||
if homework.teacher_priority == 1 #教师优先
|
if homework.teacher_priority == 1 #教师优先
|
||||||
if student_work.teacher_score
|
if student_work.teacher_score
|
||||||
student_work.final_score = student_work.teacher_score
|
student_work.final_score = student_work.teacher_score
|
||||||
student_work.work_score = student_work.teacher_score - student_work.absence_penalty - student_work.late_penalty
|
student_work.work_score = student_work.teacher_score - student_work.absence_penalty - student_work.late_penalty - student_work.appeal_penalty
|
||||||
else
|
else
|
||||||
if student_work.teaching_asistant_score.nil? #教辅未评分
|
if student_work.teaching_asistant_score.nil? #教辅未评分
|
||||||
if student_work.student_score.nil?
|
if student_work.student_score.nil?
|
||||||
|
@ -1617,7 +1715,7 @@ class StudentWorkController < ApplicationController
|
||||||
student_work.final_score = format("%.2f",final_score.to_f)
|
student_work.final_score = format("%.2f",final_score.to_f)
|
||||||
end
|
end
|
||||||
if student_work.final_score
|
if student_work.final_score
|
||||||
score = student_work.final_score - student_work.absence_penalty - student_work.late_penalty
|
score = student_work.final_score - student_work.absence_penalty - student_work.late_penalty - student_work.appeal_penalty
|
||||||
student_work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) if score
|
student_work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) if score
|
||||||
else
|
else
|
||||||
student_work.work_score = nil
|
student_work.work_score = nil
|
||||||
|
@ -1652,7 +1750,7 @@ class StudentWorkController < ApplicationController
|
||||||
student_work.final_score = format("%.2f",final_score.to_f)
|
student_work.final_score = format("%.2f",final_score.to_f)
|
||||||
end
|
end
|
||||||
if student_work.final_score
|
if student_work.final_score
|
||||||
score = student_work.final_score - student_work.absence_penalty - student_work.late_penalty
|
score = student_work.final_score - student_work.absence_penalty - student_work.late_penalty - student_work.appeal_penalty
|
||||||
student_work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) if score
|
student_work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) if score
|
||||||
else
|
else
|
||||||
student_work.work_score = nil
|
student_work.work_score = nil
|
||||||
|
|
|
@ -33,6 +33,12 @@ module UsersHelper
|
||||||
result = unsolved_issues_count + unfinished_homework_count + unfinished_test_count + unfinished_poll_count + anonymous_evaluation_count + unapproval_homework
|
result = unsolved_issues_count + unfinished_homework_count + unfinished_test_count + unfinished_poll_count + anonymous_evaluation_count + unapproval_homework
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 判断某个时间再多少天前
|
||||||
|
# params[:num] 天数
|
||||||
|
def many_days_ago time, num
|
||||||
|
time > Time.now - 86400 * num
|
||||||
|
end
|
||||||
|
|
||||||
def issue_list(issues, &block)
|
def issue_list(issues, &block)
|
||||||
ancestors = []
|
ancestors = []
|
||||||
issues.each do |issue|
|
issues.each do |issue|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class AppliedMessage < ActiveRecord::Base
|
class AppliedMessage < ActiveRecord::Base
|
||||||
# status: 0表示未批准; status:1表示已批准; status: 2表示已拒绝
|
# status: 0表示未批准; status:1表示已批准; status: 2表示已拒绝; status: 3撤销
|
||||||
|
|
||||||
attr_accessible :applied_id, :applied_type, :status, :user_id, :viewed, :applied_user_id, :role, :project_id, :name
|
attr_accessible :applied_id, :applied_type, :status, :user_id, :viewed, :applied_user_id, :role, :project_id, :name
|
||||||
belongs_to :applied ,:polymorphic => true
|
belongs_to :applied ,:polymorphic => true
|
||||||
|
|
|
@ -5,6 +5,8 @@ class CourseMessage < ActiveRecord::Base
|
||||||
# HomeworkCommon:status:
|
# HomeworkCommon:status:
|
||||||
# nil:发布了作业; 1:作业截止时间到了提醒!;2:开启匿评; 3:关闭匿评; 4:匿评开始失败; 5:申请引用作业, 6:申请结果
|
# nil:发布了作业; 1:作业截止时间到了提醒!;2:开启匿评; 3:关闭匿评; 4:匿评开始失败; 5:申请引用作业, 6:申请结果
|
||||||
# apply_user_id: 申请者的用户id
|
# apply_user_id: 申请者的用户id
|
||||||
|
# StudentWorksScoresAppeal: status:
|
||||||
|
# 1: 申诉中, 2:申诉撤销, 3:申诉成功, 4:申诉被拒绝
|
||||||
attr_accessible :course_id, :course_message_id, :course_message_type, :user_id, :viewed, :content, :status, :apply_user_id, :apply_result
|
attr_accessible :course_id, :course_message_id, :course_message_type, :user_id, :viewed, :content, :status, :apply_user_id, :apply_result
|
||||||
|
|
||||||
# 多态 虚拟关联
|
# 多态 虚拟关联
|
||||||
|
|
|
@ -53,7 +53,7 @@ class StudentWork < ActiveRecord::Base
|
||||||
if homework.teacher_priority == 1 #教师优先
|
if homework.teacher_priority == 1 #教师优先
|
||||||
if student_work.teacher_score
|
if student_work.teacher_score
|
||||||
student_work.final_score = student_work.teacher_score
|
student_work.final_score = student_work.teacher_score
|
||||||
student_work.work_score = student_work.teacher_score - student_work.absence_penalty - student_work.late_penalty
|
student_work.work_score = student_work.teacher_score - student_work.absence_penalty - student_work.late_penalty - student_work.appeal_penalty
|
||||||
else
|
else
|
||||||
if student_work.teaching_asistant_score.nil?
|
if student_work.teaching_asistant_score.nil?
|
||||||
student_work.final_score = student_work.student_score
|
student_work.final_score = student_work.student_score
|
||||||
|
@ -67,7 +67,7 @@ class StudentWork < ActiveRecord::Base
|
||||||
student_work.final_score = format("%.2f",final_score.to_f)
|
student_work.final_score = format("%.2f",final_score.to_f)
|
||||||
end
|
end
|
||||||
if student_work.final_score
|
if student_work.final_score
|
||||||
score = student_work.final_score - student_work.absence_penalty - student_work.late_penalty
|
score = student_work.final_score - student_work.absence_penalty - student_work.late_penalty - student_work.appeal_penalty
|
||||||
student_work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) if score
|
student_work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) if score
|
||||||
else
|
else
|
||||||
student_work.work_score = nil
|
student_work.work_score = nil
|
||||||
|
@ -88,7 +88,7 @@ class StudentWork < ActiveRecord::Base
|
||||||
student_work.final_score = format("%.2f",final_score.to_f)
|
student_work.final_score = format("%.2f",final_score.to_f)
|
||||||
end
|
end
|
||||||
if student_work.final_score
|
if student_work.final_score
|
||||||
score = student_work.final_score - student_work.absence_penalty - student_work.late_penalty
|
score = student_work.final_score - student_work.absence_penalty - student_work.late_penalty - student_work.appeal_penalty
|
||||||
student_work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) if score
|
student_work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) if score
|
||||||
else
|
else
|
||||||
student_work.work_score = nil
|
student_work.work_score = nil
|
||||||
|
@ -98,7 +98,7 @@ class StudentWork < ActiveRecord::Base
|
||||||
if homework.teacher_priority == 1 #教师优先
|
if homework.teacher_priority == 1 #教师优先
|
||||||
if student_work.teacher_score
|
if student_work.teacher_score
|
||||||
student_work.final_score = student_work.teacher_score
|
student_work.final_score = student_work.teacher_score
|
||||||
student_work.work_score = student_work.teacher_score - student_work.absence_penalty - student_work.late_penalty
|
student_work.work_score = student_work.teacher_score - student_work.absence_penalty - student_work.late_penalty - student_work.appeal_penalty
|
||||||
else
|
else
|
||||||
if student_work.teaching_asistant_score.nil? #教辅未评分
|
if student_work.teaching_asistant_score.nil? #教辅未评分
|
||||||
if student_work.student_score.nil?
|
if student_work.student_score.nil?
|
||||||
|
@ -128,7 +128,7 @@ class StudentWork < ActiveRecord::Base
|
||||||
student_work.final_score = format("%.2f",final_score.to_f)
|
student_work.final_score = format("%.2f",final_score.to_f)
|
||||||
end
|
end
|
||||||
if student_work.final_score
|
if student_work.final_score
|
||||||
score = student_work.final_score - student_work.absence_penalty - student_work.late_penalty
|
score = student_work.final_score - student_work.absence_penalty - student_work.late_penalty - student_work.appeal_penalty
|
||||||
student_work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) if score
|
student_work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) if score
|
||||||
else
|
else
|
||||||
student_work.work_score = nil
|
student_work.work_score = nil
|
||||||
|
@ -163,7 +163,7 @@ class StudentWork < ActiveRecord::Base
|
||||||
student_work.final_score = format("%.2f",final_score.to_f)
|
student_work.final_score = format("%.2f",final_score.to_f)
|
||||||
end
|
end
|
||||||
if student_work.final_score
|
if student_work.final_score
|
||||||
score = student_work.final_score - student_work.absence_penalty - student_work.late_penalty
|
score = student_work.final_score - student_work.absence_penalty - student_work.late_penalty - student_work.appeal_penalty
|
||||||
student_work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) if score
|
student_work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) if score
|
||||||
else
|
else
|
||||||
student_work.work_score = nil
|
student_work.work_score = nil
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
#encoding=UTF-8
|
#encoding=UTF-8
|
||||||
class StudentWorksScore < ActiveRecord::Base
|
class StudentWorksScore < ActiveRecord::Base
|
||||||
#reviewer_role: 1:教师评分;2:教辅评分;3:学生匿评
|
#reviewer_role: 1:教师评分;2:教辅评分;3:学生匿评
|
||||||
|
#appeal_status: 0:正常;1:申诉中,2:撤销申诉;3:申诉成功;4申诉被拒绝
|
||||||
attr_accessible :student_work_id, :user_id, :score, :comment, :reviewer_role
|
attr_accessible :student_work_id, :user_id, :score, :comment, :reviewer_role
|
||||||
|
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
belongs_to :student_work
|
belongs_to :student_work
|
||||||
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
|
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
|
||||||
has_many :course_messages, :class_name =>'CourseMessage', :as => :course_message, :dependent => :destroy
|
has_many :course_messages, :class_name =>'CourseMessage', :as => :course_message, :dependent => :destroy
|
||||||
|
has_one :student_works_scores_appeal, :dependent => :destroy
|
||||||
|
|
||||||
acts_as_attachable
|
acts_as_attachable
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
class StudentWorksScoresAppeal < ActiveRecord::Base
|
||||||
|
attr_accessible :appeal_status, :comment, :student_works_score_id, :user_id
|
||||||
|
has_many :course_messages, :class_name =>'CourseMessage', :as => :course_message, :dependent => :destroy
|
||||||
|
has_many :applied_messages, :class_name => 'AppliedMessage', :as => :applied, :dependent => :destroy
|
||||||
|
belongs_to :student_works_score
|
||||||
|
belongs_to :user
|
||||||
|
end
|
|
@ -110,6 +110,7 @@ class User < Principal
|
||||||
has_many :student_works_evaluation_distributions, :dependent => :destroy
|
has_many :student_works_evaluation_distributions, :dependent => :destroy
|
||||||
has_many :student_works_scores, :dependent => :destroy
|
has_many :student_works_scores, :dependent => :destroy
|
||||||
has_many :student_work_projects, :dependent => :destroy
|
has_many :student_work_projects, :dependent => :destroy
|
||||||
|
has_many :student_works_scores_appeals, :dependent => :destroy
|
||||||
has_many :apply_homeworks, :dependent => :destroy
|
has_many :apply_homeworks, :dependent => :destroy
|
||||||
has_many :apply_resources, :dependent => :destroy
|
has_many :apply_resources, :dependent => :destroy
|
||||||
#end
|
#end
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<input type="text" name="article_homepage[title]" id="message_subject" class="InputBox" style="width: 99.5%;" maxlength="255" onkeyup="regexTopicSubject();" placeholder="请输入标题,例如:张小兰的个人主页" value="<%=@article.title %>" />
|
<input type="text" name="article_homepage[title]" id="message_subject" class="InputBox" style="width: 99.5%;" maxlength="255" onkeyup="regexTopicSubject();" placeholder="请输入标题" value="<%=@article.title %>" />
|
||||||
<p id="subjectmsg"></p>
|
<p id="subjectmsg"></p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -8,21 +8,8 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="fontGrey7"> 活跃度 </span>
|
<span class="fontGrey7"> 活跃度 </span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<a class="sy_cmore fr" onmouseover ="message_titile_show2($(this),event)" onmouseout ="message_titile_hide2($(this))" style="cursor: pointer; position:relative;">积分规则</a>
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</h3>
|
</h3>
|
||||||
<div class="numIntro undis" style="cursor:pointer;">
|
|
||||||
<div class="active-degree-rule">
|
|
||||||
积分规则<br/>
|
|
||||||
资源发布:资源数 x 5 <br/>
|
|
||||||
问答发布:发帖数 x 2 <br/>
|
|
||||||
通知发布:通知数 x 1 <br/>
|
|
||||||
问答回复:回复数 x 1 <br/>
|
|
||||||
作业留言:留言数 x 1 <br/>
|
|
||||||
通知留言:留言数 x 1 <br/>
|
|
||||||
班级留言:留言数 x 1 <br/>
|
|
||||||
总得分为以上得分之和</div>
|
|
||||||
</div>
|
|
||||||
<% contributor_course_scor(course.id).each do |contributor_score| %>
|
<% contributor_course_scor(course.id).each do |contributor_score| %>
|
||||||
<% total_score = contributor_score.con_score %>
|
<% total_score = contributor_score.con_score %>
|
||||||
<% if !total_score.nil? && total_score !=0 %>
|
<% if !total_score.nil? && total_score !=0 %>
|
||||||
|
|
|
@ -7,12 +7,8 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="fontGrey7">英雄榜</span>
|
<span class="fontGrey7">英雄榜</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<a class="contributor_course" onmouseover ="message_titile_show2($(this),event)" onmouseout ="message_titile_hide2($(this))" style="cursor:pointer;">积分规则</a></h4>
|
</h4>
|
||||||
<div style="cursor:pointer;" class="numIntro undis">
|
|
||||||
<div class="hero-degree-rule">积分规则<br/>
|
|
||||||
英雄榜的得分是每个同学作业的得分总和
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% hero_homework_scores.each do |student_score| %>
|
<% hero_homework_scores.each do |student_score| %>
|
||||||
<% if student_score.score.to_i != 0 %>
|
<% if student_score.score.to_i != 0 %>
|
||||||
<li> <a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(student_score.user), :width => "35", :height => "35", :class=> "rankPortrait"),user_path(student_score.user) %></a>
|
<li> <a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(student_score.user), :width => "35", :height => "35", :class=> "rankPortrait"),user_path(student_score.user) %></a>
|
||||||
|
|
|
@ -79,8 +79,8 @@
|
||||||
<% sum = hw_score + ex_score + act_score %>
|
<% sum = hw_score + ex_score + act_score %>
|
||||||
<td><%= (@page - 1) * @limit + i + 1 %></td>
|
<td><%= (@page - 1) * @limit + i + 1 %></td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to image_tag(url_to_avatar(user), :width => "30", :height => "30", :style => "display:block;"), user_path(user), :class => 'sy_class_users_st fl mt5 mr5' ,:alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(user), :width => "30", :height => "30", :style => "display:block;"), user_path(user), :class => 'sy_class_users_st fl mt5 mr5' ,:alt => "用户头像", :target => '_blank' %>
|
||||||
<%= link_to user.show_name, user_path(user), :class => 'fl sy_class_users_st_name' ,:title => "#{user.show_name}" %>
|
<%= link_to user.show_name, user_path(user), :class => 'fl sy_class_users_st_name' ,:title => "#{user.show_name}", :target => '_blank' %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="sy_class_users_st_num" title="<%= user.user_extensions.student_id %>"><%= user.user_extensions.student_id %></span>
|
<span class="sy_class_users_st_num" title="<%= user.user_extensions.student_id %>"><%= user.user_extensions.student_id %></span>
|
||||||
|
|
|
@ -13,7 +13,9 @@
|
||||||
<% unless exercise.publish_time.nil? %>
|
<% unless exercise.publish_time.nil? %>
|
||||||
<span class="mr100">发布时间:<%=Time.parse(h(exercise.publish_time)).strftime("%Y-%m-%d %H:%M:%S") %></span>
|
<span class="mr100">发布时间:<%=Time.parse(h(exercise.publish_time)).strftime("%Y-%m-%d %H:%M:%S") %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<span class="mr100">截止时间:<%=Time.parse(h(exercise.end_time)).strftime("%Y-%m-%d %H:%M:%S") %></span>
|
<% unless exercise.end_time.nil? %>
|
||||||
|
<span class="mr100">截止时间:<%=Time.parse(h(exercise.end_time)).strftime("%Y-%m-%d %H:%M:%S") %></span>
|
||||||
|
<% end %>
|
||||||
<% if exercise.time != -1 %>
|
<% if exercise.time != -1 %>
|
||||||
<span class="fr">测验时长:<%=exercise.time %>分钟</span>
|
<span class="fr">测验时长:<%=exercise.time %>分钟</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="muban_popup_box" style="width:550px;">
|
<div id="muban_popup_box" style="width:600px;">
|
||||||
<div class="muban_popup_top">
|
<div class="muban_popup_top">
|
||||||
<h3 class="fl">评分设置</h3>
|
<h3 class="fl">评分设置</h3>
|
||||||
<a href="javascript:void(0);" class="muban_icons_close fr"></a>
|
<a href="javascript:void(0);" class="muban_icons_close fr"></a>
|
||||||
|
@ -21,6 +21,23 @@
|
||||||
<label class="pop_box_label fl ml10" for="no_anon_penalty" style="text-align: left; width: 120px;">扣分(不参加匿评)</label>
|
<label class="pop_box_label fl ml10" for="no_anon_penalty" style="text-align: left; width: 120px;">扣分(不参加匿评)</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="mb10 clear mt30">
|
<li class="mb10 clear mt30">
|
||||||
|
<label class="pop_box_label fl">匿评申诉 : </label>
|
||||||
|
<ul class="fl">
|
||||||
|
<li class="clear">
|
||||||
|
<input type="radio" class="fl" id="anonymous_appeal" value="1" name="anonymous_appeal"/>
|
||||||
|
<label for="anonymous_appeal" class="fl ml5">启用</label>
|
||||||
|
</li>
|
||||||
|
<li class="clear" style="margin-top: 27px;">
|
||||||
|
<label class="pop_box_label fl">违规匿评扣分 : </label>
|
||||||
|
<input type="text" style="width: 75px; padding-left: 10px;" id="appeal_penalty" name="appeal_penalty" placeholder="0-50" value="<%=homework.homework_detail_manual.appeal_penalty %>" class="fl">
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="mb10 clear" style="margin-top: 45px;">
|
||||||
|
<label class="pop_box_label fl"> </label>
|
||||||
|
<input type="radio" class="fl" value="0" id="no_anonymous_appeal" name="anonymous_appeal"/><label for="no_anonymous_appeal" class="fl ml5">禁用</label>
|
||||||
|
</li>
|
||||||
|
<li class="mb10 clear">
|
||||||
<label class="pop_box_label fl">最终得分 : </label>
|
<label class="pop_box_label fl">最终得分 : </label>
|
||||||
<input type="radio" class="fl" value="1" id="teacher_score" name="teacher_priority"/><label for="teacher_score" class=" fl ml5">教师评分</label>
|
<input type="radio" class="fl" value="1" id="teacher_score" name="teacher_priority"/><label for="teacher_score" class=" fl ml5">教师评分</label>
|
||||||
</li>
|
</li>
|
||||||
|
@ -61,14 +78,29 @@
|
||||||
<div class="popup_tip_box fontGrey2 mb10">
|
<div class="popup_tip_box fontGrey2 mb10">
|
||||||
<em></em>
|
<em></em>
|
||||||
<span></span>
|
<span></span>
|
||||||
<p >教师评分 - 迟交扣分 - 缺评扣分</p>
|
<p>学生可对匿评成绩发起申诉<br/>您可以接受或者拒绝申诉<br/></p>
|
||||||
|
</div>
|
||||||
|
<div class="popup_tip_box fontGrey2 mb10">
|
||||||
|
<em></em>
|
||||||
|
<span></span>
|
||||||
|
<p>请输入数值0-50<br/>若匿评时评出不合理的成绩被申诉成功,<br/>扣违规匿评分<br/></p>
|
||||||
|
</div>
|
||||||
|
<div class="popup_tip_box fontGrey2 mb10">
|
||||||
|
<em></em>
|
||||||
|
<span></span>
|
||||||
|
<p>学生不能对匿评成绩发起申诉</p>
|
||||||
|
</div>
|
||||||
|
<div class="popup_tip_box fontGrey2 mb10">
|
||||||
|
<em></em>
|
||||||
|
<span></span>
|
||||||
|
<p >教师评分-迟交扣分-缺评扣分-违规匿评扣分</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="popup_tip_box fontGrey2">
|
<div class="popup_tip_box fontGrey2">
|
||||||
<em></em>
|
<em></em>
|
||||||
<span></span>
|
<span></span>
|
||||||
<p >助教评分 * 其百分比 + <br/>
|
<p >助教评分*其百分比+ <br/>
|
||||||
学生匿评平均分 * 其百分比 - <br/>
|
学生匿评平均分*其百分比- <br/>
|
||||||
( 迟交扣分 + 缺评扣分 )</p>
|
( 迟交扣分+缺评扣分+违规匿评扣分 )</p>
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
@ -106,5 +138,10 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
<% if homework.anonymous_appeal == 1 %>
|
||||||
|
$("#anonymous_appeal").attr("checked", "checked");
|
||||||
|
<% else %>
|
||||||
|
$("#no_anonymous_appeal").attr("checked", "checked");
|
||||||
|
<% end %>
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="muban_popup_box" style="width:570px;">
|
<div id="muban_popup_box" style="width:600px;">
|
||||||
<div class="muban_popup_top">
|
<div class="muban_popup_top">
|
||||||
<h3 class="fl">评分设置</h3>
|
<h3 class="fl">评分设置</h3>
|
||||||
<a href="javascript:void(0);" class="muban_icons_close fr"></a>
|
<a href="javascript:void(0);" class="muban_icons_close fr"></a>
|
||||||
|
@ -21,6 +21,23 @@
|
||||||
<label class="pop_box_label fl ml10" for="no_anon_penalty" style="text-align: left; width: 120px;">扣分(不参加匿评)</label>
|
<label class="pop_box_label fl ml10" for="no_anon_penalty" style="text-align: left; width: 120px;">扣分(不参加匿评)</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="mb10 clear mt30">
|
<li class="mb10 clear mt30">
|
||||||
|
<label class="pop_box_label fl">匿评申诉 : </label>
|
||||||
|
<ul class="fl">
|
||||||
|
<li class="clear">
|
||||||
|
<input type="radio" class="fl" id="anonymous_appeal" value="1" name="anonymous_appeal"/>
|
||||||
|
<label for="anonymous_appeal" class="fl ml5">启用</label>
|
||||||
|
</li>
|
||||||
|
<li class="clear" style="margin-top: 27px;">
|
||||||
|
<label class="pop_box_label fl">违规匿评扣分 : </label>
|
||||||
|
<input type="text" style="width: 75px; padding-left: 10px;" id="appeal_penalty" name="appeal_penalty" placeholder="0-50" value="<%=homework.homework_detail_manual.appeal_penalty %>" class="fl" onkeyup="check_late_penalty('appeal_penalty')">
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="mb10 clear" style="margin-top: 45px;">
|
||||||
|
<label class="pop_box_label fl"> </label>
|
||||||
|
<input type="radio" class="fl" value="0" id="no_anonymous_appeal" name="anonymous_appeal"/><label for="no_anonymous_appeal" class="fl ml5">禁用</label>
|
||||||
|
</li>
|
||||||
|
<li class="mb10 clear">
|
||||||
<label class="pop_box_label fl">最终得分 : </label>
|
<label class="pop_box_label fl">最终得分 : </label>
|
||||||
<input type="radio" class="fl" value="1" id="teacher_score" name="teacher_priority"/><label for="teacher_score" class=" fl ml5">教师评分</label>
|
<input type="radio" class="fl" value="1" id="teacher_score" name="teacher_priority"/><label for="teacher_score" class=" fl ml5">教师评分</label>
|
||||||
</li>
|
</li>
|
||||||
|
@ -40,7 +57,7 @@
|
||||||
<span class="fl ml5">助教评分</span>
|
<span class="fl ml5">助教评分</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="clear">
|
<li class="clear">
|
||||||
<input type="text" style="width: 49px; padding-left: 10px;" id="student_proportion" value="<%= (100 - homework.homework_detail_manual.ta_proportion * 100).to_i - (homework.homework_detail_programing.ta_proportion * 100).to_i%>%" class="fl ml15" readonly>
|
<input type="text" style="width: 49px; padding-left: 10px;" id="student_proportion" value="<%= (100 - homework.homework_detail_manual.ta_proportion * 100).to_i - (homework.homework_detail_programing.ta_proportion * 100).to_i%>" class="fl ml15" readonly>
|
||||||
<span class="fl ml5">学生匿评</span>
|
<span class="fl ml5">学生匿评</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -60,12 +77,27 @@
|
||||||
<div class="popup_tip_box fontGrey2 mb10">
|
<div class="popup_tip_box fontGrey2 mb10">
|
||||||
<em></em>
|
<em></em>
|
||||||
<span></span>
|
<span></span>
|
||||||
<p>匿评开启后提交的作品,未能参加<br/>匿评,按照全部缺评扣分</p>
|
<p>匿评开启后提交的作品,未能参加匿评,<br/>按照全部缺评扣分</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="popup_tip_box fontGrey2 mb10">
|
<div class="popup_tip_box fontGrey2 mb10">
|
||||||
<em></em>
|
<em></em>
|
||||||
<span></span>
|
<span></span>
|
||||||
<p>教师评分-迟交扣分-缺评扣分</p>
|
<p>学生可对匿评成绩发起申诉<br/>您可以接受或者拒绝申诉<br/></p>
|
||||||
|
</div>
|
||||||
|
<div class="popup_tip_box fontGrey2 mb10">
|
||||||
|
<em></em>
|
||||||
|
<span></span>
|
||||||
|
<p>请输入数值0-50<br/>若匿评时评出不合理的成绩被申诉成功,<br/>扣违规匿评分<br/></p>
|
||||||
|
</div>
|
||||||
|
<div class="popup_tip_box fontGrey2 mb10">
|
||||||
|
<em></em>
|
||||||
|
<span></span>
|
||||||
|
<p>学生不能对匿评成绩发起申诉</p>
|
||||||
|
</div>
|
||||||
|
<div class="popup_tip_box fontGrey2 mb10">
|
||||||
|
<em></em>
|
||||||
|
<span></span>
|
||||||
|
<p>教师评分-迟交扣分-缺评扣分-违规匿评扣分</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="popup_tip_box fontGrey2">
|
<div class="popup_tip_box fontGrey2">
|
||||||
<em></em>
|
<em></em>
|
||||||
|
@ -73,7 +105,7 @@
|
||||||
<p>系统评分*其百分比+ <br/>
|
<p>系统评分*其百分比+ <br/>
|
||||||
助教评 *其百分比+ <br/>
|
助教评 *其百分比+ <br/>
|
||||||
学生匿评平均分*其百分比 - <br/>
|
学生匿评平均分*其百分比 - <br/>
|
||||||
( 迟交扣分+缺评扣分 )</p>
|
( 迟交扣分+缺评扣分+违规匿评扣分 )</p>
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
@ -116,5 +148,10 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
<% if homework.anonymous_appeal == 1 %>
|
||||||
|
$("#anonymous_appeal").attr("checked", "checked");
|
||||||
|
<% else %>
|
||||||
|
$("#no_anonymous_appeal").attr("checked", "checked");
|
||||||
|
<% end %>
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
|
@ -1,7 +1,7 @@
|
||||||
<% if @homework.homework_type == 2 %>
|
<% if @homework.homework_type == 2 %>
|
||||||
<% if @homework.anonymous_comment == 0 %>
|
<% if @homework.anonymous_comment == 0 %>
|
||||||
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_pro',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
|
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_pro',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
|
||||||
pop_box_new(htmlvalue, 570, 355);
|
pop_box_new(htmlvalue, 600, 580);
|
||||||
<% else %>
|
<% else %>
|
||||||
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_pro_anon',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
|
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_pro_anon',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
|
||||||
pop_box_new(htmlvalue, 500, 285);
|
pop_box_new(htmlvalue, 500, 285);
|
||||||
|
@ -9,19 +9,22 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if @homework.anonymous_comment == 0 %>
|
<% if @homework.anonymous_comment == 0 %>
|
||||||
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_non_pro',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
|
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_non_pro',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
|
||||||
pop_box_new(htmlvalue, 500, 325);
|
pop_box_new(htmlvalue, 600, 550);
|
||||||
<% else %>
|
<% else %>
|
||||||
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_none_pro_anon',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
|
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_none_pro_anon',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
|
||||||
pop_box_new(htmlvalue, 500, 225);
|
pop_box_new(htmlvalue, 500, 225);
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
function set_score_rule_submit() {
|
function set_score_rule_submit() {
|
||||||
if($("#late_penalty_num").val() == ""){
|
if($("#late_penalty_num").val().trim() == ""){
|
||||||
$("#late_penalty_num").val("0");
|
$("#late_penalty_num").val("0");
|
||||||
}
|
}
|
||||||
if($("#absence_penalty_num").val() == ""){
|
if($("#absence_penalty_num").val().trim() == ""){
|
||||||
$("#absence_penalty_num").val("0");
|
$("#absence_penalty_num").val("0");
|
||||||
}
|
}
|
||||||
|
if($("#appeal_penalty").val().trim() == ""){
|
||||||
|
$("#appeal_penalty").val("0");
|
||||||
|
}
|
||||||
$('#muban_popup_box').find('form').submit();
|
$('#muban_popup_box').find('form').submit();
|
||||||
hideModal();
|
hideModal();
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
<ul>
|
<ul>
|
||||||
<% issue.journals.reorder("created_on desc").each do |comment| %>
|
<% @journals.each do |comment| %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function(){
|
||||||
showNormalImage('reply_content_<%= comment.id %>');
|
showNormalImage('reply_content_<%= comment.id %>');
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<% student_num = studentCount(@course) %>
|
<% student_num = studentCount(@course) %>
|
||||||
<% course_file_num = visable_attachemnts_incourse(@course).count %>
|
<% course_file_num = visable_attachemnts_incourse(@course).count %>
|
||||||
<p class="sy_cgrey mb10 mr20">
|
<p class="sy_cgrey mb10 mr20">
|
||||||
<%= link_to(@course.teacher.show_name, user_path(@course.teacher), :class => 'sy_cgrey') %>
|
<%= link_to(@course.teacher.show_name, user_path(@course.teacher), :title => '主讲老师', :class => 'sy_cgrey') %>
|
||||||
>
|
>
|
||||||
<% if @course.syllabus %>
|
<% if @course.syllabus %>
|
||||||
<%=link_to @course.syllabus.title, syllabus_path(@course.syllabus_id), :class => 'sy_cgrey', :title => '课程名称' %>
|
<%=link_to @course.syllabus.title, syllabus_path(@course.syllabus_id), :class => 'sy_cgrey', :title => '课程名称' %>
|
||||||
|
@ -22,6 +22,12 @@
|
||||||
<% if @course.syllabus %>
|
<% if @course.syllabus %>
|
||||||
<li><%= link_to "进入课程", syllabus_path(@course.syllabus), :class => "sy_class_option", :target => "_blank" %></li>
|
<li><%= link_to "进入课程", syllabus_path(@course.syllabus), :class => "sy_class_option", :target => "_blank" %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if @course.invite_code_halt == 0 %>
|
||||||
|
<li><a href="javascript:void(0);" class="sy_class_option" onclick="alert_halt_code();">暂停加入</a></li>
|
||||||
|
<% elsif @course.invite_code_halt == 1 %>
|
||||||
|
<li><a href="<%=set_invite_code_halt_course_path(@course) %>" data-remote="true" class="sy_class_option">放开加入</a></li>
|
||||||
|
<% end %>
|
||||||
|
<li><%= link_to "设置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "sy_class_option" %></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -54,7 +60,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sy_class_id fl">
|
<div class="sy_class_id fl">
|
||||||
<p style="margin: <%=is_teacher ? '8px auto' : '24px auto 0px' %>">邀 请 码<br />
|
<p>邀 请 码<br />
|
||||||
<span class="sy_corange">
|
<span class="sy_corange">
|
||||||
<% if @course.invite_code_halt == 0 %>
|
<% if @course.invite_code_halt == 0 %>
|
||||||
<% if User.current.admin? || User.current.member_of_course?(@course) %>
|
<% if User.current.admin? || User.current.member_of_course?(@course) %>
|
||||||
|
@ -66,11 +72,6 @@
|
||||||
已停用
|
已停用
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
<% if is_teacher && @course.invite_code_halt == 0 %>
|
|
||||||
<a href="javascript:void(0);" class="btn_grey_mid" style="margin-bottom: 12px;" onclick="alert_halt_code();">停 用</a>
|
|
||||||
<% elsif is_teacher && @course.invite_code_halt == 1 %>
|
|
||||||
<a href="<%=set_invite_code_halt_course_path(@course) %>" data-remote="true" class="btn_grey_mid" style="margin-bottom: 12px;">启 用</a>
|
|
||||||
<% end %>
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="sy_class_info fl ml15">
|
<div class="sy_class_info fl ml15">
|
||||||
|
@ -79,22 +80,16 @@
|
||||||
<%=@course.name %>
|
<%=@course.name %>
|
||||||
</h3>
|
</h3>
|
||||||
<span class="<%= @course.is_public == 0 ? 'hw_icon_private' : 'hw_icon_open' %> fl mr20 mt3"></span>
|
<span class="<%= @course.is_public == 0 ? 'hw_icon_private' : 'hw_icon_open' %> fl mr20 mt3"></span>
|
||||||
<p class="sy_cgrey fl mt3">
|
|
||||||
<span class=" mr15">教师:<%= course_teacher_link teacher_num %></span>
|
|
||||||
<span class=" mr15">学生:<%= course_student_link student_num %></span>
|
|
||||||
<span class=" mr15">资源:<%= link_to course_file_num, course_files_path(@course), :class => 'sy_cblue',:id=>'courses_files_count_info' %></span>
|
|
||||||
</p>
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<p class="sy_cgrey mb5">
|
<p class="sy_cgrey mb5">
|
||||||
<span class=" mr15">主讲老师:<%= link_to(@course.teacher.show_name, user_path(@course.teacher), :class => 'sy_cblue') %></span>
|
<span class="mr25">学期:<span class="sy_cblack"><%= current_time_and_term @course %></span></span>
|
||||||
<span class=" mr15">学时:<span class="sy_cblack"><%= @course.class_period %>学时</span></span>
|
<span class="mr25">教师:<%= course_teacher_link teacher_num %></span>
|
||||||
<span class=" mr15">学期:<span class="sy_cblack"><%= current_time_and_term @course %></span></span>
|
<span class="mr25">学生:<%= course_student_link student_num %></span>
|
||||||
<span class=" mr15">单位:<span class="sy_cblack"><%= get_occupation_from_user(@course.teacher).blank? ? '无' : get_occupation_from_user(@course.teacher) %></span></span>
|
</p>
|
||||||
|
<p class="sy_cgrey fl mt5">
|
||||||
|
<span class="mr25">单位:<span class="sy_cblack"><%= get_occupation_from_user(@course.teacher).blank? ? '无' : get_occupation_from_user(@course.teacher) %></span></span>
|
||||||
</p>
|
</p>
|
||||||
<% if is_teacher %>
|
|
||||||
<%= link_to "班级设置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "sy_btn_grey mr10 fl" %>
|
|
||||||
<% end %>
|
|
||||||
<% is_TA = get_user_member_roles_course @course, User.current, 7 %>
|
<% is_TA = get_user_member_roles_course @course, User.current, 7 %>
|
||||||
<% is_TE = get_user_member_roles_course @course, User.current, 9 %>
|
<% is_TE = get_user_member_roles_course @course, User.current, 9 %>
|
||||||
<% is_ST = get_user_member_roles_course @course, User.current, 10 %>
|
<% is_ST = get_user_member_roles_course @course, User.current, 10 %>
|
||||||
|
@ -114,7 +109,7 @@
|
||||||
<div class="invite_code_tip_box fontGrey2" id="invite_code_tip_box">
|
<div class="invite_code_tip_box fontGrey2" id="invite_code_tip_box">
|
||||||
<em></em>
|
<em></em>
|
||||||
<span></span>
|
<span></span>
|
||||||
<p class="mt10 mb5"><%= @course.invite_code_halt == 0 ? "请将邀请码告诉学生和教辅" : "邀请码已停用,学生和教辅" %></p>
|
<p class="mt10 mb5"><%= @course.invite_code_halt == 0 ? "请将邀请码告诉成员" : "邀请码已停用" %></p>
|
||||||
<p class="mb10"><%= @course.invite_code_halt == 0 ? "他们可以主动加入班级" : "不可以主动加入班级了" %></p>
|
<p class="mb10"><%= @course.invite_code_halt == 0 ? "他们可以主动加入" : "暂时停止成员主动加入" %></p>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
|
@ -61,7 +61,8 @@
|
||||||
<% elsif ma.course_message.jour_type == 'HomeworkCommon' %>
|
<% elsif ma.course_message.jour_type == 'HomeworkCommon' %>
|
||||||
<li><a href="<%= homework_common_index_url_in_org(ma.course_id) %>" target="_blank" title="<%=ma.course_message.user.show_name %> <%=ma.course_message.m_parent_id.nil? ? '回复了您的作业:' : '在作业中回复了您:' %><%= message_content(ma.course_message.notes)%>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %> </span><%=ma.course_message.m_parent_id.nil? ? '回复了您的作业:' : '在作业中回复了您:' %><%= message_content(ma.course_message.notes)%></a></li>
|
<li><a href="<%= homework_common_index_url_in_org(ma.course_id) %>" target="_blank" title="<%=ma.course_message.user.show_name %> <%=ma.course_message.m_parent_id.nil? ? '回复了您的作业:' : '在作业中回复了您:' %><%= message_content(ma.course_message.notes)%>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %> </span><%=ma.course_message.m_parent_id.nil? ? '回复了您的作业:' : '在作业中回复了您:' %><%= message_content(ma.course_message.notes)%></a></li>
|
||||||
<% else %>
|
<% else %>
|
||||||
<li><a href="<%= student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id,:show_work_id => ma.course_message.jour.student_work_id) %>" target="_blank" title="<%=ma.course_message.user.show_name %><%=ma.course_message.user.allowed_to?(:as_teacher, ma.course) ? '老师' : '同学' %> 回复了作品评论:<%= message_content(ma.course_message.notes)%>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %><%=ma.course_message.user.allowed_to?(:as_teacher, ma.course) ? '老师' : '同学' %> </span>回复了作品评论:<%= message_content(ma.course_message.notes)%></a></li>
|
<% show_name = ma.course_message.jour.reviewer_role != 3 || ma.course_message.user.allowed_to?(:as_teacher, ma.course) %>
|
||||||
|
<li><a href="<%= student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id,:show_work_id => ma.course_message.jour.student_work_id) %>" target="_blank" title="<%=show_name ? ma.course_message.user.show_name + "#{ma.course_message.user.allowed_to?(:as_teacher, ma.course)?"老师":"同学"}" : "匿名用户" %> 回复了作品评论:<%= message_content(ma.course_message.notes)%>"><span class="shadowbox_news_user"><%=show_name ? ma.course_message.user.show_name + "#{ma.course_message.user.allowed_to?(:as_teacher, ma.course)?"老师":"同学"}" : "匿名用户" %> </span>回复了作品评论:<%= message_content(ma.course_message.notes)%></a></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% elsif ma.course_message_type == "StudentWork" && !ma.course_message.homework_common.nil? && !User.current.allowed_to?(:as_teacher, ma.course_message.homework_common.course) %>
|
<% elsif ma.course_message_type == "StudentWork" && !ma.course_message.homework_common.nil? && !User.current.allowed_to?(:as_teacher, ma.course_message.homework_common.course) %>
|
||||||
<li><a href="<%=student_work_index_path(:homework => ma.course_message.homework_common_id) %>" target="_blank" title="<%=ma.course_message.homework_common.user.show_name %>老师 发布的作业:<%=ma.course_message.homework_common.name %>,由于迟交作业,您及您的作品都不能参与该作业的匿评"><span class="shadowbox_news_user"><%=ma.course_message.homework_common.user.show_name %>老师 </span>发布的作业:<%=ma.course_message.homework_common.name %>,由于迟交作业,您及您的作品都不能参与该作业的匿评</a></li>
|
<li><a href="<%=student_work_index_path(:homework => ma.course_message.homework_common_id) %>" target="_blank" title="<%=ma.course_message.homework_common.user.show_name %>老师 发布的作业:<%=ma.course_message.homework_common.name %>,由于迟交作业,您及您的作品都不能参与该作业的匿评"><span class="shadowbox_news_user"><%=ma.course_message.homework_common.user.show_name %>老师 </span>发布的作业:<%=ma.course_message.homework_common.name %>,由于迟交作业,您及您的作品都不能参与该作业的匿评</a></li>
|
||||||
|
@ -69,6 +70,13 @@
|
||||||
<li><a href="<%=student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>同学 重新提交了作品:<%=ma.course_message.name %>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>同学 </span>重新提交了作品:<%=ma.course_message.name %></a></li>
|
<li><a href="<%=student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>同学 重新提交了作品:<%=ma.course_message.name %>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>同学 </span>重新提交了作品:<%=ma.course_message.name %></a></li>
|
||||||
<% elsif ma.course_message_type == "StudentWork" && ma.status == 2 %>
|
<% elsif ma.course_message_type == "StudentWork" && ma.status == 2 %>
|
||||||
<li><a href="<%=student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>同学 追加新附件了:作业标题:<%=ma.course_message.homework_common.name %>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>同学 </span>追加新附件了:作业标题:<%=ma.course_message.homework_common.name %></a></li>
|
<li><a href="<%=student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>同学 追加新附件了:作业标题:<%=ma.course_message.homework_common.name %>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>同学 </span>追加新附件了:作业标题:<%=ma.course_message.homework_common.name %></a></li>
|
||||||
|
<% elsif ma.course_message_type == "StudentWorksScoresAppeal" && ma.course_message && ma.status == 1 %>
|
||||||
|
<% student_work = ma.course_message.student_works_score.student_work %>
|
||||||
|
<li><a href="<%=student_work_index_path(:homework => student_work.homework_common_id, :show_work_id => student_work.id, :tab => 2) %>" target="_blank" title="匿名用户 对您的评阅发起申诉:<%=student_work.homework_common.name %>"><span class="shadowbox_news_user">匿名用户</span> 对您的评阅发起申诉:<%=student_work.homework_common.name %></a></li>
|
||||||
|
<% elsif ma.course_message_type == "StudentWorksScoresAppeal" && ma.course_message && (ma.status == 3 || ma.status == 4) %>
|
||||||
|
<% deal_user = User.find ma.apply_result %>
|
||||||
|
<% student_work = ma.course_message.student_works_score.student_work %>
|
||||||
|
<li><a href="<%=student_work_index_path(:homework => student_work.homework_common_id, :show_work_id => student_work.id, :tab => 2) %>" target="_blank" title="<%= deal_user.show_name%> <%= ma.status == 3 ? '接受申诉' : '拒绝申诉' %>:<%=student_work.homework_common.name %>"><span class="shadowbox_news_user"><%= deal_user.show_name%></span> <%= ma.status == 3 ? '接受申诉' : '拒绝申诉' %>:<%=student_work.homework_common.name %></a></li>
|
||||||
<% elsif ma.course_message_type == "Course" %>
|
<% elsif ma.course_message_type == "Course" %>
|
||||||
<li><a href="<%=course_path(ma.course_message) %>" target="_blank" title="系统提示 您成功创建了班级:班级名称:<%=ma.course_message.name %>"><span class="shadowbox_news_user">系统提示 </span>您成功创建了班级:班级名称:<%=ma.course_message.name %></a></li>
|
<li><a href="<%=course_path(ma.course_message) %>" target="_blank" title="系统提示 您成功创建了班级:班级名称:<%=ma.course_message.name %>"><span class="shadowbox_news_user">系统提示 </span>您成功创建了班级:班级名称:<%=ma.course_message.name %></a></li>
|
||||||
<% elsif ma.course_message_type == "JoinCourseRequest" %>
|
<% elsif ma.course_message_type == "JoinCourseRequest" %>
|
||||||
|
@ -114,6 +122,12 @@
|
||||||
<% content = "<span class='shadowbox_news_user'>系统提示:</span>“#{ma.name}”的申请,经确认为无效的单位信息,已被删除,请重新编辑您的单位资料。谢谢!" %>
|
<% content = "<span class='shadowbox_news_user'>系统提示:</span>“#{ma.name}”的申请,经确认为无效的单位信息,已被删除,请重新编辑您的单位资料。谢谢!" %>
|
||||||
<%= link_to content.html_safe, { :controller=> "my",:action => "account", :flag => 1, :applied_message_id => ma.id }, :title => "系统提示:“#{ma.name}”的申请,经确认为无效的单位信息,已被删除,请重新编辑您的单位资料。谢谢!", :target => '_blank'%>
|
<%= link_to content.html_safe, { :controller=> "my",:action => "account", :flag => 1, :applied_message_id => ma.id }, :title => "系统提示:“#{ma.name}”的申请,经确认为无效的单位信息,已被删除,请重新编辑您的单位资料。谢谢!", :target => '_blank'%>
|
||||||
</li>
|
</li>
|
||||||
|
<% elsif ma.applied_type == "StudentWorksScoresAppeal" %>
|
||||||
|
<li>
|
||||||
|
<% homework = ma.applied.student_works_score.student_work.homework_common %>
|
||||||
|
<% content = '<span class="shadowbox_news_user">'+User.find(ma.applied_user_id).show_name+' </span>申诉匿评成绩:'+"“"+homework.name+"”" %>
|
||||||
|
<%= link_to content.html_safe, student_work_index_path(:homework => homework.id, :show_work_id => ma.applied.student_works_score.student_work_id, :tab => 2), :title => "#{User.find(ma.applied_user_id).show_name}申诉匿评成绩:“#{homework.name}”", :target => '_blank' %>
|
||||||
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% elsif ma.class == ForgeMessage %>
|
<% elsif ma.class == ForgeMessage %>
|
||||||
<% if ma.forge_message_type == "AppliedProject" %>
|
<% if ma.forge_message_type == "AppliedProject" %>
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
<div class="homepagePostTo break_word">
|
<div class="homepagePostTo break_word">
|
||||||
<%= link_to activity.try(:author).show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
|
<%= link_to activity.try(:author).show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||||
TO
|
TO
|
||||||
<%= link_to activity.project.name.to_s+" | 项目资源", project_files_path(activity.course), :class => "newsBlue ml15" %>
|
<%= link_to activity.project.name.to_s+" | 项目资源", project_files_path(activity.project), :class => "newsBlue ml15" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostTitle break_word" >
|
<div class="homepagePostTitle break_word" >
|
||||||
<%= link_to activity.filename, project_files_path(activity.course), :class => "postGrey" %>
|
<%= link_to activity.filename, project_files_path(activity.project), :class => "postGrey" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostSubmitContainer">
|
<div class="homepagePostSubmitContainer">
|
||||||
<div class="homepagePostDeadline mr15">
|
<div class="homepagePostDeadline mr15">
|
||||||
|
|
|
@ -2,24 +2,24 @@
|
||||||
<% is_expand = st.student_work_projects.empty? %>
|
<% is_expand = st.student_work_projects.empty? %>
|
||||||
<ul id="syllabus_course_ul">
|
<ul id="syllabus_course_ul">
|
||||||
<li class="syllabus_class_list" style="line-height:44px; vertical-align:middle;">
|
<li class="syllabus_class_list" style="line-height:44px; vertical-align:middle;">
|
||||||
<div class="syllabus_class_w fontGrey3" style="cursor: pointer;" onclick="show_student_work('<%= student_work_path(st)%>')">
|
<div class="syllabus_class_w fontGrey3" style="cursor: pointer;">
|
||||||
<%= link_to(image_tag(url_to_avatar(st.user),:width =>"40",:height => "40", :style => "display:block;"),user_activities_path(st.user), :class => "fl") %>
|
<%= link_to(image_tag(url_to_avatar(st.user),:width =>"40",:height => "40", :style => "display:block;"),user_path(st.user), :class => "fl", :target => '_blank') %>
|
||||||
<% if !is_expand %>
|
<% if !is_expand %>
|
||||||
<span class="fl" style="width:120px;">
|
<span class="fl" style="width:120px;">
|
||||||
<%= link_to st.user.show_name + "(组长)", user_path(st.user), :class => "fl hidden ml5 linkGrey", :style => "max-width:75px;" %>
|
<%= link_to st.user.show_name + "(组长)", user_path(st.user), :class => "fl hidden ml5 linkGrey", :style => "max-width:75px;", :target => '_blank' %>
|
||||||
</span>
|
</span>
|
||||||
<span class="fl hidden student_work_<%= st.id%>" style="width:105px; text-align: center">
|
<span class="fl hidden student_work_<%= st.id%>" style="width:105px; text-align: center" onclick="show_student_work('<%= student_work_path(st)%>')">
|
||||||
<%= st.user.user_extensions.student_id.nil? || st.user.user_extensions.student_id == "" ? "--" : st.user.user_extensions.student_id%>
|
<%= st.user.user_extensions.student_id.nil? || st.user.user_extensions.student_id == "" ? "--" : st.user.user_extensions.student_id%>
|
||||||
</span>
|
</span>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="fl" style="width:120px;">
|
<span class="fl" style="width:120px;">
|
||||||
<%= link_to st.user.show_name, user_path(st.user), :class => "fl hidden ml5 linkGrey", :style => "max-width:75px;" %>
|
<%= link_to st.user.show_name, user_path(st.user), :class => "fl hidden ml5 linkGrey", :style => "max-width:75px;", :target => '_blank' %>
|
||||||
</span>
|
</span>
|
||||||
<span class="fl student_work_<%= st.id%> hidden" style="width:105px; text-align: center">
|
<span class="fl student_work_<%= st.id%> hidden" style="width:105px; text-align: center" onclick="show_student_work('<%= student_work_path(st)%>')">
|
||||||
<%= st.user.user_extensions.student_id.nil? || st.user.user_extensions.student_id == "" ? "--" : st.user.user_extensions.student_id%>
|
<%= st.user.user_extensions.student_id.nil? || st.user.user_extensions.student_id == "" ? "--" : st.user.user_extensions.student_id%>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="flex-container fl" style="width:340px;">
|
<div class="flex-container fl" style="width:340px;" onclick="show_student_work('<%= student_work_path(st)%>')">
|
||||||
<div class="flex-cell student_work_<%= st.id%>">
|
<div class="flex-cell student_work_<%= st.id%>">
|
||||||
<span class="<%= score_color (!score_open || st.teacher_score.nil? ? nil : st.teacher_score) %>">
|
<span class="<%= score_color (!score_open || st.teacher_score.nil? ? nil : st.teacher_score) %>">
|
||||||
<%= st.teacher_score.nil? ? "--" : (!score_open ? "**" : format("%.1f",st.teacher_score))%>
|
<%= st.teacher_score.nil? ? "--" : (!score_open ? "**" : format("%.1f",st.teacher_score))%>
|
||||||
|
@ -82,10 +82,18 @@
|
||||||
<span class="c_red">
|
<span class="c_red">
|
||||||
<%= st.late_penalty %>
|
<%= st.late_penalty %>
|
||||||
</span>分<br/>
|
</span>分<br/>
|
||||||
缺评扣分
|
<% if @homework.anonymous_comment == 0 %>
|
||||||
<span class="c_red">
|
缺评扣分
|
||||||
<%= st.absence_penalty%>
|
<span class="c_red">
|
||||||
</span>分<br/>
|
<%= st.absence_penalty%>
|
||||||
|
</span>分<br/>
|
||||||
|
<% if @homework.anonymous_appeal == 1 %>
|
||||||
|
违规匿评扣分
|
||||||
|
<span class="c_red">
|
||||||
|
<%= student_work.appeal_penalty%>
|
||||||
|
</span>分<br/>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
最终成绩为
|
最终成绩为
|
||||||
<span class="c_red"> <%= format("%.1f",score<0 ? 0 : score)%> </span>分
|
<span class="c_red"> <%= format("%.1f",score<0 ? 0 : score)%> </span>分
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -10,11 +10,11 @@
|
||||||
<td class="none"><a name="<%= student_work.id%>"></a></td>
|
<td class="none"><a name="<%= student_work.id%>"></a></td>
|
||||||
<td class="hworkList40 pl5 pr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></td>
|
<td class="hworkList40 pl5 pr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></td>
|
||||||
<td class="hworkPortrait pr10 float-none">
|
<td class="hworkPortrait pr10 float-none">
|
||||||
<%= link_to(image_tag(url_to_avatar(student_work.user),:width =>"40",:height => "40",:style => "display:block;"),user_activities_path(student_work.user)) %>
|
<%= link_to(image_tag(url_to_avatar(student_work.user),:width =>"40",:height => "40",:style => "display:block;"),user_path(student_work.user), :target => '_blank') %>
|
||||||
</td>
|
</td>
|
||||||
<% if @homework.homework_type != 3 %>
|
<% if @homework.homework_type != 3 %>
|
||||||
<td class="<%= @homework.homework_type == 1 ? (@homework.anonymous_comment == 1 ? 'hworkStName130' : 'hworkStName100') : (@homework.anonymous_comment == 1 ? 'hworkStName110' : 'hworkStName') %> pr10 float-none" title="<%= student_work.user.show_name%>" style="cursor:pointer;">
|
<td class="<%= @homework.homework_type == 1 ? (@homework.anonymous_comment == 1 ? 'hworkStName130' : 'hworkStName100') : (@homework.anonymous_comment == 1 ? 'hworkStName110' : 'hworkStName') %> pr10 float-none" title="<%= student_work.user.show_name%>" style="cursor:pointer;">
|
||||||
<%= link_to student_work.user.show_name ,user_path(student_work.user) %>
|
<%= link_to student_work.user.show_name ,user_path(student_work.user), :target => '_blank' %>
|
||||||
</td>
|
</td>
|
||||||
<td class="<%= @homework.homework_type == 1 ? (@homework.anonymous_comment == 1 ? 'hworkStName130' : 'hworkStID90') : (@homework.anonymous_comment == 1 ? 'hworkStID100' : 'hworkStID') %> pr10 float-none student_work_<%= student_work.id%>" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
|
<td class="<%= @homework.homework_type == 1 ? (@homework.anonymous_comment == 1 ? 'hworkStName130' : 'hworkStID90') : (@homework.anonymous_comment == 1 ? 'hworkStID100' : 'hworkStID') %> pr10 float-none student_work_<%= student_work.id%>" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
|
||||||
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
<em></em>
|
<em></em>
|
||||||
<font></font>
|
<font></font>
|
||||||
现共有
|
现共有
|
||||||
<span class="c_red"> <%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count%> </span>
|
<span class="c_red"> <%= student_work.student_works_scores.where("reviewer_role = 3 and appeal_status != 3").group_by(&:user_id).count%> </span>
|
||||||
名学生进行了匿评,平均分为
|
名学生进行了匿评,平均分为
|
||||||
<span class="c_red"> <%= format("%.1f",student_work.student_score)%> </span>分。
|
<span class="c_red"> <%= format("%.1f",student_work.student_score)%> </span>分。
|
||||||
</div>
|
</div>
|
||||||
|
@ -115,15 +115,23 @@
|
||||||
<em></em>
|
<em></em>
|
||||||
<font></font>
|
<font></font>
|
||||||
作品最终评分为
|
作品最终评分为
|
||||||
<span class="c_red"> <%= student_work.final_score%> </span>分<br/>
|
<span class="c_red"> <%= score %> </span>分<br/>
|
||||||
迟交扣分
|
迟交扣分
|
||||||
<span class="c_red">
|
<span class="c_red">
|
||||||
<%= student_work.late_penalty %>
|
<%= student_work.late_penalty %>
|
||||||
</span>分<br/>
|
</span>分<br/>
|
||||||
缺评扣分
|
<% if @homework.anonymous_comment == 0%>
|
||||||
<span class="c_red">
|
缺评扣分
|
||||||
<%= student_work.absence_penalty%>
|
<span class="c_red">
|
||||||
</span>分<br/>
|
<%= student_work.absence_penalty%>
|
||||||
|
</span>分<br/>
|
||||||
|
<% if @homework.anonymous_appeal == 1 %>
|
||||||
|
违规匿评扣分
|
||||||
|
<span class="c_red">
|
||||||
|
<%= student_work.appeal_penalty%>
|
||||||
|
</span>分<br/>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
最终成绩为
|
最终成绩为
|
||||||
<span class="c_red"> <%= format("%.1f",score<0 ? 0 : score)%> </span>分<br/>
|
<span class="c_red"> <%= format("%.1f",score<0 ? 0 : score)%> </span>分<br/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<% user_ids = student_work.student_work_projects.empty? ? "(-1)" : "(" + student_work.student_work_projects.map{|st| st.user_id}.join(",") + ")" %>
|
<% user_ids = student_work.student_work_projects.empty? ? "(-1)" : "(" + student_work.student_work_projects.map{|st| st.user_id}.join(",") + ")" %>
|
||||||
<% student_work_groups = @homework.student_works.where("user_id in #{user_ids}").order("created_at asc") %>
|
<% student_work_groups = @homework.student_works.where("user_id in #{user_ids}").order("created_at asc") %>
|
||||||
<% anon_count = student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count %>
|
<% anon_count = student_work.student_works_scores.where("reviewer_role = 3 and appeal_status != 3").group_by(&:user_id).count %>
|
||||||
<% student_work_groups.each_with_index do |st, j| %>
|
<% student_work_groups.each_with_index do |st, j| %>
|
||||||
<% score_open = @is_teacher || @homework.score_open == 1 || st.user == User.current %>
|
<% score_open = @is_teacher || @homework.score_open == 1 || st.user == User.current %>
|
||||||
<div class="syllabus_class_box" id="student_work_<%= st.id%>" style="background-color:#fff;">
|
<div class="syllabus_class_box" id="student_work_<%= st.id%>" style="background-color:#fff;">
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<div class="ping_back mt10" id="jour_replay_<%= jour.id%>">
|
<div class="ping_back mt10" id="jour_replay_<%= jour.id%>">
|
||||||
<%= link_to image_tag(url_to_avatar(jour.user), :width => "32", :height => "32"), user_path(jour.user),:class => "st_img fl" %>
|
<%= link_to image_tag(url_to_avatar(show_real_name ? jour.user : ""), :width => "32", :height => "32"), show_real_name ? user_path(jour.user) : "javascript:void(0)",:class => "st_img fl" %>
|
||||||
<div class="ping_back_tit">
|
<div class="ping_back_tit">
|
||||||
<a href="javascript:void(0);" class="c_blue fl" >
|
<a href="javascript:void(0);" class="c_blue fl" >
|
||||||
<%= link_to show_real_name ? jour.user.show_name : "匿名", user_path(jour.user), :title => jour.user.show_name, :class => "c_blue fl" %>
|
<%= link_to show_real_name ? jour.user.show_name : "匿名", show_real_name ? user_path(jour.user) : "javascript:void(0)", :title => jour.user.show_name, :class => "c_blue fl" %>
|
||||||
</a>
|
</a>
|
||||||
<% if jour.user==User.current || User.current.admin? %>
|
<% if jour.user==User.current || User.current.admin? %>
|
||||||
<%= link_to(l(:label_bid_respond_delete), destroy_score_reply_student_work_index_path(:jour_id => jour.id),
|
<%= link_to(l(:label_bid_respond_delete), destroy_score_reply_student_work_index_path(:jour_id => jour.id),
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
<div id="muban_popup_box" style="width:530px;">
|
||||||
|
<div class="muban_popup_top">
|
||||||
|
<h3 class="fl">匿评成绩申诉</h3>
|
||||||
|
<a href="javascript:void(0);" class="muban_icons_close fr"></a>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<%= form_for('appeal',:url =>{:controller => 'student_work',:action => 'appeal_anonymous_score',:score_id => @student_work_score.id, :is_last => @is_last},
|
||||||
|
:method => "post", :remote => true) do |f|%>
|
||||||
|
<div class="muban_popup_con clear">
|
||||||
|
<div class="clear mt15 ml20">
|
||||||
|
<label style="vertical-align: top;"><span class="c_red" style="vertical-align: top;">*</span>申诉理由:</label>
|
||||||
|
<%= f.text_area 'comment', :id => 'appeal_comment', :style => 'height: 70px; width: 414px;', :placeholder => "请输入你的申诉理由,最多250个字符。",:maxlength => 250 %>
|
||||||
|
<p id="notice_notes" class="c_red none" style="margin-left: 68px;">请输入申诉理由</p>
|
||||||
|
<div class="alert alert-orange mb10 mt10 mr20">
|
||||||
|
教师或者助教将受到您的申诉<br/>
|
||||||
|
申诉被接受后,此匿评成绩将被废弃,且评阅人的作品将被违规扣分
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="cl"></div>
|
||||||
|
<a href="javascript:void(0);" class="fr sy_btn_blue mr20" onclick="score_appeal_submit();">确定</a>
|
||||||
|
<a href="javascript:void(0);" class="fr sy_btn_grey mr5" onclick="hideModal();">取消</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<% end%>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var first_click = true;
|
||||||
|
function score_appeal_submit(){
|
||||||
|
if(first_click) {
|
||||||
|
if ($.trim($("#appeal_comment").val()) != "") {
|
||||||
|
first_click = false;
|
||||||
|
$('#notice_notes').hide();
|
||||||
|
$('#muban_popup_box').find('form').submit();
|
||||||
|
} else {
|
||||||
|
$('#notice_notes').show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -53,6 +53,14 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
<% if @is_evaluation && !@stundet_works.empty? %>
|
||||||
|
<div class="alert alert-orange mb10 f14">
|
||||||
|
不参与匿评将直接影响作业成绩,请按照事实进行评分<br/>
|
||||||
|
<p class="sy_cgrey">为了保障匿评的公平,允许学生对不合理的匿评成绩进行申诉</p>
|
||||||
|
<p class="sy_cgrey">若您给出了不合理的匿评成绩,并被申诉成功,您自己的作品将被匿评违规扣分</p>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="fl">
|
<div class="fl">
|
||||||
<% if @homework.homework_type != 3%>
|
<% if @homework.homework_type != 3%>
|
||||||
<% if @is_evaluation && !@stundet_works.empty? %>
|
<% if @is_evaluation && !@stundet_works.empty? %>
|
||||||
|
@ -61,7 +69,7 @@
|
||||||
<%= render :partial => "evaluation_un_title"%>
|
<%= render :partial => "evaluation_un_title"%>
|
||||||
<% end%>
|
<% end%>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if !@is_teacher && @is_evaluation && !@stundet_works.empty? %>
|
<% if @is_evaluation && !@stundet_works.empty? %>
|
||||||
<%= render :partial => "evaluation_title"%>
|
<%= render :partial => "evaluation_title"%>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= render :partial => "evaluation_un_group"%>
|
<%= render :partial => "evaluation_un_group"%>
|
||||||
|
|
|
@ -14,7 +14,20 @@
|
||||||
</a>
|
</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<a href="javascript:void(0);" class="fr linkBlue mr5" onclick="$('#add_score_reply_<%= score.id%>').slideToggle();">回复</a>
|
<a href="javascript:void(0);" class="fr linkBlue mr5" onclick="$('#add_score_reply_<%= score.id%>').slideToggle();">回复</a>
|
||||||
<span class=" fr c_grey mr20">
|
<% if @homework.anonymous_appeal == 1 %>
|
||||||
|
<% if score.student_work.user == User.current && score.reviewer_role == 3 && score.appeal_status == 0 %>
|
||||||
|
<a href="<%=alert_appeal_box_student_work_index_path(:score_id => score.id,:is_last => is_last) %>" data-remote="true" class="fr linkBlue mr10">申诉</a>
|
||||||
|
<% elsif score.reviewer_role == 3 && score.appeal_status == 1 %>
|
||||||
|
<span class="c_red fr mr10">申诉中</span>
|
||||||
|
<% elsif score.reviewer_role == 3 && score.appeal_status == 2 %>
|
||||||
|
<span class="c_red fr mr10">申诉已撤销</span>
|
||||||
|
<% elsif score.reviewer_role == 3 && score.appeal_status == 3 %>
|
||||||
|
<span class="c_red fr mr10">申诉成功</span>
|
||||||
|
<% elsif score.reviewer_role == 3 && score.appeal_status == 4 %>
|
||||||
|
<span class="c_red fr mr10">申诉失败</span>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<span class="fr c_grey mr20">
|
||||||
<%=format_time score.updated_at %>
|
<%=format_time score.updated_at %>
|
||||||
</span>
|
</span>
|
||||||
<div class="cl mb5"></div>
|
<div class="cl mb5"></div>
|
||||||
|
@ -31,6 +44,24 @@
|
||||||
<%= render :partial => 'add_score_reply',:locals => {:score => score,:is_last => is_last}%>
|
<%= render :partial => 'add_score_reply',:locals => {:score => score,:is_last => is_last}%>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<% unless score.student_works_scores_appeal.nil? %>
|
||||||
|
<div class="ping_back mt10" style="border-top: 1px dashed #CCCCCC; padding-top: 10px;">
|
||||||
|
<span class="fl">申诉</span>
|
||||||
|
<% if score.appeal_status == 1 && score.student_work.user == User.current %>
|
||||||
|
<a href="javascript:void(0)" onclick="deal_appeal_score(<%=score.id %>, 2);" class="fr linkBlue mr5 ml20">撤销申诉</a>
|
||||||
|
<% elsif @is_teacher && score.appeal_status == 1 %>
|
||||||
|
<a href="javascript:void(0)" onclick="deal_appeal_score(<%=score.id %>, 3);" class="fr linkBlue mr5">接受</a>
|
||||||
|
<a href="javascript:void(0)" onclick="deal_appeal_score(<%=score.id %>, 4);" class="fr linkBlue mr10 ml20">拒绝</a>
|
||||||
|
<% end %>
|
||||||
|
<span class="fr c_grey">
|
||||||
|
<%=format_time score.student_works_scores_appeal.updated_at %>
|
||||||
|
</span>
|
||||||
|
<div class="cl mb5"></div>
|
||||||
|
<p class="break_word">
|
||||||
|
申诉理由:<%= score.student_works_scores_appeal.comment%>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div id="replay_histroy_<%= score.id%>">
|
<div id="replay_histroy_<%= score.id%>">
|
||||||
<% score.journals_for_messages.order("created_on desc").each do |jour|%>
|
<% score.journals_for_messages.order("created_on desc").each do |jour|%>
|
||||||
|
@ -41,3 +72,25 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function deal_appeal_score(score_id, status){
|
||||||
|
if(status == '2'){
|
||||||
|
var htmlvalue = '<div id="muban_popup_box" style="width:400px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
|
||||||
|
'<div class="clear mt15"><p class="text_c f14">撤销后将不能再对该成绩发起申诉</p><p class="text_c mt10 f14">您是否确认撤销申诉</p><div class="cl"></div>'+
|
||||||
|
'<a href="/student_work/deal_appeal_score?is_last=true&score_id='+ score_id + '&status=2" class="fr sy_btn_blue mr135 mt10" data-remote="true">确 定</a>'+
|
||||||
|
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10 mr10" onclick="hideModal();">取 消</a></div></div>';
|
||||||
|
}else if(status == '3'){
|
||||||
|
var htmlvalue = '<div id="muban_popup_box" style="width:400px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
|
||||||
|
'<div class="clear mt15"><p class="text_c f14">此匿评成绩将被废弃,且评阅人的作品将被违规扣分</p><p class="text_c mt10 f14">您是否确定接受</p><div class="cl"></div>'+
|
||||||
|
'<a href="/student_work/deal_appeal_score?is_last=true&score_id='+ score_id + '&status=3" class="fr sy_btn_blue mr135 mt10" data-remote="true">确 定</a>'+
|
||||||
|
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10 mr10" onclick="hideModal();">取 消</a></div></div>';
|
||||||
|
}else if(status == '4'){
|
||||||
|
var htmlvalue = '<div id="muban_popup_box" style="width:400px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
|
||||||
|
'<div class="clear mt15"><p class="text_c f14">此匿评成绩将被认为合理</p><p class="text_c mt10 f14">您是否确定拒绝</p><div class="cl"></div>'+
|
||||||
|
'<a href="/student_work/deal_appeal_score?is_last=true&score_id='+ score_id + '&status=4" class="fr sy_btn_blue mr135 mt10" data-remote="true">确 定</a>'+
|
||||||
|
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10 mr10" onclick="hideModal();">取 消</a></div></div>';
|
||||||
|
}
|
||||||
|
pop_box_new(htmlvalue, 400, 180);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
|
@ -19,7 +19,7 @@ $("#score_list_<%= @work.id%>").removeAttr("style");
|
||||||
$("#student_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'evaluation_un_group_work', :locals => {:student_work => @work}) %>");
|
$("#student_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'evaluation_un_group_work', :locals => {:student_work => @work}) %>");
|
||||||
$("#group_member_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'group_member_work', :locals => {:student_work => @work}) %>");
|
$("#group_member_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'group_member_work', :locals => {:student_work => @work}) %>");
|
||||||
<% else %>
|
<% else %>
|
||||||
<% anon_count = @work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count %>
|
<% anon_count = @work.student_works_scores.where("reviewer_role = 3 and appeal_status != 3").group_by(&:user_id).count %>
|
||||||
$("#student_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'evaluation_un_group_member_work', :locals => {:st => @work, :anon_count => anon_count, :score_open => score_open}) %>");
|
$("#student_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'evaluation_un_group_member_work', :locals => {:st => @work, :anon_count => anon_count, :score_open => score_open}) %>");
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
var htmlvalue = "<%=escape_javascript(render :partial => 'student_work/score_appeal_box') %>";
|
||||||
|
pop_box_new(htmlvalue, 530, 400);
|
|
@ -0,0 +1,2 @@
|
||||||
|
hideModal();
|
||||||
|
$("#work_score_<%= @student_work_score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score',:locals => {:score => @student_work_score,:is_last => @is_last}) %>");
|
|
@ -0,0 +1,22 @@
|
||||||
|
hideModal();
|
||||||
|
<% if params[:status].to_i == 3 %>
|
||||||
|
<% score_open = @is_teacher || @homework.score_open == 1 || @work.user == User.current %>
|
||||||
|
<% if @is_teacher %>
|
||||||
|
<% if @homework.homework_type == 3 %>
|
||||||
|
<% if @is_group_leader %>
|
||||||
|
$("#student_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'evaluation_un_group_work', :locals => {:student_work => @work}) %>");
|
||||||
|
$("#group_member_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'group_member_work', :locals => {:student_work => @work}) %>");
|
||||||
|
<% else %>
|
||||||
|
<% anon_count = @work.student_works_scores.where("reviewer_role = 3 and appeal_status != 3").group_by(&:user_id).count %>
|
||||||
|
$("#student_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'evaluation_un_group_member_work', :locals => {:st => @work, :anon_count => anon_count, :score_open => score_open}) %>");
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
$("tr[id='student_work_<%= @work.id%>']").replaceWith("<%= escape_javascript(render :partial => 'evaluation_un_work',:locals => {:student_work => @work, :index => 1, :score_open => score_open}) %>");
|
||||||
|
$("#work_num_<%= @work.id%>").html(num);
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
$("tr[id='student_work_<%= @work.id%>']").replaceWith("<%= escape_javascript(render :partial => 'evaluation_work',:locals => {:student_work => @work, :index => 1, :score_open => score_open}) %>");
|
||||||
|
$("#work_num_<%= @work.id%>").html(num);
|
||||||
|
<% end%>
|
||||||
|
<% end %>
|
||||||
|
$("#work_score_<%= @student_work_score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score',:locals => {:score => @student_work_score,:is_last => @is_last}) %>");
|
|
@ -33,7 +33,7 @@
|
||||||
<% if course.is_delete == 0 %>
|
<% if course.is_delete == 0 %>
|
||||||
此班级的信息将不再显示<br/>
|
此班级的信息将不再显示<br/>
|
||||||
您和您的学生将不能在此班级中继续互动<br/>
|
您和您的学生将不能在此班级中继续互动<br/>
|
||||||
但您可以点击上方的“归档管理”
|
但您可以点击“归档管理”重新恢复
|
||||||
<% else %>
|
<% else %>
|
||||||
此班级的信息将恢复显示<br/>
|
此班级的信息将恢复显示<br/>
|
||||||
您和您的学生将可以重新在此班级中互动
|
您和您的学生将可以重新在此班级中互动
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<% last_score = student_work_scores.first %>
|
<% last_score = student_work_scores.first %>
|
||||||
<div class="mt10">
|
<div class="mt10">
|
||||||
<p class="fontGrey2"># <%=time_from_now last_score.created_at %>
|
<p class="fontGrey2"># <%=time_from_now last_score.created_at %>
|
||||||
<%= link_to last_score.user.show_name, user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品,优秀排行:
|
<%= link_to last_score.reviewer_role == 3 && !is_teacher ? '学生匿名' : last_score.user.show_name, last_score.reviewer_role == 3 && !is_teacher ? "javascript:void(0)" : user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品,优秀排行:
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -26,5 +26,23 @@
|
||||||
<ul class="homepageNewsList fl" id="applied_project_<%= ma.id %>">
|
<ul class="homepageNewsList fl" id="applied_project_<%= ma.id %>">
|
||||||
<%= render :partial => "users/applied_project_content", :locals =>{:ma => ma} %>
|
<%= render :partial => "users/applied_project_content", :locals =>{:ma => ma} %>
|
||||||
</ul>
|
</ul>
|
||||||
|
<!-- 匿评成绩申诉 -->
|
||||||
|
<% elsif ma && ma.applied_type == "StudentWorksScoresAppeal" %>
|
||||||
|
<ul class="homepageNewsList fl">
|
||||||
|
<% applied_user = User.find(ma.applied_user_id) %>
|
||||||
|
<li class="homepageNewsPortrait fl">
|
||||||
|
<%= link_to image_tag(url_to_avatar(applied_user), :width => "30", :height => "30"), user_path(applied_user), :target => '_blank' %>
|
||||||
|
</li>
|
||||||
|
<li class="homepageNewsPubType fl">
|
||||||
|
<%=link_to applied_user.show_name, user_path(applied_user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||||
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">申诉匿评成绩:</span>
|
||||||
|
</li>
|
||||||
|
<li class="homepageNewsContent fl">
|
||||||
|
<% homework = ma.applied.student_works_score.student_work.homework_common %>
|
||||||
|
<%= link_to homework.name, student_work_index_path(:homework => homework.id, :show_work_id => ma.applied.student_works_score.student_work_id, :tab => 2), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||||
|
</li>
|
||||||
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
|
@ -401,7 +401,7 @@
|
||||||
<div class="longMessageWidth">
|
<div class="longMessageWidth">
|
||||||
<li class="homepageNewsPortrait fl">
|
<li class="homepageNewsPortrait fl">
|
||||||
<% if ma.course_message.reviewer_role == 3 %>
|
<% if ma.course_message.reviewer_role == 3 %>
|
||||||
<%= link_to image_tag(url_to_avatar(""), :width => "30", :height => "30"), :target => '_blank' %>
|
<%= link_to image_tag(url_to_avatar(""), "javascript:void(0);", :width => "30", :height => "30"), :target => '_blank' %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %>
|
<%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -504,14 +504,17 @@
|
||||||
</ul>
|
</ul>
|
||||||
<% else %>
|
<% else %>
|
||||||
<ul class="homepageNewsList fl">
|
<ul class="homepageNewsList fl">
|
||||||
|
|
||||||
<div class="longMessageWidth">
|
<div class="longMessageWidth">
|
||||||
<li class="homepageNewsPortrait fl">
|
<li class="homepageNewsPortrait fl">
|
||||||
<%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %>
|
<% show_name = ma.course_message.jour.reviewer_role != 3 || ma.course_message.user.allowed_to?(:as_teacher, ma.course) %>
|
||||||
|
<%= link_to image_tag(url_to_avatar(show_name ? ma.course_message.user : ""), :width => "30", :height => "30"), show_name ? user_path(ma.course_message.user) : "javascript:void(0)", :target => '_blank' %>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li class="homepageNewsPubType fl">
|
<li class="homepageNewsPubType fl">
|
||||||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname +
|
|
||||||
"#{ma.course_message.user.allowed_to?(:as_teacher, ma.course)?"老师":"同学"}",
|
<%= link_to show_name ? ma.course_message.user.show_name + "#{ma.course_message.user.allowed_to?(:as_teacher, ma.course)?"老师":"同学"}" : "匿名用户",
|
||||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
show_name ? user_path(ma.course_message.user) : "javascript:void(0)", :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||||
<span class="homepageNewsType fl">回复了作品评论:</span>
|
<span class="homepageNewsType fl">回复了作品评论:</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="messageInformationContents">
|
<li class="messageInformationContents">
|
||||||
|
@ -590,7 +593,7 @@
|
||||||
<span class="homepageNewsType fl">重新提交了作品:</span>
|
<span class="homepageNewsType fl">重新提交了作品:</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="messageInformationContents">
|
<li class="messageInformationContents">
|
||||||
<%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id),
|
<%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id, :tab => 2),
|
||||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||||
<%#= link_to truncate(ma.course_message.name,:length=>25)+'(失败原因:提交作品的人数低于2人)', student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "c_red" : "newsGrey "}" %>
|
<%#= link_to truncate(ma.course_message.name,:length=>25)+'(失败原因:提交作品的人数低于2人)', student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "c_red" : "newsGrey "}" %>
|
||||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||||
|
@ -613,7 +616,7 @@
|
||||||
<span class="homepageNewsType fl">追加新附件了:</span>
|
<span class="homepageNewsType fl">追加新附件了:</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="messageInformationContents">
|
<li class="messageInformationContents">
|
||||||
<%= link_to "作业标题:" + ma.course_message.homework_common.name, student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id),
|
<%= link_to "作业标题:" + ma.course_message.homework_common.name, student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id, :tab => 2),
|
||||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||||
|
@ -622,6 +625,36 @@
|
||||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<!-- 匿评申诉 -->
|
||||||
|
<% if ma.course_message_type == "StudentWorksScoresAppeal" && ma.course_message %>
|
||||||
|
<ul class="homepageNewsList fl">
|
||||||
|
<li class="homepageNewsPortrait fl">
|
||||||
|
<%=link_to image_tag(url_to_avatar(""), :width => "30", :height => "30"), "javascript:void(0);", :target => '_blank' %>
|
||||||
|
</li>
|
||||||
|
<li class="homepageNewsPubType fl">
|
||||||
|
<% if ma.status == 1 %>
|
||||||
|
<span class="newsBlue homepageNewsPublisher">匿名用户</span>
|
||||||
|
<% elsif ma.status == 3 || ma.status == 4 %>
|
||||||
|
<% deal_user = User.find ma.apply_result %>
|
||||||
|
<%= link_to deal_user.show_name, user_path(deal_user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||||
|
<% end %>
|
||||||
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
|
||||||
|
<% if ma.status == 1 %>
|
||||||
|
对您的评阅发起申诉:
|
||||||
|
<% elsif ma.status == 3 %>
|
||||||
|
接受申诉:
|
||||||
|
<% elsif ma.status == 4 %>
|
||||||
|
拒绝申诉:
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
<li class="homepageNewsContent fl">
|
||||||
|
<%= link_to ma.course_message.student_works_score.student_work.homework_common.name, student_work_index_path(:homework => ma.course_message.student_works_score.student_work.homework_common_id, :show_work_id => ma.course_message.student_works_score.student_work_id, :tab => 2),
|
||||||
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||||
|
</li>
|
||||||
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
<!-- 创建课程消息 -->
|
<!-- 创建课程消息 -->
|
||||||
<% if ma.course_message_type == "Course" && ma.course_message %>
|
<% if ma.course_message_type == "Course" && ma.course_message %>
|
||||||
<ul class="homepageNewsList fl">
|
<ul class="homepageNewsList fl">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<% if ma.class == SystemMessage %>
|
<% if ma.class == SystemMessage && many_days_ago(ma.created_at, 30) %>
|
||||||
<%# @user_system_messages.each do |usm| %>
|
<%# @user_system_messages.each do |usm| %>
|
||||||
<ul class="homepageNewsList fl">
|
<ul class="homepageNewsList fl">
|
||||||
<div class="longMessageWidth">
|
<div class="longMessageWidth">
|
||||||
|
|
|
@ -353,6 +353,9 @@ RedmineApp::Application.routes.draw do
|
||||||
get 'work_canrepeat'
|
get 'work_canrepeat'
|
||||||
get 'get_user_infor'
|
get 'get_user_infor'
|
||||||
post 'add_group_member'
|
post 'add_group_member'
|
||||||
|
post 'appeal_anonymous_score'
|
||||||
|
get 'alert_appeal_box'
|
||||||
|
get 'deal_appeal_score'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
class AddAnonymousAppealToHomework < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :homework_commons, :anonymous_appeal, :integer, :default => 0
|
||||||
|
add_column :homework_detail_manuals, :appeal_penalty, :integer, :default => 0
|
||||||
|
add_column :student_works, :appeal_penalty, :integer, :default => 0
|
||||||
|
add_column :student_works_scores, :appeal_status, :integer, :default => 0
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,12 @@
|
||||||
|
class CreateStudentWorksScoresAppeals < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :student_works_scores_appeals do |t|
|
||||||
|
t.integer :student_works_score_id
|
||||||
|
t.integer :user_id
|
||||||
|
t.text :comment
|
||||||
|
t.integer :appeal_status
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -1441,7 +1441,7 @@ a.syllabusbox_a_blue {
|
||||||
.resource_tip_box span {display:block; border-width:10px; position:absolute;top:35px; left:-18px; border-style:dashed solid dashed dashed; border-color:transparent #fff transparent transparent; font-size:0; line-height:0;}
|
.resource_tip_box span {display:block; border-width:10px; position:absolute;top:35px; left:-18px; border-style:dashed solid dashed dashed; border-color:transparent #fff transparent transparent; font-size:0; line-height:0;}
|
||||||
|
|
||||||
/*邀请码提示框*/
|
/*邀请码提示框*/
|
||||||
.invite_code_tip_box {position:absolute; padding:5px 10px; white-space:nowrap; background-color:#fff; right:-185px; top:50px; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
|
.invite_code_tip_box {position:absolute; padding:5px 10px; white-space:nowrap; background-color:#fff; right:-160px; top:50px; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
|
||||||
.invite_code_tip_box em {display:block; border-width:10px; position:absolute;top:26px; left:-20px; border-style:dashed solid dashed dashed; border-color:transparent #eaeaea transparent transparent; font-size:0; line-height:0;}
|
.invite_code_tip_box em {display:block; border-width:10px; position:absolute;top:26px; left:-20px; border-style:dashed solid dashed dashed; border-color:transparent #eaeaea transparent transparent; font-size:0; line-height:0;}
|
||||||
.invite_code_tip_box span {display:block; border-width:10px; position:absolute;top:26px; left:-18px; border-style:dashed solid dashed dashed; border-color:transparent #fff transparent transparent; font-size:0; line-height:0;}
|
.invite_code_tip_box span {display:block; border-width:10px; position:absolute;top:26px; left:-18px; border-style:dashed solid dashed dashed; border-color:transparent #fff transparent transparent; font-size:0; line-height:0;}
|
||||||
|
|
||||||
|
|
|
@ -289,10 +289,11 @@ a.sy_class_option:hover {
|
||||||
}
|
}
|
||||||
.sy_class_id{
|
.sy_class_id{
|
||||||
width:94px;
|
width:94px;
|
||||||
height:94px;
|
height:70px;
|
||||||
border:1px solid #f1f1f1;
|
border:1px solid #f1f1f1;
|
||||||
background:#fff;
|
background:#fff;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
|
padding-top:24px;
|
||||||
}
|
}
|
||||||
.sy_class_id p{
|
.sy_class_id p{
|
||||||
font-size:16px;
|
font-size:16px;
|
||||||
|
@ -302,7 +303,7 @@ a.sy_class_option:hover {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
max-width:440px;
|
max-width:650px;
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow:ellipsis;
|
text-overflow:ellipsis;
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
FactoryGirl.define do
|
||||||
|
factory :student_works_scores_appeal do
|
||||||
|
student_works_score_id 1
|
||||||
|
user_id 1
|
||||||
|
comment "MyText"
|
||||||
|
appeal_status 1
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe StudentWorksScoresAppeal, :type => :model do
|
||||||
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
|
end
|
Loading…
Reference in New Issue