Merge branch 'Homework' into develop
|
@ -200,7 +200,7 @@ class BidsController < ApplicationController
|
||||||
flash[:notice] = l(:label_bid_succeed)
|
flash[:notice] = l(:label_bid_succeed)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
redirect_to respond_path(@homework)
|
redirect_to course_for_bid_path(@homework)
|
||||||
else
|
else
|
||||||
@bid.safe_attributes = params[:bid]
|
@bid.safe_attributes = params[:bid]
|
||||||
@courses = []
|
@courses = []
|
||||||
|
@ -454,6 +454,7 @@ class BidsController < ApplicationController
|
||||||
# 显示作业课程
|
# 显示作业课程
|
||||||
# add by nwb
|
# add by nwb
|
||||||
def show_courseEx
|
def show_courseEx
|
||||||
|
|
||||||
if (User.current.logged? && (User.current.member_of_course?(@bid.courses.first) || User.current.admin?))
|
if (User.current.logged? && (User.current.member_of_course?(@bid.courses.first) || User.current.admin?))
|
||||||
# flash[:notice] = ""
|
# flash[:notice] = ""
|
||||||
@membership = User.current.coursememberships.all(:conditions => Course.visible_condition(User.current))
|
@membership = User.current.coursememberships.all(:conditions => Course.visible_condition(User.current))
|
||||||
|
@ -489,26 +490,39 @@ class BidsController < ApplicationController
|
||||||
|
|
||||||
if @bid.homework_type
|
if @bid.homework_type
|
||||||
@homework = HomeworkAttach.new
|
@homework = HomeworkAttach.new
|
||||||
if @bid.proportion
|
@is_teacher = is_course_teacher(User.current,@bid.courses.first)
|
||||||
teacher_proportion = @bid.proportion * 1.0 / 100
|
teachers = "("
|
||||||
|
teacher_members = searchTeacherAndAssistant(@bid.courses.first)
|
||||||
|
teacher_members.each do |member|
|
||||||
|
if member == teacher_members.last
|
||||||
|
teachers += member.user_id.to_s + ")"
|
||||||
else
|
else
|
||||||
teacher_proportion = 1.0
|
teachers += member.user_id.to_s + ","
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if @is_teacher
|
||||||
|
all_homework_list = HomeworkAttach.eager_load(:attachments,:user,:rate_averages).find_by_sql("SELECT * FROM (SELECT homework_attaches.*,
|
||||||
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id IN #{teachers}) AS t_score,
|
||||||
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id NOT IN #{teachers}) AS s_score
|
||||||
|
FROM homework_attaches WHERE bid_id = #{@bid.id} ORDER BY s_score DESC,created_at ASC) AS table1
|
||||||
|
WHERE table1.t_score IS NULL")
|
||||||
|
@cur_type = 1
|
||||||
|
else
|
||||||
|
all_homework_list = HomeworkAttach.eager_load(:attachments,:user,:rate_averages).find_by_sql("SELECT * FROM(SELECT homework_attaches.*,
|
||||||
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id IN #{teachers}) AS t_score,
|
||||||
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id NOT IN #{teachers}) AS s_score,
|
||||||
|
(SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id = 3123) AS m_score
|
||||||
|
FROM homework_attaches
|
||||||
|
INNER JOIN homework_evaluations ON homework_evaluations.homework_attach_id = homework_attaches.id
|
||||||
|
WHERE homework_attaches.bid_id = #{@bid.id} AND homework_evaluations.user_id = #{User.current.id}) AS table1
|
||||||
|
WHERE table1.m_score IS NULL")
|
||||||
|
@is_student_batch_homework = true
|
||||||
|
@cur_type = 4
|
||||||
end
|
end
|
||||||
#@homework_list = @bid.homeworks
|
|
||||||
#增加作业按评分排序,
|
|
||||||
#@homework_list = @bid.homeworks.eager_load(:rate_averages, :user, :attachments).order('seems_rateable_cached_ratings.avg DESC').order("#{HomeworkAttach.table_name}.created_at ASC")
|
|
||||||
all_homework_list = HomeworkAttach.eager_load(:attachments,:user,:rate_averages).find_by_sql("SELECT homework_attaches.*,
|
|
||||||
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id = #{@bid.author_id}) AS t_score,
|
|
||||||
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id <> #{@bid.author_id}) AS s_score
|
|
||||||
FROM homework_attaches WHERE bid_id = #{@bid.id} ORDER BY
|
|
||||||
(CASE WHEN t_score IS NULL THEN 0 ELSE t_score * #{teacher_proportion} END + CASE WHEN s_score IS NULL THEN 0 ELSE s_score * #{1 - teacher_proportion} END) DESC,created_at ASC")
|
|
||||||
|
|
||||||
limit = 10
|
|
||||||
feedback_count = all_homework_list.count
|
|
||||||
@feedback_pages = Paginator.new feedback_count, limit, params['page']
|
|
||||||
offset ||= @feedback_pages.offset
|
|
||||||
@homework_list = all_homework_list[offset, limit]
|
|
||||||
|
|
||||||
|
@cur_page = params[:page] || 1
|
||||||
|
@homework_list = paginateHelper all_homework_list,10
|
||||||
|
@jours_count = @bid.journals_for_messages.where('m_parent_id IS NULL').count
|
||||||
if params[:student_id].present?
|
if params[:student_id].present?
|
||||||
@temp = []
|
@temp = []
|
||||||
@homework_list.each do |pro|
|
@homework_list.each do |pro|
|
||||||
|
@ -635,13 +649,8 @@ class BidsController < ApplicationController
|
||||||
end
|
end
|
||||||
@user = @bid.author
|
@user = @bid.author
|
||||||
@jours = @bid.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
|
@jours = @bid.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
|
||||||
@limit = 10
|
@jour = paginateHelper @jours,10
|
||||||
@feedback_count = @jours.count
|
|
||||||
@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
|
||||||
@offset ||= @feedback_pages.offset
|
|
||||||
@jour = @jours[@offset, @limit]
|
|
||||||
@bid.set_commit(@feedback_count)
|
@bid.set_commit(@feedback_count)
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
#format.api { render_api_ok }
|
#format.api { render_api_ok }
|
||||||
|
@ -813,7 +822,7 @@ class BidsController < ApplicationController
|
||||||
flash[:notice] = l(:label_bid_succeed)
|
flash[:notice] = l(:label_bid_succeed)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
redirect_to respond_url(@bid)
|
redirect_to course_for_bid_path(@bid)
|
||||||
else
|
else
|
||||||
@bid.safe_attributes = params[:bid]
|
@bid.safe_attributes = params[:bid]
|
||||||
@homework = @bid
|
@homework = @bid
|
||||||
|
@ -992,6 +1001,46 @@ class BidsController < ApplicationController
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 启动匿评
|
||||||
|
def start_anonymous_comment
|
||||||
|
@bid = Bid.find(params[:id])
|
||||||
|
homeworks = @bid.homeworks
|
||||||
|
users = homeworks.map { |h| h.user }
|
||||||
|
|
||||||
|
@start_index = rand(homeworks.size)
|
||||||
|
while users[0] == homeworks[@start_index].user
|
||||||
|
@start_index = rand(homeworks.size)
|
||||||
|
end
|
||||||
|
|
||||||
|
3.times do |i|
|
||||||
|
homework_start_index = @start_index + i
|
||||||
|
users.each_with_index do |user, index|
|
||||||
|
actual_index = homework_start_index + index
|
||||||
|
actual_index = (actual_index < homeworks.size ? actual_index : actual_index - homeworks.size)
|
||||||
|
if user != homeworks[actual_index]
|
||||||
|
@homework_evaluation = HomeworkEvaluation.new(user_id: user.id, homework_attach_id: homeworks[actual_index].id)
|
||||||
|
@homework_evaluation.save
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
# 修改状态为 '启动匿评'
|
||||||
|
@bid.update_column('comment_status', 1)
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def stop_anonymous_comment
|
||||||
|
@bid = Bid.find(params[:id])
|
||||||
|
|
||||||
|
@bid.update_column('comment_status', 2)
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def find_bid
|
def find_bid
|
||||||
|
|
|
@ -1,24 +1,155 @@
|
||||||
class HomeworkAttachController < ApplicationController
|
class HomeworkAttachController < ApplicationController
|
||||||
layout "course_base"
|
layout "course_base"
|
||||||
include CoursesHelper
|
include CoursesHelper
|
||||||
|
include HomeworkAttachHelper
|
||||||
|
helper :words
|
||||||
###############################
|
###############################
|
||||||
before_filter :can_show_course,except: []
|
before_filter :can_show_course,except: []
|
||||||
#判断当前角色权限时需先找到当前操作的project
|
#判断当前角色权限时需先找到当前操作的project
|
||||||
before_filter :find_course_by_bid_id, :only => [:new]
|
before_filter :find_course_by_bid_id, :only => [:new]
|
||||||
before_filter :find_course_by_hoemwork_id, :only => [:edit,:update,:destroy,:show,:add_homework_users,:destory_homework_users]
|
before_filter :find_bid_and_course,:only => [:get_not_batch_homework,:get_batch_homeworks,:get_homeworks,:get_homework_jours, :get_student_batch_homework, :get_my_homework]
|
||||||
|
before_filter :find_course_by_hoemwork_id, :only => [:edit,:update,:destroy,:show,:add_homework_users,:destory_homework_users, :praise_homework]
|
||||||
#判断当前角色是否有操作权限
|
#判断当前角色是否有操作权限
|
||||||
#勿删 before_filter :authorize, :only => [:new,:edit,:update,:destroy]
|
#勿删 before_filter :authorize, :only => [:new,:edit,:update,:destroy]
|
||||||
|
|
||||||
def find_course_by_bid_id
|
#@cur_type:
|
||||||
@bid = Bid.find(params[:id])
|
#1.未批作业列表
|
||||||
@course = @bid.courses[0]
|
#2.已批作业列表
|
||||||
rescue ActiveRecord::RecordNotFound
|
#3.全部作业列表
|
||||||
render_404
|
#4.匿评作业列表
|
||||||
|
#根据此字段判断关闭homework_attach的show界面后是否要调用js刷新页面
|
||||||
|
|
||||||
|
#获取未批作业列表
|
||||||
|
def get_not_batch_homework
|
||||||
|
sort, direction = params[:sort], params[:direction]
|
||||||
|
order_by = sort == 'socre'? "s_score #{direction}" : "created_at #{direction}"
|
||||||
|
teachers = find_course_teachers @course
|
||||||
|
all_homework_list = HomeworkAttach.eager_load(:attachments,:user,:rate_averages).find_by_sql("SELECT * FROM (SELECT homework_attaches.*,
|
||||||
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id IN #{teachers}) AS t_score,
|
||||||
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id NOT IN #{teachers}) AS s_score
|
||||||
|
FROM homework_attaches WHERE bid_id = #{@bid.id}
|
||||||
|
ORDER BY #{order_by}) AS table1
|
||||||
|
WHERE table1.t_score IS NULL")
|
||||||
|
@cur_page = params[:page] || 1
|
||||||
|
@cur_type = 1
|
||||||
|
@homework_list = paginateHelper all_homework_list,10
|
||||||
|
@direction = direction == 'asc'? 'desc' : 'asc'
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def find_course_by_hoemwork_id
|
#获取已评作业列表
|
||||||
@homework = HomeworkAttach.find(params[:id])
|
def get_batch_homeworks
|
||||||
@course = @homework.bid.courses[0]
|
sort, direction = params[:sort], params[:direction]
|
||||||
|
teacher_proportion = get_teacher_proportion @bid
|
||||||
|
order_by = sort == 'socre'? "(CASE WHEN t_score IS NULL THEN 0 ELSE t_score * #{teacher_proportion} END + CASE WHEN s_score IS NULL THEN 0 ELSE s_score * #{1 - teacher_proportion} END) #{direction}" : "created_at #{direction}"
|
||||||
|
teachers = find_course_teachers @course
|
||||||
|
all_homework_list = HomeworkAttach.eager_load(:attachments,:user,:rate_averages).find_by_sql("SELECT * FROM (SELECT homework_attaches.*,
|
||||||
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id IN #{teachers} and stars IS NOT NULL) AS t_score,
|
||||||
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id NOT IN #{teachers}) AS s_score
|
||||||
|
FROM homework_attaches WHERE bid_id = #{@bid.id}
|
||||||
|
ORDER BY #{order_by}) AS table1
|
||||||
|
WHERE table1.t_score IS NOT NULL")
|
||||||
|
@cur_page = params[:page] || 1
|
||||||
|
@cur_type = 2
|
||||||
|
@homework_list = paginateHelper all_homework_list,10
|
||||||
|
@direction = direction == 'asc'? 'desc' : 'asc'
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
#获取所有作业列表
|
||||||
|
def get_homeworks
|
||||||
|
sort, direction = params[:sort], params[:direction]
|
||||||
|
teacher_proportion = get_teacher_proportion @bid
|
||||||
|
order_by = sort == 'socre'? "(CASE WHEN t_score IS NULL THEN 0 ELSE t_score * #{teacher_proportion} END + CASE WHEN s_score IS NULL THEN 0 ELSE s_score * #{1 - teacher_proportion} END) #{direction}" : "created_at #{direction}"
|
||||||
|
teachers = find_course_teachers @course
|
||||||
|
all_homework_list = HomeworkAttach.eager_load(:attachments,:user,:rate_averages).find_by_sql("SELECT homework_attaches.*,
|
||||||
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id in #{teachers}) AS t_score,
|
||||||
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id not in #{teachers}) AS s_score
|
||||||
|
FROM homework_attaches WHERE bid_id = #{@bid.id}
|
||||||
|
ORDER BY #{order_by}")
|
||||||
|
@cur_page = params[:page] || 1
|
||||||
|
@cur_type = 3
|
||||||
|
@homework_list = paginateHelper all_homework_list,10
|
||||||
|
@direction = direction == 'asc'? 'desc' : 'asc'
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
#获取学生匿评列表
|
||||||
|
def get_student_batch_homework
|
||||||
|
@is_student_batch_homework = true
|
||||||
|
teachers = find_course_teachers @course
|
||||||
|
all_homework_list = HomeworkAttach.eager_load(:attachments,:user,:rate_averages).find_by_sql("SELECT * FROM(SELECT homework_attaches.*,
|
||||||
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id IN #{teachers}) AS t_score,
|
||||||
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id NOT IN #{teachers}) AS s_score,
|
||||||
|
(SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id = 3123) AS m_score
|
||||||
|
FROM homework_attaches
|
||||||
|
INNER JOIN homework_evaluations ON homework_evaluations.homework_attach_id = homework_attaches.id
|
||||||
|
WHERE homework_attaches.bid_id = #{@bid.id} AND homework_evaluations.user_id = #{User.current.id}) AS table1
|
||||||
|
WHERE table1.m_score IS NULL")
|
||||||
|
@cur_page = params[:page] || 1
|
||||||
|
@cur_type = 4
|
||||||
|
@homework_list = paginateHelper all_homework_list,10
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
#获取我的作业
|
||||||
|
def get_my_homework
|
||||||
|
@is_my_homework = true
|
||||||
|
teachers = find_course_teachers @course
|
||||||
|
all_homework_list = HomeworkAttach.find_by_sql("SELECT homework_attaches.*,
|
||||||
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id IN #{teachers}) AS t_score,
|
||||||
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id NOT IN #{teachers}) AS s_score
|
||||||
|
FROM homework_attaches
|
||||||
|
WHERE homework_attaches.bid_id = #{@bid.id} AND homework_attaches.user_id = #{User.current.id}")
|
||||||
|
#如果我没有创建过作业,就检索我是否参与了某个作业
|
||||||
|
if all_homework_list.empty?
|
||||||
|
all_homework_list = HomeworkAttach.find_by_sql("SELECT homework_attaches.*,
|
||||||
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id IN #{teachers}) AS t_score,
|
||||||
|
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id NOT IN #{teachers}) AS s_score
|
||||||
|
FROM homework_attaches
|
||||||
|
INNER JOIN homework_users ON homework_users.homework_attach_id = homework_attaches.id
|
||||||
|
WHERE homework_attaches.bid_id = #{@bid.id} AND homework_users.user_id = #{User.current.id}")
|
||||||
|
end
|
||||||
|
@cur_page = params[:page] || 1
|
||||||
|
@homework_list = paginateHelper all_homework_list,10
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
#获取作业的留言列表
|
||||||
|
def get_homework_jours
|
||||||
|
@user = @bid.author
|
||||||
|
@jours = @bid.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
|
||||||
|
@jour = paginateHelper @jours,10
|
||||||
|
@state = false
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
#为作业点赞
|
||||||
|
def praise_homework
|
||||||
|
pt = PraiseTread.new
|
||||||
|
pt.user_id = User.current.id
|
||||||
|
pt.praise_tread_object_id = @homework.id
|
||||||
|
pt.praise_tread_object_type = "HomeworkAttach"
|
||||||
|
pt.praise_or_tread = 1
|
||||||
|
if pt.save
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
else
|
||||||
|
render_404
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#获取作业的成员
|
#获取作业的成员
|
||||||
|
@ -66,6 +197,9 @@ class HomeworkAttachController < ApplicationController
|
||||||
homework_user = @homework.homework_users.where("user_id = #{params[:user_id]}").first
|
homework_user = @homework.homework_users.where("user_id = #{params[:user_id]}").first
|
||||||
homework_user.destroy
|
homework_user.destroy
|
||||||
get_homework_member @homework
|
get_homework_member @homework
|
||||||
|
|
||||||
|
@homework_list = []
|
||||||
|
@is_my_homework = true
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
|
@ -90,8 +224,8 @@ class HomeworkAttachController < ApplicationController
|
||||||
project_id = 0
|
project_id = 0
|
||||||
end
|
end
|
||||||
sta = 0
|
sta = 0
|
||||||
name = params[:new_form][:name]
|
name = params[:homework_attach][:name]
|
||||||
description = params[:new_form][:description]
|
description = params[:homework_attach][:description]
|
||||||
options = {
|
options = {
|
||||||
:user_id => user_id,
|
:user_id => user_id,
|
||||||
:state => sta,
|
:state => sta,
|
||||||
|
@ -212,9 +346,14 @@ class HomeworkAttachController < ApplicationController
|
||||||
def destroy
|
def destroy
|
||||||
if User.current.admin? || User.current == @homework.user
|
if User.current.admin? || User.current == @homework.user
|
||||||
if @homework.destroy
|
if @homework.destroy
|
||||||
|
#respond_to do |format|
|
||||||
|
# format.html { redirect_to course_for_bid_url @homework.bid }
|
||||||
|
# format.json { head :no_content }
|
||||||
|
#end
|
||||||
|
@homework_list = []
|
||||||
|
@is_my_homework = true
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to course_for_bid_url @homework.bid }
|
format.js
|
||||||
format.json { head :no_content }
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
end
|
end
|
||||||
|
@ -227,11 +366,9 @@ class HomeworkAttachController < ApplicationController
|
||||||
def show
|
def show
|
||||||
if User.current.admin? || User.current.member_of_course?(@homework.bid.courses.first)
|
if User.current.admin? || User.current.member_of_course?(@homework.bid.courses.first)
|
||||||
# 打分统计
|
# 打分统计
|
||||||
stars_reates = @homework.
|
stars_reates = @homework. rates(:quality)
|
||||||
rates(:quality)
|
|
||||||
stars_reates_count = stars_reates.count == 0 ? 1 : stars_reates.count
|
stars_reates_count = stars_reates.count == 0 ? 1 : stars_reates.count
|
||||||
stars_status = stars_reates.select("stars, count(*) as scount").
|
stars_status = stars_reates.select("stars, count(*) as scount").group("stars")
|
||||||
group("stars")
|
|
||||||
@stars_status_map = Hash.new(0.0)
|
@stars_status_map = Hash.new(0.0)
|
||||||
stars_status.each do |star_status|
|
stars_status.each do |star_status|
|
||||||
percent = (star_status.scount * 1.0/ stars_reates_count) * 100.to_f
|
percent = (star_status.scount * 1.0/ stars_reates_count) * 100.to_f
|
||||||
|
@ -243,16 +380,55 @@ class HomeworkAttachController < ApplicationController
|
||||||
@has_evaluation = stars_reates.where("rater_id = ?",User.current).count > 0
|
@has_evaluation = stars_reates.where("rater_id = ?",User.current).count > 0
|
||||||
#是否开启互评功能
|
#是否开启互评功能
|
||||||
@is_evaluation = @homework.bid.is_evaluation == 1 || @homework.bid.is_evaluation == nil
|
@is_evaluation = @homework.bid.is_evaluation == 1 || @homework.bid.is_evaluation == nil
|
||||||
@limit = 10
|
#@limit = 10
|
||||||
@jours = @homework.journals_for_messages.where("is_comprehensive_evaluation is null").order("created_on DESC")
|
#@jours留言 is null条件用以兼容历史数据
|
||||||
@feedback_count = @jours.count
|
@jours = @homework.journals_for_messages.where("is_comprehensive_evaluation = 3 or is_comprehensive_evaluation is null").order("created_on DESC")
|
||||||
@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
@cur_page = params[:cur_page] || 1
|
||||||
@offset ||= @feedback_pages.offset
|
@cur_type = params[:cur_type] || 5
|
||||||
@jour = @jours[@offset, @limit]
|
@jour = paginateHelper @jours,5
|
||||||
@comprehensive_evaluation = @homework.journals_for_messages.where("is_comprehensive_evaluation is not null").order("created_on DESC")
|
#@feedback_count = @jours.count
|
||||||
|
#@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
||||||
|
#@offset ||= @feedback_pages.offset
|
||||||
|
#@jour = @jours[@offset, @limit]
|
||||||
|
#@comprehensive_evaluation教师评论
|
||||||
|
#@comprehensive_evaluation = @homework.journals_for_messages.where("is_comprehensive_evaluation = 1").order("created_on DESC")
|
||||||
|
teachers = searchTeacherAndAssistant @course
|
||||||
|
@comprehensive_evaluation = []
|
||||||
|
teachers.each do|teacher|
|
||||||
|
temp = @homework.journals_for_messages.where("is_comprehensive_evaluation = 1 and user_id = #{teacher.user_id}").order("created_on DESC").first
|
||||||
|
@comprehensive_evaluation << temp if temp
|
||||||
|
end
|
||||||
|
#@comprehensive_evaluation = @homework.journals_for_messages.where("is_comprehensive_evaluation = 1 and user_id in #{convert_array(teachers)}").order("created_on DESC")
|
||||||
|
#@anonymous_comments 匿评
|
||||||
|
#@anonymous_comments = @homework.journals_for_messages.where("is_comprehensive_evaluation = 2").order("created_on DESC")
|
||||||
|
annymous_users = @homework.homework_evaluations.map(&:user)
|
||||||
|
unless annymous_users.nil? || annymous_users.count == 0
|
||||||
|
@anonymous_comments = @homework.journals_for_messages.where("is_comprehensive_evaluation = 2 and user_id in #{convert_array(annymous_users)}").order("created_on DESC")
|
||||||
|
end
|
||||||
@totle_score = score_for_homework @homework
|
@totle_score = score_for_homework @homework
|
||||||
@teaher_score = teacher_score_for_homework @homework
|
@teaher_score = teacher_score_for_homework @homework
|
||||||
|
|
||||||
|
is_student = is_cur_course_student @homework.bid.courses.first
|
||||||
|
is_teacher = is_course_teacher User.current,@homework.bid.courses.first
|
||||||
|
@is_anonymous_comments = @homework.bid.comment_status == 1 #是否开启了匿评
|
||||||
|
if !User.current.member_of_course?(@homework.bid.courses.first)
|
||||||
|
@is_comprehensive_evaluation = 3 #留言
|
||||||
|
elsif is_student && @is_anonymous_comments && !@has_evaluation#是学生且开启了匿评且未进行评分
|
||||||
|
@is_comprehensive_evaluation = 2 #匿评
|
||||||
|
elsif is_student && @is_anonymous_comments && @has_evaluation #是学生且开启了匿评,但已评分
|
||||||
|
@is_comprehensive_evaluation = 3 #留言
|
||||||
|
elsif is_student && !@is_anonymous_comments #是学生未开启匿评
|
||||||
|
@is_comprehensive_evaluation = 3 #留言
|
||||||
|
elsif is_teacher
|
||||||
|
@is_comprehensive_evaluation = 1 #教师评论
|
||||||
|
else
|
||||||
|
@is_comprehensive_evaluation = 3
|
||||||
|
end
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
format.html
|
||||||
|
format.js
|
||||||
|
end
|
||||||
else
|
else
|
||||||
render_403 :message => :notice_not_authorized
|
render_403 :message => :notice_not_authorized
|
||||||
end
|
end
|
||||||
|
@ -260,7 +436,30 @@ class HomeworkAttachController < ApplicationController
|
||||||
|
|
||||||
#删除留言
|
#删除留言
|
||||||
def destroy_jour
|
def destroy_jour
|
||||||
@journal_destroyed = JournalsForMessage.delete_message(params[:object_id])
|
|
||||||
|
@homework = HomeworkAttach.find(params[:jour_id])
|
||||||
|
@journal_destroyed = JournalsForMessage.find(params[:object_id])
|
||||||
|
@is_comprehensive_evaluation = @journal_destroyed.is_comprehensive_evaluation
|
||||||
|
@journal_destroyed.destroy
|
||||||
|
if @is_comprehensive_evaluation == 3
|
||||||
|
@jours = @homework.journals_for_messages.where("is_comprehensive_evaluation = 3 or is_comprehensive_evaluation is null").order("created_on DESC")
|
||||||
|
@jour = paginateHelper @jours,5
|
||||||
|
elsif @is_comprehensive_evaluation == 2
|
||||||
|
annymous_users = @homework.homework_evaluations.map(&:user)
|
||||||
|
unless annymous_users.nil? || annymous_users.count == 0
|
||||||
|
@anonymous_comments = @homework.journals_for_messages.where("is_comprehensive_evaluation = 2 and user_id in #{convert_array(annymous_users)}").order("created_on DESC")
|
||||||
|
end
|
||||||
|
elsif @is_comprehensive_evaluation == 1
|
||||||
|
teachers = searchTeacherAndAssistant @course
|
||||||
|
@comprehensive_evaluation = []
|
||||||
|
teachers.each do|teacher|
|
||||||
|
temp = @homework.journals_for_messages.where("is_comprehensive_evaluation = 1 and user_id = #{teacher.user_id}").order("created_on DESC").first
|
||||||
|
@comprehensive_evaluation << temp if temp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
|
@ -270,13 +469,30 @@ class HomeworkAttachController < ApplicationController
|
||||||
def addjours
|
def addjours
|
||||||
@homework = HomeworkAttach.find(params[:jour_id])
|
@homework = HomeworkAttach.find(params[:jour_id])
|
||||||
@add_jour = @homework.addjours User.current.id, params[:new_form][:user_message],0,params[:is_comprehensive_evaluation]
|
@add_jour = @homework.addjours User.current.id, params[:new_form][:user_message],0,params[:is_comprehensive_evaluation]
|
||||||
@jours = @homework.journals_for_messages.where("is_comprehensive_evaluation is null").order("created_on DESC")
|
if @add_jour.is_comprehensive_evaluation == 3
|
||||||
@limit = 10
|
@jours = @homework.journals_for_messages.where("is_comprehensive_evaluation = 3 or is_comprehensive_evaluation is null").order("created_on DESC")
|
||||||
@feedback_count = @jours.count
|
@jour = paginateHelper @jours,5
|
||||||
@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
elsif @add_jour.is_comprehensive_evaluation == 2
|
||||||
@offset ||= @feedback_pages.offset
|
annymous_users = @homework.homework_evaluations.map(&:user)
|
||||||
@jour = @jours[@offset, @limit]
|
unless annymous_users.nil? || annymous_users.count == 0
|
||||||
@comprehensive_evaluation = @homework.journals_for_messages.where("is_comprehensive_evaluation is not null").order("created_on DESC")
|
@anonymous_comments = @homework.journals_for_messages.where("is_comprehensive_evaluation = 2 and user_id in #{convert_array(annymous_users)}").order("created_on DESC")
|
||||||
|
end
|
||||||
|
elsif @add_jour.is_comprehensive_evaluation == 1
|
||||||
|
teachers = searchTeacherAndAssistant @homework.bid.courses.first
|
||||||
|
@comprehensive_evaluation = []
|
||||||
|
teachers.each do|teacher|
|
||||||
|
temp = @homework.journals_for_messages.where("is_comprehensive_evaluation = 1 and user_id = #{teacher.user_id}").order("created_on DESC").first
|
||||||
|
@comprehensive_evaluation << temp if temp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
#@limit = 10
|
||||||
|
#@feedback_count = @jours.count
|
||||||
|
#@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
||||||
|
#@offset ||= @feedback_pages.offset
|
||||||
|
#@jour = @jours[@offset, @limit]
|
||||||
|
#@comprehensive_evaluation = @homework.journals_for_messages.where("is_comprehensive_evaluation is not null").order("created_on DESC")
|
||||||
|
|
||||||
@totle_score = score_for_homework @homework
|
@totle_score = score_for_homework @homework
|
||||||
@teaher_score = teacher_score_for_homework @homework
|
@teaher_score = teacher_score_for_homework @homework
|
||||||
|
@ -321,6 +537,7 @@ class HomeworkAttachController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private
|
||||||
#验证是否显示课程
|
#验证是否显示课程
|
||||||
def can_show_course
|
def can_show_course
|
||||||
@first_page = FirstPage.find_by_page_type('project')
|
@first_page = FirstPage.find_by_page_type('project')
|
||||||
|
@ -328,5 +545,51 @@ class HomeworkAttachController < ApplicationController
|
||||||
render_404
|
render_404
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def find_bid_and_course
|
||||||
|
@bid = Bid.find(params[:bid_id])
|
||||||
|
@course = @bid.courses.first
|
||||||
|
rescue ActiveRecord::RecordNotFound
|
||||||
|
render_404
|
||||||
|
end
|
||||||
|
|
||||||
|
def find_course_by_bid_id
|
||||||
|
@bid = Bid.find(params[:id])
|
||||||
|
@course = @bid.courses.first
|
||||||
|
rescue ActiveRecord::RecordNotFound
|
||||||
|
render_404
|
||||||
|
end
|
||||||
|
|
||||||
|
def find_course_by_hoemwork_id
|
||||||
|
@homework = HomeworkAttach.find(params[:id])
|
||||||
|
@bid = @homework.bid
|
||||||
|
@course = @bid.courses.first
|
||||||
|
rescue ActiveRecord::RecordNotFound
|
||||||
|
render_404
|
||||||
|
end
|
||||||
|
|
||||||
|
#获取课程的老师列表
|
||||||
|
def find_course_teachers course
|
||||||
|
teachers = "("
|
||||||
|
teacher_members = searchTeacherAndAssistant(course)
|
||||||
|
teacher_members.each do |member|
|
||||||
|
if member == teacher_members.last
|
||||||
|
teachers += member.user_id.to_s + ")"
|
||||||
|
else
|
||||||
|
teachers += member.user_id.to_s + ","
|
||||||
|
end
|
||||||
|
end
|
||||||
|
teachers
|
||||||
|
end
|
||||||
|
|
||||||
|
#获取作业教师评分所占比例
|
||||||
|
def get_teacher_proportion bid
|
||||||
|
if bid.proportion
|
||||||
|
teacher_proportion = bid.proportion * 1.0 / 100
|
||||||
|
else
|
||||||
|
teacher_proportion = 1.0
|
||||||
|
end
|
||||||
|
teacher_proportion
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,12 @@ class WordsController < ApplicationController
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
@journal_destroyed = JournalsForMessage.delete_message(params[:object_id])
|
@journal_destroyed = JournalsForMessage.delete_message(params[:object_id])
|
||||||
|
if @journal_destroyed.jour_type == "Bid"
|
||||||
|
@bid = Bid.find(@journal_destroyed.jour_id)
|
||||||
|
end
|
||||||
|
if @bid
|
||||||
|
@jours_count = @bid.journals_for_messages.where('m_parent_id IS NULL').count
|
||||||
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
#format.api { render_api_ok }
|
#format.api { render_api_ok }
|
||||||
|
|
|
@ -127,7 +127,8 @@ module ApplicationHelper
|
||||||
# * :text - Link text (default to attachment filename)
|
# * :text - Link text (default to attachment filename)
|
||||||
# * :download - Force download (default: false)
|
# * :download - Force download (default: false)
|
||||||
def link_to_short_attachment(attachment, options={})
|
def link_to_short_attachment(attachment, options={})
|
||||||
text = h(truncate(options.delete(:text) || attachment.filename, length: 23, omission: '...'))
|
length = options[:length] ? options[:length]:23
|
||||||
|
text = h(truncate(options.delete(:text) || attachment.filename, length: length, omission: '...'))
|
||||||
route_method = options.delete(:download) ? :download_named_attachment_path : :named_attachment_path
|
route_method = options.delete(:download) ? :download_named_attachment_path : :named_attachment_path
|
||||||
html_options = options.slice!(:only_path)
|
html_options = options.slice!(:only_path)
|
||||||
url = send(route_method, attachment, attachment.filename, options)
|
url = send(route_method, attachment, attachment.filename, options)
|
||||||
|
@ -1892,5 +1893,18 @@ module ApplicationHelper
|
||||||
content_tag(:ul, logos.join("").html_safe, :class => ul_class.to_s).html_safe
|
content_tag(:ul, logos.join("").html_safe, :class => ul_class.to_s).html_safe
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def sort_homework_path(bid, sort, direction)
|
||||||
|
case self.action_name
|
||||||
|
when 'show_courseEx'
|
||||||
|
get_not_batch_homework_homework_attach_index_path(bid_id: bid.id, sort: sort, direction: 'asc')
|
||||||
|
when 'get_not_batch_homework'
|
||||||
|
get_not_batch_homework_homework_attach_index_path(bid_id: bid.id, sort: sort, direction: direction)
|
||||||
|
when 'get_batch_homeworks'
|
||||||
|
get_batch_homeworks_homework_attach_index_path(bid_id: bid.id, sort: sort, direction: direction)
|
||||||
|
when 'get_homeworks'
|
||||||
|
get_homeworks_homework_attach_index_path(bid_id: bid.id, sort: sort, direction: direction)
|
||||||
|
else
|
||||||
|
'#'
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -394,10 +394,7 @@ module CoursesHelper
|
||||||
#获取作业的教师评分
|
#获取作业的教师评分
|
||||||
#多个教师只获取一份教师评分
|
#多个教师只获取一份教师评分
|
||||||
def teacher_score_for_homework homework
|
def teacher_score_for_homework homework
|
||||||
members = searchTeacherAndAssistant(homework.bid.courses.first)#searchPeopleByRoles(homework.bid.courses.first,TeacherRoles).first
|
members = searchTeacherAndAssistant(homework.bid.courses.first)
|
||||||
#if member.nil?
|
|
||||||
# return "0.00"
|
|
||||||
#end
|
|
||||||
teacher_ids = []
|
teacher_ids = []
|
||||||
members.each do |user|
|
members.each do |user|
|
||||||
teacher_ids << user.user_id
|
teacher_ids << user.user_id
|
||||||
|
@ -407,7 +404,7 @@ module CoursesHelper
|
||||||
teacher_stars.each do |star|
|
teacher_stars.each do |star|
|
||||||
teacher_stars_count = teacher_stars_count + star.stars
|
teacher_stars_count = teacher_stars_count + star.stars
|
||||||
end
|
end
|
||||||
return format("%.2f",teacher_stars_count)
|
return format("%.2f",teacher_stars.count > 0 ? teacher_stars_count/teacher_stars.count : 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
#获取指定项目的得分
|
#获取指定项目的得分
|
||||||
|
|
|
@ -74,4 +74,35 @@ module HomeworkAttachHelper
|
||||||
end
|
end
|
||||||
type
|
type
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#判断指定用户是不是已经赞过该作业
|
||||||
|
def is_praise_homework user_id, obj_id
|
||||||
|
PraiseTread.where("user_id = #{user_id} AND praise_tread_object_id = #{obj_id} AND praise_tread_object_type = 'HomeworkAttach'").empty?
|
||||||
|
end
|
||||||
|
|
||||||
|
#获取赞的总数
|
||||||
|
def praise_homework_count obj_id
|
||||||
|
PraiseTread.where("praise_tread_object_id = #{obj_id} AND praise_tread_object_type = 'HomeworkAttach'").count
|
||||||
|
end
|
||||||
|
|
||||||
|
#获取用户对作业的评分
|
||||||
|
def get_homework_score user, homework
|
||||||
|
seems_rateable_rate = HomeworkAttach.find_by_sql("SELECT * FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = #{homework.id} AND rater_id = #{user.id}")
|
||||||
|
seems_rateable_rate.nil? || seems_rateable_rate.count == 0 ? 0:seems_rateable_rate[0].stars
|
||||||
|
end
|
||||||
|
|
||||||
|
def convert_array array
|
||||||
|
ary = "("
|
||||||
|
if array.nil? || array.count == 0
|
||||||
|
return "()"
|
||||||
|
end
|
||||||
|
array.each do |member|
|
||||||
|
if member == array.last
|
||||||
|
ary += member.id.to_s + ")"
|
||||||
|
else
|
||||||
|
ary += member.id.to_s + ","
|
||||||
|
end
|
||||||
|
end
|
||||||
|
ary
|
||||||
|
end
|
||||||
end
|
end
|
|
@ -138,7 +138,7 @@ module StoresHelper
|
||||||
return [link_to('unkown', '#')]
|
return [link_to('unkown', '#')]
|
||||||
end
|
end
|
||||||
bid_list = link_to l(:label_homework), homework_course_path(bid.courses.first)
|
bid_list = link_to l(:label_homework), homework_course_path(bid.courses.first)
|
||||||
bid_item = link_to bid.name, respond_path(bid)
|
bid_item = link_to bid.name, course_for_bid_path(bid)
|
||||||
return project_link(bid.courses.first).push(bid_list, bid_item)
|
return project_link(bid.courses.first).push(bid_list, bid_item)
|
||||||
else
|
else
|
||||||
xxx
|
xxx
|
||||||
|
|
|
@ -28,6 +28,7 @@ class Bid < ActiveRecord::Base
|
||||||
has_many :homework_for_courses, :dependent => :destroy
|
has_many :homework_for_courses, :dependent => :destroy
|
||||||
has_many :courses, :through => :homework_for_courses, :source => :course
|
has_many :courses, :through => :homework_for_courses, :source => :course
|
||||||
has_many :homeworks, :class_name => 'HomeworkAttach', :dependent => :destroy
|
has_many :homeworks, :class_name => 'HomeworkAttach', :dependent => :destroy
|
||||||
|
has_many :homework_evaluations, :through => :homeworks
|
||||||
has_many :join_in_contests, :dependent => :destroy
|
has_many :join_in_contests, :dependent => :destroy
|
||||||
has_many :praise_tread, as: :praise_tread_object, dependent: :destroy
|
has_many :praise_tread, as: :praise_tread_object, dependent: :destroy
|
||||||
# has_many :fork_homework, :class_name => 'Bid', :conditions => "#{Bid.table_name}.parent_id = #{id}"
|
# has_many :fork_homework, :class_name => 'Bid', :conditions => "#{Bid.table_name}.parent_id = #{id}"
|
||||||
|
|
|
@ -10,6 +10,7 @@ class HomeworkAttach < ActiveRecord::Base
|
||||||
has_many :users, :through => :homework_users
|
has_many :users, :through => :homework_users
|
||||||
seems_rateable :allow_update => true, :dimensions => :quality
|
seems_rateable :allow_update => true, :dimensions => :quality
|
||||||
belongs_to :project
|
belongs_to :project
|
||||||
|
has_many :homework_evaluations, :dependent => :destroy
|
||||||
|
|
||||||
safe_attributes "bid_id",
|
safe_attributes "bid_id",
|
||||||
"user_id"
|
"user_id"
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
class HomeworkEvaluation < ActiveRecord::Base
|
||||||
|
attr_accessible :homework_attach_id, :user_id
|
||||||
|
|
||||||
|
belongs_to :homework_attach
|
||||||
|
belongs_to :user
|
||||||
|
|
||||||
|
validate :user, presence: true
|
||||||
|
validate :homework_attach, presence: true
|
||||||
|
end
|
|
@ -14,6 +14,7 @@ class JournalsForMessage < ActiveRecord::Base
|
||||||
"is_readed", # 留言是否已读
|
"is_readed", # 留言是否已读
|
||||||
"m_reply_count", # 留言的回复数量
|
"m_reply_count", # 留言的回复数量
|
||||||
"m_reply_id" # 回复某留言的留言id(a留言回复了b留言,这是b留言的id)
|
"m_reply_id" # 回复某留言的留言id(a留言回复了b留言,这是b留言的id)
|
||||||
|
"is_comprehensive_evaluation" # 1 教师评论、2 匿评、3 留言
|
||||||
acts_as_tree :foreign_key => 'm_parent_id', :counter_cache => :m_reply_count, :order => "#{JournalsForMessage.table_name}.created_on ASC"
|
acts_as_tree :foreign_key => 'm_parent_id', :counter_cache => :m_reply_count, :order => "#{JournalsForMessage.table_name}.created_on ASC"
|
||||||
|
|
||||||
belongs_to :project,
|
belongs_to :project,
|
||||||
|
|
|
@ -42,7 +42,7 @@ class Mailer < ActionMailer::Base
|
||||||
|
|
||||||
@url = case journals_for_message.jour.class.to_s.to_sym # 判断留言的对象所属类型
|
@url = case journals_for_message.jour.class.to_s.to_sym # 判断留言的对象所属类型
|
||||||
when :Bid
|
when :Bid
|
||||||
respond_url(journals_for_message.jour, anchor: "word_li_#{journals_for_message.id}")
|
course_for_bid_url(journals_for_message.jour, anchor: "word_li_#{journals_for_message.id}")
|
||||||
when :Project
|
when :Project
|
||||||
return -1 if journals_for_message.jour.project_type == Project::ProjectType_project
|
return -1 if journals_for_message.jour.project_type == Project::ProjectType_project
|
||||||
project_feedback_url(journals_for_message.jour, anchor: "word_li_#{journals_for_message.id}")
|
project_feedback_url(journals_for_message.jour, anchor: "word_li_#{journals_for_message.id}")
|
||||||
|
|
|
@ -75,6 +75,7 @@ class User < Principal
|
||||||
|
|
||||||
has_many :homework_users
|
has_many :homework_users
|
||||||
has_many :homework_attaches, :through => :homework_users
|
has_many :homework_attaches, :through => :homework_users
|
||||||
|
has_many :homework_evaluations
|
||||||
|
|
||||||
has_and_belongs_to_many :groups, :after_add => Proc.new {|user, group| group.user_added(user)},
|
has_and_belongs_to_many :groups, :after_add => Proc.new {|user, group| group.user_added(user)},
|
||||||
:after_remove => Proc.new {|user, group| group.user_removed(user)}
|
:after_remove => Proc.new {|user, group| group.user_removed(user)}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
// file.click();
|
// file.click();
|
||||||
// }
|
// }
|
||||||
</script>
|
</script>
|
||||||
<span class="add_attachment">
|
<span class="add_attachment" style="font-weight:normal;">
|
||||||
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
|
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
|
||||||
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
|
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
|
||||||
<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()' %>
|
<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()' %>
|
||||||
|
@ -44,8 +44,11 @@
|
||||||
:upload_path => uploads_path(:format => 'js'),
|
:upload_path => uploads_path(:format => 'js'),
|
||||||
:description_placeholder => l(:label_optional_description)
|
:description_placeholder => l(:label_optional_description)
|
||||||
} %>
|
} %>
|
||||||
<span id="upload_file_count"><%= l(:label_no_file_uploaded)%></span>
|
<span id="upload_file_count">
|
||||||
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
<%= l(:label_no_file_uploaded)%>
|
||||||
|
</span>
|
||||||
|
(<%= l(:label_max_size) %>:
|
||||||
|
<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<% content_for :header_tags do %>
|
<% content_for :header_tags do %>
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
<div class="attachments">
|
<div class="attachments" style="font-weight:normal;">
|
||||||
<% for attachment in attachments %>
|
<% for attachment in attachments %>
|
||||||
<p style="width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
<p style="width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||||
<span title="<%= attachment.filename%>">
|
<span title="<%= attachment.filename%>" id = "attachment_">
|
||||||
|
<% if options[:length] %>
|
||||||
|
<%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true,:length => options[:length] -%>
|
||||||
|
<% else %>
|
||||||
<%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
|
<%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
<% if attachment.is_text? %>
|
<% if attachment.is_text? %>
|
||||||
<%= link_to image_tag('magnifier.png'),
|
<%= link_to image_tag('magnifier.png'),
|
||||||
|
@ -12,9 +17,10 @@
|
||||||
:filename => attachment.filename%>
|
:filename => attachment.filename%>
|
||||||
<% end %>
|
<% end %>
|
||||||
<span title="<%= attachment.description%>">
|
<span title="<%= attachment.description%>">
|
||||||
<%= h(truncate(" - #{attachment.description}", length: 15, omission: '...')) unless attachment.description.blank? %>
|
<%= h(truncate(" - #{attachment.description}", length: options[:length] ? options[:length]:15, omission: '...')) unless attachment.description.blank? %>
|
||||||
</span>
|
</span>
|
||||||
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
|
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
|
||||||
|
|
||||||
<% if options[:deletable] %>
|
<% if options[:deletable] %>
|
||||||
<% if attachment.container_type == 'HomeworkAttach' %>
|
<% if attachment.container_type == 'HomeworkAttach' %>
|
||||||
<%= link_to image_tag('delete.png'), {:controller => 'attachments', :action => 'delete_homework', :id => attachment.id},
|
<%= link_to image_tag('delete.png'), {:controller => 'attachments', :action => 'delete_homework', :id => attachment.id},
|
||||||
|
@ -32,6 +38,10 @@
|
||||||
:title => l(:button_delete) %>
|
:title => l(:button_delete) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if options[:wrap] %>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
<% if options[:author] %>
|
<% if options[:author] %>
|
||||||
<span class="author" title="<%= attachment.author%>">
|
<span class="author" title="<%= attachment.author%>">
|
||||||
<%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author) %>,
|
<%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author) %>,
|
||||||
|
|
|
@ -5,42 +5,64 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<% bids.each do |bid|%>
|
<% bids.each do |bid|%>
|
||||||
<table class="content-text-list">
|
<table class="content-text-list">
|
||||||
<tr><td colspan="2" valign="top" width="50" ><%= link_to(image_tag(url_to_avatar(bid.author), :class => 'avatar'), user_path(bid.author), :class => "avatar") %></td>
|
<tr>
|
||||||
|
<td colspan="2" valign="top" width="50" >
|
||||||
|
<%= link_to(image_tag(url_to_avatar(bid.author), :class => 'avatar'), user_path(bid.author), :class => "avatar") %>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<table width="580px" border="0">
|
<table width="580px" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top"><strong><%= link_to(bid.author.lastname+bid.author.firstname, user_path(bid.author)) %></strong>
|
<td colspan="2" valign="top">
|
||||||
<span class="font_lighter"><%= l(:label_user_create_project_homework) %></span>
|
<strong>
|
||||||
<span><%= link_to(bid.name, respond_path(bid), :class => 'bid_path') %></span>
|
<%= link_to(bid.author.lastname+bid.author.firstname, user_path(bid.author)) %>
|
||||||
|
</strong>
|
||||||
|
<span class="font_lighter">
|
||||||
|
<%= l(:label_user_create_project_homework) %>
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
<%= link_to(bid.name, course_for_bid_path(bid), :class => 'bid_path') %>
|
||||||
|
</span>
|
||||||
<span style="float: right">
|
<span style="float: right">
|
||||||
<% if(User.current.logged? && (!Member.where('user_id = ? and course_id = ?', User.current.id, bid.courses.first.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',5, 10, 7)).size >0)) %>
|
<% if(User.current.logged? && (!Member.where('user_id = ? and course_id = ?', User.current.id, bid.courses.first.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',5, 10, 7)).size >0)) %>
|
||||||
<%# 提交作业按钮 %>
|
|
||||||
<!--<%#= link_to l(:label_commit_homework), '#OpenWindow', rel: 'leanModal', onclick: "showSubH(#{bid.id}, '#{bid.name}');" if User.current.member_of?(@course) %>-->
|
|
||||||
<% cur_user_homework = cur_user_homework_for_bid(bid) %>
|
<% cur_user_homework = cur_user_homework_for_bid(bid) %>
|
||||||
<% if cur_user_homework!= nil && cur_user_homework.count == 0 %>
|
<% if cur_user_homework!= nil && cur_user_homework.count == 0 %>
|
||||||
<%= link_to l(:label_commit_homework),new_homework_attach_path(bid) %>
|
<%= link_to l(:label_commit_homework),new_homework_attach_path(bid) %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span style="color: green; float: right"><%= l(:lable_has_commit_homework)%></span>
|
<span style="color: green; float: right">
|
||||||
|
<%= l(:lable_has_commit_homework)%>
|
||||||
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if (User.current.admin?||User.current.id==bid.author_id) %>
|
<% if (User.current.admin?||User.current.id==bid.author_id) %>
|
||||||
|
<span id="<%=bid.id %>_anonymous_comment">
|
||||||
|
<% case bid.comment_status %>
|
||||||
|
<% when 0 %>
|
||||||
|
<%= link_to '启动匿评', start_anonymous_comment_bid_path(bid), id: "#{bid.id}_start_anonymous_comment", remote: true %>
|
||||||
|
<% when 1 %>
|
||||||
|
<%= link_to '关闭匿评', stop_anonymous_comment_bid_path(bid), id: "#{bid.id}_stop_anonymous_comment", remote: true %>
|
||||||
|
<% when 2 %>
|
||||||
|
匿评结束
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
l(:button_edit),
|
l(:button_edit),
|
||||||
{:action => 'edit', :controller=>'bids', :course_id =>@course.id, :bid_id => bid.id},
|
{:action => 'edit', :controller=>'bids', :course_id =>@course.id, :bid_id => bid.id},
|
||||||
:class => 'icon icon-edit'
|
:class => 'icon icon-edit'
|
||||||
) %>
|
) %>
|
||||||
<%= link_to(
|
<%#= link_to(
|
||||||
l(:button_delete),
|
l(:button_delete),
|
||||||
{:action => 'homework_destroy', :controller=>'bids', :course_id => bid.id},
|
{:action => 'homework_destroy', :controller=>'bids', :course_id => bid.id},
|
||||||
:method => :post,
|
:method => :post,
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:class => 'icon icon-del'
|
:class => 'icon icon-del'
|
||||||
) %></span>
|
) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><span class="font_lighter">
|
<td colspan="2">
|
||||||
|
<span class="font_lighter">
|
||||||
<% bidding_project = bid.biding_projects.all
|
<% bidding_project = bid.biding_projects.all
|
||||||
temp = []
|
temp = []
|
||||||
bidding_project.each do |pro|
|
bidding_project.each do |pro|
|
||||||
|
@ -51,48 +73,89 @@
|
||||||
end
|
end
|
||||||
%>
|
%>
|
||||||
<% if bid.homework_type == 1%>
|
<% if bid.homework_type == 1%>
|
||||||
<%= l(:label_x_homework_project, :count => bid.homeworks.count) %>(<strong><%= link_to bid.homeworks.count, course_for_bid_path(bid.id) %></strong>)
|
<%= l(:label_x_homework_project, :count => bid.homeworks.count) %>
|
||||||
|
(
|
||||||
|
<strong>
|
||||||
|
<%= link_to bid.homeworks.count, course_for_bid_path(bid.id) %>
|
||||||
|
</strong>)
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= l(:label_x_homework_project, :count => temp.count) %>(<strong><%= link_to temp.count, course_for_bid_path(bid.id) %></strong>)
|
<%= l(:label_x_homework_project, :count => temp.count) %>
|
||||||
<% end %></span>
|
(
|
||||||
<span class="font_lighter"><%= l(:label_x_responses, :count => bid.commit) %>(<strong><%= link_to bid.commit, respond_path(bid) %></strong>)</span>
|
<strong>
|
||||||
|
<%= link_to temp.count, course_for_bid_path(bid.id) %>
|
||||||
|
</strong>)
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
|
<span class="font_lighter">
|
||||||
|
<%= l(:label_students_responses) %>
|
||||||
|
(
|
||||||
|
<strong>
|
||||||
|
<%= bid.commit.nil? ? bid.commit : 0 %>
|
||||||
|
</strong>
|
||||||
|
)
|
||||||
|
</span>
|
||||||
<span style="float: right">
|
<span style="float: right">
|
||||||
<% if betweentime(bid.deadline) < 0 %>
|
<% if betweentime(bid.deadline) < 0 %>
|
||||||
<span style="color: red; float: right"><%= l(:label_commit_limit)%></span>
|
<span style="color: red; float: right">
|
||||||
|
<%= l(:label_commit_limit)%>
|
||||||
|
</span>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if betweentime(bid.deadline) < 3 %>
|
<% if betweentime(bid.deadline) < 3 %>
|
||||||
<span style="color: red"><%= l(:label_commit_ar) %></span>
|
<span style="color: red">
|
||||||
<% else %>
|
<%= l(:label_commit_ar) %>
|
||||||
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
<% end %> </span>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"> <% if bid.reward_type.nil? or bid.reward_type == 1 %> <strong><%= l(:label_bids_reward_method) %><span style="color: #ed8924;font-family: 14px; font-family: '微软雅黑'"><%= l(:label_call_bonus) %> <%= l(:label_RMB_sign) %>
|
<td colspan="2">
|
||||||
<%= bid.budget%></span></strong> <% elsif bid.reward_type == 2 %> <strong><%= l(:label_bids_reward_method) %><span style="color: #15bccf;font-family: 14px; font-family:' 微软雅黑'"><%= bid.budget%></span></strong>
|
<% if bid.reward_type.nil? or bid.reward_type == 1 %>
|
||||||
<% else %>
|
<strong>
|
||||||
|
<%= l(:label_bids_reward_method) %>
|
||||||
<% end %> <!-- <td style="color: rgb(255, 0, 0);"><strong><%#= l(:label_price) %><%#= l(:label_RMB_sign) %><%#= bid.budget%></strong></td> --></td>
|
<span style="color: #ed8924;font-family: 14px; font-family: '微软雅黑'">
|
||||||
|
<%= l(:label_call_bonus) %>
|
||||||
|
|
||||||
|
<%= l(:label_RMB_sign) %>
|
||||||
|
<%= bid.budget%>
|
||||||
|
</span>
|
||||||
|
</strong>
|
||||||
|
<% elsif bid.reward_type == 2 %>
|
||||||
|
<strong>
|
||||||
|
<%= l(:label_bids_reward_method) %>
|
||||||
|
<span style="color: #15bccf;font-family: 14px; font-family:' 微软雅黑'">
|
||||||
|
<%= bid.budget%>
|
||||||
|
</span>
|
||||||
|
</strong>
|
||||||
|
<% end %> <!-- <td style="color: rgb(255, 0, 0);"><strong><%#= l(:label_price) %><%#= l(:label_RMB_sign) %><%#= bid.budget%></strong></td> -->
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" width="580px" ><span class="font_description">
|
<td colspan="2" width="580px" >
|
||||||
<%#= bid.description %>
|
<span class="font_description">
|
||||||
<%= textilizable bid, :description %>
|
<%= textilizable bid, :description %>
|
||||||
</span></td>
|
</span>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: left">
|
<td style="text-align: left">
|
||||||
<span class="font_lighter">
|
<span class="font_lighter">
|
||||||
<%= l(:label_create_time) %> : <%=format_time bid.created_on %></span><span style="float: right"> <%= l(:field_deadline) %> : <%=bid.deadline %>
|
<%= l(:label_create_time) %>
|
||||||
</span></td>
|
:
|
||||||
|
<%=format_time bid.created_on %>
|
||||||
|
</span>
|
||||||
|
<span style="float: right">
|
||||||
|
<%= l(:field_deadline) %>
|
||||||
|
:
|
||||||
|
<%=bid.deadline %>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table></td>
|
</table></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
|
|
|
@ -26,44 +26,76 @@
|
||||||
{
|
{
|
||||||
$("#what_is_project_div").slideToggle();
|
$("#what_is_project_div").slideToggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.onready = function()
|
||||||
|
{
|
||||||
|
<% if !@is_teacher && @homework_list.count > 0 && @bid.comment_status == 1%>
|
||||||
|
//登录者不是老师,且作业列表数目不为0,且作业处于开启匿评阶段
|
||||||
|
var alert_model = "'#ajax-modal'";
|
||||||
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'homework_attach/praise_alert') %>');
|
||||||
|
showModal('ajax-modal', '480px');
|
||||||
|
$('#ajax-modal').css('height','240px');
|
||||||
|
$('#ajax-modal').before("<span style='float: right;padding-left: 455px;cursor:pointer;'>" +
|
||||||
|
"<a href='#' onclick='hiddent_alert_model();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||||
|
<% end %>
|
||||||
|
}
|
||||||
|
|
||||||
|
function hiddent_alert_model(){hideModal($('#popbox02'));}
|
||||||
|
|
||||||
|
function hidden_homework_atert_form(cur_page,cur_type)
|
||||||
|
{
|
||||||
|
hideModal($("#popbox"));
|
||||||
|
// 评了分的则刷新列表
|
||||||
|
switch (cur_type)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: "<%= get_not_batch_homework_homework_attach_index_path(:bid_id => @bid.id)%>&page=" + cur_page,
|
||||||
|
data: 'text',
|
||||||
|
success: function (data) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: "<%= get_batch_homeworks_homework_attach_index_path(:bid_id => @bid.id)%>&page=" + cur_page,
|
||||||
|
data: 'text',
|
||||||
|
success: function (data) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: "<%= get_homeworks_homework_attach_index_path(:bid_id => @bid.id)%>&page=" + cur_page,
|
||||||
|
data: 'text',
|
||||||
|
success: function (data) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: "<%= get_student_batch_homework_homework_attach_index_path(:bid_id => @bid.id)%>&page=" + cur_page,
|
||||||
|
data: 'text',
|
||||||
|
success: function (data) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
<% if User.current.logged? && User.current.member_of_course?(@bid.courses.first) && cur_user_homework_for_bid(@bid).count == 0 && is_cur_course_student(@bid.courses.first) %>
|
|
||||||
<div class='icon icon-add'>
|
|
||||||
<%#= link_to l(:label_commit_homework), new_submit_homework_path, :onclick => "$('#put-bid-form').slideToggle(); this.blur(); return false;" %>
|
|
||||||
<%= link_to l(:label_course_new_homework),new_homework_attach_path %><strong style="color: #a9a9a9"> (每一个作业都可以是一个精美的作品)</strong>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<table style="width: 100%">
|
|
||||||
<tr>
|
|
||||||
<td style="width: 50%">
|
|
||||||
<% if @homework_list.empty? %>
|
|
||||||
<div class="font_lighter_sidebar" style="padding-left: 10px;">
|
|
||||||
<span>暂无学生提交作业!</span>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</td>
|
|
||||||
<td style="width: 50%">
|
|
||||||
<div class="font_lighter_sidebar" style="padding-left: 200px;">
|
|
||||||
<strong><a href="#" onclick="show()" style="color:#919294;">什么是项目?</a></strong>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="width: 50%">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td style="width: 50%">
|
|
||||||
<div id = "what_is_project_div" style="display: none">
|
|
||||||
<p>项目是一种由用户创建的基于网络的协作空间,能够为个人或小组提供分布式的协同交流和资料管理等方面的支持。</p>
|
|
||||||
<p>项目托管平台:<%= link_to Setting.protocol + "://" + Setting.host_name + "/", home_path %> </p>
|
|
||||||
<%= link_to "我要创建项目",new_project_path(course: 0, project_type: 0), :target => '_blank'%>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<div id='bidding_project_list'>
|
<div id='bidding_project_list'>
|
||||||
<%= render :partial => 'homework_list', :locals => {:homework => @homework_list} %>
|
<%= render :partial => 'homework_list' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<p>
|
<p>
|
||||||
<%= f.select :is_evaluation, is_evaluation_option %>
|
<%= f.select :is_evaluation, is_evaluation_option %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p style="display: none;">
|
||||||
<%= f.select :proportion, proportion_option %>
|
<%= f.select :proportion, proportion_option %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -1,163 +1,65 @@
|
||||||
<!-- fq -->
|
<head>
|
||||||
<% is_student = is_cur_course_student(@bid.courses.first) %>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<% is_teacher = is_course_teacher(User.current,@bid.courses.first) %>
|
<title>作业列表页_老师界面</title>
|
||||||
<!-- 当is_evaluation为1或者null(null主要是为了兼容前面数据)时代表启用互评功能,2表示未启用 -->
|
<%= stylesheet_link_tag 'css', :media => 'all' %>
|
||||||
<% is_evaluation = @bid.is_evaluation == 1 || @bid.is_evaluation == nil %>
|
</head>
|
||||||
<%= form_tag(:controller => 'bids', :action => "show_courseEx", :method => :get) do %>
|
|
||||||
<div class="project-search-block">
|
|
||||||
<table width="100%" valign="center">
|
|
||||||
<tr>
|
|
||||||
<td ><span style="margin-left:0px"><%= l(:label_task_plural)%>(<%= @homework_list.count%>)</span>
|
|
||||||
<%= link_to "作业打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), class: "button_submit button_submit_font_white", style: "margin: 5px 10px;line-height: 20px;height: 20px;display: inline-block;" if(is_teacher && @bid.homeworks.count > 0) %>
|
|
||||||
</td>
|
|
||||||
<td align="right">
|
|
||||||
<div class="project-search">
|
|
||||||
<% if is_teacher %>
|
|
||||||
<%= text_field_tag 'student_id', params[:student_id], :size => 30 %>
|
|
||||||
<%= submit_tag l(:label_search_by_student_id), :class => "small", :name => nil %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% display_id = im_watching_student_id? @bid%>
|
|
||||||
<% @homework_list.each do |homework|%>
|
|
||||||
<table width="660px" border="0" align="center" id="homework_attach_<%= homework.id %>" >
|
|
||||||
<tr>
|
|
||||||
<td style="vertical-align: top;width: 70px" >
|
|
||||||
<table style="text-align: center;width: 100%;table-layout: fixed">
|
|
||||||
<% user_name = is_teacher ? (homework.user.lastname + homework.user.firstname) : homework.user.login %>
|
|
||||||
<tr>
|
|
||||||
<td title="<%= user_name %>"><%= image_tag(url_to_avatar(homework.user), :class => "avatar")%></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
|
|
||||||
<td title="<%= user_name %>">
|
<body>
|
||||||
<p style="width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><strong>
|
<div id="content">
|
||||||
<%= link_to user_name, user_path(homework.user),{:style => "color:#727272"} %>
|
<div id="tb_" class="tb_">
|
||||||
</strong></p>
|
<% if @is_teacher %>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<% if (users_for_homework(homework).include?(User.current) || is_teacher) %>
|
|
||||||
<%= link_to l(:button_edit), edit_homework_attach_path(homework) %>
|
|
||||||
<% if homework.user == User.current || is_teacher %>
|
|
||||||
<%= link_to(l(:label_bid_respond_delete), homework,
|
|
||||||
method: :delete, :confirm => l(:text_are_you_sure)) %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<span></span>
|
|
||||||
</td>
|
|
||||||
<td colspan="2">
|
|
||||||
<table width="580px" border="0" style="table-layout: fixed">
|
|
||||||
<tr>
|
|
||||||
<td style="width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
|
||||||
<strong>作品名称:</strong>
|
|
||||||
<% if homework.name == nil || homework.name == "" %>
|
|
||||||
<% homework_filename = homework.user.name + "提交的作业" %>
|
|
||||||
<% else %>
|
|
||||||
<% homework_filename = homework.name %>
|
|
||||||
<% end %>
|
|
||||||
<strong title="<%=homework_filename%>">
|
|
||||||
<%= link_to homework_filename , homework_attach_path(homework)%>
|
|
||||||
</strong>
|
|
||||||
</td>
|
|
||||||
<td style="vertical-align: top;width: 200px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
|
||||||
<strong>合作成员: </strong>
|
|
||||||
<% homework_users = homework_user_of_homework(homework,is_teacher) %>
|
|
||||||
<% if homework.users.count == 0 %>
|
|
||||||
无
|
|
||||||
<% else %>
|
|
||||||
<span title="<%= homework_users%>"><%= homework_users %></span>
|
|
||||||
<% end %>
|
|
||||||
</td>
|
|
||||||
<td rowspan="4" style="text-align: center;vertical-align: middle;width: 30px">
|
|
||||||
<% if Time.parse(@bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
|
|
||||||
<span class="required">迟交</span>
|
|
||||||
<% end %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td style="width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
|
||||||
<strong>开发项目</strong>:
|
|
||||||
<% if homework.project != nil %>
|
|
||||||
<span title="<%= homework.project.name %>">
|
|
||||||
<%= link_to homework.project.name,project_path(homework.project.id)%>
|
|
||||||
</span>
|
|
||||||
<% else %>
|
|
||||||
暂无
|
|
||||||
<% end %>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<strong>项目得分:
|
|
||||||
<span style="color: <%= homework.project.nil? ? "#727272" : "#EC6300"%>;">
|
|
||||||
<%= homework.project.nil? ? "N/A" : project_scores(homework.project) %>
|
|
||||||
</span>
|
|
||||||
</strong>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<strong>提交文件:
|
|
||||||
<% if is_evaluation || is_teacher%>
|
|
||||||
<%= link_to "打包下载", :controller => "zipdown", :action => "download_user_homework",:homework => homework%>
|
|
||||||
<% else %>
|
|
||||||
<span class="required">未开启互评功能作业不允许下载</span>
|
|
||||||
<% end %>
|
|
||||||
</strong>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<strong>互评得分:
|
|
||||||
<%# student_homework_score = student_score_for_homework(homework) %>
|
|
||||||
<span style="color:<%= homework.s_score.nil? ? "#727272" : "#EC6300"%>;">
|
|
||||||
<% score = homework.s_score.nil? ? "N/A" : format("%.2f",homework.s_score) %>
|
|
||||||
<%= score %>
|
|
||||||
</span>
|
|
||||||
<% if is_evaluation && is_student && (!users_for_homework(homework).include? User.current)%>
|
|
||||||
<%= link_to "学生互评>>",homework_attach_path(homework) %>
|
|
||||||
<% end %>
|
|
||||||
</strong>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="vertical-align: top;width: 200px;">
|
|
||||||
<% if is_evaluation || is_teacher%>
|
|
||||||
<%= render :partial => 'app_link', :locals => {:attachments => homework.attachments} %>
|
|
||||||
<% end %>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<strong>终评得分:
|
|
||||||
<%# totle_homework_score = score_for_homework(homework) %>
|
|
||||||
<% totle_homework_score = format("%.2f",(homework.t_score.nil? ? 0.00 : homework.t_score) * ((@bid.proportion.nil? ? 60 : @bid.proportion) * 1.0 / 100) +
|
|
||||||
(homework.s_score.nil? ? 0.00 : homework.s_score) * (1 - (@bid.proportion.nil? ? 60 : @bid.proportion) * 1.0 / 100)) %>
|
|
||||||
<span style="color:<%= totle_homework_score == "0.00"? "#727272" : "#EC6300"%> ;">
|
|
||||||
<% score = totle_homework_score == "0.00"? "N/A" : totle_homework_score %>
|
|
||||||
<%= score %>
|
|
||||||
</span>
|
|
||||||
<% if is_teacher %>
|
|
||||||
<%= link_to "教师评分>>",homework_attach_path(homework) %>
|
|
||||||
<% end %>
|
|
||||||
</strong>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<div class="line_under"></div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<!--分页-->
|
|
||||||
<div class="pagination" style="float:left;">
|
|
||||||
<ul>
|
<ul>
|
||||||
<%= pagination_links_full @feedback_pages %>
|
<li id="tb_1" class="hovertab">
|
||||||
|
<%= link_to "未批作品", get_not_batch_homework_homework_attach_index_path(:bid_id => @bid.id), { id: 'not_batch_homework', :remote => true}%>
|
||||||
|
</li>
|
||||||
|
<li id="tb_2" class="normaltab">
|
||||||
|
<%= link_to "已改作品", get_batch_homeworks_homework_attach_index_path(:bid_id => @bid.id), {:remote => true}%>
|
||||||
|
</li>
|
||||||
|
<li id="tb_3" class="normaltab">
|
||||||
|
<%= link_to "全部作品", get_homeworks_homework_attach_index_path(:bid_id => @bid.id), {:remote => true}%>
|
||||||
|
</li>
|
||||||
|
<li id="tb_4" class="normaltab">
|
||||||
|
<%= link_to "留言", get_homework_jours_homework_attach_index_path(:bid_id => @bid.id), {:remote => true}%>
|
||||||
|
(<span id="jours_count" class="c_red f_12"><%= @jours_count %></span>)
|
||||||
|
</li>
|
||||||
|
<li >
|
||||||
|
<%= link_to "作品打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), class: "tb_all" unless @bid.homeworks.empty? %>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<% else %>
|
||||||
|
<ul>
|
||||||
|
<li id="tb_5" class="hovertab">
|
||||||
|
<%= link_to "待评作品", get_student_batch_homework_homework_attach_index_path(:bid_id => @bid.id), {:remote => true}%>
|
||||||
|
</li>
|
||||||
|
<li id="tb_6" class="normaltab">
|
||||||
|
<%= link_to "我的作品", get_my_homework_homework_attach_index_path(:bid_id => @bid.id), {:remote => true}%>
|
||||||
|
</li>
|
||||||
|
<% if @bid.comment_status == 2 %>
|
||||||
|
<!-- 匿评结束后才能看到全部作业列表 -->
|
||||||
|
<li id="tb_7" class="normaltab">
|
||||||
|
<%= link_to "所有作品", get_homeworks_homework_attach_index_path(:bid_id => @bid.id), {:remote => true}%>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<li id="tb_8" class="normaltab">
|
||||||
|
<%= link_to "留言", get_homework_jours_homework_attach_index_path(:bid_id => @bid.id), {:remote => true}%>
|
||||||
|
(<span id="jours_count" class="c_red f_12">
|
||||||
|
<%= @jours_count %>
|
||||||
|
</span>)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div class="ctt">
|
||||||
|
<div class="dis" id="tbc_01">
|
||||||
|
<%= render :partial => 'homework_attach/homeworks_list',
|
||||||
|
:locals => {:homeworks => @homework_list,
|
||||||
|
:homework_count => @obj_count,
|
||||||
|
:remote => false,
|
||||||
|
:is_student_batch_homework => @is_student_batch_homework}%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="show_homework_attach_model"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
@ -13,9 +13,13 @@
|
||||||
$('#' + id).val(content);
|
$('#' + id).val(content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function submit1(button)
|
||||||
|
{
|
||||||
|
$('#jours_submit').parent().submit();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<%= form_for('bid_message', :remote => true, :method => :post,
|
<%= form_for('bid_message', :id=>"bid_message_form",:remote => true, :method => :post,
|
||||||
:url => {:controller => 'bids',
|
:url => {:controller => 'bids',
|
||||||
:action => 'create',
|
:action => 'create',
|
||||||
:id => bid,
|
:id => bid,
|
||||||
|
@ -29,21 +33,21 @@
|
||||||
<table border="0" width="525px" align="center" >
|
<table border="0" width="525px" align="center" >
|
||||||
<tr>
|
<tr>
|
||||||
<% if @bid.reward_type ==3 %>
|
<% if @bid.reward_type ==3 %>
|
||||||
<td><%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_my_question), :style => "resize: none;", :class => 'noline'%></td>
|
<td><%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_max_length), :style => "resize: none;", :class => 'noline'%></td>
|
||||||
<% else %>
|
<% else %>
|
||||||
<td><%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_my_respond), :style => "resize: none;", :class => 'noline'%></td>
|
<td><%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_max_length), :style => "resize: none;", :class => 'noline'%></td>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
|
||||||
<%= f.text_field :reference_user_id, :style=>"display:none"%>
|
|
||||||
|
|
||||||
<!-- modified by bai -->
|
|
||||||
<table border="0" width="525px" align="center">
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right"> <%= submit_tag l(:button_leave_meassge), :name => nil , :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%>
|
<td><%= f.text_field :reference_user_id, :style=>"display:none"%>
|
||||||
<%= submit_tag l(:button_clear_meassge), :name => nil, :onclick => "clearMessage('bid_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %> </td>
|
<a href="javascript:void(0);" class="ping_sub" onclick = "clearMessage('bid_message_message');"><%= l(:button_clear_meassge) %></a>
|
||||||
|
<a href="#" class="ping_sub" id="jours_submit" onclick="submit1();"><%= l(:label_responses) %></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<!-- modified by bai 525px -->
|
||||||
|
|
||||||
|
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
|
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
<p class="buttons" style="padding-top: 10px; padding-bottom: 1px; margin-bottom: 1px">
|
<p class="buttons" style="padding-top: 10px; padding-bottom: 1px; margin-bottom: 1px">
|
||||||
<%= submit_tag l(:label_new_join), :name => nil, :class => "bid_btn", :onclick => "hideModal(this);" %>
|
<%= submit_tag l(:label_new_join), :name => nil, :class => "bid_btn", :onclick => "hideModal(this);" %>
|
||||||
<%= submit_tag l(:button_cancel), :name => nil, :class => "bid_btn", :onclick => "hideModal(this);", :type => 'button' %>
|
<%= submit_tag l(:button_cancel), :name => nil, :class => "bid_btn", :onclick => "hideModal(this);", :type => 'button' %>
|
||||||
|
</p>
|
||||||
</td>
|
</td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!-- fq -->
|
<!-- fq -->
|
||||||
<% unless content.nil?%>
|
<% unless content.nil?%>
|
||||||
<table width="60%" style="margin-left: 60px;">
|
<table width="80%" style="margin-left: 60px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td> <%= textilizable content %></td>
|
<td> <%= textilizable content %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
$('#history').html('<%= escape_javascript(render(:partial => 'bids/history', :locals => {:bid => @bid, :journals => @jour, :state => true})) %>');
|
$('#history').html('<%= escape_javascript(render(:partial => 'homework_attach/history', :locals => {:bid => @bid, :journals => @jour, :state => true})) %>');
|
||||||
|
//$('#tbc_01').html('<#%= escape_javascript(render(:partial => 'homework_attach/homework_jours',:locals => { :bid => @bid, :journals => @jour, :state => false} )) %>');
|
||||||
$('#pre_show').html('<%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
|
$('#pre_show').html('<%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
|
||||||
|
$('#jours_count').html("<%= @jours.count %>");
|
||||||
$('#bid_message_message').val("");
|
$('#bid_message_message').val("");
|
||||||
$('#bid_message_reference_user_id').val("");
|
$('#bid_message_reference_user_id').val("");
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
alert('启动成功')
|
||||||
|
$("#<%= @bid.id %>_start_anonymous_comment").html('<%= link_to "关闭匿评", stop_anonymous_comment_bid_path(@bid), remote: true %>')
|
|
@ -0,0 +1,2 @@
|
||||||
|
alert('关闭成功')
|
||||||
|
$("#<%= @bid.id %>_anonymous_comment").html('已关闭匿评')
|
|
@ -42,7 +42,7 @@
|
||||||
<span id="bid_deadline_span">
|
<span id="bid_deadline_span">
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p style="display: none">
|
||||||
<%= f.select :is_evaluation, is_evaluation_option %>
|
<%= f.select :is_evaluation, is_evaluation_option %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -49,6 +49,11 @@
|
||||||
$('#' + id).val(content);
|
$('#' + id).val(content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function submit1(button)
|
||||||
|
{
|
||||||
|
$('#jours_submit').parent().submit();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<%= form_for('new_form', :remote => true, :method => :post,
|
<%= form_for('new_form', :remote => true, :method => :post,
|
||||||
|
@ -63,27 +68,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
<table border="0" width="525px" align="center" >
|
<%= f.text_area 'user_message', :rows => 3, :cols => 65,
|
||||||
<tr>
|
:style => "resize: none;", :class => 'noline', :placeholder => l(:text_caracters_maximum,:count=>250)%>
|
||||||
<td><%= f.text_area 'user_message', :rows => 3, :cols => 65, :value => "#{l(:label_leave_a_message)}",
|
|
||||||
:onfocus => "clearInfo('new_form_user_message','#{l(:label_leave_a_message)}')",
|
|
||||||
:onblur => "showInfo('new_form_user_message','#{l(:label_leave_a_message)}')",
|
|
||||||
:style => "resize: none;", :class => 'noline'%></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<%= f.text_field :reference_user_id, :style=>"display:none"%>
|
<%= f.text_field :reference_user_id, :style=>"display:none"%>
|
||||||
<table border="0" width="525px" align="center">
|
<div style="float:right">
|
||||||
<tr>
|
<a href="#" class="ping_sub1" id="jours_submit" onclick="submit1();"><%= l(:label_submit_comments) %></a>
|
||||||
<td align="right"> <%= submit_tag l(:button_leave_meassge),
|
|
||||||
:name => nil , :class => "enterprise",
|
</div>
|
||||||
:onmouseout => "this.style.backgroundPosition = 'left top'",
|
|
||||||
:onmouseover => "this.style.backgroundPosition = 'left -31px'"%>
|
|
||||||
<%= submit_tag l(:button_clear_meassge), :name => nil, :class => "enterprise",
|
|
||||||
:onclick => "clearMessage('new_form_user_message');",
|
|
||||||
:onmouseout => "this.style.backgroundPosition = 'left top'",
|
|
||||||
:onmouseover => "this.style.backgroundPosition = 'left -31px'" %> </td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<div style="font-size: 14px;margin:10px;text-align: center">
|
<div style="font-size: 14px;margin:10px;text-align: center">
|
||||||
<%= l(:label_user_login_tips) %>
|
<%= l(:label_user_login_tips) %>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div style="text-align: center;">评分:
|
<div>评分:
|
||||||
<%= rating_for homework, dimension: :quality, class: 'rateable div_inline' %>
|
<%= rating_for homework, dimension: :quality, class: 'rateable div_inline' %>
|
||||||
<span style="font-size: 11px">(您可以对作业进行多次评价,以最后一次评价为最终结果)</span>
|
<span style="font-size: 11px">(您可以对作业进行多次评价,以最后一次评价为最终结果)</span>
|
||||||
</div>
|
</div>
|
|
@ -0,0 +1,25 @@
|
||||||
|
<div class="ping_list">
|
||||||
|
<div id="ping_tb_" class="ping_tb_">
|
||||||
|
<ul>
|
||||||
|
<li id="ping_tb_4" class="ping_normaltab" onclick="i:HoverLi(4);">
|
||||||
|
<%= l(:label_teacher_comments) %>(<span class="c_red" id="jour_count_4"><%= @comprehensive_evaluation.nil? ? 0 : @comprehensive_evaluation.count %></span>)</li>
|
||||||
|
<li id="ping_tb_5" class="ping_normaltab" onclick="i:HoverLi(5);">
|
||||||
|
<%= l(:label_anonymous_comments) %>(<span class="c_red" id="jour_count_5" ><%= @anonymous_comments.nil? ? 0 : @anonymous_comments.count %></span>)</li>
|
||||||
|
<li id="ping_tb_3" class="ping_hovertab" onclick="x:HoverLi(3);">
|
||||||
|
<%= l(:label_responses) %>(<span class="c_red" id="jour_count_3"><%= @jours.nil? ? 0 : @jours.count %></span>)</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div class="ping_ctt">
|
||||||
|
<div class="ping_dis" id="tbc_03">
|
||||||
|
<%= render :partial => 'homework_attach/jour',:locals => {:jours => @jour,:show_score => false,:show_name => true,:is_jour => true} %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ping_undis" id="tbc_04">
|
||||||
|
<%= render :partial => 'homework_attach/jour',:locals => {:jours => @comprehensive_evaluation,:show_score => true,:show_name => true,:is_jour => false} %>
|
||||||
|
</div>
|
||||||
|
<div class="ping_undis" id="tbc_05">
|
||||||
|
<%= render :partial => 'homework_attach/jour',:locals => {:jours => @anonymous_comments,:show_score => true,:show_name => false,:is_jour => false} %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!---ping_list end--->
|
|
@ -0,0 +1,65 @@
|
||||||
|
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||||
|
<% label = ''
|
||||||
|
case bid.reward_type
|
||||||
|
when 1
|
||||||
|
label = l(:label_respond_requirement)
|
||||||
|
when 2
|
||||||
|
label = l(:label_contest_requirement)
|
||||||
|
when 3
|
||||||
|
label = l(:label_question_requirement)
|
||||||
|
else
|
||||||
|
end
|
||||||
|
%>
|
||||||
|
<div class="ping_ctt">
|
||||||
|
<div id="tbc_01" class="ping_dis">
|
||||||
|
<% if journals.size > 0 %>
|
||||||
|
<% for journal in journals %>
|
||||||
|
<div class="ping_C" id='word_li_<%= journal.id.to_s %>'>
|
||||||
|
<div class="ping_dispic"><a target="_blank" href="#"><%= image_tag(url_to_avatar(journal.user)) %></a></div>
|
||||||
|
<div class="ping_discon" style="width: 85%;">
|
||||||
|
<div class="ping_distop">
|
||||||
|
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
|
||||||
|
<span><%= link_to journal.user, user_path(journal.user),:style => " font-weight:bold; color:#15bccf; margin-right:30px; background:none;", :target => "_blank"%></span><span style="color:#a6a6a6; margin-right:40px; margin-left:30px;"><%= format_time(journal.created_on) %></span>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p><%= textilizable journal.notes%></p>
|
||||||
|
</div>
|
||||||
|
<div class="ping_disfoot">
|
||||||
|
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||||
|
<span style="float: right">
|
||||||
|
<% if journal.user == User.current|| User.current.admin? %>
|
||||||
|
<%= link_to(l(:label_bid_respond_delete),
|
||||||
|
{:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user},
|
||||||
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete',
|
||||||
|
:class => "delete", :title => l(:button_delete)) %>
|
||||||
|
<% end %>
|
||||||
|
<% if reply_allow %>
|
||||||
|
<%= link_to l(:label_bid_respond_quote),'',
|
||||||
|
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.name}: '); $('##{ids} textarea') ;return false;"} %>
|
||||||
|
<%= link_to(l(:button_quote), {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal},
|
||||||
|
:remote => true,:method => 'post', :title => l(:button_quote))%>
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
|
<span class="font_lighter" style="float: right">
|
||||||
|
<%= l(:label_bids_published) %>
|
||||||
|
<%= time_tag(journal.created_on).html_safe %>
|
||||||
|
<%= l(:label_bids_published_ago) %>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div style="clear: both;"></div>
|
||||||
|
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||||
|
<% if reply_allow %>
|
||||||
|
<div id='<%= ids %>' class="respond-form">
|
||||||
|
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<div style="clear: both;"></div>
|
||||||
|
<div>
|
||||||
|
<%= render :partial => "words/journal_reply", :locals => {:journal => journal } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,101 @@
|
||||||
|
<li class="pic_head">
|
||||||
|
<% if is_student_batch_homework %>
|
||||||
|
<!-- 学生匿评 不现实姓名、头像,以及相关的连接 -->
|
||||||
|
<a><%= image_tag(url_to_avatar("匿名"), :width => "40", :height => "40")%></a>
|
||||||
|
<a>匿名</a>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to image_tag(url_to_avatar(homework.user), :width => "40", :height => "40"), user_path(homework.user) %>
|
||||||
|
<span>
|
||||||
|
<% user_realname = homework.user.lastname.to_s + homework.user.firstname.to_s %>
|
||||||
|
<% user_name = is_teacher ? (user_realname.empty? ? homework.user.login : user_realname) : homework.user.login %>
|
||||||
|
<%= link_to user_name, user_path(homework.user), :title => user_name %>
|
||||||
|
</span>
|
||||||
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li class="wname">
|
||||||
|
<% if homework.name == nil || homework.name == "" %>
|
||||||
|
<% homework_filename = homework.user.name + "提交的作业" %>
|
||||||
|
<% else %>
|
||||||
|
<% homework_filename = homework.name %>
|
||||||
|
<% end %>
|
||||||
|
<%= link_to homework_filename , homework_attach_path(homework,:cur_page => @cur_page,:cur_type => @cur_type), :title => homework_filename, :remote => true%>
|
||||||
|
</li>
|
||||||
|
<li class="wdown">
|
||||||
|
<%= link_to "(#{homework.attachments.count.to_s}个附件)", zipdown_download_user_homework_path(:homework => homework)%>
|
||||||
|
</li>
|
||||||
|
<li class="wscore">
|
||||||
|
<%= l(:label_teacher_score)%>:
|
||||||
|
<span class="c_red">
|
||||||
|
<%= homework.t_score.nil? ? l(:label_without_score) : format("%.2f",homework.t_score)%>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li class="wscore">
|
||||||
|
<%= l(:label_student_score)%>:
|
||||||
|
<span class="c_red">
|
||||||
|
<%= homework.s_score.nil? ? l(:label_without_score) : format("%.2f",homework.s_score) %>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
<% if is_teacher %>
|
||||||
|
<!-- 是老师,所有列表正常显示 -->
|
||||||
|
<li class="wping">
|
||||||
|
<%= link_to l(:label_work_rating),homework_attach_path(homework,:cur_page => @cur_page,:cur_type => @cur_type),:remote => true %>
|
||||||
|
<% if Time.parse(@bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
|
||||||
|
<span class="c_red"> 迟交!</span>
|
||||||
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<% else %>
|
||||||
|
<!-- 是学生 -->
|
||||||
|
<% if is_my_homework %>
|
||||||
|
<!-- 我的作品,显示为编辑和删除 -->
|
||||||
|
<% if @bid.comment_status == 0 %>
|
||||||
|
<li class="wmine">
|
||||||
|
<%= link_to l(:button_edit), edit_homework_attach_path(homework) %>
|
||||||
|
<% if homework.user == User.current || User.current.admin? %>
|
||||||
|
<!-- 作业创建者显示删除作业 -->
|
||||||
|
<%= link_to(l(:label_bid_respond_delete), homework,
|
||||||
|
method: :delete, :confirm => l(:text_are_you_sure), :remote => true ) %>
|
||||||
|
<% else %>
|
||||||
|
<!-- 作业参与者显示退出作业 -->
|
||||||
|
<%= link_to l(:label_logout), destory_homework_users_homework_attach_path(homework,:user_id=>User.current.id),
|
||||||
|
:remote => true, :confirm => l(:label_sure_exit_homework) %>
|
||||||
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<% else %>
|
||||||
|
<li class="wmine" title="只有开启匿评之前才能修改和删除作业哦!">
|
||||||
|
<a style="color:#8e8e8e;"><%= l(:button_edit) %></a>
|
||||||
|
<% if homework.user == User.current || User.current.admin? %>
|
||||||
|
<!-- 作业创建者显示删除作业 -->
|
||||||
|
<a style="color:#8e8e8e;"><%=l(:label_bid_respond_delete)%></a>
|
||||||
|
<% else %>
|
||||||
|
<!-- 作业参与者显示退出作业 -->
|
||||||
|
<a style="color:#8e8e8e;"><%=l(:label_logout) %></a>
|
||||||
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% elsif is_student_batch_homework%>
|
||||||
|
<!-- 学生匿评列表 -->
|
||||||
|
<% if @bid.comment_status == 1 %>
|
||||||
|
<!-- 处于开启匿评阶段,可以正常评分 -->
|
||||||
|
<li class="wping">
|
||||||
|
<%= link_to l(:label_work_rating),homework_attach_path(homework,:cur_page => @cur_page,:cur_type => @cur_type),:remote => true %>
|
||||||
|
<% if Time.parse(@bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
|
||||||
|
<span class="c_red"> 迟交!</span>
|
||||||
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<% elsif @bid.comment_status == 2%>
|
||||||
|
<!-- 处于匿评已关闭阶段,不容许评分 -->
|
||||||
|
<li class="wping" title="关闭匿评后不可继续评分">
|
||||||
|
<a style="color:#8e8e8e;">评分</a>
|
||||||
|
<% if Time.parse(@bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
|
||||||
|
<span class="c_red"> 迟交!</span>
|
||||||
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<!-- 学生众评列表,显示为点赞 -->
|
||||||
|
<li class="wzan" id="homeworl_praise_li_<%= homework.id%>">
|
||||||
|
<%= render :partial => "homework_attach/homework_praise", locals: {:homework => homework} %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
|
@ -0,0 +1,14 @@
|
||||||
|
<div class="msg_box" id='leave-message'>
|
||||||
|
<h4>留言内容</h4>
|
||||||
|
<%= render :partial => 'bids/new', :locals => {:bid => @bid, :sta => @state} %>
|
||||||
|
|
||||||
|
<!-- <textarea id="ta_msg_content" name="content" placeholder="最多250个字"></textarea> -->
|
||||||
|
<!-- <a href="#">取 消</a><a href="#">留 言</a> -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="history">
|
||||||
|
<%= render :partial => 'homework_attach/history',:locals => { :bid => @bid, :journals => @jour, :state => false} %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="wlist"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => true, :flag => true%></ul>
|
||||||
|
|
|
@ -1,11 +1,22 @@
|
||||||
|
<script>
|
||||||
|
function submit_homework_user()
|
||||||
|
{
|
||||||
|
$(".edit_user").submit();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<%= error_messages_for 'member' %>
|
<%= error_messages_for 'member' %>
|
||||||
<div style="float:left; width:60%;padding-left: 10px;padding-right: 10px"
|
<div style="float:left; width:60%;padding-left: 10px;padding-right: 10px"
|
||||||
xmlns="http://www.w3.org/1999/html" id = "homework_of_users">
|
xmlns="http://www.w3.org/1999/html" id = "homework_of_users">
|
||||||
<table class="list members" style="width: 100%">
|
<table class="list members" style="width: 100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= l(:label_user) %></th>
|
<th>
|
||||||
<th><%= l(:label_role_plural) %></th>
|
<%= l(:label_user) %>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<%= l(:label_role_plural) %>
|
||||||
|
</th>
|
||||||
<th style="width:10%"></th>
|
<th style="width:10%"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -19,9 +30,15 @@
|
||||||
<% hoemwork_users.each do |user| %>
|
<% hoemwork_users.each do |user| %>
|
||||||
<tr id="member-<%= user.id %>" class="<%= cycle 'odd', 'even' %> member" style="text-align: center">
|
<tr id="member-<%= user.id %>" class="<%= cycle 'odd', 'even' %> member" style="text-align: center">
|
||||||
<% if homework.user != user %>
|
<% if homework.user != user %>
|
||||||
<td style="width: 40%"><%= link_to_user user %></td>
|
<td style="width: 40%">
|
||||||
<td style="text-align: center;width: 50%"> 参与人员 </td>
|
<%= link_to_user user %>
|
||||||
<td><%= link_to l(:button_delete),destory_homework_users_homework_attach_path(:user_id=>user),:remote => true, :method => :post %></td>
|
</td>
|
||||||
|
<td style="text-align: center;width: 50%">
|
||||||
|
参与人员
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<%= link_to l(:button_delete),destory_homework_users_homework_attach_path(:user_id=>user),:remote => true, :method => :post, :confirm => l(:label_delete_confirm) %>
|
||||||
|
</td>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -31,14 +48,23 @@
|
||||||
|
|
||||||
<div class="splitcontentright" style="width: 37%">
|
<div class="splitcontentright" style="width: 37%">
|
||||||
<%= form_for(hoemwork_users, {:url => add_homework_users_homework_attach_path(homework), :remote => true, :method => :post}) do |f| %>
|
<%= form_for(hoemwork_users, {:url => add_homework_users_homework_attach_path(homework), :remote => true, :method => :post}) do |f| %>
|
||||||
<fieldset>
|
<fieldset style=" border:none; margin-top:10px;">
|
||||||
<legend><%= l(:label_member_new) %></legend>
|
<legend style=" font-weight:bold; color:#15bccf;">
|
||||||
<p><%= label_tag "principal_search", l(:label_principal_search) %><%= text_field_tag 'principal_search', nil %></p>
|
<%= l(:label_member_new) %>
|
||||||
|
</legend>
|
||||||
|
<p style="padding-left: 20px;">
|
||||||
|
<%= label_tag "principal_search", l(:label_principal_search) %>
|
||||||
|
<%= text_field_tag 'principal_search', nil ,{:class => "N_search",:style => "width:50%;"}%>
|
||||||
|
</p>
|
||||||
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript get_homework_member_list_homework_attach_index_path(:q => params[:q], :bid_id => params[:id]||homework, :format => 'js') }')" %>
|
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript get_homework_member_list_homework_attach_index_path(:q => params[:q], :bid_id => params[:id]||homework, :format => 'js') }')" %>
|
||||||
<div id="principals_for_new_member">
|
<div id="principals_for_new_member" style="padding-left: 20px;">
|
||||||
<%= render_new_members_for_homework(members) %>
|
<%= render_new_members_for_homework(members) %>
|
||||||
</div>
|
</div>
|
||||||
<p><%= submit_tag l(:button_add), :id => 'member-add-submit' %></p>
|
<p style="padding-left: 20px;">
|
||||||
|
<a href="#" class="tijiao" id='member-add-submit' onclick="submit_homework_user();">
|
||||||
|
<%= l(:button_add) %>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
<% if is_praise_homework User.current.id,homework.id %>
|
||||||
|
<%= link_to "",praise_homework_homework_attach_path(homework),
|
||||||
|
:class => "wzan_img", :remote => true, :title => "点赞"%>
|
||||||
|
<% else %>
|
||||||
|
<a class="wzan_img wzan_visited" title="您已经赞过该作业"></a>
|
||||||
|
<% end %>
|
||||||
|
<a>
|
||||||
|
<%= praise_homework_count homework.id %>
|
||||||
|
</a>
|
|
@ -0,0 +1,64 @@
|
||||||
|
<% is_teacher = is_course_teacher(User.current,@bid.courses.first) %>
|
||||||
|
<% is_my_homework ||= false %>
|
||||||
|
<% is_student_batch_homework ||= false %>
|
||||||
|
|
||||||
|
<% unless is_my_homework || is_student_batch_homework %>
|
||||||
|
<div class="code_list">
|
||||||
|
<span>
|
||||||
|
<%= l(:label_homework_list)%>
|
||||||
|
(<font color="#CC0000">
|
||||||
|
<%= homework_count%>
|
||||||
|
</font>)
|
||||||
|
</span><span class="fr">
|
||||||
|
按
|
||||||
|
<%= link_to l(:label_work_rating), sort_homework_path(@bid, 'socre', @direction), {:remote => true}%>
|
||||||
|
/
|
||||||
|
<%= link_to l(:label_time), sort_homework_path(@bid, 'time', @direction), {:remote => true}%>
|
||||||
|
<%= l(:label_sort) %>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
<% unless homeworks.nil? %>
|
||||||
|
<% if !is_teacher && is_my_homework && homeworks.empty? %>
|
||||||
|
<!-- 是学生,我的作业,且作业列表为空,即我未提交作业 -->
|
||||||
|
<ul>
|
||||||
|
<li class="pic_head">
|
||||||
|
<%= link_to image_tag(url_to_avatar(User.current), :width => "40", :height => "40"), user_path(User.current) %>
|
||||||
|
<span>
|
||||||
|
<%= link_to User.current.login, user_path(User.current), :title => User.current.login%>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
<li class="c_red" style="margin:25px 0 0 20px;"> 您还没交作业,请创建作业!</li>
|
||||||
|
<% if @bid.comment_status == 0 %>
|
||||||
|
<!-- 老师布置的作业在创建和开启匿评这段时间才允许创建作品 -->
|
||||||
|
<li class="wping">
|
||||||
|
<%= link_to "创建作业", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %>
|
||||||
|
</li>
|
||||||
|
<% else %>
|
||||||
|
<li class="wping">
|
||||||
|
<a style="width:80px; margin:20px 0 0 350px;">创建作业</a>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% homeworks.each do |homework| %>
|
||||||
|
<ul id="homework_li_<%= homework.id%>">
|
||||||
|
<%= render :partial => 'homework_attach/homework',
|
||||||
|
:locals => {:homework => homework, :is_student_batch_homework => is_student_batch_homework,
|
||||||
|
:is_my_homework => is_my_homework, :is_teacher => is_teacher}%>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<% end %>
|
||||||
|
<!-- 如果是我的作业或者匿评列表界面不现实分页控件 -->
|
||||||
|
<% unless is_my_homework || is_student_batch_homework %>
|
||||||
|
<ul class="wlist">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => remote, :flag => true%>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
|
@ -0,0 +1,54 @@
|
||||||
|
<% jours.nil? || jours.count == 0 || jours.each do |jour| %>
|
||||||
|
<div class="ping_C">
|
||||||
|
<div class="ping_dispic">
|
||||||
|
<% if show_name %>
|
||||||
|
<%= link_to image_tag(url_to_avatar(jour.user)) , user_path(jour.user), :target =>"_blank" %>
|
||||||
|
<% else %>
|
||||||
|
<a><%= image_tag(url_to_avatar(nil))%></a>
|
||||||
|
<a><%= l(:label_anonymous) %></a>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="ping_discon">
|
||||||
|
<div class="ping_distop">
|
||||||
|
<span><%= link_to jour.user, user_path(jour.user),:style => " font-weight:bold; color:#15bccf; margin-right:30px; background:none;", :target => "_blank"%></span>
|
||||||
|
<span style="color:#a6a6a6; margin-right:40px; margin-left:30px;"><%= format_time(jour.created_on) %></span>
|
||||||
|
<span style="font-weight:bold; color:#a6a6a6; ">
|
||||||
|
<% if show_score %>
|
||||||
|
<%= l(:label_work_rating) %>:
|
||||||
|
<%= render :partial => 'show_score', locals: {:stars => get_homework_score(jour.user,@homework ) } %>
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p><%= textilizable jour.notes%></p>
|
||||||
|
</div>
|
||||||
|
<div class="ping_disfoot">
|
||||||
|
<% ids = 'project_respond_form_'+ jour.id.to_s%>
|
||||||
|
<span>
|
||||||
|
<% if jour.user==User.current|| User.current.admin? %>
|
||||||
|
<%= link_to(l(:label_bid_respond_delete), {:controller => 'homework_attach', :action => 'destroy_jour', :object_id => jour, :user_id => jour.user,:jour_id =>@homework.id },
|
||||||
|
:remote => true, :confirm => l(:text_are_you_sure), :title => l(:button_delete)) %>
|
||||||
|
<% end %>
|
||||||
|
<%= link_to l(:label_projects_feedback_respond),'',
|
||||||
|
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{jour.user.name}: '); $('##{ids} textarea') ;return false;"}
|
||||||
|
%>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div id='<%= ids %>' class="respond-form">
|
||||||
|
<%= render :partial => 'words/new_respond', :locals => {:journal => jour, :m_reply_id => jour} %>
|
||||||
|
</div>
|
||||||
|
<div style="clear: both;"></div>
|
||||||
|
<div>
|
||||||
|
<%= render :partial => "words/journal_reply", :locals => {:journal => jour } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<% end %>
|
||||||
|
<% if is_jour%>
|
||||||
|
<div class="dis">
|
||||||
|
<ul class="wlist"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => true, :flag => true%></ul>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>作业评分弹框</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="popbox02">
|
||||||
|
<div class="ni_con">
|
||||||
|
<h2><img src="/images/bid/pic_top.jpg" width="188" height="37" alt="匿名评价" /></h2>
|
||||||
|
<p> 据说雷锋做完好事是从来不留名的呢,我们这次评分也不留名!!!但是,但是,您给的分数一定要公正哦,老天爷看不到,我们的系统可是清楚得很!</p>
|
||||||
|
<p style="margin-bottom:15px;"> 别怪我没告诉你,系统分配给你的作品不评价可是要扣分的哈!</p>
|
||||||
|
<a href="#" class="tijiao" style="margin-left:100px;" onclick="hideModal(this)">匿名评分</a>
|
||||||
|
<a href="#" style="color:#15bccf; margin-top:20px; display:block;" onclick="hideModal(this)">冒着扣分的危险残忍拒绝</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,79 @@
|
||||||
|
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||||
|
|
||||||
|
<script type="text/javascript" language="javascript">
|
||||||
|
//<!CDATA[
|
||||||
|
function g(o){return document.getElementById(o);}
|
||||||
|
function HoverLi(n){
|
||||||
|
//如果有N个标签,就将i<=N;
|
||||||
|
for(var i=3;i<=5;i++){g('ping_tb_'+i).className='ping_normaltab';g('tbc_0'+i).className='ping_undis';}g('tbc_0'+n).className='ping_dis';g('ping_tb_'+n).className='ping_hovertab';
|
||||||
|
}
|
||||||
|
//如果要做成点击后再转到请将<li>中的onmouseover 改成 onclick;
|
||||||
|
//]]>
|
||||||
|
</script>
|
||||||
|
<%= javascript_include_tag 'seems_rateable/jRating', 'seems_rateable/rateable'%>
|
||||||
|
<div id="popbox">
|
||||||
|
<div class="ping_con">
|
||||||
|
<h2><%= @homework.name %></h2>
|
||||||
|
<ul>
|
||||||
|
<li><%= l(:label_create_person) %>:
|
||||||
|
<span class="c_grey">
|
||||||
|
<% if @is_anonymous_comments && @is_comprehensive_evaluation != 1 %>
|
||||||
|
<%= l(:label_anonymous) %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to @homework.user, user_path(@homework.user)%>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
<li style=" margin-left:130px;"><%= l(:label_activity_time) %>:<span class="c_grey" ><%=format_time @homework.created_at %></span></li>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<% if @homework.users.count > 0 %>
|
||||||
|
<div><%= l(:label_participation_person) %>:
|
||||||
|
<% if @is_anonymous_comments && @is_comprehensive_evaluation != 1 %>
|
||||||
|
<%= l(:label_anonymous) %>
|
||||||
|
<%else%>
|
||||||
|
<% @homework.users.each do |homework_user| %>
|
||||||
|
<span class="c_grey"><%= link_to homework_user, user_path(homework_user)%></span>
|
||||||
|
<% if @homework.users.count > 1 && homework_user != @homework.users.last %>
|
||||||
|
、
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<p>
|
||||||
|
<% if @homework.description != nil && @homework.description != "" %>
|
||||||
|
<%= @homework.description %>
|
||||||
|
<% else %>
|
||||||
|
<div style="font-size: 15px;color: #15BCCC;vertical-align:middle;padding-top: 10px;padding-left: 10px ">
|
||||||
|
<strong><%= l(:label_homework_without_description) %></strong>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</p>
|
||||||
|
<p style=" border-bottom:none; color:#333; margin-top:8px;"><strong><%= l(:label_attachment) %>:
|
||||||
|
</strong>
|
||||||
|
<span>
|
||||||
|
<% if @is_evaluation || is_teacher%>
|
||||||
|
<% options = {:author => true } %>
|
||||||
|
<%= render :partial => 'app_link', :locals => {:attachments => @homework.attachments, :options => options} %>
|
||||||
|
<% else %>
|
||||||
|
<%= l(:label_cant_download) %>
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="ping_star" id="star_score">
|
||||||
|
<%= render :partial => 'show_star',:locals => {:is_comprehensive_evaluation => @is_comprehensive_evaluation,:totle_score => @totle_score,:has_evaluation => @has_evaluation ,
|
||||||
|
:homework => @homework} %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<%= render :partial => 'addjour', :locals => {:homework_attach => @homework, :sta => 0, :is_comprehensive_evaluation => @is_comprehensive_evaluation} %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div><!---ping_con end--->
|
||||||
|
|
||||||
|
<%= render :partial => 'histoey_new' %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,15 @@
|
||||||
|
<% if is_comprehensive_evaluation == 3 %>
|
||||||
|
<%= l(:label_work_rating) %>:
|
||||||
|
<%= render :partial => 'show_score', locals: {:stars => totle_score} %>
|
||||||
|
<% elsif is_comprehensive_evaluation == 2 %>
|
||||||
|
<%= l(:label_work_rating) %>:
|
||||||
|
<% if has_evaluation %>
|
||||||
|
<%= render :partial => 'show_score', locals: {:stars => totle_score} %>
|
||||||
|
<% else %>
|
||||||
|
<%= rating_for homework, dimension: :quality, class: 'rateable div_inline' %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% elsif @is_comprehensive_evaluation == 1%>
|
||||||
|
<%= l(:label_work_rating) %>:
|
||||||
|
<%= rating_for homework, dimension: :quality, class: 'rateable div_inline' %>
|
||||||
|
<% end %>
|
|
@ -1,9 +1,22 @@
|
||||||
|
//教师评论
|
||||||
<% if @add_jour.is_comprehensive_evaluation == 1 %>
|
<% if @add_jour.is_comprehensive_evaluation == 1 %>
|
||||||
$('#comprehensive_evaluation').html('<%= escape_javascript(render(:partial => 'comprehensive_evaluation',
|
//$('#comprehensive_evaluation').html('<#%= escape_javascript(render(:partial => 'comprehensive_evaluation',
|
||||||
:locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework,:teaher_score => @teaher_score} )) %>');
|
//:locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework,:teaher_score => @teaher_score} )) %>');
|
||||||
|
HoverLi(4);
|
||||||
|
$('#jour_count_4').html('<%= @comprehensive_evaluation.count %>')
|
||||||
|
$('#tbc_04').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @comprehensive_evaluation,:show_score => true,:show_name => true,:is_jour => false})) %>')
|
||||||
|
//匿评
|
||||||
|
<% elsif @add_jour.is_comprehensive_evaluation == 2 %>
|
||||||
|
// $('#message').html('<#%= escape_javascript(render(:partial => 'showjour', :locals => {:jour =>@jour, :state => false,:homework => @homework} )) %>');
|
||||||
|
// $('#pre_show').html('<#%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
|
||||||
|
HoverLi(5);
|
||||||
|
$('#jour_count_5').html('<%= @anonymous_comments.count %>')
|
||||||
|
$('#tbc_05').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @anonymous_comments,:show_score => true,:show_name => false,:is_jour => false})) %>')
|
||||||
|
//留言
|
||||||
<% else %>
|
<% else %>
|
||||||
$('#message').html('<%= escape_javascript(render(:partial => 'showjour', :locals => {:jour =>@jour, :state => false,:homework => @homework} )) %>');
|
HoverLi(3);
|
||||||
$('#pre_show').html('<%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
|
$('#jour_count_3').html('<%= @jours.count %>')
|
||||||
|
$('#tbc_03').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @jour,:show_score => false,:show_name => true,:is_jour => true})) %>')
|
||||||
|
<% end %>
|
||||||
$('#new_form_user_message').val("");
|
$('#new_form_user_message').val("");
|
||||||
$('#new_form_reference_user_id').val("");
|
$('#new_form_reference_user_id').val("");
|
||||||
<% end %>
|
|
|
@ -1 +1,4 @@
|
||||||
$('#content2').html('<%= escape_javascript(render(:partial => 'homework_member', :locals => {:members => @members,:hoemwork_users =>@hoemwork_users,:homework => @homework} )) %>');
|
$('#content2').html('<%= escape_javascript(render(:partial => 'homework_member', :locals => {:members => @members,:hoemwork_users =>@hoemwork_users,:homework => @homework} )) %>');
|
||||||
|
|
||||||
|
$('#tbc_01').html('<%= escape_javascript(render(:partial => 'homeworks_list',
|
||||||
|
:locals => {:homeworks => @homework_list, :bid => @bid, :remote => true, :is_my_homework => @is_my_homework} )) %>');
|
|
@ -0,0 +1,2 @@
|
||||||
|
$('#tbc_01').html('<%= escape_javascript(render(:partial => 'homeworks_list',
|
||||||
|
:locals => {:homeworks => @homework_list, :bid => @bid, :remote => true, :is_my_homework => @is_my_homework} )) %>');
|
|
@ -1,8 +1,24 @@
|
||||||
<% if @journal_destroyed.nil? %>
|
<% if @journal_destroyed.nil? %>
|
||||||
alert('<%=l(:notice_failed_delete)%>');
|
alert('<%=l(:notice_failed_delete)%>');
|
||||||
<% else %>
|
<% else %>
|
||||||
var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>')
|
//教师评论
|
||||||
destroyedItem.fadeOut(600,function(){
|
<% if @is_comprehensive_evaluation == 1 %>
|
||||||
destroyedItem.remove();
|
//$('#comprehensive_evaluation').html('<#%= escape_javascript(render(:partial => 'comprehensive_evaluation',
|
||||||
});
|
//:locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework,:teaher_score => @teaher_score} )) %>');
|
||||||
|
HoverLi(4);
|
||||||
|
$('#jour_count_4').html('<%= @comprehensive_evaluation.count %>')
|
||||||
|
$('#tbc_04').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @comprehensive_evaluation,:show_score => true,:show_name => true,:is_jour => false})) %>')
|
||||||
|
//匿评
|
||||||
|
<% elsif @is_comprehensive_evaluation == 2 %>
|
||||||
|
// $('#message').html('<#%= escape_javascript(render(:partial => 'showjour', :locals => {:jour =>@jour, :state => false,:homework => @homework} )) %>');
|
||||||
|
// $('#pre_show').html('<#%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
|
||||||
|
HoverLi(5);
|
||||||
|
$('#jour_count_5').html('<%= @anonymous_comments.count %>')
|
||||||
|
$('#tbc_05').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @anonymous_comments,:show_score => true,:show_name => false,:is_jour => false})) %>')
|
||||||
|
//留言
|
||||||
|
<% else %>
|
||||||
|
HoverLi(3);
|
||||||
|
$('#jour_count_3').html('<%= @jours.count %>')
|
||||||
|
$('#tbc_03').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @jour,:show_score => false,:show_name => true,:is_jour => true})) %>')
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,91 +1,103 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<script type="text/javascript">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>新建作业</title>
|
||||||
|
<%= stylesheet_link_tag 'css'%>
|
||||||
|
<script type="text/javascript" language="javascript">
|
||||||
function switchTab(ProTag){
|
function switchTab(ProTag){
|
||||||
var display_index = 3 - ProTag;
|
var display_index = 3 - ProTag;
|
||||||
$("#tab" + ProTag).attr("class","selected");
|
$("#tb_" + ProTag).attr("class","hovertab");
|
||||||
$("#tab" + display_index).attr("class","");
|
$("#tb_" + display_index).attr("class","normaltab");
|
||||||
$("#content" + ProTag).show();
|
$("#content" + ProTag).show();
|
||||||
$("#content" + display_index).hide();
|
$("#content" + display_index).hide();
|
||||||
}
|
}
|
||||||
|
function submit_homework_form()
|
||||||
|
{
|
||||||
|
$('#edit_homework_attach_<%= @homework.id%>').submit();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
<div class="top-content">
|
<body>
|
||||||
<table>
|
<div class="container">
|
||||||
<tr>
|
<div class="Newwork">
|
||||||
<td class="info_font" style="width: 240px; color: #15bccf">高校课程实践社区</td>
|
<div id="tb_" class="tb_">
|
||||||
<td style="width: auto; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="padding-left: 8px"><a><%= link_to request.host()+"/courses", :controller => 'courses', :action => 'index'%></a></td>
|
|
||||||
<td><p class="top-content-list-homework"><%=link_to "主页", home_path %> > <%=link_to l(:label_course_practice), :controller => 'courses', :action => 'index' %> >
|
|
||||||
<span><%= link_to(@homework.bid.courses.first.name.to_s, homework_course_path(@homework.bid.courses.first)) if @homework.bid.courses.first%></span> >
|
|
||||||
<%=link_to(@homework.bid.name, respond_path(@homework.bid)) %> > <span><%= link_to "修改作业",edit_homework_attach_path(@homework)%></span></p></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p style="font-weight: bold; color: rgb(237,137,36)" xmlns="http://www.w3.org/1999/html"> <%=raw l(:label_edit_homework)%> </p>
|
|
||||||
<div class="tabs">
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li id="tb_1" class="hovertab" onclick="switchTab(1);this.blur();return false;" style="width: auto; padding:5px 10px 0;">
|
||||||
<a id = "tab1" href="#" class = "selected" onclick="switchTab(1);this.blur();return false;">
|
修改作业
|
||||||
<%= l(:label_information_plural) %>
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li id="tb_2" class="normaltab" onclick="switchTab(2);this.blur();return false;">
|
||||||
<a id="tab2" href="#" onclick="switchTab(2); this.blur(); return false;">
|
成员
|
||||||
<%= l(:label_member_plural) %>
|
</li>
|
||||||
</a>
|
<li class="N_top" style="width: 747px;">
|
||||||
|
<%= link_to(l(:label_project_new), {:controller => 'projects',
|
||||||
|
:action => 'new',
|
||||||
|
:course => 0,
|
||||||
|
:project_type => 0}) if User.current.allowed_to?(:add_project, nil, :global => true) %>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
|
||||||
<div class="box" id="content1">
|
|
||||||
<%= form_for(@homework) do |f|%>
|
|
||||||
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
|
||||||
<strong>标 题 <span style="color: red">*</span>:</strong>
|
|
||||||
<%= f.text_field :name, :required => true, :name => "homework_name", :size => 60, :style => "width:490px;", :maxlength => 254%>
|
|
||||||
</p>
|
|
||||||
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
|
||||||
<strong>提交项目 :</strong>
|
|
||||||
<% if @homework.project.nil? %>
|
|
||||||
<%= f.select :project_id, options_for_select(user_projects_option),:name => "project_id", :required => true%>
|
|
||||||
<% else %>
|
|
||||||
<%= f.select :project_id, options_for_select(user_projects_option,@homework.project.id),:name => "project_id", :required => true%>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target => '_blank' %>
|
</div>
|
||||||
<p class="font_lighter" style="padding-left:120px;clear:left;">提交项目可以为空</p>
|
<div id="content1">
|
||||||
|
<div class="N_con">
|
||||||
|
<%= form_for(@homework) do |f|%>
|
||||||
|
<p>
|
||||||
|
<label><span class="c_red">*</span> 作品名称 :</label>
|
||||||
|
<%= f.text_field :name, :required => true, :name => "homework_name", :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称"%>
|
||||||
</p>
|
</p>
|
||||||
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
<p>
|
||||||
<strong style="vertical-align: top">描 述 :</strong>
|
<label> 提交项目
|
||||||
<span style="margin-left:-10px;padding-right: 20px;">
|
<img src="/images/bid/pic_question.png" width="16" height="16"
|
||||||
<%= f.text_area :description, :rows => 8, :name => "homework_description", :class => 'wiki-edit', :maxlength => 65534, :style => "font-size:small;width:490px;margin-left:10px;" %>
|
title="项目是一种由用户创建的基于网络的协作空间,能够为个人或小组提供分布式的协同交流和资料管理等方面的支持。
|
||||||
</span>
|
项目托管平台:http://forge.trustie.ne">:
|
||||||
|
</label>
|
||||||
|
<% if @homework.project.nil? %>
|
||||||
|
<%= f.select :project_id, options_for_select(user_projects_option),{}, {:name => "project_id", :required => true,:class => "w350 bo"}%>
|
||||||
|
<% else %>
|
||||||
|
<%= f.select :project_id, options_for_select(user_projects_option,@homework.project.id),{},{:name => "project_id", :required => true, :class => "w350 bo"}%>
|
||||||
|
<% end %>
|
||||||
</p>
|
</p>
|
||||||
<p style="padding-left: 60px">
|
<p>
|
||||||
<fieldset style="text-align: left;">
|
<label style="float:left;">
|
||||||
<p style="padding-left: 60px">
|
<span class="c_red">*</span>
|
||||||
|
作业描述 :
|
||||||
|
</label>
|
||||||
|
<%= f.text_area :description, :rows => 8, :name => "homework_description", :class => "w620",
|
||||||
|
:maxlength => 3000, :placeholder => "最多3000个汉字" %>
|
||||||
|
</p>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p>
|
||||||
|
<label style="float: left;"> 添加附件 :</label>
|
||||||
|
<%#= render :partial => 'attachments/form' %>
|
||||||
|
<p style=" padding: 3px 0 3px 0;padding-left: 90px;">
|
||||||
<% options = {:author => true, :deletable => attach_delete(@homework)} %>
|
<% options = {:author => true, :deletable => attach_delete(@homework)} %>
|
||||||
<%= render :partial => 'attachments/links',
|
<%= render :partial => 'attachments/links',
|
||||||
:locals => {:attachments => @homework.attachments, :options => options} %>
|
:locals => {:attachments => @homework.attachments, :options => options} %>
|
||||||
</p>
|
</p>
|
||||||
<legend>
|
<p style=" padding: 3px 0 3px 0;padding-left: 90px;">
|
||||||
<%= l(:label_attachment_plural) %>
|
|
||||||
</legend>
|
|
||||||
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
|
||||||
<%= render :partial => 'attachments/form' %>
|
<%= render :partial => 'attachments/form' %>
|
||||||
</p>
|
</p>
|
||||||
</fieldset>
|
|
||||||
</p>
|
</p>
|
||||||
<p style="padding-left: 60px;padding-top: 10px;">
|
|
||||||
<span >
|
<p>
|
||||||
<%= submit_tag t(:label_button_ok), :sta => 0, :class => "enterprise"%>
|
<span style="float: left;">
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
|
<a href="#" class="tijiao" onclick="submit_homework_form();">
|
||||||
|
<%= l(:label_button_ok) %>
|
||||||
|
</a>
|
||||||
|
<a href="javascript:history.back()" class="tijiao">取 消</a>
|
||||||
|
<div class="cl"></div>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div><!---创建作业内容结束-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="content2" style="display: none" >
|
<div id="content2" class="undis">
|
||||||
<%= render :partial => "homework_member",:locals => {:members => @members,:hoemwork_users =>@hoemwork_users,:homework => @homework} %>
|
<%= render :partial => "homework_member",:locals => {:members => @members,:hoemwork_users =>@hoemwork_users,:homework => @homework} %>
|
||||||
|
</div><!---成员结束-->
|
||||||
</div>
|
</div>
|
||||||
|
</div><!--新建作业结束-->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
$('#tbc_01').html('<%= escape_javascript(render(:partial => 'homeworks_list',
|
||||||
|
:locals => {:homeworks => @homework_list, :homework_count => @obj_count, :bid => @bid, :remote => true} )) %>');
|
||||||
|
for(var i=1;i<=4;i++){$("#tb_"+i).removeClass().addClass("normaltab");}
|
||||||
|
$("#tb_2").removeClass().addClass("hovertab");
|
|
@ -0,0 +1,6 @@
|
||||||
|
$('#tbc_01').html('<%= escape_javascript(render(:partial => 'homework_jours',:locals => { :bid => @bid, :journals => @jour, :state => false} )) %>');
|
||||||
|
for(var i=1;i<=4;i++){$("#tb_"+i).removeClass().addClass("normaltab");}
|
||||||
|
$("#tb_4").removeClass().addClass("hovertab");
|
||||||
|
|
||||||
|
for(var i=5;i<=8;i++){$("#tb_"+i).removeClass().addClass("normaltab");}
|
||||||
|
$("#tb_8").removeClass().addClass("hovertab");
|
|
@ -0,0 +1,8 @@
|
||||||
|
$('#tbc_01').html('<%= escape_javascript(render(:partial => 'homeworks_list',
|
||||||
|
:locals => {:homeworks => @homework_list, :homework_count => @obj_count, :bid => @bid, :remote => true} )) %>');
|
||||||
|
for(var i=1;i<=4;i++){$("#tb_"+i).removeClass().addClass("normaltab");}
|
||||||
|
$("#tb_3").removeClass().addClass("hovertab");
|
||||||
|
|
||||||
|
for(var i=5;i<=8;i++){$("#tb_"+i).removeClass().addClass("normaltab");}
|
||||||
|
$("#tb_7").removeClass().addClass("hovertab");
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
$('#tbc_01').html('<%= escape_javascript(render(:partial => 'homeworks_list',
|
||||||
|
:locals => {:homeworks => @homework_list, :homework_count => @obj_count, :bid => @bid, :remote => true, :is_my_homework => @is_my_homework} )) %>');
|
||||||
|
for(var i=5;i<=8;i++){$("#tb_"+i).removeClass().addClass("normaltab");}
|
||||||
|
$("#tb_6").removeClass().addClass("hovertab");
|
|
@ -0,0 +1,4 @@
|
||||||
|
$('#tbc_01').html('<%= escape_javascript(render(:partial => 'homeworks_list',
|
||||||
|
:locals => {:homeworks => @homework_list, :homework_count => @obj_count, :bid => @bid, :remote => true} )) %>');
|
||||||
|
for(var i=1;i<=4;i++){$("#tb_"+i).removeClass().addClass("normaltab");}
|
||||||
|
$("#tb_1").removeClass().addClass("hovertab");
|
|
@ -0,0 +1,4 @@
|
||||||
|
$('#tbc_01').html('<%= escape_javascript(render(:partial => 'homeworks_list',
|
||||||
|
:locals => {:homeworks => @homework_list, :homework_count => @obj_count, :bid => @bid, :remote => true, :is_student_batch_homework => @is_student_batch_homework} )) %>');
|
||||||
|
for(var i=5;i<=8;i++){$("#tb_"+i).removeClass().addClass("normaltab");}
|
||||||
|
$("#tb_5").removeClass().addClass("hovertab");
|
|
@ -1,85 +1,81 @@
|
||||||
<div class="top-content">
|
<%= stylesheet_link_tag 'css', :media => 'all' %>
|
||||||
<table>
|
<script type="text/javascript" language="javascript">
|
||||||
<tr>
|
function submit_homework_form()
|
||||||
<td class="info_font" style="width: 240px; color: #15bccf">高校课程实践社区</td>
|
{
|
||||||
<td style="width: auto; color: #15bccf">
|
$('#new_homework_attach').submit();
|
||||||
<strong>
|
}
|
||||||
<%= l(:label_user_location) %> :
|
</script>
|
||||||
</strong>
|
<div class="container">
|
||||||
</td>
|
<div class="Newwork">
|
||||||
|
<div id="tb_" class="tb_">
|
||||||
</tr>
|
<ul>
|
||||||
<tr>
|
<li id="tb_1" class="hovertab" onmouseover="x:HoverLi(1);" style="width: auto; padding:5px 10px 0;">
|
||||||
<td style="padding-left: 8px">
|
创建作品
|
||||||
<a>
|
</li>
|
||||||
<%= link_to request.host()+"/courses", :controller => 'courses', :action => 'index'%>
|
<li class="N_top" style="width: 835px;">
|
||||||
</a>
|
<%= link_to(l(:label_project_new), {:controller => 'projects',
|
||||||
</td>
|
:action => 'new',
|
||||||
<td>
|
:course => 0,
|
||||||
<p class="top-content-list-homework">
|
:project_type => 0}) if User.current.allowed_to?(:add_project, nil, :global => true) %>
|
||||||
<%=link_to "主页", home_path %> >
|
</li>
|
||||||
<%=link_to l(:label_course_practice), :controller => 'courses', :action => 'index' %> >
|
</ul>
|
||||||
<span>
|
|
||||||
<%= link_to(@bid.courses.first.name.to_s, homework_course_path(@bid.courses.first)) if @bid.courses.first%>
|
|
||||||
</span> >
|
|
||||||
<%=link_to(@bid.name, respond_path(@bid)) %> >
|
|
||||||
<span>
|
|
||||||
<%= link_to "创建作业", new_homework_attach_path(@bid)%>
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="dis" id="tbc_01">
|
||||||
<p style="font-weight: bold; color: rgb(237,137,36)" xmlns="http://www.w3.org/1999/html">
|
<div class="N_con">
|
||||||
<%=h l(:label_new_homework)%>
|
<%= form_for(HomeworkAttach.new, :method => :post,
|
||||||
</p>
|
:name => 'new_form',
|
||||||
|
|
||||||
<div class="box">
|
|
||||||
<%= form_for('new_form', :method => :post,
|
|
||||||
:url => {:controller => 'homework_attach',
|
:url => {:controller => 'homework_attach',
|
||||||
:action => 'create',
|
:action => 'create',
|
||||||
:user_id => User.current.id,
|
:user_id => User.current.id,
|
||||||
:bid_id => @bid
|
:bid_id => @bid
|
||||||
}) do |f|%>
|
}) do |f|%>
|
||||||
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
<p>
|
||||||
<strong>标 题 <span style="color: red">*</span>:</strong>
|
<label>
|
||||||
<%= f.text_field "name", :required => true, :size => 60, :style => "width:490px;", :maxlength => 254 %>
|
<span class="c_red">
|
||||||
</p>
|
*
|
||||||
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
|
||||||
<strong>
|
|
||||||
提交项目 :
|
|
||||||
</strong>
|
|
||||||
<%= f.select :project_id,options_for_select(user_projects_option), {},{:style => "width:490px;"} %>
|
|
||||||
<%= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target => '_blank' %>
|
|
||||||
<p class="font_lighter" style="padding-left:120px;clear:left;">
|
|
||||||
提交项目可以为空
|
|
||||||
</p>
|
|
||||||
</p>
|
|
||||||
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
|
||||||
<strong style="vertical-align: top">
|
|
||||||
描 述 :
|
|
||||||
</strong>
|
|
||||||
<span style="margin-left:-10px;padding-right: 20px;">
|
|
||||||
<%= f.text_area "description", :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => 5000 %>
|
|
||||||
</span>
|
</span>
|
||||||
|
作品名称 :
|
||||||
|
</label>
|
||||||
|
<%= f.text_field "name", :required => true, :size => 60, :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称" %>
|
||||||
</p>
|
</p>
|
||||||
<p style="padding-left: 60px">
|
<p>
|
||||||
<fieldset style="text-align: left;">
|
<label> 提交项目
|
||||||
<legend>
|
<img src="/images/bid/pic_question.png" width="16" height="16"
|
||||||
<%= l(:label_attachment_plural) %>
|
title="项目是一种由用户创建的基于网络的协作空间,能够为个人或小组提供分布式的协同交流和资料管理等方面的支持。
|
||||||
</legend>
|
项目托管平台:http://forge.trustie.ne">:
|
||||||
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
</label>
|
||||||
|
<%= f.select :project_id,options_for_select(user_projects_option), {},{:class => "w350 bo"} %>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<label style="float:left;">
|
||||||
|
<span class="c_red">
|
||||||
|
*
|
||||||
|
</span>
|
||||||
|
作业描述 :
|
||||||
|
</label>
|
||||||
|
<%= f.text_area "description", :class => "w620", :maxlength => 3000, :placeholder => "最多3000个汉字" %>
|
||||||
|
</p>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p>
|
||||||
|
<label style="float: left;"> 添加附件 :</label>
|
||||||
|
<%#= render :partial => 'attachments/form' %>
|
||||||
|
<p style=" padding: 3px 0 3px 0;padding-left: 90px;">
|
||||||
<%= render :partial => 'attachments/form' %>
|
<%= render :partial => 'attachments/form' %>
|
||||||
</p>
|
</p>
|
||||||
</fieldset>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p style="padding-left: 60px;padding-top: 5px;">
|
<p>
|
||||||
<span >
|
<span style="float: left;">
|
||||||
<%= submit_tag t(:label_button_ok), :sta => 0, :class => "enterprise"%>
|
|
||||||
</span>
|
</span>
|
||||||
|
<a href="#" class="tijiao" onclick="submit_homework_form();">
|
||||||
|
<%= l(:label_button_ok) %>
|
||||||
|
</a>
|
||||||
|
<a href="javascript:history.back()" class="tijiao">取 消</a>
|
||||||
|
<div class="cl"></div>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div><!---创建作业内容结束-->
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!--新建作业结束-->
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
$('#homeworl_praise_li_<%= @homework.id%>').
|
||||||
|
html('<%= escape_javascript(render :partial => 'homework_attach/homework_praise',
|
||||||
|
:locals => {:homework => @homework})%>');
|
|
@ -0,0 +1,9 @@
|
||||||
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'show',:locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework, :teaher_score => @teaher_score}) %>');
|
||||||
|
showModal('ajax-modal', '503px');
|
||||||
|
$('#ajax-modal').css('height','569px');
|
||||||
|
$('#ajax-modal').siblings().remove();
|
||||||
|
$('#ajax-modal').before("<span style='float: right;padding-left: 455px;cursor:pointer;'>" +
|
||||||
|
"<a href='#' onclick='hidden_homework_atert_form("+
|
||||||
|
<%= @cur_page%> + "," + <%= @cur_type%> +
|
||||||
|
");'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||||
|
|
|
@ -205,9 +205,13 @@
|
||||||
<%= l(:label_course_organizers) %> :
|
<%= l(:label_course_organizers) %> :
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar">
|
<td class="font_lighter_sidebar">
|
||||||
|
<% if @course.school %>
|
||||||
<a href="http://<%= Setting.host_course%>/?school_id=<%= @course.school.id%>">
|
<a href="http://<%= Setting.host_course%>/?school_id=<%= @course.school.id%>">
|
||||||
<%= @course.school %>
|
<%= @course.school %>
|
||||||
</a>
|
</a>
|
||||||
|
<% else%>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
<%= link_to(course.name.to_s, homework_course_path(course)) if course %>
|
<%= link_to(course.name.to_s, homework_course_path(course)) if course %>
|
||||||
</span>
|
</span>
|
||||||
>
|
>
|
||||||
<%= link_to(@bid.name, respond_path(@bid)) %>
|
<%= link_to(@bid.name, course_for_bid_path(@bid)) %>
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -87,8 +87,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td style=" word-wrap: break-word; word-break: break-all;font-size: 16px;text-align: center">
|
<td style=" word-wrap: break-word; word-break: break-all;font-size: 16px;text-align: center">
|
||||||
<span style=" color:#ed8924">
|
<span style=" color:#ed8924">
|
||||||
<!-- modified by zjc 添加超链接 -->
|
<strong><%=link_to(@bid.name, course_for_bid_path(@bid)) %></strong>
|
||||||
<strong><%=link_to(@bid.name, respond_path(@bid)) %></strong>
|
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -105,66 +104,26 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" colspan="2" style="font-size: 16px;padding-left: 8px;">
|
<td valign="top" colspan="2" style="font-size: 16px;padding-left: 8px;">
|
||||||
<strong>
|
<strong>
|
||||||
<%= l(:label_new_course_description) %> :
|
<%= l(:label_homework_description) %> :
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="font_lighter_sidebar" colspan="2" style="padding-left: 8px;">
|
<td class="font_lighter_sidebar" colspan="2" style="padding-left: 8px;" title="<%= @bid.description %>">
|
||||||
<%= textilizable course.description %>
|
<%= textilizable truncate(@bid.description, length: 200, omission: '...') %>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td valign="top" style="padding-left: 8px;">
|
|
||||||
<%= l(:label_create_time) %> :
|
|
||||||
</td>
|
|
||||||
<td class="font_lighter_sidebar">
|
|
||||||
<%= format_time course.created_at %>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" style="padding-left: 8px; width:62px;">
|
<td valign="top" style="padding-left: 8px; width:62px;">
|
||||||
<%= l(:lable_course_teacher) %> :
|
<%= l(:label_limit_time) %>:
|
||||||
</td>
|
|
||||||
<td class="font_lighter_sidebar">
|
|
||||||
<%= link_to(course.teacher.lastname+course.teacher.firstname, user_path(course.teacher)) %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td valign="top" style="padding-left: 8px;">
|
|
||||||
<%= l(:label_class_period) %> :
|
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar">
|
<td class="font_lighter_sidebar">
|
||||||
<%= course.class_period.to_s %>
|
<%= @bid.deadline %>
|
||||||
<%= l(:label_class_hour) %>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td valign="top" style="padding-left: 8px;">
|
|
||||||
<%= l(:label_main_term) %> :
|
|
||||||
</td>
|
|
||||||
<td class="font_lighter_sidebar">
|
|
||||||
<%= course.time.to_s %>
|
|
||||||
<%= course.term %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td valign="top" style="padding-left: 8px;">
|
|
||||||
<%= l(:label_teacher_work_unit) %> :
|
|
||||||
</td>
|
|
||||||
<!-- modified by zjc 有@user.user_extensions.occupation改为 @user.user_extensions.school 并添加超链接 -->
|
|
||||||
<% unless @user.user_extensions.nil? || @user.user_extensions.school.nil? %>
|
|
||||||
<td class="font_lighter_sidebar">
|
|
||||||
<%= link_to @user.user_extensions.school,"http://#{Setting.host_course}/?school_id=#{@user.user_extensions.school.id}" %>
|
|
||||||
</td>
|
|
||||||
<% end %>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="user_underline"></div>
|
<div class="user_underline"></div>
|
||||||
|
@ -173,9 +132,18 @@
|
||||||
<div class="inf_user_image">
|
<div class="inf_user_image">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td valign="top" colspan="2" style="font-size: 16px;padding-left: 8px;">
|
||||||
<%= l(:label_limit_time) %>:
|
<strong>
|
||||||
<%= @bid.deadline %>
|
<%= l(:label_attachment) %> :
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" colspan="2">
|
||||||
|
<% if @bid.attachments.any?%>
|
||||||
|
<% options = {:author => true,:deletable => (@bid.author.id == User.current.id || User.current.admin? ? true : false),:wrap => true,:length => 7} %>
|
||||||
|
<%= render :partial => 'attachments/links', :locals => {:attachments => @bid.attachments, :options => options} %>
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -183,95 +151,14 @@
|
||||||
<%#= @bid.homework_type==Bid::HomeworkFile ? "提交文件" : "提交项目" %>
|
<%#= @bid.homework_type==Bid::HomeworkFile ? "提交文件" : "提交项目" %>
|
||||||
</td-->
|
</td-->
|
||||||
</tr>
|
</tr>
|
||||||
<% unless @bid.parent_id.nil? %>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div style=" color: rgb(255, 0, 0); width:200px">
|
|
||||||
<% author=Bid.find(@bid.parent_id).author %>
|
|
||||||
作业来源于<%= link_to(author.lastname+author.firstname, user_path(Bid.find(@bid.parent_id).author)) %>
|
|
||||||
的需求:<%= link_to(Bid.find(@bid.parent_id).name, respond_path(Bid.find(@bid.parent_id))) %>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<% end %>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- tags -->
|
|
||||||
<div class="user_fans">
|
|
||||||
<div class="user_underline"></div>
|
|
||||||
<table style="font-family:'微软雅黑'; padding-left: 8px">
|
|
||||||
<tr>
|
|
||||||
<td><!-- added by william -for tag -->
|
|
||||||
<%= render :partial => 'tags/tag', :locals => {:obj => @bid, :object_flag => "4"} %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--homework-->
|
|
||||||
<div class="user_fans">
|
|
||||||
|
|
||||||
<div class="user_underline"></div>
|
|
||||||
<div class="font_title_left">
|
|
||||||
<strong><%= l(:label_commit_homework) %></strong>
|
|
||||||
</div>
|
|
||||||
<div class="left_wf">
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td style="padding-top: 5px">
|
|
||||||
<% if @bid.homework_type == 1 %>
|
|
||||||
<% if @bid.homeworks.size>0 %>
|
|
||||||
<% for homework in @bid.homeworks.eager_load(:user) %>
|
|
||||||
<%= link_to image_tag(url_to_avatar(homework.user), :class => "avatar", :title => homework.user.name), user_path(homework.user), :class => "avatar" %>
|
|
||||||
<% end %>
|
|
||||||
<% else %>
|
|
||||||
<p class="font_lighter">
|
|
||||||
<%= l(:label_no_course_project) %>
|
|
||||||
</p>
|
|
||||||
<% end %>
|
|
||||||
<% else %>
|
|
||||||
<% if @bid.courses.size>0 %>
|
|
||||||
<% for course in @bid.courses %>
|
|
||||||
<%= link_to image_tag(url_to_avatar(course), :class => "avatar", :title => course.name), course_path(course), :class => "avatar" %>
|
|
||||||
<% end %>
|
|
||||||
<% else %>
|
|
||||||
<p class="font_lighter">
|
|
||||||
<%= l(:label_no_course_project) %>
|
|
||||||
</p>
|
|
||||||
<% end %>
|
|
||||||
<% end %> </td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="user_underline"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
</div>
|
</div>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
|
||||||
<div class="tabs_new">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<%= link_to l(:label_question_student), {:controller => 'bids', :action => 'show'}, :class => link_class(:respond) %>
|
|
||||||
</li>
|
|
||||||
<% if User.current.member_of_course? course %>
|
|
||||||
<li>
|
|
||||||
<% if User.current.logged? && course && (!Member.where('user_id = ? and course_id = ?', User.current.id, course.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, course.id).first.roles&Role.where('id = ? or id = ? or id =?', 5, 10, 7)).size >0) %>
|
|
||||||
<%= link_to l(:label_homework_commit), course_for_bid_path, :class => link_class(:course) %>
|
|
||||||
<% else %>
|
|
||||||
<%= link_to l(:label_homework_info), course_for_bid_path, :class => link_class(:course) %>
|
|
||||||
<% end %>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
<!-- <li><%#= link_to l(:label_homework_statistics), {:controller => 'bids', :action => 'homework_statistics'}, :class => link_class(:homework_statistics) %></li> -->
|
|
||||||
<!-- <li><%#= link_to l(:label_homework_respond), {:controller => 'bids', :action => 'homework_respond'}, :class => link_class(:homework_respond) %></li>-->
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
<%= call_hook :view_layouts_base_content %>
|
<%= call_hook :view_layouts_base_content %>
|
||||||
<div style="clear:both;"></div>
|
<div style="clear:both;"></div>
|
||||||
|
|
|
@ -3,38 +3,57 @@
|
||||||
<% if horizontal %>
|
<% if horizontal %>
|
||||||
<!-- 横排 -->
|
<!-- 横排 -->
|
||||||
<div id="praise_tread_<%= obj.id %>" style="float:right;">
|
<div id="praise_tread_<%= obj.id %>" style="float:right;">
|
||||||
|
|
||||||
<% @is_valuate = is_praise_or_tread(obj,user_id)%>
|
<% @is_valuate = is_praise_or_tread(obj,user_id)%>
|
||||||
<% if @is_valuate.size > 0 %> <!-- 评价过 1代表赞 0代表踩 -->
|
<% if @is_valuate.size > 0 %> <!-- 评价过 1代表赞 0代表踩 -->
|
||||||
<% @flag = @is_valuate.first.praise_or_tread %>
|
<% @flag = @is_valuate.first.praise_or_tread %>
|
||||||
<% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai -->
|
<% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai -->
|
||||||
<table style="line-height: 1px">
|
<table style="line-height: 1px">
|
||||||
<tr>
|
<tr>
|
||||||
<td ><%= image_tag "/images/praise_tread/praise_false.png" , weight:"22px", height:"22px",:title => l(:label_issue_praise_over) %></td>
|
<td >
|
||||||
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td>
|
<%= image_tag "/images/praise_tread/praise_false.png" , weight:"22px", height:"22px",:title => l(:label_issue_praise_over) %>
|
||||||
<td><%= image_tag "/images/praise_tread/tread_false.png",weight:"22px", height:"22px",:title => l(:label_issue_appraise_over) %></td>
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<strong class="font_small_watch">
|
||||||
|
<%= get_praise_num(obj)%>
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<%= image_tag "/images/praise_tread/tread_false.png",weight:"22px", height:"22px",:title => l(:label_issue_appraise_over) %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<% elsif @flag == 0 %> <!-- 踩过 0-->
|
<% elsif @flag == 0 %> <!-- 踩过 0-->
|
||||||
|
|
||||||
<table style="line-height: 1px">
|
<table style="line-height: 1px">
|
||||||
<tr>
|
<tr>
|
||||||
<td > <%= image_tag "/images/praise_tread/praise_false.png",weight:"22px", height:"22px", :title => l(:label_issue_appraise_over) %></td>
|
<td >
|
||||||
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td>
|
<%= image_tag "/images/praise_tread/praise_false.png",weight:"22px", height:"22px", :title => l(:label_issue_appraise_over) %>
|
||||||
<td><%= image_tag "/images/praise_tread/tread_false.png",weight:"22px", height:"22px",:title => l(:label_issue_tread_over) %> </td>
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<strong class="font_small_watch">
|
||||||
|
<%= get_praise_num(obj)%>
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<%= image_tag "/images/praise_tread/tread_false.png",weight:"22px", height:"22px",:title => l(:label_issue_tread_over) %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
||||||
<% if user_id == obj.author_id %>
|
<% if user_id == obj.author_id %>
|
||||||
<table style="line-height: 1px">
|
<table style="line-height: 1px">
|
||||||
<tr>
|
<tr>
|
||||||
<td ><%= image_tag "/images/praise_tread/praise_true.png" , weight:"22px", height:"22px",:title => l(:label_issue_not_praise_over) %></td>
|
<td >
|
||||||
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td>
|
<%= image_tag "/images/praise_tread/praise_true.png" , weight:"22px", height:"22px",:title => l(:label_issue_not_praise_over) %>
|
||||||
<td><%= image_tag "/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issue_not_treed_over) %></td>
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<strong class="font_small_watch">
|
||||||
|
<%= get_praise_num(obj)%>
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<%= image_tag "/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issue_not_treed_over) %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -42,30 +61,42 @@
|
||||||
<% if OptionNumber.get_user_option_number(user_id).nil? || OptionNumber.get_user_option_number(user_id).total_score < 2 %>
|
<% if OptionNumber.get_user_option_number(user_id).nil? || OptionNumber.get_user_option_number(user_id).total_score < 2 %>
|
||||||
<table style="line-height: 1px">
|
<table style="line-height: 1px">
|
||||||
<tr>
|
<tr>
|
||||||
<td ><%= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
|
<td >
|
||||||
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %></td>
|
<%= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
|
||||||
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td>
|
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %>
|
||||||
<td><%= image_tag "/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issues_score_not_enough) %></td>
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<strong class="font_small_watch">
|
||||||
|
<%= get_praise_num(obj)%>
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<%= image_tag "/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issues_score_not_enough) %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<% else %>
|
<% else %>
|
||||||
<table style="line-height: 1px">
|
<table style="line-height: 1px">
|
||||||
<tr>
|
<tr>
|
||||||
<td > <%= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
|
<td >
|
||||||
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %> </td>
|
<%= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
|
||||||
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td>
|
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %>
|
||||||
<td> <%= link_to image_tag("/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issue_tread)),:controller=>"praise_tread",
|
</td>
|
||||||
:action=>"tread_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %></td>
|
<td align="center">
|
||||||
|
<strong class="font_small_watch">
|
||||||
|
<%= get_praise_num(obj)%>
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<%= link_to image_tag("/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issue_tread)),:controller=>"praise_tread",
|
||||||
|
:action=>"tread_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<!-- end -->
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<!-- 竖排 -->
|
<!-- 竖排 -->
|
||||||
<div id="praise_tread_<%= obj.id %>" style="float:right;">
|
<div id="praise_tread_<%= obj.id %>" style="float:right;">
|
||||||
|
@ -75,80 +106,115 @@
|
||||||
<% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai -->
|
<% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai -->
|
||||||
<table style="line-height: 1px">
|
<table style="line-height: 1px">
|
||||||
<tr>
|
<tr>
|
||||||
<td ><%= image_tag "/images/praise_tread/praise_false.png" , weight:"22px", height:"22px",:title => l(:label_issue_praise_over) %></td>
|
<td >
|
||||||
|
<%= image_tag "/images/praise_tread/praise_false.png" , weight:"22px", height:"22px",:title => l(:label_issue_praise_over) %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td>
|
<td align="center">
|
||||||
|
<strong class="font_small_watch">
|
||||||
|
<%= get_praise_num(obj)%>
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= image_tag "/images/praise_tread/tread_false.png",weight:"22px", height:"22px",:title => l(:label_issue_appraise_over) %></td>
|
<td>
|
||||||
|
<%= image_tag "/images/praise_tread/tread_false.png",weight:"22px", height:"22px",:title => l(:label_issue_appraise_over) %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<% elsif @flag == 0 %> <!-- 踩过 0-->
|
<% elsif @flag == 0 %> <!-- 踩过 0-->
|
||||||
|
|
||||||
<table style="line-height: 1px">
|
<table style="line-height: 1px">
|
||||||
<tr>
|
<tr>
|
||||||
<td > <%= image_tag "/images/praise_tread/praise_false.png",weight:"22px", height:"22px", :title => l(:label_issue_appraise_over) %></td>
|
<td >
|
||||||
|
<%= image_tag "/images/praise_tread/praise_false.png",weight:"22px", height:"22px", :title => l(:label_issue_appraise_over) %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td>
|
<td align="center">
|
||||||
|
<strong class="font_small_watch">
|
||||||
|
<%= get_praise_num(obj)%>
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= image_tag "/images/praise_tread/tread_false.png",weight:"22px", height:"22px",:title => l(:label_issue_tread_over) %> </td>
|
<td>
|
||||||
|
<%= image_tag "/images/praise_tread/tread_false.png",weight:"22px", height:"22px",:title => l(:label_issue_tread_over) %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if user_id == obj.author_id %>
|
<% if user_id == obj.author_id %>
|
||||||
<table style="line-height: 1px">
|
<table style="line-height: 1px">
|
||||||
<tr>
|
<tr>
|
||||||
<td > <%= image_tag "/images/praise_tread/praise_true.png",weight:"22px", height:"22px", :title => l(:label_issue_not_praise_over) %></td>
|
<td >
|
||||||
|
<%= image_tag "/images/praise_tread/praise_true.png",weight:"22px", height:"22px", :title => l(:label_issue_not_praise_over) %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td>
|
<td align="center">
|
||||||
|
<strong class="font_small_watch">
|
||||||
|
<%= get_praise_num(obj)%>
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= image_tag "/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issue_not_treed_over) %> </td>
|
<td>
|
||||||
|
<%= image_tag "/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issue_not_treed_over) %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if OptionNumber.get_user_option_number(user_id).nil? || OptionNumber.get_user_option_number(user_id).total_score < 2 %>
|
<% if OptionNumber.get_user_option_number(user_id).nil? || OptionNumber.get_user_option_number(user_id).total_score < 2 %>
|
||||||
<table style="line-height: 1px">
|
<table style="line-height: 1px">
|
||||||
<tr>
|
<tr>
|
||||||
<td > <%= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
|
<td >
|
||||||
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class ,:horizontal => horizontal %></td>
|
<%= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
|
||||||
|
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class ,:horizontal => horizontal %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td>
|
<td align="center">
|
||||||
|
<strong class="font_small_watch">
|
||||||
|
<%= get_praise_num(obj)%>
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= image_tag "/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issues_score_not_enough) %> </td>
|
<td>
|
||||||
|
<%= image_tag "/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issues_score_not_enough) %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<% else %>
|
<% else %>
|
||||||
<table style="line-height: 1px">
|
<table style="line-height: 1px">
|
||||||
<tr>
|
<tr>
|
||||||
<td > <%= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
|
<td >
|
||||||
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class ,:horizontal => horizontal %> </td>
|
<%= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
|
||||||
|
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class ,:horizontal => horizontal %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td>
|
<td align="center">
|
||||||
|
<strong class="font_small_watch">
|
||||||
|
<%= get_praise_num(obj)%>
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <%= link_to image_tag("/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issue_tread)),:controller=>"praise_tread",
|
<td>
|
||||||
:action=>"tread_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class ,:horizontal => horizontal %></td>
|
<%= link_to image_tag("/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issue_tread)),:controller=>"praise_tread",
|
||||||
|
:action=>"tread_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class ,:horizontal => horizontal %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<div class="homeworks panel panel-default ">
|
<div class="homeworks panel panel-default ">
|
||||||
<div class="homeworks panel-heading">
|
<div class="homeworks panel-heading">
|
||||||
<div class="panel-title">
|
<div class="panel-title">
|
||||||
<%= link_to homework.name, respond_path(homework) %>(<%=homework.homeworks.count %>)<%#Bid%>
|
<%= link_to homework.name, course_for_bid_path(homework) %>(<%=homework.homeworks.count %>)<%#Bid%>
|
||||||
<%#= link_to "打包下载", zipdown_assort_path(obj_class: homework.class, obj_id: homework.id), :class => "btn btn-primary btn-sm" %><br/>
|
<%#= link_to "打包下载", zipdown_assort_path(obj_class: homework.class, obj_id: homework.id), :class => "btn btn-primary btn-sm" %><br/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<table border="0">
|
<table border="0">
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td> <% if bid.reward_type.nil? or bid.reward_type == 1 %> <strong><%= l(:label_bids_reward_method) %><span style="color: #ed8924;font-family: 14px; font-family: 微软雅黑"><%= l(:label_call_bonus) %> <%= l(:label_RMB_sign) %><%= bid.budget%></span></strong> <% elsif bid.reward_type == 2 %> <strong><%= l(:label_bids_reward_method) %><span style="color: #15bccf;font-family: 14px; font-family: 微软雅黑"><%= bid.budget%></span></strong> <% else %> <!-- <strong><%= l(:label_bids_reward_method) %><span style="color: #00aa83;font-family: 14px; font-family: 微软雅黑"><%= l(:label_bids_credit) %> <%= bid.budget%> <%= l(:label_bids_credit_number) %></span></strong> --> <% end %> <!-- <td style="color: rgb(255, 0, 0);"><strong><%= l(:label_price) %><%= l(:label_RMB_sign) %><%= bid.budget%></strong></td> --></td>
|
<td> <% if bid.reward_type.nil? or bid.reward_type == 1 %> <strong><%= l(:label_bids_reward_method) %><span style="color: #ed8924;font-family: 14px; font-family: 微软雅黑;"><%= l(:label_call_bonus) %> <%= l(:label_RMB_sign) %><%= bid.budget%></span></strong> <% elsif bid.reward_type == 2 %> <strong><%= l(:label_bids_reward_method) %><span style="color: #15bccf;font-family: 14px; font-family: 微软雅黑"><%= bid.budget%></span></strong> <% else %> <!-- <strong><%= l(:label_bids_reward_method) %><span style="color: #00aa83;font-family: 14px; font-family: 微软雅黑"><%= l(:label_bids_credit) %> <%= bid.budget%> <%= l(:label_bids_credit_number) %></span></strong> --> <% end %> <!-- <td style="color: rgb(255, 0, 0);"><strong><%= l(:label_price) %><%= l(:label_RMB_sign) %><%= bid.budget%></strong></td> --></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class="font_lighter">
|
<td><span class="font_lighter">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
<% id = "journal_reply_ul_" + journal.id.to_s%>
|
<% id = "journal_reply_ul_" + journal.id.to_s%>
|
||||||
<ul class="messages-for-user-reply" id = '<%= id %>' >
|
<div id = '<%= id %>' >
|
||||||
<% fetch_user_leaveWord_reply(journal).each do |reply|%>
|
<% fetch_user_leaveWord_reply(journal).each do |reply|%>
|
||||||
<%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply} %>
|
<%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</div>
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||||
<% ids_r = 'reply_respond_form_'+ reply.id.to_s %>
|
<% ids_r = 'reply_respond_form_'+ reply.id.to_s %>
|
||||||
<li id='word_li_<%=reply.id.to_s%>' onmouseover="$('#<%= ids_r %>').show()" onmouseout="$('#<%= ids_r %>').hide()">
|
<div class="recall" id='word_li_<%=reply.id.to_s%>' onmouseover="$('#<%= ids_r %>').show()" onmouseout="$('#<%= ids_r %>').hide()">
|
||||||
<span class="portrait">
|
<div class="recall_head">
|
||||||
<%= image_tag url_to_avatar(reply.user), :class => "avatar-3" %>
|
<%= image_tag url_to_avatar(reply.user) %>
|
||||||
</span>
|
</div>
|
||||||
<div class="message-body">
|
<div class="recall_con">
|
||||||
<% id = 'project_respond_form_'+ reply.id.to_s %>
|
<% id = 'project_respond_form_'+ reply.id.to_s %>
|
||||||
<p>
|
|
||||||
<span>
|
|
||||||
<%= link_to reply.user.name, user_path(reply.user) %>
|
<%= link_to reply.user.name, user_path(reply.user) %>
|
||||||
:
|
回复
|
||||||
</span>
|
<%= link_to reply.at_user.name,user_path(reply.at_user) %>
|
||||||
|
<p>
|
||||||
<span class="message-notes">
|
<span class="message-notes">
|
||||||
<%= reply.notes %>
|
<%= reply.notes %>
|
||||||
</span>
|
</span>
|
||||||
|
@ -19,15 +18,15 @@
|
||||||
<span class="time">
|
<span class="time">
|
||||||
<%= format_time reply.created_on %>
|
<%= format_time reply.created_on %>
|
||||||
</span>
|
</span>
|
||||||
<span style="display: none; margin-left: 4px;" id='<%=ids_r%>' >
|
<span class="ping_disfoot" style="display: none; margin-left: 4px;" id='<%=ids_r%>' >
|
||||||
<% if reply_allow %>
|
|
||||||
<%= link_to l(:label_projects_feedback_respond),'',
|
|
||||||
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), '#{l(:label_reply_plural)} #{m_reply_id.user.name}: '); return false;"} %>
|
|
||||||
<% end %>
|
|
||||||
<% if @user == User.current || User.current.admin? || reply.user.id == User.current.id %>
|
<% if @user == User.current || User.current.admin? || reply.user.id == User.current.id %>
|
||||||
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
|
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
|
||||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if reply_allow %>
|
||||||
|
<%= link_to l(:label_projects_feedback_respond),'',
|
||||||
|
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), '#{l(:label_reply_plural)} #{m_reply_id.user.name}: '); return false;"} %>
|
||||||
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -37,4 +36,4 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div style="clear: both;"></div>
|
<div style="clear: both;"></div>
|
||||||
</li>
|
</div>
|
|
@ -1,6 +1,9 @@
|
||||||
<% if @journal_destroyed.nil? %>
|
<% if @journal_destroyed.nil? %>
|
||||||
alert('<%=l(:notice_failed_delete)%>');
|
alert('<%=l(:notice_failed_delete)%>');
|
||||||
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication'].include? @journal_destroyed.jour_type)%>
|
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication'].include? @journal_destroyed.jour_type)%>
|
||||||
|
<% if @jours_count %>
|
||||||
|
$('#jours_count').html("<%= @jours_count %>");
|
||||||
|
<% end %>
|
||||||
var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>')
|
var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>')
|
||||||
destroyedItem.fadeOut(600,function(){
|
destroyedItem.fadeOut(600,function(){
|
||||||
destroyedItem.remove();
|
destroyedItem.remove();
|
||||||
|
|
|
@ -1843,3 +1843,12 @@ en:
|
||||||
label_search_conditions_not_null: The search conditions can not be empty
|
label_search_conditions_not_null: The search conditions can not be empty
|
||||||
lable_school_list: List of schools
|
lable_school_list: List of schools
|
||||||
button_delete_file: delete
|
button_delete_file: delete
|
||||||
|
label_attachment: attachment
|
||||||
|
label_max_length: A maximum of 250 characters
|
||||||
|
label_create_person: Create personnel
|
||||||
|
label_participation_person: The participation of personnel
|
||||||
|
label_homework_without_description: The homework without any description!
|
||||||
|
label_teacher_comments: Teacher comments
|
||||||
|
label_anonymous_comments: Anonymous comments
|
||||||
|
label_anonymous: Anonymous
|
||||||
|
label_submit_comments: Submit_comments
|
|
@ -1487,10 +1487,7 @@ zh:
|
||||||
one: 留言
|
one: 留言
|
||||||
other: 留言
|
other: 留言
|
||||||
#end
|
#end
|
||||||
label_x_responses: #modify by huang
|
label_students_responses: 学生提问
|
||||||
zero: 学生提问
|
|
||||||
one: 学生提问
|
|
||||||
other: 学生提问
|
|
||||||
#end
|
#end
|
||||||
label_x_bids_responses: #modify by huang
|
label_x_bids_responses: #modify by huang
|
||||||
zero: 用户反馈
|
zero: 用户反馈
|
||||||
|
@ -1894,6 +1891,7 @@ zh:
|
||||||
label_new_course_password: 课程密码
|
label_new_course_password: 课程密码
|
||||||
label_new_course_school: 开课学校
|
label_new_course_school: 开课学校
|
||||||
label_new_course_description: 课程描述
|
label_new_course_description: 课程描述
|
||||||
|
label_homework_description: 作业描述
|
||||||
label_new_join_order: 请输入课程密码
|
label_new_join_order: 请输入课程密码
|
||||||
label_task_submit_form_accessory: 作业最终以附件形式提交
|
label_task_submit_form_accessory: 作业最终以附件形式提交
|
||||||
label_task_submit_form_project: 作业最终以项目形式提交
|
label_task_submit_form_project: 作业最终以项目形式提交
|
||||||
|
@ -2171,3 +2169,18 @@ zh:
|
||||||
label_contest_news_title_condition: 竞赛标题超过255个汉字
|
label_contest_news_title_condition: 竞赛标题超过255个汉字
|
||||||
label_subject_empty: 主题不能为空
|
label_subject_empty: 主题不能为空
|
||||||
label_course_organizers: 开设单位
|
label_course_organizers: 开设单位
|
||||||
|
label_teacher_score: 教师评分
|
||||||
|
label_student_score: 学生评分
|
||||||
|
label_without_score: 未评分
|
||||||
|
label_homework_list: 作品列表
|
||||||
|
label_time: 时间
|
||||||
|
label_attachment: 附件
|
||||||
|
label_max_length: 最多250个字
|
||||||
|
label_create_person: 创建人员
|
||||||
|
label_participation_person: 参与人员
|
||||||
|
label_homework_without_description: 该作业无任何描述!
|
||||||
|
label_sure_exit_homework: 是否确认退出该作业
|
||||||
|
label_teacher_comments: 教师评论
|
||||||
|
label_anonymous_comments: 匿评
|
||||||
|
label_anonymous: 匿名
|
||||||
|
label_submit_comments: 提交评论
|
|
@ -44,10 +44,17 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'add_jour_reply', :via => [:get,:post]
|
match 'add_jour_reply', :via => [:get,:post]
|
||||||
match 'destroy_jour', :via => [:get,:post]
|
match 'destroy_jour', :via => [:get,:post]
|
||||||
match 'comprehensive_evaluation_jour', :via => [:get,:post]
|
match 'comprehensive_evaluation_jour', :via => [:get,:post]
|
||||||
|
get 'get_not_batch_homework'
|
||||||
|
get 'get_batch_homeworks'
|
||||||
|
get 'get_homeworks'
|
||||||
|
get 'get_homework_jours'
|
||||||
|
get 'get_student_batch_homework'
|
||||||
|
get 'get_my_homework'
|
||||||
end
|
end
|
||||||
member do
|
member do
|
||||||
match 'add_homework_users', :via => [:get,:post]
|
match 'add_homework_users', :via => [:get,:post]
|
||||||
match 'destory_homework_users', :via => [:get,:post]
|
match 'destory_homework_users', :via => [:get,:post]
|
||||||
|
get 'praise_homework'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -322,6 +329,8 @@ RedmineApp::Application.routes.draw do
|
||||||
resources :bids, :only=>[:edit,:update,:show] do
|
resources :bids, :only=>[:edit,:update,:show] do
|
||||||
member do
|
member do
|
||||||
match 'homework_ajax_modal'
|
match 'homework_ajax_modal'
|
||||||
|
get 'start_anonymous_comment', as: 'start_anonymous_comment'
|
||||||
|
get 'stop_anonymous_comment', as: 'stop_anonymous_comment'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
resources :projects do
|
resources :projects do
|
||||||
|
@ -695,7 +704,7 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'contest/new_contest', :to => 'bids#new_contest' #huang
|
match 'contest/new_contest', :to => 'bids#new_contest' #huang
|
||||||
match 'calls/:id/show_project', :to => 'bids#show_project', :as => 'project_for_bid'
|
match 'calls/:id/show_project', :to => 'bids#show_project', :as => 'project_for_bid'
|
||||||
match 'calls/:id/show_course', :to => 'bids#show_courseEx', :as => 'course_for_bid' # nwb added
|
match 'calls/:id/show_course', :to => 'bids#show_courseEx', :as => 'course_for_bid' # nwb added
|
||||||
match 'calls/:id/new_exercise_book', :to => 'homework_attach#new', :as => 'new_homework_attach'
|
match 'calls/:id/new_exercise_book', :to => 'homework_attach#new', :as => 'new_exercise_book'
|
||||||
match 'calls/:id/add', :to => 'bids#add'
|
match 'calls/:id/add', :to => 'bids#add'
|
||||||
match 'calls/:id/delete', :to => 'bids#delete'
|
match 'calls/:id/delete', :to => 'bids#delete'
|
||||||
match 'calls/:id/add_homework', :to => 'bids#add_homework', :via => :post
|
match 'calls/:id/add_homework', :to => 'bids#add_homework', :via => :post
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
class CreateHomeworkEvaluations < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :homework_evaluations do |t|
|
||||||
|
t.string :user_id
|
||||||
|
t.string :homework_attach_id
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddCommentStatusToBid < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :bids, :comment_status, :integer, default: 0
|
||||||
|
end
|
||||||
|
end
|
25
db/schema.rb
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20141029065917) do
|
ActiveRecord::Schema.define(:version => 20141102054414) do
|
||||||
|
|
||||||
create_table "activities", :force => true do |t|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
|
@ -108,6 +108,7 @@ ActiveRecord::Schema.define(:version => 20141029065917) do
|
||||||
t.string "password"
|
t.string "password"
|
||||||
t.integer "is_evaluation"
|
t.integer "is_evaluation"
|
||||||
t.integer "proportion", :default => 60
|
t.integer "proportion", :default => 60
|
||||||
|
t.integer "comment_status", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "boards", :force => true do |t|
|
create_table "boards", :force => true do |t|
|
||||||
|
@ -177,6 +178,13 @@ ActiveRecord::Schema.define(:version => 20141029065917) do
|
||||||
|
|
||||||
add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true
|
add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true
|
||||||
|
|
||||||
|
create_table "class_members", :force => true do |t|
|
||||||
|
t.integer "member_id"
|
||||||
|
t.integer "course_class_id"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "code_review_assignments", :force => true do |t|
|
create_table "code_review_assignments", :force => true do |t|
|
||||||
t.integer "issue_id"
|
t.integer "issue_id"
|
||||||
t.integer "change_id"
|
t.integer "change_id"
|
||||||
|
@ -309,6 +317,14 @@ ActiveRecord::Schema.define(:version => 20141029065917) do
|
||||||
t.integer "container_id", :default => 0
|
t.integer "container_id", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "course_classes", :force => true do |t|
|
||||||
|
t.string "name"
|
||||||
|
t.text "explain"
|
||||||
|
t.integer "course_id"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "course_infos", :force => true do |t|
|
create_table "course_infos", :force => true do |t|
|
||||||
t.integer "course_id"
|
t.integer "course_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
@ -478,6 +494,13 @@ ActiveRecord::Schema.define(:version => 20141029065917) do
|
||||||
t.integer "project_id", :default => 0
|
t.integer "project_id", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "homework_evaluations", :force => true do |t|
|
||||||
|
t.string "user_id"
|
||||||
|
t.string "homework_attach_id"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "homework_for_courses", :force => true do |t|
|
create_table "homework_for_courses", :force => true do |t|
|
||||||
t.integer "course_id"
|
t.integer "course_id"
|
||||||
t.integer "bid_id"
|
t.integer "bid_id"
|
||||||
|
|
|
@ -219,50 +219,75 @@ module Redmine
|
||||||
#Added by Nie guanghui
|
#Added by Nie guanghui
|
||||||
#Designed for pagination.
|
#Designed for pagination.
|
||||||
def pagination_links_each(paginator, count=nil, options={}, &block)
|
def pagination_links_each(paginator, count=nil, options={}, &block)
|
||||||
options.assert_valid_keys :per_page_links
|
#options.assert_valid_keys :per_page_links
|
||||||
|
|
||||||
per_page_links = options.delete(:per_page_links)
|
#per_page_links = options.delete(:per_page_links)
|
||||||
|
per_page_links = options[:per_page_links]
|
||||||
|
remote = options[:remote] ? options[:remote] : false
|
||||||
|
flag = options[:flag] ? options[:flag] : false
|
||||||
per_page_links = false if count.nil?
|
per_page_links = false if count.nil?
|
||||||
page_param = paginator.page_param
|
page_param = paginator.page_param
|
||||||
|
|
||||||
html = ''
|
html = ''
|
||||||
if paginator.previous_page
|
if paginator.previous_page
|
||||||
# \xc2\xab(utf-8) = «
|
# \xc2\xab(utf-8) = «
|
||||||
|
if flag
|
||||||
|
text = l(:label_previous)
|
||||||
|
else
|
||||||
text = "\xc2\xab " + l(:label_previous)
|
text = "\xc2\xab " + l(:label_previous)
|
||||||
html << '<li>' << yield(text, {page_param => paginator.previous_page}, :class => 'previous') << '</li>' + ' '
|
end
|
||||||
|
html << '<li>' << yield(text, {page_param => paginator.previous_page}, :class => 'previous', :remote => remote) << '</li>' + ' '
|
||||||
end
|
end
|
||||||
unless paginator.previous_page
|
unless paginator.previous_page
|
||||||
if paginator.next_page
|
if paginator.next_page
|
||||||
|
if flag
|
||||||
|
text = l(:label_previous)
|
||||||
|
else
|
||||||
text = "\xc2\xab " + l(:label_previous)
|
text = "\xc2\xab " + l(:label_previous)
|
||||||
html << '<li>' << yield(text, {page_param => paginator.previous_page}, :class => 'previous') << '</li>' + ' '
|
end
|
||||||
|
html << '<li>' << yield(text, {page_param => paginator.previous_page}, :class => 'previous', :remote => remote) << '</li>' + ' '
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
previous = nil
|
previous = nil
|
||||||
paginator.linked_pages.each do |page|
|
paginator.linked_pages.each do |page|
|
||||||
if previous && previous != page - 1
|
if previous && previous != page - 1
|
||||||
|
if flag
|
||||||
|
html << '<li>' << content_tag('a', '...') << '</li>' + ' '
|
||||||
|
else
|
||||||
html << '<li>' << content_tag('span', '...', :class => 'spacer') << '</li>' + ' '
|
html << '<li>' << content_tag('span', '...', :class => 'spacer') << '</li>' + ' '
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if page == paginator.page
|
if page == paginator.page
|
||||||
html << '<li>' << content_tag('span', page.to_s, :class => 'current-page') << '</li>'
|
if flag
|
||||||
|
html << '<li class = "wlist_select">' << page.to_s << '</li>'
|
||||||
else
|
else
|
||||||
html << '<li>' << yield(page.to_s, {page_param => page}, :class => 'page') << '</li>'
|
html << '<li>' << content_tag('span', page.to_s, :class => 'current-page') << '</li>'
|
||||||
|
end
|
||||||
|
else
|
||||||
|
html << '<li>' << yield(page.to_s, {page_param => page}, :class => 'page', :remote => remote) << '</li>'
|
||||||
end
|
end
|
||||||
html << ' '
|
html << ' '
|
||||||
previous = page
|
previous = page
|
||||||
end
|
end
|
||||||
|
|
||||||
if paginator.next_page
|
if paginator.next_page
|
||||||
# \xc2\xbb(utf-8) = »
|
if flag
|
||||||
|
text = l(:label_next)
|
||||||
|
else
|
||||||
text = l(:label_next) + " \xc2\xbb"
|
text = l(:label_next) + " \xc2\xbb"
|
||||||
html << '<li>' << yield(text, {page_param => paginator.next_page}, :class => 'next') << '</li>' + ' '
|
end
|
||||||
|
html << '<li>' << yield(text, {page_param => paginator.next_page}, :class => 'next', :remote => remote) << '</li>' + ' '
|
||||||
end
|
end
|
||||||
|
|
||||||
unless paginator.next_page
|
unless paginator.next_page
|
||||||
if paginator.previous_page
|
if paginator.previous_page
|
||||||
# \xc2\xbb(utf-8) = »
|
if flag
|
||||||
text = l(:label_front) + " \xc2\xbb"
|
text = l(:label_next)
|
||||||
html << "<li>" << yield(text, {page_param => paginator.next_page}, :class => 'next') << "</li>" + ' '
|
else
|
||||||
|
text = l(:label_next) + " \xc2\xbb"
|
||||||
|
end
|
||||||
|
html << "<li>" << yield(text, {page_param => paginator.next_page}, :class => 'next', :remote => remote) << "</li>" + ' '
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 502 B |
After Width: | Height: | Size: 8.6 KiB |
|
@ -1271,6 +1271,14 @@ a.user.locked, a.user.locked:link, a.user.locked:visited {color: #999;}
|
||||||
|
|
||||||
#sidebar a.selected {line-height:1.7em; padding:1px 3px 2px 2px; margin-left:-2px; background-color:#9DB9D5; color:#fff; border-radius:2px;}
|
#sidebar a.selected {line-height:1.7em; padding:1px 3px 2px 2px; margin-left:-2px; background-color:#9DB9D5; color:#fff; border-radius:2px;}
|
||||||
#sidebar a.selected:hover {text-decoration:none;}
|
#sidebar a.selected:hover {text-decoration:none;}
|
||||||
|
#sidebar #attachment_ a {
|
||||||
|
background-position: 0% 50%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
font-family: '微软雅黑'; /*modify by men*/
|
||||||
|
padding-left: 20px !important;
|
||||||
|
padding-top: 2px !important;
|
||||||
|
padding-bottom: 3px !important;
|
||||||
|
}
|
||||||
#admin-menu a {line-height:1.7em;}
|
#admin-menu a {line-height:1.7em;}
|
||||||
#admin-menu a.selected {padding-left: 20px !important; background-position: 2px 40%;}
|
#admin-menu a.selected {padding-left: 20px !important; background-position: 2px 40%;}
|
||||||
|
|
||||||
|
@ -2528,6 +2536,14 @@ a.close-icon:hover {background-image:url('../images/close_hl.png');}
|
||||||
padding-top: 2px;
|
padding-top: 2px;
|
||||||
padding-bottom: 3px;
|
padding-bottom: 3px;
|
||||||
}
|
}
|
||||||
|
#sidebar #attachemnt_.icon {
|
||||||
|
background-position: 0% 50%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
font-family: '微软雅黑'; /*modify by men*/
|
||||||
|
padding-left: 20px;
|
||||||
|
padding-top: 2px;
|
||||||
|
padding-bottom: 3px;
|
||||||
|
}
|
||||||
.icon_enterprise {
|
.icon_enterprise {
|
||||||
background-position: 0% 50%;
|
background-position: 0% 50%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
|
|
@ -0,0 +1,158 @@
|
||||||
|
/* CSS Document */
|
||||||
|
body{ font-size:12px !important; font-family:"微软雅黑","宋体" !important; line-height:1.9; background:#fff; font-style:normal;}
|
||||||
|
div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span,textarea{ margin:0; padding:0;}
|
||||||
|
div,img,tr,td,textarea{ border:0;}
|
||||||
|
table,tr,td{border:0; cellspacing:0; cellpadding:0;}
|
||||||
|
ul,li{ list-style-type:none}
|
||||||
|
.cl{ clear:both; overflow:hidden; }
|
||||||
|
a{ text-decoration:none; }
|
||||||
|
a:hover{ text-decoration:underline;}
|
||||||
|
|
||||||
|
.container{ width:940px; margin:0 auto; }
|
||||||
|
/* 作业列表 */
|
||||||
|
.ttl{ }
|
||||||
|
.ctt{height:820px;clear:both; }
|
||||||
|
/* TAB 切换效果 */
|
||||||
|
.tb_{ background-color: #eaeaea; height:40px; }
|
||||||
|
.tb_ ul{height:40px; }
|
||||||
|
.tb_ li{float:left;height:35px;width: 90px;cursor:pointer; font-size:14px; padding-top:5px; text-align:center; }
|
||||||
|
a.tb_all{ margin-left:235px; font-size:12px; display:block; height:23px; padding-top:4px; width:90px; color:#7a7a7a; border:1px solid #cbcbcb; background:#fff; text-align: center;}
|
||||||
|
a:hover.tb_all{ background:#eaeaea; text-decoration:none;}
|
||||||
|
|
||||||
|
/* 控制显示与隐藏css类 */
|
||||||
|
.normaltab { color:#64bdd9 ; }
|
||||||
|
.hovertab { color:#fff; background-color:#64bdd9; }
|
||||||
|
.normaltab a { color:#64bdd9 ; }
|
||||||
|
.hovertab a{color:#fff; background-color:#64bdd9; text-decoration:none;}
|
||||||
|
.dis{display:block; }
|
||||||
|
.undis{display:none;}
|
||||||
|
|
||||||
|
.c_red{ color:#de030d;}
|
||||||
|
.f_12{ font-size:12px;}
|
||||||
|
.w_40{ width:40px; border:1px solid red;}
|
||||||
|
|
||||||
|
.dis ul{ height:75px; border-bottom:1px dashed #64bdd9;}
|
||||||
|
.dis ul li{ float:left;}
|
||||||
|
.dis ul li a{ display:block; color:#15bccf; }
|
||||||
|
.pic_head{ width:42px; padding:8px 15px 0 8px;}
|
||||||
|
.pic_head a{ text-align:center; width:42px; overflow:hidden;text-overflow:ellipsis; white-space:nowrap;}
|
||||||
|
.pic_head img{ border:1px solid #fff;}
|
||||||
|
.pic_head img:hover{border:1px solid #15bccf;}
|
||||||
|
.dis ul li.wname a{ width:260px; font-size:14px; color:#595959; padding:20px 0 0 15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
|
||||||
|
.dis ul li.wdown a{padding-top:22px; color:#3d7ec2; margin-right:35px;}
|
||||||
|
.wscore{ padding-top:22px; color:#888888; width:96px;}
|
||||||
|
.dis ul li.wping{margin-left:12px; }
|
||||||
|
.dis ul li.wping a{ margin-top:18px; margin-bottom:3px; width:43px; height:23px; background:#15bccf; color:#fff; text-align:center; padding-top:3px;}
|
||||||
|
.dis ul li.wping a:hover{ background-color:#03a1b3;}
|
||||||
|
ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; }
|
||||||
|
.wlist span{ border:1px solid #15bccf; padding:0 5px; margin-left:3px;}
|
||||||
|
.wlist a{ border:1px solid #15bccf; padding:0 5px; margin-left:3px;}
|
||||||
|
.wlist a:hover{ background:#15bccf; color:#fff; text-decoration:none;}
|
||||||
|
.wlist_select { background-color:#64bdd9; color:#fff; padding:0 5px; margin-left:3px; border:1px solid #64bdd9;}
|
||||||
|
.code_list{ float:right; font-size:12px; color:#484848; padding:5px 3px; border-bottom:2px solid #15bccf; width:687px; }
|
||||||
|
.code_list a{ color:#787878;}
|
||||||
|
.fr{ float:right;}
|
||||||
|
.c_grey{ color:#999; font-weight:normal;}
|
||||||
|
.dis ul li.wname02 a{ width:200px; font-size:14px; color:#595959; padding:20px 0 0 15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
|
||||||
|
.dis ul li.wmine{ margin:12px 0 0 10px;}
|
||||||
|
.dis ul li.wmine a{ color:#3d7ec2; text-align:center; width:50px; font-weight: bold;}
|
||||||
|
.wzan{ margin:15px 0 0 25px; width:32px; height:44px;}
|
||||||
|
.wzan a{ display: block;text-align: center;}
|
||||||
|
a.wzan_img{background:url(images/pic_zan.png) 0 -59px no-repeat; display:block; height:31px; width:30px; color:#fff;}
|
||||||
|
a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;}
|
||||||
|
|
||||||
|
.msg_box{ width:693px; border-bottom:1px dashed #CCC; padding-top:20px;}
|
||||||
|
.msg_box h4{ margin-left:15px;border-style: none;}
|
||||||
|
.msg_box textarea{width:660px;height:90px;padding:2px;overflow:hidden;background-color: #ffffff; border:1px solid #CCC; margin:5px 15px; color:#666; font-size:12px;}
|
||||||
|
.msg_box a{ float:right; display:block; width:50px; height:22px; background:#15bccf; color:#fff; margin-right:10px; text-align:center; margin-top:5px; }
|
||||||
|
.msg_box a:hover{ background-color:#03a1b3; text-decoration:none;}
|
||||||
|
|
||||||
|
|
||||||
|
/****评分弹框****/
|
||||||
|
|
||||||
|
.alert .close{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-502px;background:url(images/close.png) no-repeat;cursor:pointer;}
|
||||||
|
.alert .C{width:476px;height:296px;position:absolute;left:5px;top:5px; }
|
||||||
|
|
||||||
|
.ping_con{ margin:5px; border-bottom:1px dashed #CCC; padding-bottom:5px;}
|
||||||
|
.ping_con ul{ height:30px;}
|
||||||
|
.ping_con ul li{ float:left; color:#656767; font-weight:bold;}
|
||||||
|
.ping_con h2{ font-size:14px; color:#444443; margin-bottom:10px; }
|
||||||
|
.ping_con p{ color:#777777; font-size:12px; border-bottom:1px dashed #CCC; padding-bottom:5px;}
|
||||||
|
.ping_con p span a{ color:#777777;}
|
||||||
|
.ping_star{ width:160px; color:#333; font-weight:bold; margin-bottom:5px;}
|
||||||
|
.ping_star span a{ float:right; width:20px; height:20px; background:url(images/star.png) -2px 0 no-repeat; margin-right:3px;}
|
||||||
|
.ping_star span a:hover{background:url(images/star.png) -24px 0 no-repeat;}
|
||||||
|
.ping_con textarea{ width:455px; height:76px; border:1px solid #15bccf; margin-bottom:5px; color:#666; font-size:12px;}
|
||||||
|
a.ping_sub{ float:right; height:22px; width:60px; margin-right:20px; background:#15bccf; color:#fff; text-align:center;}
|
||||||
|
a.ping_sub1{ float:right; height:22px; width:60px; background:#15bccf; color:#fff; text-align:center;}
|
||||||
|
a:hover.ping_sub{ background:#14a8b9;}
|
||||||
|
.recall{ border-top:1px solid #CCC; padding:5px 0;}
|
||||||
|
.recall_head{ float:left;}
|
||||||
|
.recall_head a{ display:block; width:30px; height:30px; border:1px solid #CCC; padding:1px;}
|
||||||
|
.recall_head img{ height:30px; width:30px;}
|
||||||
|
.recall_head a:hover{border:1px solid #15bccf;}
|
||||||
|
.recall_head img:hover{border:1px solid #15bccf;}
|
||||||
|
.recall_con{ float:left;color:#777777; width:90%; margin-left:10px; }
|
||||||
|
.recall_con a{ color:#15bccf; }
|
||||||
|
|
||||||
|
.ping_list{ margin-top:15px;}
|
||||||
|
|
||||||
|
.ping_ttl{height:18px;}
|
||||||
|
.ping_ctt{height:auto;padding:6px;clear:both;}
|
||||||
|
.ping_tb_{ border-bottom:3px solid #e4e4e4; text-align:center;}
|
||||||
|
.ping_tb_ ul{height:24px;}
|
||||||
|
.ping_tb_ li{float:left;height: 24px;width: auto; padding:0 10px;cursor:pointer;}
|
||||||
|
.ping_normaltab { color:#15bccf ; border-bottom:3px solid #e4e4e4;}
|
||||||
|
.ping_hovertab { color:#656767; font-weight:bold; border-bottom:3px solid #15bccf; }
|
||||||
|
.ping_dis{display:block; }
|
||||||
|
.ping_undis{display:none;}
|
||||||
|
|
||||||
|
.ping_C{border-bottom:1px dashed #CCC; padding:5px;}
|
||||||
|
.ping_dispic a{ display:block; height:46px; width:46px; border:1px solid #CCC; padding:1px; float:left;}
|
||||||
|
.ping_dispic img{ height:46px; width:46px;}
|
||||||
|
.ping_discon{ float:left; width:372px; margin-left:15px;}
|
||||||
|
.ping_distop span{ float:left;}
|
||||||
|
.ping_distop p{ color:#5f5f5f;}
|
||||||
|
.ping_disfoot a{ float:right; color:#15bccf; margin-left:5px;}
|
||||||
|
|
||||||
|
.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}
|
||||||
|
|
||||||
|
|
||||||
|
/* 创建作业 */
|
||||||
|
.Newwork{ width:940px; border:1px solid #c3c3c3;}
|
||||||
|
.N_top{ height:35px; background:#e5e5e5; border:1px solid #fff; width:691px; padding:5px 10px 0 15px;}
|
||||||
|
.N_top h2{ color:#616161; font-size:14px; float:left;}
|
||||||
|
.N_top a{ float:right; font-size:14px; color:#15bccf; display:block; background:url(images/pic_ad.png) 0 5px no-repeat; height:20px; width:60px; padding-left:16px;}
|
||||||
|
.N_con{ color:#484747 !important; font-weight:bold; width: 691px;; margin:15px auto;}
|
||||||
|
.N_con p{ margin-bottom:15px;}
|
||||||
|
|
||||||
|
.w430{ width:430px;}
|
||||||
|
.w350{ width:350px;}
|
||||||
|
.w620{ width:580px; height:160px; border:1px solid #CCC;}
|
||||||
|
.bo{height:26px; border:1px solid #CCC !important; padding: 0 !important;}
|
||||||
|
a.tijiao{ height:28px !important; display:block !important; width:80px !important; color:#fff !important; background:#15bccf !important; text-align:center !important; padding-top:4px !important; float:left !important; margin-right:10px !important;}
|
||||||
|
a:hover.tijiao{ background:#0f99a9 !important;}
|
||||||
|
.members_left{ float:left; width:570px; margin-right:20px;}
|
||||||
|
.members_left{}
|
||||||
|
.members_left ul li{ height:30px; border-bottom:1px solid #CCC; width:570px; padding-top:5px; }
|
||||||
|
.members_left ul li a{ float:left;}
|
||||||
|
.members_left ul li span{ float:left; text-align:center; color:#484747;}
|
||||||
|
.w260{ text-align:center; width:260px;}
|
||||||
|
.f_b{ font-weight: bold;}
|
||||||
|
.members_right label{ margin-left:15px;}
|
||||||
|
.N_search{ height:20px !important; border:1px solid #999 !important;}
|
||||||
|
|
||||||
|
/* 匿名评分弹框 */
|
||||||
|
.alert .close02{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-490px;background:url(images/close.png) no-repeat;cursor:pointer;}
|
||||||
|
.ni_con { width:425px; margin:25px 30px;}
|
||||||
|
.ni_con h2{ display:block; height:40px; width:188px; margin:0 auto;}
|
||||||
|
.ni_con p{ color:#808181;}
|
||||||
|
.ni_con a:hover{ text-decoration:none;}
|
||||||
|
|
||||||
|
.ui-widget-header{display: none;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 521 B |
After Width: | Height: | Size: 714 B |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 502 B |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.6 KiB |