Merge remote-tracking branch 'origin/szzh' into guange_dev
This commit is contained in:
commit
f56e48d60a
|
@ -247,7 +247,7 @@ module Mobile
|
|||
end
|
||||
get "course_dynamic/:id" do
|
||||
cs = CoursesService.new
|
||||
count = cs.course_dynamic(params,current_user)
|
||||
count = cs.all_course_dynamics(params,current_user)
|
||||
present :data, count, with: Mobile::Entities::CourseDynamic
|
||||
present :status, 0
|
||||
end
|
||||
|
@ -311,6 +311,44 @@ module Mobile
|
|||
present :data,news,with:Mobile::Entities::News
|
||||
present :status,0
|
||||
end
|
||||
|
||||
desc '课程历次作业总成绩列表'
|
||||
params do
|
||||
requires :token,type:String
|
||||
requires :course_id,type:Integer,desc:'课程id'
|
||||
optional :page,type:Integer,desc:'页码'
|
||||
end
|
||||
get ':course_id/students_score_list' do
|
||||
cs = CoursesService.new
|
||||
news = cs.students_score_list params,current_user
|
||||
present :data,news,with:Mobile::Entities::User
|
||||
end
|
||||
|
||||
desc '课程某次作业提交列表 并显示成绩'
|
||||
params do
|
||||
requires :token,type:String
|
||||
requires :course_id,type:Integer,desc:'课程id'
|
||||
requires :homework_id,type:Integer,desc:'作业id'
|
||||
optional :page,type:Integer,desc:'页码'
|
||||
end
|
||||
get ':course_id/student_works_list' do
|
||||
cs = CoursesService.new
|
||||
student_works = cs.student_work_list params,current_user
|
||||
present :data,student_works.all,with:Mobile::Entities::StudentWork
|
||||
end
|
||||
|
||||
desc '开启匿评'
|
||||
params do
|
||||
requires :token,type:String
|
||||
requires :course_id,type:Integer,desc:'课程id'
|
||||
requires :homework_id,type:Integer,desc:'作业id'
|
||||
end
|
||||
get ':course_id/start_anonymous_comment' do
|
||||
cs = CoursesService.new
|
||||
status = cs.start_anonymous_comment params,current_user
|
||||
present :data,status
|
||||
present :status,0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,17 +1,23 @@
|
|||
module Mobile
|
||||
module Entities
|
||||
class Attachment < Grape::Entity
|
||||
include Redmine::I18n
|
||||
def self.attachment_expose(field)
|
||||
expose field do |f,opt|
|
||||
if f.is_a?(Hash) && f.key?(field)
|
||||
f[field]
|
||||
elsif f.is_a?(::Attachment)
|
||||
if f.respond_to?(field)
|
||||
f.send(field)
|
||||
if field == :created_on
|
||||
format_time(f.send(field))
|
||||
else
|
||||
f.send(field)
|
||||
end
|
||||
else
|
||||
#case field
|
||||
# when ""
|
||||
#end
|
||||
case field
|
||||
when :file_dir
|
||||
"attachments/download/" << f.send(:id).to_s << '/'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -21,6 +27,8 @@ module Mobile
|
|||
attachment_expose :description
|
||||
attachment_expose :downloads
|
||||
attachment_expose :quotes
|
||||
attachment_expose :created_on
|
||||
attachment_expose :file_dir
|
||||
end
|
||||
end
|
||||
end
|
|
@ -6,6 +6,38 @@ module Mobile
|
|||
expose field do |c,opt|
|
||||
if field == :update_time
|
||||
(format_time(c[field]) if (c.is_a?(Hash) && c.key?(field)))
|
||||
elsif field == :news_count
|
||||
obj = nil
|
||||
c[:dynamics].each do |d|
|
||||
if d[:type] == 1
|
||||
obj = d[:count]
|
||||
end
|
||||
end
|
||||
obj
|
||||
elsif field == :document_count
|
||||
obj = nil
|
||||
c[:dynamics].each do |d|
|
||||
if d[:type] == 3
|
||||
obj = d[:count]
|
||||
end
|
||||
end
|
||||
obj
|
||||
elsif field == :topic_count
|
||||
obj = nil
|
||||
c[:dynamics].each do |d|
|
||||
if d[:type] == 2
|
||||
obj = d[:count]
|
||||
end
|
||||
end
|
||||
obj
|
||||
elsif field == :homework_count
|
||||
obj = nil
|
||||
c[:dynamics].each do |d|
|
||||
if d[:type] == 4
|
||||
obj = d[:count]
|
||||
end
|
||||
end
|
||||
obj
|
||||
else
|
||||
c[field] if (c.is_a?(Hash) && c.key?(field))
|
||||
end
|
||||
|
@ -21,6 +53,60 @@ module Mobile
|
|||
course_dynamic_expose :course_img_url
|
||||
course_dynamic_expose :message
|
||||
course_dynamic_expose :update_time
|
||||
course_dynamic_expose :count
|
||||
course_dynamic_expose :news_count
|
||||
course_dynamic_expose :document_count
|
||||
course_dynamic_expose :topic_count
|
||||
course_dynamic_expose :homework_count
|
||||
#在dynamics里解析出四种动态
|
||||
expose :documents,using:Mobile::Entities::Attachment do |f,opt|
|
||||
obj = nil
|
||||
f[:dynamics].each do |d|
|
||||
if d[:type] == 3
|
||||
obj = d[:documents]
|
||||
end
|
||||
end
|
||||
obj
|
||||
end
|
||||
expose :topics,using:Mobile::Entities::Message do |f,opt|
|
||||
obj = nil
|
||||
f[:dynamics].each do |d|
|
||||
if d[:type] == 2
|
||||
obj = d[:topics]
|
||||
end
|
||||
end
|
||||
obj
|
||||
end
|
||||
expose :homeworks,using:Mobile::Entities::Homework do |f,opt|
|
||||
obj = nil
|
||||
f[:dynamics].each do |d|
|
||||
if d[:type] == 4
|
||||
obj = d[:homeworks]
|
||||
end
|
||||
end
|
||||
obj
|
||||
end
|
||||
|
||||
expose :news,using:Mobile::Entities::News do |f,opt|
|
||||
obj = nil
|
||||
f[:dynamics].each do |d|
|
||||
if d[:type] == 1
|
||||
obj = d[:news]
|
||||
end
|
||||
end
|
||||
obj
|
||||
end
|
||||
|
||||
expose :better_students,using:Mobile::Entities::User do |f,opt|
|
||||
obj = nil
|
||||
f[:dynamics].each do |d|
|
||||
if d[:type] == 6
|
||||
obj = d[:better_students]
|
||||
end
|
||||
end
|
||||
obj
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,7 +1,10 @@
|
|||
# 这个模块由于作业模块的改变,里边的注释以及属性不可信
|
||||
module Mobile
|
||||
module Entities
|
||||
class Homework < Grape::Entity
|
||||
include Redmine::I18n
|
||||
include ApplicationHelper
|
||||
include ApiHelper
|
||||
def self.homework_expose(field)
|
||||
expose field do |f,opt|
|
||||
if f.is_a?(Hash) && f.key?(field)
|
||||
|
@ -14,7 +17,20 @@ module Mobile
|
|||
if f.respond_to?(field)
|
||||
f.send(field)
|
||||
else
|
||||
|
||||
case field
|
||||
when :homework_name
|
||||
f.send(:name)
|
||||
when :homework_notsubmit_num
|
||||
f.course.members.count - f.student_works.count
|
||||
when :homework_submit_num
|
||||
f.student_works.count
|
||||
when :homework_status
|
||||
get_homework_status f
|
||||
when :homework_times
|
||||
f.course.homework_commons.index(f) + 1
|
||||
when :homework_status_desc
|
||||
homework_status_desc f
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -60,6 +76,15 @@ module Mobile
|
|||
f[:homework_for_anonymous_comments] if f.is_a?(Hash) && f.key?(:homework_for_anonymous_comments)
|
||||
end
|
||||
|
||||
homework_expose :homework_submit_num
|
||||
homework_expose :homework_notsubmit_num
|
||||
|
||||
expose :submit_student_list ,using: Mobile::Entities::User do |f,opt|
|
||||
get_submit_sutdent_list f
|
||||
end
|
||||
homework_expose :homework_status #作业的状态
|
||||
homework_expose :homework_status_desc #状态的解释
|
||||
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,46 @@
|
|||
module Mobile
|
||||
module Entities
|
||||
class Message < Grape::Entity
|
||||
include ApplicationHelper
|
||||
include ApiHelper
|
||||
def self.message_expose(f)
|
||||
expose f do |u,opt|
|
||||
if u.is_a?(Hash) && u.key?(f)
|
||||
u[f]
|
||||
elsif u.is_a?(::Message)
|
||||
if u.respond_to?(f)
|
||||
if f == :created_on
|
||||
format_time( u.send(f))
|
||||
else
|
||||
u.send(f)
|
||||
end
|
||||
else
|
||||
# case f
|
||||
# when :xx
|
||||
# #
|
||||
# end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
expose :user, using: Mobile::Entities::User do |c, opt|
|
||||
if c.is_a?(::Message)
|
||||
c.author
|
||||
end
|
||||
end
|
||||
message_expose :board_id
|
||||
message_expose :subject
|
||||
message_expose :content
|
||||
message_expose :replies_count
|
||||
message_expose :created_on
|
||||
message_expose :id
|
||||
expose :message_children,using:Mobile::Entities::Message do |c,opt|
|
||||
if c.is_a? (::Message)
|
||||
c.children
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -6,6 +6,12 @@ module Mobile
|
|||
expose field do |f,opt|
|
||||
if f.is_a?(Hash) && f.key?(field)
|
||||
f[field]
|
||||
elsif f.is_a?(::News)
|
||||
if field == :created_on
|
||||
format_time(f.send(field)) if f.respond_to?(field)
|
||||
else
|
||||
f.send(field) if f.respond_to?(field)
|
||||
end
|
||||
elsif f.is_a?(Hash) && !f.key?(field)
|
||||
n = f[:news]
|
||||
comments = f[:comments]
|
||||
|
@ -26,13 +32,20 @@ module Mobile
|
|||
news_expose :title
|
||||
|
||||
expose :author,using: Mobile::Entities::User do |f, opt|
|
||||
n = f[:news]
|
||||
n.author if n.respond_to?(:author)
|
||||
obj = nil
|
||||
if f.is_a?(::News) && f.respond_to?(:author)
|
||||
obj = f.send(:author)
|
||||
elsif f.is_a?(Hash) && f.key?(:author)
|
||||
obj = f[:author]
|
||||
end
|
||||
obj
|
||||
end
|
||||
#作者id
|
||||
news_expose :author_id
|
||||
#作者名
|
||||
news_expose :author_name
|
||||
#作者头像url
|
||||
news_expose :author_img_url
|
||||
#新闻内容
|
||||
news_expose :description
|
||||
#发布时间
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
module Mobile
|
||||
module Entities
|
||||
class StudentWork < Grape::Entity
|
||||
include ApplicationHelper
|
||||
include ApiHelper
|
||||
def self.student_work_expose(f)
|
||||
expose f do |u,opt|
|
||||
if u.is_a?(Hash) && u.key?(f)
|
||||
u[f]
|
||||
elsif u.is_a?(::StudentWork)
|
||||
if u.respond_to?(f)
|
||||
if f == :created_at
|
||||
format_time(u.send(:created_at))
|
||||
else
|
||||
u.send(f)
|
||||
end
|
||||
|
||||
else
|
||||
case f
|
||||
when :student_id
|
||||
u.user.user_extensions.student_id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
expose :user, using: Mobile::Entities::User do |c, opt|
|
||||
if c.is_a?(::StudentWork)
|
||||
c.user
|
||||
end
|
||||
end
|
||||
student_work_expose :student_id
|
||||
student_work_expose :id
|
||||
student_work_expose :name
|
||||
student_work_expose :description
|
||||
student_work_expose :final_score
|
||||
student_work_expose :teacher_score
|
||||
student_work_expose :student_score
|
||||
student_work_expose :teacher_asistant_score
|
||||
student_work_expose :created_at
|
||||
end
|
||||
end
|
||||
end
|
|
@ -22,6 +22,8 @@ module Mobile
|
|||
get_user_location u unless u.user_extensions.nil?
|
||||
when :brief_introduction
|
||||
u.nil? || u.user_extensions.nil? ? "" : u.user_extensions.brief_introduction
|
||||
when :student_num
|
||||
u.nil? || u.user_extensions.nil? ? "" : u.user_extensions.student_id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -47,6 +49,10 @@ module Mobile
|
|||
user_expose :location
|
||||
#签名
|
||||
user_expose :brief_introduction
|
||||
#总成绩
|
||||
user_expose :score
|
||||
#学号
|
||||
user_expose :student_num
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ class ActivityNotifysController < ApplicationController
|
|||
# accept_rss_auth :index, :show
|
||||
|
||||
helper :activities
|
||||
helper :attachments
|
||||
def index
|
||||
query = nil
|
||||
if @course
|
||||
|
|
|
@ -34,13 +34,21 @@ class AdminController < ApplicationController
|
|||
def projects
|
||||
@status = params[:status] || 1
|
||||
|
||||
scope = Project.status(@status).order('lft')
|
||||
scope = Project.status(@status).order('id asc')
|
||||
scope = scope.like(params[:name]) if params[:name].present?
|
||||
@projects = scope.where(project_type: Project::ProjectType_project).all
|
||||
|
||||
render :action => "projects", :layout => false if request.xhr?
|
||||
end
|
||||
|
||||
def courses
|
||||
@name = params[:name]
|
||||
@courses = Course.like(@name)
|
||||
respond_to do |format|
|
||||
format.html
|
||||
end
|
||||
end
|
||||
|
||||
def users
|
||||
sort_init 'login', 'asc'
|
||||
sort_update %w(login firstname lastname mail admin created_on last_login_on)
|
||||
|
|
|
@ -388,7 +388,7 @@ class AttachmentsController < ApplicationController
|
|||
end
|
||||
rescue NoMethodError
|
||||
@save_flag = false
|
||||
@save_message = [] << l(:label_course_empty_select)
|
||||
@save_message = [] << l(:label_project_empty_select)
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
|
|
@ -34,6 +34,20 @@ class CommentsController < ApplicationController
|
|||
ids = params[:asset_id].split(',')
|
||||
update_kindeditor_assets_owner ids,@comment.id,OwnerTypeHelper::COMMENT
|
||||
end
|
||||
# 与我相关动态的记录add start
|
||||
if( @comment.id && @news.course )
|
||||
if(@news.author_id != User.current.id)
|
||||
notify = ActivityNotify.new()
|
||||
notify.activity_container_id = @news.course.id
|
||||
notify.activity_container_type = 'Course'
|
||||
notify.activity_id = @comment.id
|
||||
notify.activity_type = 'Comment'
|
||||
notify.notify_to = @news.author_id
|
||||
notify.is_read = 0
|
||||
notify.save()
|
||||
end
|
||||
end
|
||||
# 与我相关动态的记录add end
|
||||
flash[:notice] = l(:label_comment_added)
|
||||
end
|
||||
|
||||
|
|
|
@ -443,26 +443,19 @@ class CoursesController < ApplicationController
|
|||
def create
|
||||
cs = CoursesService.new
|
||||
@course = cs.create_course(params,User.current)[:course]
|
||||
if @course.new_record?
|
||||
if @course
|
||||
respond_to do |format|
|
||||
format.html { render :action => 'new', :layout => 'new_base' } #Added by young
|
||||
format.api { render_validation_errors(@course) }
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
format.html {redirect_to settings_course_url(@course, :course_type => 1)}
|
||||
format.api { render :action => 'show', :status => :created, :location => url_for(:controller => 'courses', :action => 'show', :id => @course.id) }
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
# render :layout => 'base_courses'
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
if params[:continue]
|
||||
redirect_to new_course_url(attrs, :course => '0')
|
||||
elsif params[:course_continue]
|
||||
redirect_to new_course_url(:course => '1')
|
||||
else
|
||||
redirect_to settings_course_url(@course, :course_type => 1)
|
||||
end
|
||||
}
|
||||
format.api { render :action => 'show', :status => :created, :location => url_for(:controller => 'courses', :action => 'show', :id => @course.id) }
|
||||
end
|
||||
flash[:notice] = l(:notice_create_failed)
|
||||
# @course = Course.new
|
||||
format.html { redirect_to new_course_path } #Added by young
|
||||
format.api { render_validation_errors(@course) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -532,7 +525,7 @@ class CoursesController < ApplicationController
|
|||
@trackers = Tracker.sorted.all
|
||||
@course = Course.new
|
||||
@course.safe_attributes = params[:course]
|
||||
month = Time.now.month
|
||||
# month = Time.now.month
|
||||
render :layout => 'new_base'
|
||||
end
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class FilesController < ApplicationController
|
|||
obj.each do |container|
|
||||
@attachments += container.attachments
|
||||
end
|
||||
@all_attachments = visable_attachemnts(@attachments)
|
||||
@all_attachments = User.current.admin? ? @attachments : visable_attachemnts(@attachments)
|
||||
@limit = 10
|
||||
@feedback_count = @all_attachments.count
|
||||
@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#added by baiyu
|
||||
class GitUsageController < ApplicationController
|
||||
layout "project_base"
|
||||
layout "new_base"
|
||||
def ch_usage
|
||||
|
||||
end
|
||||
|
|
|
@ -91,16 +91,39 @@ class HomeworkCommonController < ApplicationController
|
|||
@homework.end_time = params[:homework_common][:end_time]
|
||||
@homework.publish_time = params[:homework_common][:publish_time]
|
||||
@homework.homework_type = params[:homework_common][:homework_type]
|
||||
@homework.late_penalty = params[:late_penalty]
|
||||
@homework.user_id = User.current.id
|
||||
unless @homework.late_penalty == params[:late_penalty]
|
||||
@homework.student_works.where("created_at > '#{@homework.end_time} 23:59:59'").each do |student_work|
|
||||
student_work.late_penalty = params[:late_penalty]
|
||||
student_work.save
|
||||
end
|
||||
@homework.late_penalty = params[:late_penalty]
|
||||
end
|
||||
@homework.course_id = @course.id
|
||||
|
||||
#匿评作业相关属性
|
||||
@homework_detail_manual.ta_proportion = params[:ta_proportion] || 0.6
|
||||
@homework_detail_manual.evaluation_start = params[:evaluation_start]
|
||||
@homework_detail_manual.evaluation_end = params[:evaluation_end]
|
||||
@homework_detail_manual.evaluation_num = params[:evaluation_num]
|
||||
@homework_detail_manual.absence_penalty = params[:absence_penalty]
|
||||
if @homework.homework_type == 1
|
||||
@homework_detail_manual.ta_proportion = params[:ta_proportion] || 0.6
|
||||
@homework_detail_manual.evaluation_start = params[:evaluation_start]
|
||||
@homework_detail_manual.evaluation_end = params[:evaluation_end]
|
||||
@homework_detail_manual.evaluation_num = params[:evaluation_num]
|
||||
unless @homework_detail_manual.absence_penalty == params[:absence_penalty]
|
||||
if @homework_detail_manual.comment_status == 3 #当前作业处于匿评结束状态,修改缺评扣分才会修改每个作品应扣分的值
|
||||
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"
|
||||
@homework.student_works.each do |student_work|
|
||||
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
|
||||
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
|
||||
student_work.save
|
||||
end
|
||||
end
|
||||
@homework_detail_manual.absence_penalty = params[:absence_penalty]
|
||||
end
|
||||
else #不是匿评作业,缺评扣分为0分,每个作品的缺评扣分改为0分,防止某些作业在结束匿评之后改为普通作业
|
||||
@homework.student_works.where("absence_penalty != 0").each do |student_work|
|
||||
student_work.late_penalty = 0
|
||||
student_work.save
|
||||
end
|
||||
@homework_detail_manual.absence_penalty = 0
|
||||
end
|
||||
|
||||
@homework.save_attachments(params[:attachments])
|
||||
render_attachment_warning_if_needed(@homework)
|
||||
|
@ -135,6 +158,7 @@ class HomeworkCommonController < ApplicationController
|
|||
#statue 1:启动成功,2:启动失败,作业总数大于等于2份时才能启动匿评,3:已开启匿评,请务重复开启,4:没有开启匿评的权限
|
||||
def start_anonymous_comment
|
||||
@statue =4 and return unless User.current.admin? || User.current.allowed_to?(:as_teacher,@course)
|
||||
@statue = 5 and return if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
||||
if @homework_detail_manual.comment_status == 1
|
||||
student_works = @homework.student_works
|
||||
if student_works && student_works.size >=2
|
||||
|
@ -161,6 +185,14 @@ class HomeworkCommonController < ApplicationController
|
|||
#关闭匿评
|
||||
def stop_anonymous_comment
|
||||
@homework_detail_manual.update_column('comment_status', 3)
|
||||
|
||||
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"
|
||||
@homework.student_works.each do |student_work|
|
||||
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
|
||||
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
|
||||
student_work.save
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
@ -206,7 +238,7 @@ class HomeworkCommonController < ApplicationController
|
|||
|
||||
#当前用户是不是课程的成员
|
||||
def member_of_course
|
||||
render_403 unless User.current.member_of_course?(@course) || User.current.admin?
|
||||
render_403 unless @course.is_public || User.current.member_of_course?(@course) || User.current.admin?
|
||||
end
|
||||
|
||||
def get_assigned_homeworks(student_works, n, index)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class IssueCategoriesController < ApplicationController
|
||||
layout "project_base"
|
||||
layout "base_projects"
|
||||
menu_item :settings
|
||||
model_object IssueCategory
|
||||
before_filter :find_model_object, :except => [:index, :new, :create]
|
||||
|
|
|
@ -74,6 +74,7 @@ class JournalsController < ApplicationController
|
|||
text = text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]')
|
||||
@content = "> #{ll(Setting.default_language, :text_user_wrote, user)}\n> "
|
||||
@content << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
|
||||
# @content = "<blockquote style='word-break: break-all;word-wrap: break-word;'>" << @content
|
||||
@id = user.id
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
render_404
|
||||
|
|
|
@ -141,6 +141,21 @@ class NewsController < ApplicationController
|
|||
ids = params[:asset_id].split(',')
|
||||
update_kindeditor_assets_owner ids,@news.id,OwnerTypeHelper::NEWS
|
||||
end
|
||||
# 与我相关动态的记录add start
|
||||
teachers = searchTeacherAndAssistant(@course)
|
||||
for teacher in teachers
|
||||
if(teacher.user_id != User.current.id)
|
||||
notify = ActivityNotify.new()
|
||||
notify.activity_container_id = @course.id
|
||||
notify.activity_container_type = 'Course'
|
||||
notify.activity_id = @news.id
|
||||
notify.activity_type = 'News'
|
||||
notify.notify_to = teacher.user_id
|
||||
notify.is_read = 0
|
||||
notify.save()
|
||||
end
|
||||
end
|
||||
# 与我相关动态的记录add end
|
||||
render_attachment_warning_if_needed(@news)
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
redirect_to course_news_index_url(@course)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class OrganizationController < ApplicationController
|
||||
layout 'project_base'
|
||||
layout 'base_projects'
|
||||
before_filter :require_admin, :except => [:index]
|
||||
|
||||
def index
|
||||
|
|
|
@ -438,9 +438,9 @@ class ProjectsController < ApplicationController
|
|||
case params[:role]
|
||||
when '1'
|
||||
@subPage_title = l :label_teacher_list
|
||||
@members = searchTeacherAndAssistant(@project)
|
||||
@members = searchTeacherAndAssistant(@project)
|
||||
when '2'
|
||||
@subPage_title = l :label_student_list
|
||||
@subPage_title = l :label_student_list
|
||||
@members = searchStudent(@project)
|
||||
else
|
||||
@subPage_title = ''
|
||||
|
@ -578,7 +578,7 @@ class ProjectsController < ApplicationController
|
|||
format.api { render_api_ok }
|
||||
end
|
||||
else
|
||||
render :layout => "project_base"
|
||||
render :layout => "base_projects"
|
||||
end
|
||||
# hide project in layout
|
||||
@project = nil
|
||||
|
@ -586,7 +586,7 @@ class ProjectsController < ApplicationController
|
|||
|
||||
def show_projects_score
|
||||
respond_to do |format|
|
||||
format.html { render :layout => "project_base"}
|
||||
format.html { render :layout => "base_projects"}
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
@ -674,10 +674,10 @@ class ProjectsController < ApplicationController
|
|||
private
|
||||
|
||||
def memberAccess
|
||||
# 是课程,则判断当前用户是否参加了课程
|
||||
# return 0 if @project.project_type == Project::ProjectType_project
|
||||
# currentUser = User.current
|
||||
render_403 unless User.current.member_of?(@project)
|
||||
# 如果是私有项目,项目成员不对外公开,公开项目成员列表对外公开。
|
||||
unless @project.is_public?
|
||||
render_403 unless User.current.member_of?(@project)
|
||||
end
|
||||
end
|
||||
|
||||
def toggleCourse
|
||||
|
|
|
@ -72,6 +72,22 @@ class StoresController < ApplicationController
|
|||
l(:label_borad_project), #l(:label_contest_innovate),
|
||||
l(:label_forum) ]
|
||||
end
|
||||
|
||||
#缺失文件列表
|
||||
def lost_file
|
||||
attachments = []
|
||||
Attachment.where("container_id is not null and container_type is not null and container_type <> 'Bid' and container_type <> 'HomeworkAttach'").each do |attachment|
|
||||
unless File.exist?(attachment.diskfile)
|
||||
attachments << attachment
|
||||
end
|
||||
end
|
||||
respond_to do |format|
|
||||
format.xls {
|
||||
send_data(homework_to_xls(attachments), :type => "text/excel;charset=utf-8; header=present",
|
||||
:filename => "#{l(:label_file_lost_list)}.xls")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
|
@ -117,4 +133,27 @@ class StoresController < ApplicationController
|
|||
else
|
||||
end
|
||||
end
|
||||
|
||||
#作品列表转换为excel
|
||||
def homework_to_xls attachments
|
||||
xls_report = StringIO.new
|
||||
book = Spreadsheet::Workbook.new
|
||||
sheet1 = book.create_worksheet :name => "homework"
|
||||
blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10
|
||||
sheet1.row(0).default_format = blue
|
||||
sheet1.row(0).concat(["文件ID","文件名","硬盘路径","上传时间","是否公开","所属对象","所属对象Id"])
|
||||
count_row = 1
|
||||
attachments.each do |attachment|
|
||||
sheet1[count_row,0] = attachment.id
|
||||
sheet1[count_row,1] = attachment.filename
|
||||
sheet1[count_row,2] = attachment.diskfile
|
||||
sheet1[count_row,3] = format_time(attachment.created_on)
|
||||
sheet1[count_row,4] = (attachment.is_public == 1 || attachment.is_public) ? "是" :"否"
|
||||
sheet1[count_row,5] = attachment.container_type
|
||||
sheet1[count_row,6] = attachment.container_id
|
||||
count_row += 1
|
||||
end
|
||||
book.write xls_report
|
||||
xls_report.string
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,38 +2,39 @@ class StudentWorkController < ApplicationController
|
|||
layout "base_courses"
|
||||
include StudentWorkHelper
|
||||
require 'bigdecimal'
|
||||
before_filter :find_homework, :only => [:new, :index, :create, :student_work_absence_penalty]
|
||||
before_filter :find_homework, :only => [:new, :index, :create, :student_work_absence_penalty, :absence_penalty_list, :evaluation_list]
|
||||
before_filter :find_work, :only => [:edit, :update, :show, :destroy, :add_score, :praise_student_work]
|
||||
before_filter :member_of_course, :only => [:index, :new, :create, :show, :add_score, :praise_student_work]
|
||||
before_filter :author_of_work, :only => [:edit, :update, :destroy]
|
||||
before_filter :teacher_of_course, :only => [:student_work_absence_penalty, :absence_penalty_list, :evaluation_list]
|
||||
|
||||
def index
|
||||
@order,@b_sort,@name = params[:order] || "final_score",params[:sort] || "desc",params[:name] || ""
|
||||
@order,@b_sort,@name = params[:order] || "score",params[:sort] || "desc",params[:name] || ""
|
||||
@is_teacher = User.current.allowed_to?(:as_teacher,@course)
|
||||
#老师 || 非匿评作业 || 匿评结束 显示所有的作品
|
||||
@show_all = @is_teacher || @homework.homework_type != 1 || @homework.homework_detail_manual.comment_status == 3
|
||||
@show_all = @is_teacher || @homework.homework_type != 1 || @homework.homework_detail_manual.comment_status == 3 || User.current.admin?
|
||||
if @show_all
|
||||
if @homework.homework_type == 1 || @is_teacher || User.current.admin?
|
||||
if @homework.homework_type == 1 || @is_teacher || User.current.admin? #超级管理员 || 老师 || 匿评结束 显示所有的作品
|
||||
if @order == "name"
|
||||
@stundet_works = search_homework_member @homework.student_works.joins(:user).order("users.lastname #{@b_sort}, users.firstname #{@b_sort}"),@name
|
||||
@stundet_works = search_homework_member @homework.student_works.select("*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").joins(:user).order("users.lastname #{@b_sort}, users.firstname #{@b_sort}"),@name
|
||||
else
|
||||
@stundet_works = search_homework_member @homework.student_works.order("#{@order} #{@b_sort}"),@name
|
||||
@stundet_works = search_homework_member @homework.student_works.select("*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name
|
||||
end
|
||||
else
|
||||
my_work = @homework.student_works.where(:user_id => User.current.id)
|
||||
else #剩余情况: 学生 && 非匿评作业 如果未提交作品,只能看到自己的,提交了作品,能看到所有作品
|
||||
my_work = @homework.student_works.select("*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id)
|
||||
if my_work.empty?
|
||||
@stundet_works = []
|
||||
else
|
||||
if @order == "name"
|
||||
@stundet_works = search_homework_member @homework.student_works.joins(:user).order("users.lastname #{@b_sort}, users.firstname #{@b_sort}"),@name
|
||||
@stundet_works = search_homework_member @homework.student_works.select("*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").joins(:user).order("users.lastname #{@b_sort}, users.firstname #{@b_sort}"),@name
|
||||
else
|
||||
@stundet_works = search_homework_member @homework.student_works.order("#{@order} #{@b_sort}"),@name
|
||||
@stundet_works = search_homework_member @homework.student_works.select("*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name
|
||||
end
|
||||
end
|
||||
end
|
||||
else #学生
|
||||
if @homework.homework_detail_manual.comment_status == 1 #未开启匿评,只显示我的作品
|
||||
@stundet_works = @homework.student_works.where(:user_id => User.current.id)
|
||||
@stundet_works = @homework.student_works.select("*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id)
|
||||
elsif @homework.homework_detail_manual.comment_status == 2 #匿评列表,显示匿评作品和我的作品
|
||||
@is_evaluation = true
|
||||
my_work = @homework.student_works.where(:user_id => User.current.id)
|
||||
|
@ -41,6 +42,7 @@ class StudentWorkController < ApplicationController
|
|||
end
|
||||
end
|
||||
@homework_commons = @course.homework_commons.order("created_at desc")
|
||||
@homework_commons = @course.homework_commons.order("created_at desc")
|
||||
@score = @b_sort == "desc" ? "asc" : "desc"
|
||||
respond_to do |format|
|
||||
format.html
|
||||
|
@ -72,6 +74,11 @@ class StudentWorkController < ApplicationController
|
|||
stundet_work.homework_common_id = @homework.id
|
||||
stundet_work.user_id = User.current.id
|
||||
stundet_work.save_attachments(params[:attachments])
|
||||
if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d")
|
||||
stundet_work.late_penalty = @homework.late_penalty
|
||||
else
|
||||
stundet_work.late_penalty = 0
|
||||
end
|
||||
render_attachment_warning_if_needed(stundet_work)
|
||||
if stundet_work.save
|
||||
respond_to do |format|
|
||||
|
@ -241,25 +248,61 @@ class StudentWorkController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
#评价列表显示
|
||||
#缺评列表显示
|
||||
def student_work_absence_penalty
|
||||
render_403 unless User.current.allowed_to?(:as_teacher,@course)
|
||||
order = params[:order] || "desc"
|
||||
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"
|
||||
@stundet_works = StudentWork.find_by_sql("SELECT *,(all_count - has_count) AS absence FROM(
|
||||
if @homework.student_works.empty?
|
||||
@stundet_works = []
|
||||
else
|
||||
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"
|
||||
@stundet_works = StudentWork.find_by_sql("SELECT *,(all_count - has_count) AS absence FROM(
|
||||
SELECT * ,
|
||||
(SELECT COUNT(*) FROM `student_works_evaluation_distributions` WHERE user_id = student_works.user_id AND student_work_id IN #{work_ids}) AS all_count,
|
||||
(SELECT COUNT(*) FROM `student_works_scores` WHERE user_id = student_works.user_id AND student_work_id IN #{work_ids}) AS has_count
|
||||
FROM `student_works`
|
||||
WHERE homework_common_id = #{@homework.id}
|
||||
) AS table_1
|
||||
ORDER BY absence #{order}")
|
||||
) AS table_1
|
||||
ORDER BY absence #{order}")
|
||||
end
|
||||
@order = order == "desc" ? "asc" : "desc"
|
||||
respond_to do |format|
|
||||
format.html
|
||||
end
|
||||
end
|
||||
|
||||
#导出缺评列表
|
||||
def absence_penalty_list
|
||||
if @homework.student_works.empty?
|
||||
@stundet_works = []
|
||||
else
|
||||
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"
|
||||
@stundet_works = StudentWork.find_by_sql("SELECT * FROM (SELECT *,(all_count - has_count) AS absence FROM(
|
||||
SELECT * ,
|
||||
(SELECT COUNT(*) FROM `student_works_evaluation_distributions` WHERE user_id = student_works.user_id AND student_work_id IN #{work_ids}) AS all_count,
|
||||
(SELECT COUNT(*) FROM `student_works_scores` WHERE user_id = student_works.user_id AND student_work_id IN #{work_ids}) AS has_count
|
||||
FROM `student_works`
|
||||
WHERE homework_common_id = #{@homework.id}
|
||||
) AS table_1) AS table_2
|
||||
where absence > 0 order by absence")
|
||||
end
|
||||
respond_to do |format|
|
||||
format.xls {
|
||||
send_data(absence_penalty_list_xls(@stundet_works), :type => "text/excel;charset=utf-8; header=present",
|
||||
:filename => "#{@course.teacher.lastname.to_s + @course.teacher.firstname}_#{@course.name}_#{@course.time.to_s + @course.term}_#{@homework.name}#{l(:excel_absence_list)}.xls")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
#导出匿评列表
|
||||
def evaluation_list
|
||||
respond_to do |format|
|
||||
format.xls {
|
||||
send_data(evaluation_list_xls(@homework.student_works), :type => "text/excel;charset=utf-8; header=present",
|
||||
:filename => "#{@course.teacher.lastname.to_s + @course.teacher.firstname}_#{@course.name}_#{@course.time.to_s + @course.term}_#{@homework.name}#{l(:excel_evaluation_list)}.xls")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
#获取作业
|
||||
def find_homework
|
||||
|
@ -280,7 +323,7 @@ class StudentWorkController < ApplicationController
|
|||
#是不是当前课程的成员
|
||||
#当前课程成员才可以看到作品列表
|
||||
def member_of_course
|
||||
render_403 unless User.current.member_of_course? @course || User.current.admin?
|
||||
render_403 unless User.current.member_of_course?(@course) || User.current.admin?
|
||||
end
|
||||
|
||||
#判断是不是当前作品的提交者
|
||||
|
@ -289,6 +332,10 @@ class StudentWorkController < ApplicationController
|
|||
render_403 unless (User.current.id == @work.user_id || User.current.admin?) && (@homework.homework_type != 1 || @homework.homework_detail_manual.comment_status == 1 )
|
||||
end
|
||||
|
||||
def teacher_of_course
|
||||
render_403 unless User.current.allowed_to?(:as_teacher,@course)
|
||||
end
|
||||
|
||||
#根据条件过滤作业结果
|
||||
def search_homework_member homeworks,name
|
||||
name = name.downcase
|
||||
|
@ -298,6 +345,7 @@ class StudentWorkController < ApplicationController
|
|||
select_homework
|
||||
end
|
||||
|
||||
#作品列表转换为excel
|
||||
def homework_to_xls items
|
||||
xls_report = StringIO.new
|
||||
book = Spreadsheet::Workbook.new
|
||||
|
@ -324,4 +372,55 @@ class StudentWorkController < ApplicationController
|
|||
book.write xls_report
|
||||
xls_report.string
|
||||
end
|
||||
|
||||
#缺评列表转换为excel
|
||||
def absence_penalty_list_xls items
|
||||
xls_report = StringIO.new
|
||||
book = Spreadsheet::Workbook.new
|
||||
sheet1 = book.create_worksheet :name => "homework"
|
||||
blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10
|
||||
sheet1.row(0).default_format = blue
|
||||
|
||||
sheet1.row(0).concat([l(:excel_student_id),l(:excel_nickname),l(:excel_user_name),l(:lable_all_penalty),l(:lable_has_penalty),l(:lable_absence_penalty)])
|
||||
count_row = 1
|
||||
items.each do |homework|
|
||||
sheet1[count_row,0] = homework.user.user_extensions.student_id
|
||||
sheet1[count_row,1] = homework.user.login
|
||||
sheet1[count_row,2] = homework.user.lastname.to_s + homework.user.firstname.to_s
|
||||
sheet1[count_row,3] = homework.all_count
|
||||
sheet1[count_row,4] = homework.has_count
|
||||
sheet1[count_row,5] = homework.absence
|
||||
count_row += 1
|
||||
end
|
||||
book.write xls_report
|
||||
xls_report.string
|
||||
end
|
||||
|
||||
#匿评列表转换为excel
|
||||
def evaluation_list_xls items
|
||||
xls_report = StringIO.new
|
||||
book = Spreadsheet::Workbook.new
|
||||
sheet1 = book.create_worksheet :name => "homework"
|
||||
blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10
|
||||
sheet1.row(0).default_format = blue
|
||||
|
||||
sheet1.row(0).concat([l(:label_work_name),l(:label_work_id),l(:label_work_autor),l(:label_evaluation_id),l(:label_evaluation_name),
|
||||
l(:label_evaluation_score),l(:label_evaluation_common),l(:label_evaluation_time)])
|
||||
count_row = 1
|
||||
items.each do |homework|
|
||||
homework.student_works_scores.where(:reviewer_role => 3).each do |score|
|
||||
sheet1[count_row,0] = homework.name
|
||||
sheet1[count_row,1] = homework.user.user_extensions.student_id
|
||||
sheet1[count_row,2] = homework.user.show_name
|
||||
sheet1[count_row,3] = score.user.user_extensions.student_id
|
||||
sheet1[count_row,4] = score.user.show_name
|
||||
sheet1[count_row,5] = score.score
|
||||
sheet1[count_row,6] = score.comment
|
||||
sheet1[count_row,7] = format_time(score.created_at)
|
||||
count_row += 1
|
||||
end
|
||||
end
|
||||
book.write xls_report
|
||||
xls_report.string
|
||||
end
|
||||
end
|
|
@ -1,3 +1,4 @@
|
|||
# encoding: utf-8
|
||||
module ApiHelper
|
||||
#获取用户的工作单位
|
||||
def get_user_work_unit user
|
||||
|
@ -64,4 +65,73 @@ module ApiHelper
|
|||
def get_user_language user
|
||||
(user.language.nil? || user.language == "") ? 'zh':user.language
|
||||
end
|
||||
|
||||
# 获取课程作业的状态
|
||||
def get_homework_status homework
|
||||
homework_status = ""
|
||||
if !homework.nil?
|
||||
if homework.homework_type == 1 && homework.homework_detail_manual
|
||||
case homework.homework_detail_manual.comment_status
|
||||
when 1
|
||||
homework_status = show_homework_deadline homework
|
||||
when 2
|
||||
homework_status = "正在匿评中"
|
||||
when 3
|
||||
homework_status = "匿评已结束"
|
||||
end
|
||||
elsif homework.homework_type == 0
|
||||
homework_status = "未启用匿评"
|
||||
elsif homework.homework_type == 2
|
||||
homework_status = "编程作业"
|
||||
else
|
||||
end
|
||||
end
|
||||
homework_status
|
||||
end
|
||||
|
||||
#获取作业的是否可以匿评的描述
|
||||
def homework_status_desc homework
|
||||
if homework.homework_type == 1 && homework.homework_detail_manual #匿评作业
|
||||
if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
||||
link = "截止日期之前不可启动匿评"
|
||||
elsif homework.student_works.count >= 2 #作业份数大于2
|
||||
case homework.homework_detail_manual.comment_status
|
||||
when 1
|
||||
link = '启动匿评'
|
||||
when 2
|
||||
link = '关闭匿评'
|
||||
when 3
|
||||
link = " 匿评结束"
|
||||
end
|
||||
else
|
||||
link = "提交作业数大于2才可启动匿评"
|
||||
end
|
||||
else
|
||||
link = "未开启匿评作业不可启动匿评"
|
||||
end
|
||||
link
|
||||
end
|
||||
|
||||
#获取
|
||||
def get_submit_sutdent_list homework
|
||||
studentlist = []
|
||||
if homework.is_a?(Hash) && homework.key?(:studentlist)
|
||||
studentlist = homework[:studentlist]
|
||||
else
|
||||
homework.student_works.order("created_at desc").page(1).per(6).each do |work|
|
||||
studentlist << work.user
|
||||
end
|
||||
end
|
||||
studentlist
|
||||
end
|
||||
|
||||
#计算作业的截止日期,剩余日期
|
||||
def show_homework_deadline homework
|
||||
day = 0
|
||||
if (day = (Date.parse(homework.end_time.to_s) - Date.parse(Time.now.to_s)).to_i) > 0
|
||||
"距作业截止还有" << (Date.parse(Time.now.to_s) - Date.parse(homework.end_time.to_s)).to_i.to_s << "天"
|
||||
else
|
||||
"已截止,但可补交"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -2278,7 +2278,9 @@ module ApplicationHelper
|
|||
#获取匿评相关连接代码
|
||||
def homework_anonymous_comment homework
|
||||
if homework.homework_type == 1 && homework.homework_detail_manual #匿评作业
|
||||
if homework.student_works.count >= 2 #作业份数大于2
|
||||
if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
||||
link = "<span class='fr mr10 pr_join_span ' title='作业截止日期之前不可以启动匿评'>启动匿评</span>".html_safe
|
||||
elsif homework.student_works.count >= 2 #作业份数大于2
|
||||
case homework.homework_detail_manual.comment_status
|
||||
when 1
|
||||
link = link_to '启动匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_start_anonymous_comment", remote: true, disable_with: '加载中...',:class => 'fr mr10 work_edit'
|
||||
|
|
|
@ -35,7 +35,7 @@ module CoursesHelper
|
|||
|
||||
#生成课程老师成员链接
|
||||
def course_teacher_link teacher_num
|
||||
if User.current.member_of_course?(@course)
|
||||
if User.current.member_of_course?(@course) || User.current.admin?
|
||||
link_to "#{teacher_num}", course_member_path(@course, :role => 1), :class => 'info_foot_num c_blue'
|
||||
else
|
||||
content_tag 'span',teacher_num, :class => 'info_foot_num c_blue'
|
||||
|
@ -44,7 +44,7 @@ module CoursesHelper
|
|||
|
||||
#生成课程学生列表连接
|
||||
def course_student_link student_num
|
||||
if (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course))
|
||||
if (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin?
|
||||
link_to "#{student_num}", course_member_path(@course, :role => 2), :class => 'info_foot_num c_blue'
|
||||
else
|
||||
content_tag 'span',student_num, :class => 'info_foot_num c_blue'
|
||||
|
|
|
@ -15,7 +15,7 @@ module HomeworkCommonHelper
|
|||
#教辅评分比例下拉框
|
||||
def ta_proportion_option
|
||||
type = []
|
||||
i = 10
|
||||
i = 0
|
||||
while i <= 100
|
||||
option = []
|
||||
option << i.to_s + "%"
|
||||
|
|
|
@ -361,16 +361,15 @@ module IssuesHelper
|
|||
end
|
||||
end
|
||||
|
||||
# 之所以注释是因为该功能冗余了
|
||||
if detail.property == 'attr' && detail.prop_key == 'description'
|
||||
s = l(:text_journal_changed_no_detail, :label => label)
|
||||
# unless no_html
|
||||
# diff_link = link_to l(:label_diff),
|
||||
# {:controller => 'journals', :action => 'diff', :id => detail.journal_id,
|
||||
# :detail_id => detail.id, :only_path => options[:only_path]},
|
||||
# :title => l(:label_view_diff)
|
||||
# s << " (#{ diff_link })"
|
||||
# end
|
||||
unless no_html
|
||||
diff_link = link_to l(:label_diff),
|
||||
{:controller => 'journals', :action => 'diff', :id => detail.journal_id,
|
||||
:detail_id => detail.id, :only_path => options[:only_path]},
|
||||
:title => l(:label_view_diff)
|
||||
s << " (#{ diff_link })"
|
||||
end
|
||||
s.html_safe
|
||||
elsif detail.value.present?
|
||||
case detail.property
|
||||
|
|
|
@ -19,6 +19,14 @@ class Comment < ActiveRecord::Base
|
|||
include Redmine::SafeAttributes
|
||||
include ApplicationHelper
|
||||
has_many_kindeditor_assets :assets, :dependent => :destroy
|
||||
|
||||
has_many :ActivityNotifies,:as => :activity, :dependent => :destroy
|
||||
acts_as_event :datetime => :updated_on,
|
||||
:description => :comments,
|
||||
:type => 'news',
|
||||
:title=>Proc.new {|o| "RE: #{o.commented.title}" },
|
||||
:url => Proc.new {|o| {:controller => 'news', :action => 'show', :id => o.commented.id} }
|
||||
|
||||
belongs_to :commented, :polymorphic => true, :counter_cache => true
|
||||
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
|
||||
validates_presence_of :commented, :author, :comments
|
||||
|
@ -38,4 +46,17 @@ class Comment < ActiveRecord::Base
|
|||
def delete_kindeditor_assets
|
||||
delete_kindeditor_assets_from_disk self.id,OwnerTypeHelper::COMMENT
|
||||
end
|
||||
|
||||
def set_notify_id(notify_id)
|
||||
@notify_id= notify_id
|
||||
end
|
||||
def get_notify_id()
|
||||
return @notify_id
|
||||
end
|
||||
def set_notify_is_read(notify_is_read)
|
||||
@notify_is_read = notify_is_read
|
||||
end
|
||||
def get_notify_is_read()
|
||||
return @notify_is_read
|
||||
end
|
||||
end
|
||||
|
|
|
@ -104,13 +104,13 @@ class Mailer < ActionMailer::Base
|
|||
|
||||
# 查询user的缺陷,项目中成员都能收到
|
||||
sql = "select DISTINCT * from members m, issues i where i.project_id = m.project_id and m.user_id='#{user.id}'
|
||||
and (i.updated_on between '#{date_from}' and '#{date_to}') order by i.updated_on desc"
|
||||
and (i.updated_on between '#{date_from}' and '#{date_to}') order by i.project_id, i.updated_on desc"
|
||||
@issues = Issue.find_by_sql(sql)
|
||||
|
||||
# issue回复
|
||||
@issues_journals = Journal.find_by_sql("select j.* from journals j, members m, projects p, issues i
|
||||
where m.user_id = '#{user.id}' and p.id = m.project_id and i.project_id = p.id and j.journalized_id = i.id
|
||||
and j.journalized_type='Issue' and (j.created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||
and j.journalized_type='Issue' and (j.created_on between '#{date_from}' and '#{date_to}') order by i.project_id, created_on desc")
|
||||
|
||||
# @bids 查询课程作业,包括老师发布的作业,以及user提交作业
|
||||
# @attachments查询课程课件更新
|
||||
|
@ -121,16 +121,16 @@ class Mailer < ActionMailer::Base
|
|||
count = count - 1
|
||||
for i in 0..count do
|
||||
bids = courses[i].homework_commons.where("homework_commons.created_at between '#{date_from}' and '#{date_to}'").order("homework_commons.created_at desc")
|
||||
attachments = courses[i].attachments.where("attachments.created_on between '#{date_from}' and '#{date_to}'").order('attachments.created_on DESC')
|
||||
attachments = courses[i].attachments.where("attachments.created_on between '#{date_from}' and '#{date_to}'")
|
||||
@bids += bids if bids.count > 0
|
||||
@attachments += attachments if attachments.count > 0
|
||||
|
||||
end
|
||||
# @bids = @bids.sort_by { |obj| obj.created_at }
|
||||
end
|
||||
|
||||
# 项目附件
|
||||
@project_attachments = Attachment.find_by_sql("select DISTINCT a.* from members m, attachments a
|
||||
where a.container_id = m.project_id and m.user_id='#{user.id}' and container_type = 'Project' and (a.created_on between '#{date_from}' and '#{date_to}') order by a.created_on desc")
|
||||
where a.container_id = m.project_id and m.user_id='#{user.id}' and container_type = 'Project' and (a.created_on between '#{date_from}' and '#{date_to}') order by m.project_id, a.created_on desc")
|
||||
|
||||
# user 提交的作业
|
||||
# @homeworks = HomeworkAttach.where("user_id=#{user.id} and (created_at between '#{date_from}' and '#{date_to}')").order("created_at desc")
|
||||
|
@ -138,18 +138,18 @@ class Mailer < ActionMailer::Base
|
|||
# 查询user所在项目添加wiki
|
||||
@wiki_contents = WikiContent.find_by_sql("select DISTINCT wc.* from wikis w, members m, projects p, wiki_pages wp, wiki_contents wc where
|
||||
m.user_id = '#{user.id}' and m.project_id = p.id and w.project_id = p.id and w.id = wp.wiki_id and wc.page_id = wp.id and w.project_id>0
|
||||
and (wc.updated_on between '#{date_from}' and '#{date_to}') order by updated_on desc")
|
||||
and (wc.updated_on between '#{date_from}' and '#{date_to}') order by m.project_id, updated_on desc")
|
||||
|
||||
# 查询user在课程中发布的讨论帖子
|
||||
course_mesages = Message.find_by_sql("select DISTINCT me.* from messages me, boards b, members m where
|
||||
b.id = me.board_id and b.course_id = m.course_id
|
||||
and b.course_id is not Null and m.user_id = '#{user.id}'
|
||||
and (me.created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||
and (me.created_on between '#{date_from}' and '#{date_to}') order by m.course_id, created_on desc")
|
||||
|
||||
# 查询user在项目中发布的讨论帖子
|
||||
project_messages = Message.find_by_sql("select DISTINCT me.* from messages me, boards b, members m where
|
||||
b.id = me.board_id and b.project_id = m.project_id
|
||||
and b.project_id != '-1' and m.user_id = '#{user.id}' and (me.created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||
and b.project_id != '-1' and m.user_id = '#{user.id}' and (me.created_on between '#{date_from}' and '#{date_to}') order by m.project_id, created_on desc")
|
||||
# messages = Message.find_by_sql("select DISTINCT * from messages where author_id = #{user.id} and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||
@course_messages ||= []
|
||||
@project_messages ||= []
|
||||
|
@ -168,31 +168,31 @@ class Mailer < ActionMailer::Base
|
|||
# 查询user在课程中发布的通知和回复通知
|
||||
@course_news = (course_ids && !course_ids.empty?) ? News.find_by_sql("select DISTINCT n.* from news n
|
||||
where n.course_id in (#{course_ids})
|
||||
and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc") : []
|
||||
and (created_on between '#{date_from}' and '#{date_to}') order by n.course_id, created_on desc") : []
|
||||
|
||||
@course_news_comments = Comment.find_by_sql("select cm.* from comments cm, members m, courses c, news n
|
||||
where m.user_id = '#{user.id}' and c.id = m.course_id and n.course_id = c.id and cm.commented_id = n.id
|
||||
and cm.commented_type ='News' and (cm.created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||
and cm.commented_type ='News' and (cm.created_on between '#{date_from}' and '#{date_to}') order by m.course_id, created_on desc")
|
||||
|
||||
# 查询user在项目中添加新闻和回复新闻
|
||||
@project_news = (project_ids && !project_ids.empty?) ? News.find_by_sql("select DISTINCT n.* from news n where n.project_id in (#{project_ids})
|
||||
and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc") : []
|
||||
and (created_on between '#{date_from}' and '#{date_to}') order by n.project_id, created_on desc") : []
|
||||
|
||||
@project_news_comments = Comment.find_by_sql("select c.* from comments c, members m, projects p, news n
|
||||
where m.user_id = '#{user.id}' and p.id = m.project_id and n.project_id = p.id and c.commented_id = n.id
|
||||
and c.commented_type ='News' and (c.created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||
and c.commented_type ='News' and (c.created_on between '#{date_from}' and '#{date_to}') order by m.project_id, created_on desc")
|
||||
|
||||
# 查询user在课程及个人中留言
|
||||
@course_journal_messages = JournalsForMessage.find_by_sql("select DISTINCT jfm.* from journals_for_messages jfm, members m, courses c
|
||||
where m.user_id = '#{user.id}' and c.id = m.course_id and jfm.jour_id = c.id
|
||||
and jfm.jour_type='Course' and (jfm.created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||
and jfm.jour_type='Course' and (jfm.created_on between '#{date_from}' and '#{date_to}') order by m.course_id, created_on desc")
|
||||
|
||||
@user_journal_messages = user.journals_for_messages.where("jour_type='Principal' and (created_on between '#{date_from}' and '#{date_to}')").order('created_on DESC')
|
||||
|
||||
# 查询user在项目中留言(用户反馈)
|
||||
@project_journal_messages = JournalsForMessage.find_by_sql("select DISTINCT jfm.* from journals_for_messages jfm, members m, projects p
|
||||
where m.user_id = '#{user.id}' and p.id = m.project_id and jfm.jour_id = p.id
|
||||
and jfm.jour_type='Project' and (jfm.created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||
and jfm.jour_type='Project' and (jfm.created_on between '#{date_from}' and '#{date_to}') order by m.project_id, created_on desc")
|
||||
|
||||
# 查询user新建贴吧或发布帖子
|
||||
@forums = Forum.find_by_sql("select DISTINCT * from forums where creator_id = #{user.id} and (created_at between '#{date_from}' and '#{date_to}') order by created_at desc")
|
||||
|
|
|
@ -9,7 +9,7 @@ class Memo < ActiveRecord::Base
|
|||
# 若是主题帖,则内容可以是空
|
||||
#validates :content, presence: true, if: Proc.new{|o| !o.parent_id.nil? }
|
||||
validates_length_of :subject, maximum: 50
|
||||
#validates_length_of :content, maximum: 3072
|
||||
validates_length_of :content, maximum: 5000
|
||||
validate :cannot_reply_to_locked_topic, :on => :create
|
||||
|
||||
acts_as_tree :counter_cache => :replies_count, :order => "#{Memo.table_name}.created_at ASC"
|
||||
|
|
|
@ -30,6 +30,8 @@ class News < ActiveRecord::Base
|
|||
has_many :forge_acts, :class_name => 'ForgeActivity',:as =>:forge_act ,:dependent => :destroy
|
||||
# end
|
||||
|
||||
has_many :ActivityNotifies,:as => :activity, :dependent => :destroy
|
||||
|
||||
validates_presence_of :title, :description
|
||||
validates_length_of :title, :maximum => 60
|
||||
validates_length_of :summary, :maximum => 255
|
||||
|
@ -85,6 +87,19 @@ class News < ActiveRecord::Base
|
|||
#description
|
||||
end
|
||||
|
||||
def set_notify_id(notify_id)
|
||||
@notify_id= notify_id
|
||||
end
|
||||
def get_notify_id()
|
||||
return @notify_id
|
||||
end
|
||||
def set_notify_is_read(notify_is_read)
|
||||
@notify_is_read = notify_is_read
|
||||
end
|
||||
def get_notify_is_read()
|
||||
return @notify_is_read
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def add_author_as_watcher
|
||||
|
|
|
@ -839,7 +839,7 @@ class Project < ActiveRecord::Base
|
|||
# Yields the given block for each project with its level in the tree
|
||||
def self.project_tree(projects, &block)
|
||||
ancestors = []
|
||||
projects.sort_by(&:lft).each do |project|
|
||||
projects.sort_by(&:id).each do |project|
|
||||
while (ancestors.any? && !project.is_descendant_of?(ancestors.last))
|
||||
ancestors.pop
|
||||
end
|
||||
|
|
|
@ -120,10 +120,10 @@ class CoursesService
|
|||
if current_user.nil? || !(current_user.admin? || @course.is_public == 1 || (@course.is_public == 0 && current_user.member_of_course?(@course)))
|
||||
raise '403'
|
||||
end
|
||||
scope = @course ? @course.news.course_visible(current_user) : News.course_visible(current_user)
|
||||
scope = @course ? @course.news.order("news.created_on desc").course_visible(current_user) : News.order("news.created_on desc").course_visible(current_user)
|
||||
news = []
|
||||
scope.each do |n|
|
||||
news << {:id => n.id,:title => n.title,:author_name => n.author.name,:author_id => n.author.id, :description => n.description,:created_on => format_time(n.created_on),:comments_count => n.comments_count}
|
||||
news << {:id => n.id,:title => n.title,:author_name => n.author.name,:author_id => n.author.id, :author=>n.author, :description => n.description,:created_on => format_time(n.created_on),:comments_count => n.comments_count}
|
||||
end
|
||||
news
|
||||
end
|
||||
|
@ -201,12 +201,14 @@ class CoursesService
|
|||
@course.class_period = params[:class_period].to_i
|
||||
params[:course][:is_public] ? @course.is_public = 1 : @course.is_public = 0
|
||||
params[:course][:open_student] ? @course.open_student = 1 : @course.open_student = 0
|
||||
else
|
||||
|
||||
end
|
||||
|
||||
@issue_custom_fields = IssueCustomField.sorted.all
|
||||
@trackers = Tracker.sorted.all
|
||||
|
||||
if @course.save
|
||||
if @course && @course.save
|
||||
#unless User.current.admin?
|
||||
r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first
|
||||
m = Member.new(:user => current_user, :roles => [r])
|
||||
|
@ -330,7 +332,7 @@ class CoursesService
|
|||
def homework_list params,current_user
|
||||
course = Course.find(params[:id])
|
||||
if course.is_public != 0 || current_user.member_of_course?(course)
|
||||
bids = course.homework_commons.order('end_time DESC')
|
||||
bids = course.homework_commons.page(1).per(20).order('created_at DESC')
|
||||
bids = bids.like(params[:name]) if params[:name].present?
|
||||
homeworks = []
|
||||
bids.each do |bid|
|
||||
|
@ -432,24 +434,15 @@ class CoursesService
|
|||
# 课程课件
|
||||
def course_attachments params
|
||||
result = []
|
||||
@course = Course.find(params[:course_id])
|
||||
@attachments = @course.attachments.order("created_on desc")
|
||||
course = Course.find(params[:course_id])
|
||||
attachments = course.attachments.order("created_on ")
|
||||
if !params[:name].nil? && params[:name] != ""
|
||||
@attachments.each do |atta|
|
||||
result << {:filename => atta.filename,
|
||||
:description => atta.description,
|
||||
:downloads => atta.downloads,
|
||||
:quotes => atta.quotes.nil? ? 0 :atta.quotes } if atta.filename.include?(params[:name])
|
||||
attachments.each do |atta|
|
||||
result << atta if atta.filename.include?(params[:name])
|
||||
|
||||
end
|
||||
else
|
||||
@attachments.each do |atta|
|
||||
result << {:filename => atta.filename,
|
||||
:description => atta.description,
|
||||
:downloads => atta.downloads,
|
||||
:quotes => atta.quotes.nil? ? 0 :atta.quotes }
|
||||
|
||||
end
|
||||
result = attachments
|
||||
end
|
||||
result
|
||||
end
|
||||
|
@ -540,14 +533,35 @@ class CoursesService
|
|||
#student_questions_count = bid.journals_for_messages.where('m_parent_id IS NULL').count
|
||||
description = bid.description
|
||||
#if is_course_teacher(User.current, course) && @bid.open_anonymous_evaluation == 1 && @bid.homeworks.count >= 2
|
||||
state = bid.homework_detail_manual.comment_status
|
||||
#state = bid.homework_detail_manual.comment_status
|
||||
if !bid.nil?
|
||||
if bid.homework_type == 1 && bid.homework_detail_manual
|
||||
case bid.homework_detail_manual.comment_status
|
||||
when 1
|
||||
state = show_homework_deadline bid
|
||||
when 2
|
||||
state = "正在匿评中"
|
||||
when 3
|
||||
state = "匿评已结束"
|
||||
end
|
||||
elsif bid.homework_type == 0
|
||||
state = "未启用匿评"
|
||||
elsif bid.homework_type == 2
|
||||
state = "编程作业"
|
||||
else
|
||||
end
|
||||
end
|
||||
studentlist = []
|
||||
bid.student_works.order("created_at desc").page(1).per(6).each do |work|
|
||||
studentlist << work.user
|
||||
end
|
||||
unless is_course_teacher
|
||||
homework_for_anonymous_comments = get_student_batch_homework_list bid,current_user
|
||||
end
|
||||
#end
|
||||
open_anonymous_evaluation = bid.homework_detail_manual.comment_status
|
||||
{:course_name => course.name,:course_id => course.id,:id => bid.id, :author => bid.user,:author_real_name => author_real_name, :homework_times => many_times, :homework_name => name, :homework_count => homework_count,:student_questions_count => 0,
|
||||
:description => description, :homework_state => state,:open_anonymous_evaluation => open_anonymous_evaluation,:homework_for_anonymous_comments => homework_for_anonymous_comments,:created_on => bid.created_at,:deadline => bid.end_time}
|
||||
:description => description, :homework_state => state,:open_anonymous_evaluation => open_anonymous_evaluation,:homework_for_anonymous_comments => homework_for_anonymous_comments,:created_on => bid.created_at,:deadline => bid.end_time,:studentlist => studentlist}
|
||||
|
||||
end
|
||||
|
||||
|
@ -615,9 +629,158 @@ class CoursesService
|
|||
homework_scores
|
||||
end
|
||||
|
||||
#app新版api
|
||||
#
|
||||
#
|
||||
#课程动态
|
||||
public
|
||||
def all_course_dynamics params, current_user
|
||||
#获取当前用户的所有课程
|
||||
@user = User.find(params[:id])
|
||||
if current_user.nil? && !current_user.admin? && !@user.active?
|
||||
raise '404'
|
||||
return
|
||||
end
|
||||
if current_user == @user || current_user.admin?
|
||||
membership = @user.coursememberships.page(1).per(15)
|
||||
else
|
||||
membership = @user.coursememberships.page(1).per(15).all(:conditions => Course.visible_condition(current_user))
|
||||
end
|
||||
if membership.nil? || membership.count == 0
|
||||
raise l(:label_no_courses, :locale => get_user_language(current_user))
|
||||
end
|
||||
membership.sort! { |older, newer| newer.created_on <=> older.created_on }
|
||||
|
||||
#定义一个数组集合,存放hash数组,该hash数组包括课程的信息,并包含课程的最新发布的资源,最新的讨论区留言,最新的作业,最新的通知
|
||||
result = []
|
||||
#对用户所有的课程进行循环,找到每个课程最新发布的资源,最新的讨论区留言,最新的作业,最新的通知,并存进数组
|
||||
membership.each do |mp|
|
||||
course = mp.course
|
||||
latest_course_dynamics = []
|
||||
dynamics_count = 0
|
||||
# 课程学霸 学生总分数排名靠前的5个人
|
||||
homework_count = course.homework_commons.count
|
||||
sql = "select users.*,sum(IFNULL(0,student_works.final_score))/#{homework_count} score from student_works left outer join users on student_works.user_id = users.id" <<
|
||||
" where homework_common_id in ( select id from homework_commons where homework_commons.course_id = #{course.id}) GROUP BY student_works.user_id ORDER BY score limit 0,6"
|
||||
better_students = User.find_by_sql(sql)
|
||||
if homework_count != 0 && !better_students.empty?
|
||||
latest_course_dynamics <<{:type=> 6,:time=>Time.now.to_s,:count=> 6,:better_students=> better_students}
|
||||
dynamics_count += 1
|
||||
end
|
||||
# 课程通知
|
||||
latest_news = course.news.page(1).per(2).order("created_on desc")
|
||||
unless latest_news.first.nil?
|
||||
latest_course_dynamics << {:type => 1, :time => latest_news.first.created_on,:count=>course.news.count,
|
||||
:news => latest_news.all}
|
||||
dynamics_count += 1
|
||||
end
|
||||
|
||||
# 课程讨论区
|
||||
# latest_message = course.boards.first.topics.page(1).per(2)
|
||||
# unless latest_message.first.nil?
|
||||
# latest_course_dynamics << {:type => 2, :time => latest_message.first.created_on, :count =>course.boards.nil? ? 0 : course.boards.first.topics.count,
|
||||
# :topics => latest_message.all}
|
||||
# dynamics_count += 1
|
||||
# end
|
||||
|
||||
# 课程资源
|
||||
# latest_attachment = course.attachments.order("created_on desc").page(1).per(2)
|
||||
# unless latest_attachment.first.nil?
|
||||
# latest_course_dynamics << {:type => 3, :time => latest_attachment.first.created_on,:count =>course.attachments.count , :documents=>latest_attachment}
|
||||
# dynamics_count += 1
|
||||
# end
|
||||
|
||||
#课程作业 已经交的学生列表(暂定显示6人),未交的学生列表,作业的状态
|
||||
homeworks = course.homework_commons.page(1).per(2).order('created_at desc')
|
||||
unless homeworks.first.nil?
|
||||
latest_course_dynamics << {:type => 4, :time => homeworks.first.updated_at, :count=>course.homework_commons.count , :homeworks => homeworks}
|
||||
dynamics_count += 1
|
||||
end
|
||||
latest_course_dynamics.sort! { |order, newer| newer[:time] <=> order[:time] }
|
||||
latest_course_dynamic = latest_course_dynamics.first
|
||||
unless latest_course_dynamic.nil?
|
||||
result << {:course_name => course.name, :course_id => course.id, :course_img_url => url_to_avatar(course), :course_time => course.time, :course_term => course.term,:message => dynamics_count, :dynamics => latest_course_dynamics, :count => dynamics_count}
|
||||
end
|
||||
end
|
||||
#返回数组集合
|
||||
result.sort! { |order, newer| newer[:update_time] <=> order[:update_time] }
|
||||
result
|
||||
end
|
||||
|
||||
# 获取课程历次作业的学生总成绩
|
||||
def students_score_list params,current_user
|
||||
homework_count = Course.find(params[:course_id]).homework_commons.count
|
||||
page = (params[:page] || 1) - 1
|
||||
sql = "select users.*,sum(IFNULL(0,student_works.final_score))/#{homework_count} score from student_works left outer join users on student_works.user_id = users.id" <<
|
||||
" where homework_common_id in ( select id from homework_commons where homework_commons.course_id = #{params[:course_id]}) GROUP BY student_works.user_id ORDER BY score limit #{page*10},10"
|
||||
User.find_by_sql(sql)
|
||||
end
|
||||
|
||||
# 获取某次作业的所有作业列表
|
||||
def student_work_list params,current_user
|
||||
is_teacher = User.current.allowed_to?(:as_teacher,Course.find(params[:course_id]))
|
||||
homework = HomeworkCommon.find(params[:homework_id])
|
||||
student_works = []
|
||||
#老师 || 非匿评作业 || 匿评结束 显示所有的作品
|
||||
show_all = is_teacher || homework.homework_type != 1 || homework.homework_detail_manual.comment_status == 3
|
||||
if show_all
|
||||
if homework.homework_type == 1 || is_teacher || current_user.admin?
|
||||
student_works = homework.student_works.page(params[:page] || 1).per(10).order("final_score desc ")
|
||||
else
|
||||
my_work = homework.student_works.where(:user_id => current_user.id)
|
||||
if my_work.empty?
|
||||
student_works = []
|
||||
else
|
||||
student_works = homework.student_works.page(params[:page] || 1).per(10).order("final_score desc")
|
||||
end
|
||||
end
|
||||
else #学生
|
||||
if homework.homework_detail_manual.comment_status == 1 #未开启匿评,只显示我的作品
|
||||
student_works = homework.student_works.where(:user_id => current_user.id).page(params[:page] || 1).per(10)
|
||||
elsif homework.homework_detail_manual.comment_status == 2 #匿评列表,显示匿评作品和我的作品
|
||||
#is_evaluation = true
|
||||
my_work = homework.student_works.where(:user_id => current_user.id).page(params[:page] || 1).per(10)
|
||||
student_works = my_work + current_user.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == homework.id}
|
||||
end
|
||||
end
|
||||
student_works
|
||||
end
|
||||
|
||||
# 开启匿评
|
||||
#statue 1:启动成功,2:启动失败,作业总数大于等于2份时才能启动匿评,3:已开启匿评,请务重复开启,4:没有开启匿评的权限
|
||||
def start_anonymous_comment params,current_user
|
||||
homework = HomeworkCommon.find(params[:homework_id])
|
||||
return {:status=>4} unless current_user.admin? || current_user.allowed_to?(:as_teacher,Course.find(params[:course_id]))
|
||||
return {:status=>5} if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
||||
homework_detail_manual = homework.homework_detail_manual
|
||||
if homework_detail_manual.comment_status == 1
|
||||
student_works = homework.student_works
|
||||
if student_works && student_works.size >=2
|
||||
student_works.each_with_index do |work, index|
|
||||
user = work.user
|
||||
n = homework_detail_manual.evaluation_num
|
||||
n = n < student_works.size ? n : student_works.size - 1
|
||||
assigned_homeworks = get_assigned_homeworks(student_works, n, index)
|
||||
assigned_homeworks.each do |h|
|
||||
student_works_evaluation_distributions = StudentWorksEvaluationDistribution.new(user_id: user.id, student_work_id: h.id)
|
||||
student_works_evaluation_distributions.save
|
||||
end
|
||||
end
|
||||
homework_detail_manual.update_column('comment_status', 2)
|
||||
statue = 1
|
||||
else
|
||||
statue = 2
|
||||
end
|
||||
else
|
||||
statue = 3
|
||||
end
|
||||
{:status => statue}
|
||||
end
|
||||
|
||||
def get_assigned_homeworks(student_works, n, index)
|
||||
student_works += student_works
|
||||
student_works[index + 1 .. index + n]
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,76 @@
|
|||
<div class="contextual">
|
||||
<%= link_to l(:label_course_new), {:controller => 'courses', :action => 'new'}, :class => 'icon icon-add' %>
|
||||
</div>
|
||||
|
||||
<h3>
|
||||
<%=l(:label_course_all)%>
|
||||
</h3>
|
||||
|
||||
<%= form_tag({}, :method => :get) do %>
|
||||
<fieldset>
|
||||
<label for='name'>
|
||||
课程:
|
||||
</label>
|
||||
<%= text_field_tag 'name', params[:name], :size => 30, :placeholder => '课程名称' %>
|
||||
<%= submit_tag l(:button_apply), :class => "small", :name => nil %>
|
||||
<a class="icon icon-reload" onclick="$('#name').val('')" style="cursor: pointer;text-decoration: none;">
|
||||
<%= l(:button_clear)%>
|
||||
</a>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
|
||||
<div class="autoscroll">
|
||||
<table class="list" style="width: 100%;table-layout: fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 30px;">
|
||||
序号
|
||||
</th>
|
||||
<th style="width: 120px;">
|
||||
课程
|
||||
</th>
|
||||
<th style="width: 50px;">
|
||||
主讲老师
|
||||
</th>
|
||||
<th style="width: 30px;">
|
||||
学时
|
||||
</th>
|
||||
<th style="width: 20px;">
|
||||
<%=l(:field_is_public)%>
|
||||
</th>
|
||||
<th style="width: 70px;">
|
||||
<%=l(:field_created_on)%>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @courses.each do |course| %>
|
||||
<tr class="<%= cycle("odd", "even") %>">
|
||||
<td style="text-align: center;">
|
||||
<%= course.id %>
|
||||
</td>
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=course.name%>'>
|
||||
<span>
|
||||
<%= link_to(course.name, course_path(course.id)) %>
|
||||
</span>
|
||||
</td>
|
||||
<td align="center">
|
||||
<%= link_to(course.try(:teacher).try(:realname).truncate(6, omission: '...'), user_path(course.teacher)) %>
|
||||
</td>
|
||||
<td align="center">
|
||||
<%= course.class_period %>
|
||||
</td>
|
||||
<td class="center">
|
||||
<%= checked_image course.is_public? %>
|
||||
</td>
|
||||
<td class="center">
|
||||
<%= format_date(course.created_at) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<% html_title(l(:label_course_all)) -%>
|
|
@ -1,5 +1,5 @@
|
|||
<div class="contextual">
|
||||
<%= link_to l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add' %>
|
||||
<%= link_to l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add' %>
|
||||
</div>
|
||||
|
||||
<h3>
|
||||
|
@ -7,62 +7,70 @@
|
|||
</h3>
|
||||
|
||||
<%= form_tag({}, :method => :get) do %>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<%= l(:label_filter_plural) %>
|
||||
</legend>
|
||||
<label for='status'>
|
||||
<%= l(:field_status) %> :
|
||||
</label>
|
||||
<%= select_tag 'status', project_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
|
||||
<label for='name'>
|
||||
<%= l(:label_project) %>:
|
||||
</label>
|
||||
<%= text_field_tag 'name', params[:name], :size => 30 %>
|
||||
<%= submit_tag l(:button_apply), :class => "small", :name => nil %>
|
||||
<%= link_to l(:button_clear), {:controller => 'admin', :action => 'projects'}, :class => 'icon icon-reload' %>
|
||||
</fieldset>
|
||||
</legend>
|
||||
<label for='status'>
|
||||
<%= l(:field_status) %> :
|
||||
</label>
|
||||
<%= select_tag 'status', project_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
|
||||
<label for='name'>
|
||||
<%= l(:label_project) %>:
|
||||
</label>
|
||||
<%= text_field_tag 'name', params[:name], :size => 30 %>
|
||||
<%= submit_tag l(:button_apply), :class => "small", :name => nil %>
|
||||
<%= link_to l(:button_clear), {:controller => 'admin', :action => 'projects'}, :class => 'icon icon-reload' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
|
||||
<div class="autoscroll">
|
||||
<table class="list" style="width: 100%;table-layout: fixed">
|
||||
<thead><tr>
|
||||
<th>
|
||||
<%=l(:label_project)%>
|
||||
</th>
|
||||
<th>
|
||||
<%=l(:field_is_public)%>
|
||||
</th>
|
||||
<th>
|
||||
<%=l(:field_created_on)%>
|
||||
</th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% project_tree(@projects) do |project, level| %>
|
||||
<tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=project.name%>'>
|
||||
<span>
|
||||
<%= link_to_project_settings(project, {}) %>
|
||||
</span>
|
||||
</td>
|
||||
<td align="center">
|
||||
<%= checked_image project.is_public? %>
|
||||
</td>
|
||||
<td align="center">
|
||||
<%= format_date(project.created_on) %>
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock') unless project.archived? %>
|
||||
<%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project, :status => params[:status] }, :method => :post, :class => 'icon icon-unlock') if project.archived? && (project.parent.nil? || !project.parent.archived?) %>
|
||||
<%= link_to(l(:button_copy), { :controller => 'projects', :action => 'copy', :id => project }, :class => 'icon icon-copy') %>
|
||||
<%= link_to(l(:button_delete), project_path(project), :method => :delete, :class => 'icon icon-del') %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="list" style="width: 100%;table-layout: fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 30px;">
|
||||
序号
|
||||
</th>
|
||||
<th style="width: 120px;">
|
||||
<%=l(:label_project)%>
|
||||
</th>
|
||||
<th style="width: 20px;">
|
||||
<%=l(:field_is_public)%>
|
||||
</th>
|
||||
<th style="width: 30px;">
|
||||
<%=l(:field_created_on)%>
|
||||
</th>
|
||||
<th style="width: 70px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% project_tree(@projects) do |project, level| %>
|
||||
<tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
|
||||
<td style="text-align: center;">
|
||||
<%= project.id %>
|
||||
</td>
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=project.name%>'>
|
||||
<span>
|
||||
<%= link_to_project_settings(project, {}) %>
|
||||
</span>
|
||||
</td>
|
||||
<td align="center">
|
||||
<%= checked_image project.is_public? %>
|
||||
</td>
|
||||
<td align="center">
|
||||
<%= format_date(project.created_on) %>
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock') unless project.archived? %>
|
||||
<%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project, :status => params[:status] }, :method => :post, :class => 'icon icon-unlock') if project.archived? && (project.parent.nil? || !project.parent.archived?) %>
|
||||
<%= link_to(l(:button_copy), { :controller => 'projects', :action => 'copy', :id => project }, :class => 'icon icon-copy') %>
|
||||
<%= link_to(l(:button_delete), project_path(project), :method => :delete, :class => 'icon icon-del') %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<% html_title(l(:label_project_plural)) -%>
|
||||
|
|
|
@ -70,31 +70,41 @@
|
|||
//解决由于图片加载慢造成div高度不够 以至于展开按钮不显示的bug
|
||||
$(function(){
|
||||
function nh_show_btn(){
|
||||
if($("#contentmessage<%=topic.id %>").height()>182){
|
||||
$("#project_show_<%= topic.id%>").show();
|
||||
if($("#project_show_<%= topic.id%>").is(':hidden')){
|
||||
if($("#contentmessage<%=topic.id %>").height()>182){
|
||||
$("#project_show_<%= topic.id%>").show();
|
||||
}
|
||||
}
|
||||
}
|
||||
var div = $("#contentmessage<%=topic.id %>");
|
||||
var imgs = $('img',div);
|
||||
var lens = imgs.length;
|
||||
function nh_load_img_end(){
|
||||
lens--;
|
||||
if(lens <= 0){
|
||||
nh_show_btn();
|
||||
}
|
||||
}
|
||||
if(lens <= 0){
|
||||
nh_show_btn();
|
||||
}else{
|
||||
// lens--;
|
||||
// if(lens <= 0){
|
||||
// nh_show_btn();
|
||||
// }
|
||||
}
|
||||
if(lens > 0){
|
||||
$('img',div).load(function(){
|
||||
nh_load_img_end();
|
||||
});
|
||||
}
|
||||
nh_show_btn();
|
||||
// if(lens <= 0){
|
||||
// nh_show_btn();
|
||||
// }else{
|
||||
// $('img',div).load(function(){
|
||||
// nh_load_img_end();
|
||||
// });
|
||||
// }
|
||||
});
|
||||
</script>
|
||||
<div class="project_board_content break_word" id="content_<%=topic.id%>">
|
||||
<div id="contentmessage<%=topic.id %>" class="upload_img">
|
||||
<%= topic.content.html_safe %>
|
||||
<!-- -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -157,7 +167,10 @@
|
|||
<div class="Msg_txt">
|
||||
<%= link_to_user_header message.author,false,:class => 'fl c_orange ' %>
|
||||
<br/>
|
||||
<div class="fl break_word"><%= textAreailizable message,:content,:attachments => message.attachments %></div>
|
||||
<div class="fl break_word">
|
||||
<%= textAreailizable message,:content,:attachments => message.attachments %>
|
||||
<!-- -->
|
||||
</div>
|
||||
<input nhname="nh_content_val" value="<%= message.content %>" type="hidden"/>
|
||||
<br/><div class="cl"></div>
|
||||
<span class=" c_grey fl"><%= format_time(message.created_on) %></span>
|
||||
|
|
|
@ -62,26 +62,35 @@
|
|||
//解决由于图片加载慢造成div高度不够 以至于展开按钮不显示的bug
|
||||
$(function(){
|
||||
function nh_show_btn(){
|
||||
if($("#contentmessage<%=topic.id %>").height()>182){
|
||||
$("#project_show_<%= topic.id%>").show();
|
||||
if($("#project_show_<%= topic.id%>").is(':hidden')){
|
||||
if($("#contentmessage<%=topic.id %>").height()>182){
|
||||
$("#project_show_<%= topic.id%>").show();
|
||||
}
|
||||
}
|
||||
}
|
||||
var div = $("#contentmessage<%=topic.id %>");
|
||||
var imgs = $('img',div);
|
||||
var lens = imgs.length;
|
||||
function nh_load_img_end(){
|
||||
lens--;
|
||||
if(lens <= 0){
|
||||
nh_show_btn();
|
||||
}
|
||||
}
|
||||
if(lens <= 0){
|
||||
nh_show_btn();
|
||||
}else{
|
||||
// lens--;
|
||||
// if(lens <= 0){
|
||||
// nh_show_btn();
|
||||
// }
|
||||
}
|
||||
if(lens > 0){
|
||||
$('img',div).load(function(){
|
||||
nh_load_img_end();
|
||||
});
|
||||
}
|
||||
nh_show_btn();
|
||||
// if(lens <= 0){
|
||||
// nh_show_btn();
|
||||
// }else{
|
||||
// $('img',div).load(function(){
|
||||
// nh_load_img_end();
|
||||
// });
|
||||
// }
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
@ -89,6 +98,7 @@
|
|||
<div class="project_board_content break_word" id="content_<%=topic.id%>">
|
||||
<div id="contentmessage<%=topic.id %>" class="upload_img">
|
||||
<%= topic.content.html_safe %>
|
||||
<!-- -->
|
||||
</div>
|
||||
</div>
|
||||
<p style="display: none;" id="project_show_<%= topic.id%>">
|
||||
|
@ -144,7 +154,10 @@
|
|||
<div class="Msg_txt">
|
||||
<%= link_to_user_header message.author,false,:class => 'fl c_orange ' %>
|
||||
<br/>
|
||||
<div class="fl break_word"><%= textAreailizable message,:content,:attachments => message.attachments %></div>
|
||||
<div class="fl break_word">
|
||||
<%= textAreailizable message,:content,:attachments => message.attachments %>
|
||||
<!-- -->
|
||||
</div>
|
||||
<input nhname="nh_content_val" type="hidden" value="<%= message.content %>"/>
|
||||
<br/><div class="cl"></div>
|
||||
<span class=" c_grey fl"><%= format_time(message.created_on) %></span>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<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),:class => 'c_blue fb fl mb10', :target => "_blank"%>
|
||||
<%= link_to "#{journal.user.show_name}(#{journal.user.login})", user_path(journal.user),:class => 'c_blue fb fl mb10', :target => "_blank"%>
|
||||
</span>
|
||||
<span class="c_grey fr">
|
||||
<%= format_time(journal.created_on) %>
|
||||
|
@ -18,6 +18,7 @@
|
|||
<p>
|
||||
<%= journal.notes.html_safe %>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="ping_disfoot">
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'join_private_course') %>');
|
||||
showModal('ajax-modal', '510px');
|
||||
showModal('ajax-modal', '540px');
|
||||
$('#ajax-modal').css('height','330px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'>" +
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
|
||||
<div class="for_img_thumbnails">
|
||||
<% curse_attachments.each do |file| %>
|
||||
<% if file.is_public? || User.current.member_of_course?(course) %>
|
||||
<% if file.is_public? || User.current.member_of_course?(course) || User.current.admin? %>
|
||||
<div class="re_con_box" id="container_files_<%= file.id %>">
|
||||
<div class="">
|
||||
<%= link_to truncate(file.filename,length: 35, omission: '...'),
|
||||
<%= link_to truncate(file.filename,length: 35, omission: '...'),
|
||||
download_named_attachment_path(file.id, file.filename),
|
||||
:title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
|
||||
<% if User.current.logged? %>
|
||||
|
|
|
@ -21,14 +21,26 @@
|
|||
$("#attachments_fields").children().remove();
|
||||
$("#upload_file_count").text("未上传文件");
|
||||
$('#upload_file_div').slideToggle('slow');
|
||||
<% if @project%>
|
||||
<% if @project %>
|
||||
closeModal();
|
||||
$("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>');
|
||||
// 添加文件上传成功提示
|
||||
<% unless params[:attachments].nil? %>
|
||||
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||
$("#course_list").prepend(div);
|
||||
setTimeout( function(){div.remove();},3000)
|
||||
<% end %>
|
||||
<%elsif @course%>
|
||||
closeModal();
|
||||
$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
|
||||
$("#courses_files_count_info").html("<%= @all_attachments.count%>");
|
||||
$("#courses_files_count_nav").html("(<%= @all_attachments.count%>)")
|
||||
// 添加文件上传成功提示,
|
||||
<% unless params[:attachments].nil? %>
|
||||
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||
$("#course_list").prepend(div);
|
||||
setTimeout( function(){div.remove();},3000)
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
$(document).ready(img_thumbnails);
|
||||
|
|
|
@ -4,36 +4,40 @@
|
|||
<% if memos.any? %>
|
||||
<% memos.each do |topic| %>
|
||||
<table class="content-text-list">
|
||||
<tr><td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) if topic.author%></td>
|
||||
<td>
|
||||
<table width="630px" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="500px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), forum_memo_path(topic.forum, topic) %></td>
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), forum_memo_path(topic.forum, topic) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">回答</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" ><span class="font_description"> </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2" ><span class="font_lighter"><%= authoring topic.created_at, topic.author %>
|
||||
<span class="font_description2">
|
||||
<% author = topic.last_reply.try(:author)%>
|
||||
<% if author%>
|
||||
最后回复:<%=link_to_user author %>
|
||||
<% end%>
|
||||
</span>
|
||||
<br />
|
||||
</span></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
<tr>
|
||||
<td colspan="2" valign="top" style="width: 50px;">
|
||||
<%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) if topic.author%>
|
||||
</td>
|
||||
<td>
|
||||
<table width="630px" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="500px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), forum_memo_path(topic.forum, topic) %></td>
|
||||
<td align="right" rowspan="3">
|
||||
<table class="borad-count">
|
||||
<tr>
|
||||
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), forum_memo_path(topic.forum, topic) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">回答</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" ><span class="font_description"> </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2" ><span class="font_lighter"><%= authoring topic.created_at, topic.author %>
|
||||
<span class="font_description2">
|
||||
<% author = topic.last_reply.try(:author)%>
|
||||
<% if author%>
|
||||
最后回复:<%=link_to_user author %>
|
||||
<% end%>
|
||||
</span>
|
||||
<br />
|
||||
</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<% end %>
|
||||
|
|
|
@ -5,7 +5,11 @@
|
|||
<p>
|
||||
开启匿评后学生将不能对作品进行
|
||||
<span class="c_blue">修改、删除</span>
|
||||
等操作,目前有
|
||||
等操作,开启匿评后的提交作品,将
|
||||
<span class="c_blue">不能参与匿评</span>,
|
||||
匿评评分将被记为
|
||||
<span class="c_pink">0分</span>
|
||||
。目前有
|
||||
<span class="c_pink"><%= @totle_size%>个</span>
|
||||
学生,共提交了
|
||||
<span class="c_pink"><%= @cur_size %></span>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<p class="fl ml20 f14 mb10 c_orange">基本规则设置(总分为100分)</p>
|
||||
<div class="cl"></div>
|
||||
<ul class="ml10">
|
||||
<li style="display: none;">
|
||||
<li>
|
||||
<label class="label02">迟交扣分: </label>
|
||||
<%= select_tag :late_penalty,options_for_select(late_penalty_option,homework.late_penalty), {:class => "fl mb10 h26 w70"} %>
|
||||
<span class="fl mt5"> 分</span>
|
||||
|
@ -99,11 +99,11 @@
|
|||
<div class="cl"></div>
|
||||
</li>
|
||||
|
||||
<li style="display: none;">
|
||||
<li>
|
||||
<label class="label02">缺评扣分: </label>
|
||||
<%= select_tag :absence_penalty,options_for_select(absence_penalty_option,homework.homework_detail_manual.absence_penalty), {:class => "fl mb10 h26 w70"} %>
|
||||
<span class="fl mt5"> 分</span>
|
||||
<p class="ml5 fl mt5">学生漏评1个作品将扣<span class="c_red" id="absence_penalty_notice"> 2 </span>分</p>
|
||||
<p class="ml5 fl mt5">学生漏评1个作品将扣<span class="c_red" id="absence_penalty_notice"> <%= homework.homework_detail_manual.absence_penalty%> </span>分</p>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</ul> <!-- h1 end--->
|
||||
|
|
|
@ -41,12 +41,13 @@
|
|||
<%= homework.description.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="news_foot currentDd" id="bid_show_more_des_button<%= homework.id%>" onclick="bid_show_more_des(<%= homework.id%>);" style="cursor:pointer;display: none;">
|
||||
<div class="news_foot currentDd fr" id="bid_show_more_des_button<%= homework.id%>" onclick="bid_show_more_des(<%= homework.id%>);" style="cursor:pointer;display: none;">
|
||||
[展开]
|
||||
</div>
|
||||
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="mt5">
|
||||
<% unless homework.attachments.empty?%>
|
||||
<span class="tit_fb" style="width: auto;"> 附件:</span>
|
||||
|
@ -55,7 +56,23 @@
|
|||
</div>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="mt5">
|
||||
<span class="tit_fb" style="width: auto;"> 扣分标准:</span>
|
||||
<div class="fl mb5 c_red">
|
||||
迟交扣
|
||||
<%= homework.late_penalty%>
|
||||
分
|
||||
<% if homework.homework_type == 1%>
|
||||
,缺评一个作品扣
|
||||
<%= homework.homework_detail_manual.absence_penalty%>
|
||||
分
|
||||
<% else%>
|
||||
。
|
||||
<% end%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<span class="fl"><%= l(:label_end_time)%>:<%= homework.end_time%></span>
|
||||
|
|
|
@ -5,6 +5,8 @@ $("#<%= @homework.id %>_start_anonymous_comment").replaceWith('<%= escape_javasc
|
|||
alert('启动失败\n作业总数大于等于2份时才能启动匿评');
|
||||
<% elsif @statue == 3%>
|
||||
alert("已开启匿评,请务重复开启");
|
||||
<% elsif @statue == 3%>
|
||||
<% elsif @statue == 4%>
|
||||
alert("您没有权限开启匿评");
|
||||
<% elsif @statue == 5%>
|
||||
alert("作业提交截止之后才能启动匿评");
|
||||
<% end %>
|
|
@ -5,7 +5,7 @@
|
|||
<% if @edit_allowed || !@allowed_statuses.empty? %>
|
||||
<div id="all_attributes" style="display:none;">
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<div class="ping_C mb10"></div>
|
||||
<div class="ping_C mb10 ml10"></div>
|
||||
<!--<a remote="true" href="javascript:void(0)" class="blue_btn fl" style="margin-left: 80px;margin-bottom: 10px;margin-top: -10px;" onclick="$('#issue-form').submit();">-->
|
||||
<!--<%#= l(:button_submit) %>-->
|
||||
<!--</a>-->
|
||||
|
@ -20,6 +20,8 @@
|
|||
<%= render :partial => 'history', :locals => {:issue => @issue, :journals => @journals} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div id="journal_issue_note" class="wiki"></div>
|
||||
<input name="issue_quote_new" type="hidden" value="<%= %>" />
|
||||
<fieldset><legend>回复</legend>
|
||||
<%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %>
|
||||
</fieldset>
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
<% reply_links = authorize_for('issues', 'edit') -%>
|
||||
<% journals.reverse.each do |journal| %>
|
||||
<!-- modified by bai -->
|
||||
<div id="change-<%= journal.id %>" class="<%= journal.css_classes %>" style=" word-wrap: break-word; word-break: break-all">
|
||||
<!-- end -->
|
||||
<div class="ping_C mb10">
|
||||
<div class="ping_dispic"><a href="#" target="_blank"><%= image_tag(url_to_avatar(journal.user), :class => "ping_dispic",:width => 46,:height => 46) %></a></div>
|
||||
<div class="ping_discon">
|
||||
<div class="ping_distop">
|
||||
<a href="#" target="_blank" class="c_blue fb fl mb10 "><%= journal.user %></a><span class="c_grey fr"><%= format_time journal.created_on %></span>
|
||||
<!-- modified by bai -->
|
||||
<div id="change-<%= journal.id %>" class="<%= journal.css_classes %>" style=" word-wrap: break-word; word-break: break-all">
|
||||
<!-- end -->
|
||||
<div class="ping_C mb10 ml10">
|
||||
<div class="ping_dispic"><a href="#" target="_blank"><%= image_tag(url_to_avatar(journal.user), :class => "ping_dispic",:width => 46,:height => 46) %></a></div>
|
||||
<div class="ping_discon" style="width: 600px;">
|
||||
<div class="ping_distop">
|
||||
<a href="#" target="_blank" class="c_blue fb fl mb10 "><%= journal.user %></a><span class="c_grey fr"><%= format_time journal.created_on %></span>
|
||||
<div class="cl"></div>
|
||||
<p>
|
||||
<% if journal.details.any? %>
|
||||
<% details_to_strings(journal.details).each do |string| %>
|
||||
<p><%= string %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<!--编辑、引用、回复按钮-->
|
||||
<div class="ping_disfoot"><%= render_links_easy(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %></div>
|
||||
<!--回复内容、引用内容-->
|
||||
<p><%= render_notes_issue(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %></p>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<p>
|
||||
<% if journal.details.any? %>
|
||||
<% details_to_strings(journal.details).each do |string| %>
|
||||
<p><%= string %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<!--编辑、引用、回复按钮-->
|
||||
<div class="ping_disfoot"><%= render_links_easy(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %></div>
|
||||
<!--回复内容、引用内容-->
|
||||
<p><%= render_notes_issue(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %></p>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %>
|
||||
<% end %>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<div class="problem_txt fl">
|
||||
<%= link_to issue.author.name, user_path(issue.author), :class => "problem_name c_orange fl" %>
|
||||
<span class="fl"><%= l(:label_post_on_issue) %>(<%= "#{raw column_content[2]}" %>):</span>
|
||||
<div class="problem_tit_div fl">
|
||||
<div class="problem_tit_div fl break_word">
|
||||
<%=link_to "#{column_content[4]}<span class = '#{get_issue_type(column_content[1])[0]}'>#{get_issue_type(column_content[1])[1]}</span>".html_safe, issue_path(issue.id), :class => "problem_tit_a break_word",:target => "_blank" %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -109,6 +109,9 @@
|
|||
<%= render :partial => 'edit' %>
|
||||
</div>
|
||||
<p style="padding-top: 5px"></p>
|
||||
|
||||
<!--引用时不能修改,剥离出引用内容-->
|
||||
|
||||
<a remote="true" href="javascript:void(0)" class="blue_btn fr mr80" onclick="issue_desc_editor.sync();$('#issue-form').submit();">
|
||||
<%= l(:button_submit) %>
|
||||
</a>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<h3><%=h @issue.tracker %> #<%= @issue.id %></h3>
|
||||
<p><%= authoring @journal.created_on, @journal.user, :label => :label_updated_time_by %></p>
|
||||
<p>由<%= @journal.user %> 更新于 <%= format_time @journal.created_on %></p>
|
||||
|
||||
<div class="text-diff">
|
||||
<%= simple_format_without_paragraph @diff.to_html %>
|
||||
|
|
|
@ -17,15 +17,14 @@
|
|||
visiable = hidden_non_project && hidden_non_project.value == "0"%>
|
||||
<ul class="sub_menu">
|
||||
<% if @show_course == 1 && !visiable %>
|
||||
<% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%>
|
||||
<% hasCourse=false %>
|
||||
<% User.current.courses.each do |course| %>
|
||||
<% if !course_endTime_timeout?(course) %>
|
||||
<% hasCourse=true %>
|
||||
<% end %>
|
||||
<% hasCourse=false %>
|
||||
<% User.current.courses.each do |course| %>
|
||||
<% if !course_endTime_timeout?(course) %>
|
||||
<% hasCourse=true %>
|
||||
<% break %>
|
||||
<% end %>
|
||||
<%= render :partial => 'layouts/user_courses_list', :locals => {:hasCourse => hasCourse} %>
|
||||
<% end -%>
|
||||
<% end %>
|
||||
<%= render :partial => 'layouts/user_courses_list', :locals => {:hasCourse => hasCourse} %>
|
||||
<% end %>
|
||||
<%= render :partial => 'layouts/user_project_list', :locals => {:hasCourse => hasCourse} %>
|
||||
<li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<li id="current_user_li">
|
||||
<%= link_to "#{User.current.login}<span class='pic_triangle'></span>".html_safe, {:controller=> 'users', :action => 'show', id: User.current.id, host: Setting.host_user}, target:"_blank", :class => "uses_name"%>
|
||||
<ul id="user_sub_menu" style="right: 0px;display: none;">
|
||||
<% if @show_course == 1 && User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) %>
|
||||
<% if @show_course == 1 %>
|
||||
<% user_course = get_user_course User.current%>
|
||||
<% unless user_course.empty? %>
|
||||
<li id="my_courses_li">
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<% if @attachments.first || @course_news.first || @course_news_comments.first || @bids.first ||
|
||||
@course_journal_messages.first|| @course_messages.first || @attachments.first %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h3 class="wmail_h2" style="color:#15bccf; "><%= l(:label_course_overview)%></h3>
|
||||
<h3 class="wmail_h2" style="color:#474646; "><%= l(:label_course_overview)%></h3>
|
||||
<!-- 课程通知 -->
|
||||
<% unless @course_news.first.nil? %>
|
||||
<% unless @course_news.first.nil? || @course_news_comments.first.nil? %>
|
||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_course_news) %>
|
||||
|
@ -25,7 +25,7 @@
|
|||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_notice) %></span>
|
||||
|
||||
<%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value),
|
||||
<%= link_to truncate(course_new.title.html_safe,length: 30,omission: '...'), news_url(course_new,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
|
@ -33,31 +33,23 @@
|
|||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul><!--课程通知 end-->
|
||||
<% end %>
|
||||
|
||||
<!-- 课程通知回复 -->
|
||||
<% unless @course_news_comments.first.nil? %>
|
||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_course_mail_news_reply) %>
|
||||
</span>
|
||||
<!--课程通知回复-->
|
||||
<% @course_news_comments.each do |course_news_comment|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
<% unless course_news_comment.commented.nil? %>
|
||||
<%= link_to truncate(course_news_comment.commented.course.name,length: 30,omission: '...'), course_url(course_news_comment.commented.course, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<%= link_to truncate(course_news_comment.commented.course.name,length: 30,omission: '...'), course_url(course_news_comment.commented.course, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<% end %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to course_news_comment.author, user_activities_url(course_news_comment.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_notice) %></span>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_notice_reply) %></span>
|
||||
|
||||
<%= link_to truncate(course_news_comment.comments,length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value),
|
||||
<%= link_to truncate(l(:label_course_notice_point),length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
|
@ -65,7 +57,7 @@
|
|||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul><!--课程通知回复 end-->
|
||||
</ul><!--课程通知 end-->
|
||||
<% end %>
|
||||
|
||||
<!--课程作业-->
|
||||
|
@ -89,7 +81,7 @@
|
|||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_course_homework) %></span>
|
||||
|
||||
<%= link_to truncate(bid.name,length: 30,omission: '...'), student_work_index_path(:homework => bid.id,:token => @token.value),
|
||||
<%= link_to truncate(bid.name.html_safe,length: 30,omission: '...'), student_work_index_path(:homework => bid.id,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
|
@ -150,7 +142,7 @@
|
|||
<%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_send_course_messages) %></span>
|
||||
<%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value),
|
||||
<%= link_to truncate(course_message.subject.html_safe,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(course_message.created_on) %></span>
|
||||
|
@ -164,7 +156,7 @@
|
|||
<% unless @attachments.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_course_attendingcontestwork_download) %>
|
||||
<%= l(:label_course_mail_files) %>
|
||||
</span>
|
||||
<% @attachments.each do |attachment|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
|
@ -197,8 +189,8 @@
|
|||
<% if @issues.first || @project_messages.first || @issues_journals.first || @wiki_contents.first || @project_news.first || @project_news_comments.first || @project_journal_messages.first ||
|
||||
@project_news_comments.first %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h3 class="wmail_h2" style="color:#15BCCF; "><%= l(:label_project_overview_new)%></h3>
|
||||
<% unless @issues.first.nil? %>
|
||||
<h3 class="wmail_h2" style="color:#474646; "><%= l(:label_project_overview_new)%></h3>
|
||||
<% unless @issues.first.nil? || @issues_journals.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_issue_tracking) %>
|
||||
|
@ -220,44 +212,32 @@
|
|||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(issue.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
<% @issues_journals.each do |issues_journal| %>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
<%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
<%= link_to issues_journal.user, user_activities_url(issues_journal.user,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_issue_update) %></span>
|
||||
<% if issues_journal.notes.blank? || issues_journal.notes.nil? %>
|
||||
<%= link_to truncate(l(:label_isuue_mail_status),length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<% else %>
|
||||
<%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<% end %>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(issues_journal.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul><!--问题跟踪 end-->
|
||||
<% end %>
|
||||
|
||||
<!-- issues回复 -->
|
||||
|
||||
<% unless @issues_journals.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_issue_tracking) %>
|
||||
</span>
|
||||
<% @issues_journals.each do |issues_journal| %>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
<%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
<%= link_to issues_journal.user, user_activities_url(issues_journal.user,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_issue) %></span>
|
||||
<% if issues_journal.notes.blank? || issues_journal.notes.nil? %>
|
||||
<%= l(:label_isuue_mail_status) %>
|
||||
<% else %>
|
||||
<%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<% end %>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(issues_journal.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--问题跟踪 end-->
|
||||
<% end %>
|
||||
|
||||
<!-- 讨论区 -->
|
||||
<% unless @project_messages.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
|
@ -322,7 +302,7 @@
|
|||
<% end %>
|
||||
|
||||
<!--项目新闻-->
|
||||
<% unless @project_news.first.nil? %>
|
||||
<% unless @project_news.first.nil? || @project_news_comments.first.nil? %>
|
||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_project_news) %>
|
||||
|
@ -347,37 +327,29 @@
|
|||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul><!-- 项目新闻end -->
|
||||
<% end %>
|
||||
|
||||
<!-- 项目新闻回复 -->
|
||||
<% unless @project_news_comments.first.nil? %>
|
||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_project_news) %>
|
||||
</span>
|
||||
<!--新闻回复-->
|
||||
<% @project_news_comments.each do |project_news_comment|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
<% unless project_news_comment.commented.nil? %>
|
||||
<%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<% end %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
<%= link_to project_news_comment.author, user_activities_url(project_news_comment.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_mail_notice) %></span>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:lable_project_mail_notice_reply) %></span>
|
||||
|
||||
<%= link_to truncate(project_news_comment.comments.html_safe,length: 30,omission: '...'), news_url(project_news_comment.commented,:token => @token.value),
|
||||
<%= link_to truncate(l(:lable_project_notice_point),length: 30,omission: '...'), news_url(project_news_comment.commented,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(project_news_comment.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul><!-- 项目新闻回复end -->
|
||||
</ul><!-- 项目新闻end -->
|
||||
<% end %>
|
||||
|
||||
<!-- 项目上传资源 -->
|
||||
|
@ -448,7 +420,7 @@
|
|||
<!-- 用户留言 -->
|
||||
<% unless @user_journal_messages.first.nil? %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h3 class="wmail_h2" style="color:#15bccf; "><%= l(:label_activities) %></h3>
|
||||
<h3 class="wmail_h2" style="color:#474646; "><%= l(:label_activities) %></h3>
|
||||
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
|
@ -479,7 +451,7 @@
|
|||
<% end %>
|
||||
<% if @forums.first || @memos.first %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h3 class="wmail_h2" style="color:#15bccf; "><%= l(:lable_bar_active) %></h3>
|
||||
<h3 class="wmail_h2" style="color:#474646; "><%= l(:lable_bar_active) %></h3>
|
||||
<% unless @forums.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
|
@ -536,7 +508,7 @@
|
|||
</div><!--贴吧动态 end-->
|
||||
<% end %>
|
||||
<div class="wmail_foot" style="margin-top:20px;color:#2775d2; margin-left:10px;">
|
||||
<span style="color:#666;"><%= l(:label_mail_policy) %>:</span>
|
||||
<span style="color:#474646;"><%= l(:label_mail_policy) %>:</span>
|
||||
<% [:label_user_mail_option_all, :label_user_mail_option_day, :label_user_mail_option_none].each do |mail_option| %>
|
||||
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
|
||||
<label style="margin-top:20px;color:gray; margin-left:10px;"><%= l(mail_option) %></label>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<% end %>
|
||||
]
|
||||
<%= link_to course_news_comment.author, user_activities_url(course_news_comment.author,:token => @token.value) %>
|
||||
<%= l(:label_project_notice) %>
|
||||
<%= l(:label_project_notice_reply) %>
|
||||
<%= link_to truncate(course_news_comment.comments,length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value) %>
|
||||
<%= format_time(course_news_comment.created_on) %>
|
||||
<% end %>
|
||||
|
@ -49,7 +49,7 @@
|
|||
[ <%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course, :token => @token.value) %>]
|
||||
<%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value) %>
|
||||
<%= l(:label_send_course_journals_for_messages) %>
|
||||
<%= link_to truncate(course_journal_message.notes,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value) %>
|
||||
<%= link_to truncate(course_journal_message.notes.html_safe,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value) %>
|
||||
<%= format_time(course_journal_message.created_on) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -66,7 +66,7 @@
|
|||
<% end %>
|
||||
|
||||
<% unless @attachments.first.nil? %>
|
||||
<%= l(:label_course_attendingcontestwork_download) %>
|
||||
<%= l(:label_course_mail_files) %>
|
||||
<% @attachments.each do |attachment|%>
|
||||
▪[<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value) %>]
|
||||
<%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value) %>
|
||||
|
@ -101,11 +101,11 @@
|
|||
<% @issues_journals.each do |issues_journal| %>
|
||||
▪[<%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project, :token => @token.value) %>]
|
||||
<%= link_to issues_journal.user, user_activities_url(issues_journal.user,:token => @token.value) %>
|
||||
<%= l(:label_project_issue) %>
|
||||
<%= l(:label_project_issue_update) %>
|
||||
<% if issues_journal.notes.nil? %>
|
||||
<%= link_to truncate(issues_journal.issue.subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value) %>
|
||||
<% else %>
|
||||
<%= link_to truncate(issues_journal.notes,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value) %>
|
||||
<%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value) %>
|
||||
<% end %>
|
||||
<%= format_time(issues_journal.created_on) %>
|
||||
<% end %>
|
||||
|
@ -148,7 +148,7 @@
|
|||
▪[<%= link_to truncate(project_new.project.name,length: 30,omission: '...'), project_url(project_new.project, :token => @token.value) %> ]
|
||||
<%= link_to project_new.author, user_activities_url(project_new.author,:token => @token.value) %>
|
||||
<%= l(:label_project_mail_notice) %>
|
||||
<%= link_to truncate(project_new.title,length: 30,omission: '...'), news_url(project_new,:token => @token.value) %>
|
||||
<%= link_to truncate(project_new.title.html_safe,length: 30,omission: '...'), news_url(project_new,:token => @token.value) %>
|
||||
<%= format_time(project_new.created_on) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -161,7 +161,7 @@
|
|||
<%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project, :token => @token.value) %>
|
||||
<% end %>]
|
||||
<%= link_to project_news_comment.author, user_activities_url(project_news_comment.author,:token => @token.value) %>
|
||||
<%= l(:label_project_mail_notice) %>
|
||||
<%= l(:lable_project_mail_notice_reply) %>
|
||||
<%= link_to truncate(project_news_comment.comments.html_safe,length: 30,omission: '...'), news_url(project_news_comment.commented,:token => @token.value) %>
|
||||
<%= format_time(project_news_comment.created_on) %>
|
||||
<% end %>
|
||||
|
@ -204,7 +204,7 @@
|
|||
<% @user_journal_messages.each do |user_journal_message|%>
|
||||
▪ <%= link_to user_journal_message.user, user_activities_url(user_journal_message.user,:token => @token.value)%>
|
||||
<%= l(:label_show_your_message) %>
|
||||
<%= link_to truncate(user_journal_message.notes,length: 30,omission: '...'), feedback_url(@user,:token => @token.value) %>
|
||||
<%= link_to truncate(user_journal_message.notes.html_safe,length: 30,omission: '...'), feedback_url(@user,:token => @token.value) %>
|
||||
<%= format_time(user_journal_message.created_on) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -216,7 +216,7 @@
|
|||
<% @forums.each do |forum|%>
|
||||
▪<%= link_to forum.creator, user_activities_url(forum.creator,:token => @token.value) %>
|
||||
<%= l(:label_forum_new) %>
|
||||
<%= link_to truncate(forum.name,length: 30,omission: '...'),forum_url(forum,:token => @token.value) %>
|
||||
<%= link_to truncate(forum.name.html_safe,length: 30,omission: '...'),forum_url(forum,:token => @token.value) %>
|
||||
<%= format_time(forum.created_at) %>
|
||||
<% end %>
|
||||
<!-- 新建贴吧 end-->
|
||||
|
@ -226,7 +226,7 @@
|
|||
<% @memos.each do |memo|%>
|
||||
▪<%= link_to memo.author, user_activities_url(memo.author,:token => @token.value)%>
|
||||
<%= memo.parent_id.nil? ? l(:label_memo_new_from_forum) : l(:label_reply) %>
|
||||
<%= link_to truncate(memo.subject,length: 30,omission: '...'),forum_memo_url(memo.forum, (memo.parent_id.nil? ? memo : memo.parent_id))%>
|
||||
<%= link_to truncate(memo.subject.html_safe,length: 30,omission: '...'),forum_memo_url(memo.forum, (memo.parent_id.nil? ? memo : memo.parent_id))%>
|
||||
<%= format_time(memo.created_at) %>
|
||||
<% end %>
|
||||
<!-- 新建贴吧 end-->
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
<%= l(:label_release_news) %>:
|
||||
</span>
|
||||
<%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %>
|
||||
<%=link_to "<span class = 'pic_mes'>#{news.comments.all.count}</span>".html_safe, news_path(news.id), :class => "pro_mes_w" %>
|
||||
<br />
|
||||
<div class="cl mb5"></div>
|
||||
<script>
|
||||
|
@ -44,9 +45,11 @@
|
|||
<%= news.description.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_foot currentDd" style="cursor:pointer;display: none;" onclick="news_show_more_des(<%= news.id %>);" id="news_foot_<%= news.id %>">
|
||||
<div class="cl"></div>
|
||||
<div class="news_foot currentDd fr" style="cursor:pointer;display: none;" onclick="news_show_more_des(<%= news.id %>);" id="news_foot_<%= news.id %>">
|
||||
[展开]
|
||||
</div>
|
||||
<div class="cl mb5"></div>
|
||||
<span class="fl"><%= l(:label_create_time)%>:<%= format_time(news.created_on)%></span>
|
||||
<%= link_to_attachments_course news %>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -27,7 +27,8 @@
|
|||
<%= link_to image_tag(url_to_avatar(news.author),:width => 42,:height => 42), user_path(news.author), :class => "problem_pic fl" %>
|
||||
<div class="problem_txt fl mt5">
|
||||
<%= link_to_user_header(news.author,false,{:class=> 'problem_name c_orange fl'}) if news.respond_to?(:author) %>
|
||||
<span class="fl"> <%= l(:label_add_news) %>:</span><%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %><br />
|
||||
<span class="fl"> <%= l(:label_add_news) %>:</span><%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %>
|
||||
<%=link_to "<span class = 'pic_mes'>#{news.comments.all.count}</span>".html_safe, news_path(news.id), :class => "pro_mes_w_news" %><br />
|
||||
<div class="cl mb5"></div>
|
||||
<p id="news_description_<%= news.id %>" class="mt5 break_word"><%=textAreailizable news.description %><br /> </p>
|
||||
<div class="news_foot" style="display: none;" onclick="news_show_more_des(<%= news.id %>);" id="news_foot_<%= news.id %>"><%= l(:label_expend_information) %> <span class="g-arr-down"><img src="/images/jiantou.jpg" width="12" height="6" /></span></div>
|
||||
|
|
|
@ -3,3 +3,15 @@
|
|||
<% elsif @course %>
|
||||
<%= render :partial => 'course_show', locals: {course: @course} %>
|
||||
<% end %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#add_comment_form").submit(function(){
|
||||
if($("#comment").val() == ''){
|
||||
alert('请输入评论内容');
|
||||
return false;
|
||||
}
|
||||
$(this)[0].submit();
|
||||
//return true;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<%= stylesheet_link_tag 'polls', :media => 'all' %>
|
||||
<div class="polls_content polls_box">
|
||||
<div class="polls_content polls_box break_word">
|
||||
<div class="ur_page_head" >
|
||||
<h1 class="ur_page_title">
|
||||
<%= @poll.polls_name.empty? ? l(:label_poll_new) : @poll.polls_name %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'projects/join_project') %>');
|
||||
showModal('ajax-modal', '510px');
|
||||
showModal('ajax-modal', '540px');
|
||||
$('#ajax-modal').css('height','260px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'>" +
|
||||
|
|
|
@ -116,9 +116,9 @@
|
|||
</p>
|
||||
<% end %>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||
<% end %>
|
||||
<%# other_formats_links do |f| %>
|
||||
<%#= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||
<%# end %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= form_tag({}, :method => :get) do %>
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
<div style="width: 57%;margin: 10px auto;">
|
||||
<div style="width: 67%;margin: 10px auto;">
|
||||
<%= form_tag( search_stores_path, method: 'post') do %>
|
||||
<%= text_field_tag 'name', params[:name], placeholder: l('welcome.search.information'), name: "name", :class => 'blueinputbar', :style => 'width:450px;'%>
|
||||
|
||||
<%= submit_tag l(:label_search), :class => "enterprise"%>
|
||||
<%= submit_tag l(:label_search), :class => "enterprise "%>
|
||||
<% end %>
|
||||
<%= link_to("导出缺失列表",lost_file_stores_path(:format => 'xls'),:style => "background-color: #15bccf;padding: 4px 5px;color: white;") if User.current.admin?%>
|
||||
<div class='font_lighter' style="display: inline-block; margin-top:3px;"><%= l(:label_resources_search_all)%></div>
|
||||
</div>
|
|
@ -0,0 +1,58 @@
|
|||
<!-- 作品列表,显示某一个作品的信息 -->
|
||||
<ul class="hwork_ul <%= cycle("b_grey", "") %>" id="student_work_<%= student_work.id%>">
|
||||
<li class="hwork_num">
|
||||
<span>
|
||||
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||
</span>
|
||||
</li>
|
||||
<li class=" hwork_name ">
|
||||
<%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name, :class => "c_blue02"%>
|
||||
</li>
|
||||
<li class=" hwork_tit">
|
||||
<%= link_to student_work.name, student_work_path(student_work),:remote => true,:title => student_work.name, :class => "c_blue02"%>
|
||||
</li>
|
||||
<li class=" hwork_time_c">
|
||||
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
|
||||
<span class="c_red">迟交</span>
|
||||
<% else%>
|
||||
<%= student_work.created_at.strftime("%m-%d").to_s%>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class=" hwork_score <%= score_color student_work.teacher_score%>">
|
||||
<%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%>
|
||||
</li>
|
||||
<li class=" hwork_score <%= score_color student_work.teaching_asistant_score%>">
|
||||
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
|
||||
</li>
|
||||
<li class=" hwork_code02 <%= score_color student_work.student_score%> student_score_info" >
|
||||
<%= student_work.student_score.nil? ? "--" : format("%.1f",student_work.student_score)%>
|
||||
<% unless student_work.student_score.nil?%>
|
||||
<span class="">
|
||||
(<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>)
|
||||
</span>
|
||||
<div class="info_ni">
|
||||
现共有
|
||||
<span class="c_red"> <%= student_work.student_works_scores.where(:reviewer_role => 3).count%> </span>
|
||||
名学生进行了匿评,平均分为
|
||||
<span class="c_red"> <%= format("%.1f",student_work.student_score)%> </span>分。
|
||||
</div>
|
||||
<% end%>
|
||||
</li>
|
||||
<% score = student_work.respond_to?("score") ? student_work.score : student_work.final_score - student_work.absence_penalty - student_work.late_penalty%>
|
||||
<li class=" hwork_score <%= score_color score%> student_final_scor_info">
|
||||
<%= score.nil? ? "--" : format("%.1f",score)%>
|
||||
<% unless score.nil?%>
|
||||
<div class="info_ni">
|
||||
作品最终评分为
|
||||
<span class="c_red"> <%= student_work.final_score%> </span>分。
|
||||
迟交扣分
|
||||
<span class="c_red"> <%= student_work.late_penalty%> </span>分,
|
||||
缺评扣分
|
||||
<span class="c_red"> <%= student_work.absence_penalty%> </span>分,
|
||||
最终成绩为
|
||||
<span class="c_red"> <%= format("%.1f",score)%> </span>分。
|
||||
</div>
|
||||
<% end%>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
</ul><!---hwork_ul end-->
|
|
@ -0,0 +1,43 @@
|
|||
<li class="hwork_num ">
|
||||
<span class="c_dark f14 fb fl">学号</span>
|
||||
</li>
|
||||
<li class=" hwork_name f14 fb c_dark">
|
||||
<%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "name", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
|
||||
<% if @show_all && @order == "name"%>
|
||||
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="hwork_tit">
|
||||
<span class="c_dark f14 fb fl">作品名称</span>
|
||||
</li>
|
||||
<li class=" hwork_time f14 fb c_dark">
|
||||
<%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
|
||||
<% if @show_all && @order == "created_at"%>
|
||||
<%= link_to "",student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="mr5 w40 ml15">
|
||||
<%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
|
||||
<% if @show_all && @order == "teacher_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="mr5 w40 ml20">
|
||||
<%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
|
||||
<% if @show_all && @order == "teaching_asistant_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
|
||||
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="mr5 ml10 w40">
|
||||
<%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
|
||||
<% if @show_all && @order == "student_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="ml20">
|
||||
<%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
|
||||
<% if @show_all && @order == "score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
|
||||
<% end%>
|
||||
</li>
|
|
@ -0,0 +1,14 @@
|
|||
<div id="popbox02">
|
||||
<div class="ni_con_work">
|
||||
<p>
|
||||
当前作业
|
||||
<span class="c_pink">已开启匿评</span>
|
||||
您提交作品后将
|
||||
<span class="c_pink">不会收到任何匿评作品</span>,
|
||||
您的作品也
|
||||
<span class="c_pink">不会被其他用户匿评</span>.
|
||||
如需获得最终成绩,请您联系主讲老师对您的作品单独进行评分
|
||||
</p>
|
||||
<a href="javascript:void(0)" class="tijiao" style="margin-left:200px;" onclick="clickCanel()">确定</a>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,9 @@
|
|||
<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="javascript:" class="tijiao" style="margin-left:100px;" onclick="clickCanel()">匿名评分</a>
|
||||
<a href="javascript:" style="color:#15bccf; margin-top:20px; display:block;" onclick="clickCanel()">冒着扣分的危险残忍拒绝</a>
|
||||
</div>
|
||||
</div>
|
|
@ -8,7 +8,7 @@
|
|||
<li class=" hwork_name ">
|
||||
<%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name, :class => "c_blue02"%>
|
||||
</li>
|
||||
<li class=" hwork_tit">
|
||||
<li class=" hwork_tit_une">
|
||||
<%= link_to student_work.name, student_work_path(student_work),:remote => true,:title => student_work.name, :class => "c_blue02"%>
|
||||
</li>
|
||||
<li class=" hwork_time_c">
|
||||
|
@ -24,22 +24,20 @@
|
|||
<li class=" hwork_score <%= score_color student_work.teaching_asistant_score%>">
|
||||
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
|
||||
</li>
|
||||
<li class=" hwork_code02 <%= score_color student_work.student_score%> student_score_info" >
|
||||
<%= student_work.student_score.nil? ? "--" : format("%.1f",student_work.student_score)%>
|
||||
<% unless student_work.student_score.nil?%>
|
||||
<span class="">
|
||||
(<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>)
|
||||
</span>
|
||||
<% score = student_work.respond_to?("score") ? student_work.score : student_work.final_score - student_work.absence_penalty - student_work.late_penalty%>
|
||||
<li class=" hwork_score <%= score_color score%> student_final_scor_info ml4">
|
||||
<%= score.nil? ? "--" : format("%.1f",score)%>
|
||||
<% unless score.nil?%>
|
||||
<!-- 非匿评作品不显示缺评扣分 -->
|
||||
<div class="info_ni">
|
||||
现共有
|
||||
<span class="c_red"> <%= student_work.student_works_scores.where(:reviewer_role => 3).count%> </span>
|
||||
名学生进行了匿评,平均分为
|
||||
<span class="c_red"> <%= format("%.1f",student_work.student_score)%> </span>分。
|
||||
作品最终评分为
|
||||
<span class="c_red"> <%= student_work.final_score%> </span>分。
|
||||
迟交扣分
|
||||
<span class="c_red"> <%= student_work.late_penalty%> </span>分,
|
||||
最终成绩为
|
||||
<span class="c_red"> <%= format("%.1f",score)%> </span>分。
|
||||
</div>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class=" hwork_score <%= score_color student_work.final_score%>">
|
||||
<%= student_work.final_score.nil? ? "--" : format("%.1f",student_work.final_score)%>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
</ul><!---hwork_ul end-->
|
|
@ -7,36 +7,31 @@
|
|||
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="hwork_tit">
|
||||
<li class="hwork_tit_une">
|
||||
<span class="c_dark f14 fb fl">作品名称</span>
|
||||
</li>
|
||||
<li class=" hwork_time f14 fb c_dark">
|
||||
<%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
|
||||
<% if @show_all && @order == "created_at"%>
|
||||
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
||||
<%= link_to "",student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="mr5 w40 ml15">
|
||||
<%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
|
||||
<% if @show_all && @order == "teacher_score"%>
|
||||
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="mr5 w40 ml20">
|
||||
<%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
|
||||
<% if @show_all && @order == "teaching_asistant_score"%>
|
||||
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="mr5 ml10 w40">
|
||||
<%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
|
||||
<% if @show_all && @order == "student_score"%>
|
||||
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
|
||||
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="ml20">
|
||||
<%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "final_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
|
||||
<% if @show_all && @order == "final_score"%>
|
||||
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
||||
<%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
|
||||
<% if @show_all && @order == "score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
|
||||
<% end%>
|
||||
</li>
|
|
@ -16,14 +16,26 @@ $("#score_list_<%= @work.id%>").removeAttr("style");
|
|||
|
||||
|
||||
$(function(){
|
||||
//匿评评分提示
|
||||
$(".student_score_info").bind("mouseover",function(e){
|
||||
//alert($(this).html());
|
||||
$(this).find("div").show();
|
||||
$(this).find("div").css("top",e.pageY);
|
||||
$(this).find("div").css("left",e.pageX);
|
||||
// $(this).find("div").css("top",e.pageY);
|
||||
// $(this).find("div").css("left",e.pageX);
|
||||
});
|
||||
$(".student_score_info").bind("mouseout",function(e){
|
||||
//alert($(this).html());
|
||||
$(this).find("div").hide();
|
||||
});
|
||||
//最终成绩提示
|
||||
$(".student_final_scor_info").bind("mouseover",function(e){
|
||||
//alert($(this).html());
|
||||
$(this).find("div").show();
|
||||
// $(this).find("div").css("top",e.pageY);
|
||||
// $(this).find("div").css("left",e.pageX);
|
||||
});
|
||||
$(".student_final_scor_info").bind("mouseout",function(e){
|
||||
//alert($(this).html());
|
||||
$(this).find("div").hide();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
$("#add_score_reply_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'add_score_reply', :locals => {:score => @score}) %>");
|
||||
<% if @status && @status == 1%>
|
||||
$("#replay_histroy_<%= @score.id%>").prepend("<%= escape_javascript(render :partial => 'jour_replay', :locals => {:jour => @jour}) %>");
|
||||
$("#add_score_reply_<%= @score.id%>").hide();
|
||||
<% else%>
|
||||
alert("回复内容不能为空");
|
||||
<% end%>
|
|
@ -1,3 +1,17 @@
|
|||
<script type="text/javascript">
|
||||
<% if @homework.homework_type == 1 && @homework.homework_detail_manual.comment_status == 2 && !@is_teacher && @stundet_works.count > 1%>
|
||||
$(function(){
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/praise_alert') %>');
|
||||
showModal('ajax-modal', '500px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
$('#ajax-modal').parent().css("top","").css("left","");
|
||||
$('#ajax-modal').parent().addClass("anonymos");
|
||||
});
|
||||
<% end%>
|
||||
</script>
|
||||
|
||||
<div class="project_r_h">
|
||||
<div id="menu_r">
|
||||
<ul class="menu_r">
|
||||
|
@ -36,37 +50,65 @@
|
|||
<% if @show_all%>
|
||||
<input type="text" value="<%= @name%>" placeholder="昵称、学号、姓名搜索" class="min_search ml10 fl" onkeypress="SearchByName($(this),'<%= student_work_index_path(:homework => @homework.id)%>',event);">
|
||||
<a class="student_work_search fl" onclick="SearchByName_1($(this).prev(),'<%= student_work_index_path(:homework => @homework.id)%>');" href="javascript:void(0)">搜索</a>
|
||||
<%= link_to "缺评情况",student_work_absence_penalty_student_work_index_path(:homework => @homework.id), :class => "student_work_search fl", :target => "_blank" if @is_teacher%>
|
||||
<%= link_to("缺评情况",student_work_absence_penalty_student_work_index_path(:homework => @homework.id), :class => "student_work_search fl", :target => "_blank") if((@is_teacher || User.current.admin?) && @homework.homework_type == 1) %>
|
||||
<% end%>
|
||||
<% if @is_teacher%>
|
||||
<div class="fr">
|
||||
<% if @homework.student_works.empty?%>
|
||||
<%= link_to "附件", "javascript:void(0)", class: "down_btn fr", :onclick => "alert('没有学生提交作业,无法下载附件')" %>
|
||||
<%= link_to "附件", "javascript:void(0)", class: "down_btn fr zip_download_alert", :onclick => "alert('没有学生提交作业,无法下载附件')" %>
|
||||
<% else%>
|
||||
<%= link_to "附件", zipdown_assort_path(obj_class: @homework.class, obj_id: @homework, format: :json),
|
||||
remote: true, class: "down_btn fr", :id => "download_homework_attachments" %>
|
||||
remote: true, class: "down_btn fr zip_download_alert", :id => "download_homework_attachments" %>
|
||||
<% end%>
|
||||
|
||||
<div class="info_ni_download">
|
||||
使用
|
||||
<span class="c_red">winzip</span>
|
||||
工具进行解压可能会导致
|
||||
<span class="c_red">下载文件乱码</span>
|
||||
,建议您使用
|
||||
<span class="c_red">winrar</span>
|
||||
工具进行解压
|
||||
</div>
|
||||
<%= link_to("匿评", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'down_btn fr') if @homework.homework_type == 1%>
|
||||
<%= link_to("缺评", absence_penalty_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'down_btn fr') if @homework.homework_type == 1%>
|
||||
<%= link_to l(:label_list), student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :format => 'xls'),:class=>'down_btn fr'%>
|
||||
<span class="mt3 fr " style="color:#136b3b;">导出全部:</span>
|
||||
</div>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
</div><!---code_list end--->
|
||||
<ul class="hwork_ul">
|
||||
<% if @is_evaluation.nil?%>
|
||||
<%= render :partial => 'student_work_title'%>
|
||||
<% else%>
|
||||
<%= render :partial => 'evaluation_work_title'%>
|
||||
<% end%>
|
||||
</ul><!---hwork_ul end-->
|
||||
<div class="cl"></div>
|
||||
|
||||
<% @stundet_works.each do |student_work|%>
|
||||
<%= render :partial => (@is_evaluation ? 'evaluation_work' :'student_work'),:locals => {:student_work => student_work}%>
|
||||
<div id="about_hwork_<%= student_work.id%>" ></div>
|
||||
<% if @is_evaluation%>
|
||||
<ul class="hwork_ul">
|
||||
<%= render :partial => 'evaluation_work_title'%>
|
||||
</ul><!---hwork_ul end-->
|
||||
<div class="cl"></div>
|
||||
<% @stundet_works.each do |student_work|%>
|
||||
<%= render :partial => "evaluation_work",:locals => {:student_work => student_work}%>
|
||||
<div id="about_hwork_<%= student_work.id%>" ></div>
|
||||
<% end%>
|
||||
<% else %>
|
||||
<% if @homework.homework_type == 1%>
|
||||
<ul class="hwork_ul">
|
||||
<%= render :partial => 'evaluation_student_work_title'%>
|
||||
</ul><!---hwork_ul end-->
|
||||
<div class="cl"></div>
|
||||
<% @stundet_works.each do |student_work|%>
|
||||
<%= render :partial => "evaluation_student_work",:locals => {:student_work => student_work}%>
|
||||
<div id="about_hwork_<%= student_work.id%>" ></div>
|
||||
<% end%>
|
||||
<% else%>
|
||||
<ul class="hwork_ul">
|
||||
<%= render :partial => 'student_work_title'%>
|
||||
</ul><!---hwork_ul end-->
|
||||
<div class="cl"></div>
|
||||
<% @stundet_works.each do |student_work|%>
|
||||
<%= render :partial => "student_work",:locals => {:student_work => student_work}%>
|
||||
<div id="about_hwork_<%= student_work.id%>" ></div>
|
||||
<% end%>
|
||||
<% end%>
|
||||
<% end%>
|
||||
|
||||
<div class="cl"></div>
|
||||
</div><!---tbc_01 end-->
|
||||
|
||||
|
@ -99,6 +141,23 @@
|
|||
</div>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="mt5">
|
||||
<span class="tit_fb" style="width: auto;"> 扣分标准:</span>
|
||||
<div class="fl mb5 c_red">
|
||||
迟交扣
|
||||
<%= @homework.late_penalty%>
|
||||
分
|
||||
<% if @homework.homework_type == 1%>
|
||||
,缺评一个作品扣
|
||||
<%= @homework.homework_detail_manual.absence_penalty%>
|
||||
分
|
||||
<% else%>
|
||||
。
|
||||
<% end%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cl"></div>
|
||||
<span class="fl">截止时间:<%= @homework.end_time%></span>
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
<script type="text/javascript">
|
||||
<%if @homework.homework_type == 1 && @homework.homework_detail_manual.comment_status != 1%>
|
||||
$(function(){
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/new_student_work_alert') %>');
|
||||
showModal('ajax-modal', '360px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
$('#ajax-modal').parent().css("top","").css("left","");
|
||||
$('#ajax-modal').parent().addClass("anonymos_work");
|
||||
// alert("当前作业已开启匿评,您提交作品后将不会收到任何匿评作品,您的作品也不会被其他用户匿评,如需获得最终成绩,请您联系主讲老师对您的作品单独进行评分");
|
||||
});
|
||||
<% end%>
|
||||
</script>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2">创建作品</h2>
|
||||
</div>
|
||||
|
@ -11,6 +25,11 @@
|
|||
:homework => @homework.id
|
||||
}) do |f|%>
|
||||
<div class="N_con">
|
||||
<% if @homework.homework_type == 1%>
|
||||
<div class=" c_red mb10 ml90">
|
||||
提示:匿评作业提交的作品,作品名称和描述中不能出现真实的姓名信息
|
||||
</div>
|
||||
<% end%>
|
||||
<p>
|
||||
<label class="fl"><span class="c_red">*</span> 作品名称 :</label>
|
||||
<%= f.text_field "name", :required => true, :size => 60, :class => "bo fl", :maxlength => 200, :placeholder => "作品名称", :onkeyup => "regexStudentWorkName();" %>
|
||||
|
|
|
@ -14,13 +14,13 @@
|
|||
<a href="javascript:void(0)">姓名</a>
|
||||
</li>
|
||||
<li class="ml320">
|
||||
<a href="javascript:void(0)">应评</a>
|
||||
<a href="javascript:void(0)"><%= l(:lable_all_penalty)%></a>
|
||||
</li>
|
||||
<li class="ml30">
|
||||
<a href="javascript:void(0)">实评</a>
|
||||
<a href="javascript:void(0)"><%= l(:lable_has_penalty)%></a>
|
||||
</li>
|
||||
<li class="ml30">
|
||||
<%= link_to "缺评",student_work_absence_penalty_student_work_index_path(:homework => @homework.id,:order => @order)%>
|
||||
<%= link_to l(:lable_absence_penalty),student_work_absence_penalty_student_work_index_path(:homework => @homework.id,:order => @order)%>
|
||||
<a href="javascript:void(0);" class="<%= @order == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<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>
|
||||
<span><%= link_to "#{journal.user.show_name}(#{journal.user.login})", 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>-->
|
||||
<p><%=journal.notes.html_safe%></p>
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<%= image_tag(url_to_avatar(e.user), :class => "avatar") %>
|
||||
</td>
|
||||
<td>
|
||||
<table width="580" border="0" class="info-break">
|
||||
<table border="0" class="info-break" style="width:580px;">
|
||||
<% case e.act_type %>
|
||||
<% when 'JournalsForMessage' %>
|
||||
<tr>
|
||||
|
@ -97,7 +97,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580" class="upload_img">
|
||||
<td colspan="2" class="upload_img" style="max-width:580px;">
|
||||
<p class="font_description">
|
||||
<%= textAreailizable act.notes %>
|
||||
</p>
|
||||
|
@ -144,7 +144,7 @@
|
|||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580" class="upload_img">
|
||||
<td colspan="2" class="upload_img" style="max-width:580px;">
|
||||
<p class="font_description">
|
||||
<%= textAreailizable act, :description %>
|
||||
</p></td>
|
||||
|
@ -204,7 +204,7 @@
|
|||
<% else %>
|
||||
<% desStr= textAreailizable(act, :notes) %>
|
||||
<% end %>
|
||||
<td colspan="2" width="580" class="upload_img">
|
||||
<td colspan="2" class="upload_img" style="max-width:580px;">
|
||||
<p class="font_description">
|
||||
<%= desStr %>
|
||||
</p>
|
||||
|
@ -259,7 +259,7 @@
|
|||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580" class="upload_img">
|
||||
<td colspan="2" class="upload_img" style="max-width:580px;">
|
||||
<p class="font_description">
|
||||
<%= textAreailizable act, :long_comments %>
|
||||
</p>
|
||||
|
@ -320,7 +320,7 @@
|
|||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580" class="upload_img">
|
||||
<td colspan="2" class="upload_img" style="max-width:580px;">
|
||||
<p class="font_description">
|
||||
<%= textAreailizable(act, :content) %>
|
||||
</p>
|
||||
|
@ -361,7 +361,7 @@
|
|||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580" class="upload_img">
|
||||
<td colspan="2" class="upload_img" style="max-width:580px;">
|
||||
<p class="font_description"></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -404,7 +404,7 @@
|
|||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580" class="upload_img">
|
||||
<td colspan="2" class="upload_img" style="max-width:580px;">
|
||||
<p class="font_description">
|
||||
<%= textAreailizable act, :description %>
|
||||
</p>
|
||||
|
@ -446,7 +446,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580" style="WORD-BREAK: break-all; WORD-WRAP: break-word">
|
||||
<td colspan="2" class="upload_img" style="max-width:580px;">
|
||||
<%= textAreailizable act, :description %>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -482,7 +482,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580" style="WORD-BREAK: break-all; WORD-WRAP: break-word">
|
||||
<td colspan="2" class="upload_img" style="max-width:580px;">
|
||||
<%= textAreailizable act, :description %>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -535,7 +535,7 @@
|
|||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580" class="upload_img">
|
||||
<td colspan="2" class="upload_img" style="max-width:580px;">
|
||||
<p class="font_description">
|
||||
<%= textAreailizable act, :description %>
|
||||
</p>
|
||||
|
@ -609,7 +609,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580" class="upload_img">
|
||||
<td colspan="2" class="upload_img" style="max-width:580px;">
|
||||
<p class="font_description">
|
||||
<%= textAreailizable e.notes %>
|
||||
</p>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% course_list.map do |course| %>
|
||||
<li class='<%= cycle("odd", "even") %>' title="<%= course.description.to_s.gsub(/<\/?.*?>/,'') %>" style="min-height: 69px;">
|
||||
<div class='avatar'>
|
||||
<%= image_tag(get_course_avatar(course), :class => "avatar-4") %>
|
||||
<%= image_tag(url_to_avatar(course), :class => "avatar-4") %>
|
||||
</div>
|
||||
<!-- 上左下右 -->
|
||||
<div class='desc_item'>
|
||||
|
@ -27,7 +27,7 @@
|
|||
(<%= course.members.count %>人)
|
||||
<% files_count = visable_attachemnts_incourse(course).count %>
|
||||
<% if files_count > 0%>
|
||||
(<%= link_to "#{files_count.to_s}份", course_files_path(course) %>公开资料)
|
||||
(<%= link_to "#{files_count.to_s}份", course_files_path(course) %>资料)
|
||||
<% end %>
|
||||
</div>
|
||||
</li>
|
||||
|
|
|
@ -6,17 +6,17 @@
|
|||
<div class="recall" id='word_li_<%=reply.id.to_s%>' onmouseover="$('#<%= ids_r %>').show()" onmouseout="$('#<%= ids_r %>').hide()">
|
||||
<div class="recall_head">
|
||||
<% if show_name %>
|
||||
<%= image_tag url_to_avatar(reply.user),:width => '30',:height => '30' %>
|
||||
<%= image_tag url_to_avatar(reply.user.show_name),:width => '30',:height => '30' %>
|
||||
<% else %>
|
||||
<%= image_tag url_to_avatar(nil),:width => '30',:height => '30' %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="recall_con">
|
||||
<% id = 'project_respond_form_'+ reply.id.to_s %>
|
||||
<%= link_to reply.user.name, user_path(reply.user) %>
|
||||
<%= link_to "#{reply.user.show_name}(#{reply.user.login})", user_path(reply.user) %>
|
||||
<%= l(:label_reply_to)%>
|
||||
<% if show_name %>
|
||||
<%= link_to parent_jour.user.name, user_path(parent_jour.user) %>
|
||||
<%= link_to "#{parent_jour.user.show_name}(#{parent_jour.user.login})", user_path(parent_jour.user) %>
|
||||
<% else %>
|
||||
<%= l(:label_anonymous) %>
|
||||
<% end %>
|
||||
|
@ -24,6 +24,7 @@
|
|||
<p>
|
||||
<%= reply.notes.html_safe %>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<span class="c_grey fl">
|
||||
<%= format_time reply.created_on %>
|
||||
</span>
|
||||
|
|
|
@ -263,7 +263,7 @@ zh:
|
|||
label_tags_numbers: "Tag统计"
|
||||
|
||||
label_issue_plural: 问题跟踪
|
||||
label_project_plural: 项目列表
|
||||
# label_project_plural: 项目列表
|
||||
label_user_plural: 用户列表
|
||||
label_tags_call: 需求
|
||||
field_filename: 文件
|
||||
|
@ -337,7 +337,7 @@ zh:
|
|||
#
|
||||
# 贴吧动态栏
|
||||
#
|
||||
lable_bar_active: 问题和反馈动态
|
||||
lable_bar_active: 贴吧动态
|
||||
label_my_question: 我要提问
|
||||
label_my_feedback: 我要反馈
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ zh:
|
|||
label_course_mail_news_reply: 课程通知回复
|
||||
label_main_teacher: 主讲教师
|
||||
label_course_term: 开课学期
|
||||
label_isuue_mail_status: 更新了issue状态
|
||||
label_isuue_mail_status: 更新了issue状态!
|
||||
|
||||
label_join_course: 加入
|
||||
label_exit_course: 退出
|
||||
|
|
|
@ -183,10 +183,10 @@ en:
|
|||
setting_bcc_recipients: Blind carbon copy recipients (bcc)
|
||||
setting_plain_text_mail: Plain text mail (no HTML)
|
||||
setting_host_name: Host name and path
|
||||
setting_host_course: Host course and path
|
||||
setting_host_contest: Host contest and path
|
||||
setting_host_user: Host user and path
|
||||
setting_host_repository: Host repository and path
|
||||
setting_host_course: Host course and path
|
||||
setting_host_contest: Host contest and path
|
||||
setting_host_user: Host user and path
|
||||
setting_host_repository: Host repository and path
|
||||
setting_text_formatting: Text formatting
|
||||
setting_wiki_compression: Wiki history compression
|
||||
setting_feeds_limit: Maximum number of items in Atom feeds
|
||||
|
@ -961,6 +961,8 @@ en:
|
|||
label_overview: "Overview"
|
||||
label_project_tool: "Tool"
|
||||
label_project_issues: "Issues"
|
||||
label_project_issue: "Created the Issue:"
|
||||
label_project_issue_update: "Upadated the Issue:"
|
||||
label_project_newother: "See other comments"
|
||||
label_project_newshare: "has shared"
|
||||
label_project_newadd: "added"
|
||||
|
@ -1469,6 +1471,7 @@ en:
|
|||
label_borad_course: Course-borad
|
||||
|
||||
label_project_notice: release the notice
|
||||
label_project_notice_reply: reply the notice
|
||||
|
||||
label_forum_new: New forum
|
||||
label_memo_new_from_forum: Release memo
|
||||
|
@ -1524,7 +1527,7 @@ en:
|
|||
label_recently_updated_courseware: Recently updated the courseware
|
||||
label_no_courses: You do not participate in any course, please search the curriculum, course, or create a course!
|
||||
label_commit_failed: commit failed
|
||||
#api end
|
||||
error_upload_avatar_to_large: "too big (%{max_size})"
|
||||
not_valid_image_file: not a valid image file
|
||||
|
||||
#api end
|
||||
error_upload_avatar_to_large: "too big (%{max_size})"
|
||||
not_valid_image_file: not a valid image file
|
||||
|
||||
|
|
|
@ -399,6 +399,7 @@ zh:
|
|||
label_issue_number: issue的数量
|
||||
label_issue_journal_number: issue的留言数量
|
||||
label_project_mail_feedback: 项目留言
|
||||
label_project_issue_feedback: 留言
|
||||
|
||||
label_news_score: 新闻得分
|
||||
label_new_number: 新闻的数量
|
||||
|
|
|
@ -12,6 +12,7 @@ zh:
|
|||
notice_account_wrong_password: 密码错误
|
||||
name_can_be_empty: 可以不填写真实姓名[保密所需]
|
||||
notice_successful_create: 创建成功
|
||||
notice_create_failed: 创建失败,请先完善个人信息
|
||||
notice_failed_create: 创建失败
|
||||
notice_successful_update: 更新成功
|
||||
notice_successful_edit: 修改成功
|
||||
|
@ -736,7 +737,7 @@ zh:
|
|||
label_date_to: 到
|
||||
label_language_based: 根据用户的语言
|
||||
|
||||
label_mail_policy: 邮件策略
|
||||
label_mail_policy: 您可以修改邮件通知策略
|
||||
label_send_test_email: 发送测试邮件
|
||||
label_feeds_access_key: RSS存取键
|
||||
label_missing_feeds_access_key: 缺少RSS存取键
|
||||
|
@ -783,8 +784,13 @@ zh:
|
|||
label_project_newother: "查看其他评论"
|
||||
label_project_newshare: "分享了"
|
||||
label_project_notice: "发布了通知:"
|
||||
label_project_notice_reply: "回复了通知:"
|
||||
label_course_notice_point: "通知有了新的回复!"
|
||||
lable_project_notice_point: "新闻有了新的回复!"
|
||||
label_project_mail_notice: "发布了新闻:"
|
||||
label_project_issue: "发布了问题:"
|
||||
lable_project_mail_notice_reply: "回复了新闻:"
|
||||
label_project_issue: "发布了问题:"
|
||||
label_project_issue_update: "更新了问题:"
|
||||
label_project_newadd: "添加了"
|
||||
label_project_unadd: "暂无项目,赶快去创建吧!"
|
||||
label_project_un: "该用户暂未参与任何项目!"
|
||||
|
@ -1815,6 +1821,8 @@ zh:
|
|||
excel_member_with_out_class: "未加入班级的学生"
|
||||
excel_member_list: 成员列表
|
||||
excel_homework_list: 作品列表
|
||||
excel_absence_list: 缺评列表
|
||||
excel_evaluation_list: 匿评列表
|
||||
excel_been_rated: 已评
|
||||
excel_not_rated: 未评
|
||||
label_export_excel: 导出列表
|
||||
|
@ -1845,6 +1853,7 @@ zh:
|
|||
label_attendingcontestwork_adaptive_system: 系统支持
|
||||
label_attendingcontestwork_download: 作品下载
|
||||
label_course_attendingcontestwork_download: 课件下载
|
||||
label_course_mail_files: 课程资源
|
||||
label_attendingcontestwork_developers: 开发人员
|
||||
label_attendingcontestwork_average_scores: 平均评分
|
||||
label_attendingcontestwork_release_time: 发布时间
|
||||
|
@ -1919,6 +1928,7 @@ zh:
|
|||
label_my_score: 我的评分
|
||||
field_open_anonymous_evaluation: 是否使用匿评
|
||||
label_course_empty_select: 尚未选择课程!
|
||||
label_project_empty_select: 尚未选择项目!
|
||||
label_course_prompt: 课程:
|
||||
label_project_prompt: 项目:
|
||||
label_contain_resource: 已包含资源:
|
||||
|
@ -2000,3 +2010,21 @@ zh:
|
|||
|
||||
error_upload_avatar_to_large: "超过大小限制 (%{max_size})"
|
||||
not_valid_image_file: 不是有效的图片文件
|
||||
|
||||
lable_all_penalty: 应评
|
||||
lable_has_penalty: 实评
|
||||
lable_absence_penalty: 缺评
|
||||
|
||||
label_work_name: 作品名称
|
||||
label_work_autor: 作品提交者
|
||||
label_work_id: 提交者学号
|
||||
label_evaluation_id: 匿评者学号
|
||||
label_evaluation_name: 匿评者
|
||||
label_evaluation_score: 匿评分数
|
||||
label_evaluation_common: 匿评评语
|
||||
label_evaluation_time: 匿评时间
|
||||
|
||||
label_file_lost_list: 缺失文件列表
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -101,6 +101,8 @@ RedmineApp::Application.routes.draw do
|
|||
post 'add_score_reply'
|
||||
get 'destroy_score_reply'
|
||||
get 'student_work_absence_penalty'
|
||||
get 'absence_penalty_list'
|
||||
get 'evaluation_list'
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -193,6 +195,7 @@ RedmineApp::Application.routes.draw do
|
|||
resources :stores do
|
||||
collection do
|
||||
match 'search', :via => [:get, :post]
|
||||
get 'lost_file'
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -636,6 +639,7 @@ RedmineApp::Application.routes.draw do
|
|||
|
||||
match 'admin', :to => 'admin#index', :via => :get
|
||||
match 'admin/projects', :via => :get
|
||||
get 'admin/courses'
|
||||
match 'admin/users', :via => :get
|
||||
match 'admin/first_page_made', as: :first_page_made
|
||||
match 'admin/course_page_made', as: :course_page_made
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
class DeleteSameScore < ActiveRecord::Migration
|
||||
def up
|
||||
student_work_scores = StudentWorksScore.find_by_sql("SELECT * FROM student_works_scores AS a
|
||||
WHERE (a.student_work_id,a.user_id) IN (SELECT student_work_id,user_id FROM student_works_scores GROUP BY student_work_id,user_id HAVING COUNT(*) > 1)
|
||||
AND id NOT IN (SELECT MIN(id) FROM student_works_scores GROUP BY student_work_id,user_id HAVING COUNT(*)>1)")
|
||||
student_work_scores.each do |score|
|
||||
score.destroy
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -0,0 +1,9 @@
|
|||
class AddLatePenaltyToStudnetWork < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :student_works, :late_penalty, :integer, default: 0
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :student_works, :late_penalty
|
||||
end
|
||||
end
|
|
@ -0,0 +1,9 @@
|
|||
class AddAbsencePenaltyToStudnetWork < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :student_works, :absence_penalty, :integer, default: 0
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :student_works, :absence_penalty
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20150619060110) do
|
||||
ActiveRecord::Schema.define(:version => 20150702073308) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -1231,6 +1231,8 @@ ActiveRecord::Schema.define(:version => 20150619060110) do
|
|||
t.integer "project_id", :default => 0
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "late_penalty", :default => 0
|
||||
t.integer "absence_penalty", :default => 0
|
||||
end
|
||||
|
||||
create_table "student_works_evaluation_distributions", :force => true do |t|
|
||||
|
|
|
@ -367,6 +367,7 @@ end
|
|||
Redmine::MenuManager.map :admin_menu do |menu|
|
||||
menu.push :organization, {:controller => 'admin', :action => 'organization'}, :caption => :label_organization_list
|
||||
menu.push :projects, {:controller => 'admin', :action => 'projects'}, :caption => :label_project_plural
|
||||
menu.push :courses, {:controller => 'admin', :action => 'courses'}, :caption => :label_course_all
|
||||
menu.push :users, {:controller => 'admin', :action => 'users'}, :caption => :label_user_plural
|
||||
menu.push :first_page_made, {:controller => 'admin',:action => 'first_page_made'},:caption => :label_first_page_made
|
||||
menu.push :mobile_version, {:controller => 'admin',:action => 'mobile_version'},:caption => :label_mobile_version
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class CodeReviewController < ApplicationController
|
||||
layout "project_base"
|
||||
layout "base_projects"
|
||||
unloadable
|
||||
before_filter :find_project, :authorize, :find_user, :find_setting, :find_repository
|
||||
|
||||
|
|
|
@ -671,6 +671,8 @@ function edit_student_work(id)
|
|||
{$("#edit_student_work_" + id).submit();}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
//滑动打分
|
||||
$.fn.peSlider = function(settings){
|
||||
//configurable options (none so far)
|
||||
|
@ -786,15 +788,38 @@ $(function(){
|
|||
$(".student_score_info").bind("mouseover",function(e){
|
||||
//alert($(this).html());
|
||||
$(this).find("div").show();
|
||||
$(this).find("div").css("top",e.pageY);
|
||||
$(this).find("div").css("left",e.pageX);
|
||||
//$(this).find("div").css("top",e.pageY);
|
||||
//$(this).find("div").css("left",e.pageX);
|
||||
});
|
||||
$(".student_score_info").bind("mouseout",function(e){
|
||||
//alert($(this).html());
|
||||
$(this).find("div").hide();
|
||||
});
|
||||
//最终成绩提示
|
||||
$(".student_final_scor_info").bind("mouseover",function(e){
|
||||
//alert($(this).html());
|
||||
$(this).find("div").show();
|
||||
//$(this).find("div").css("top",e.pageY);
|
||||
//$(this).find("div").css("left",e.pageX);
|
||||
});
|
||||
$(".student_final_scor_info").bind("mouseout",function(e){
|
||||
//alert($(this).html());
|
||||
$(this).find("div").hide();
|
||||
});
|
||||
|
||||
$("#about_project label").eq(1).remove();
|
||||
|
||||
//附件下载提示
|
||||
$(".zip_download_alert").bind("mouseover",function(e){
|
||||
//alert($(this).html());
|
||||
$(this).next("div").show();
|
||||
//$(this).next("div").css("top",e.pageY);
|
||||
//$(this).next("div").css("left",e.pageX);
|
||||
});
|
||||
$(".zip_download_alert").bind("mouseout",function(e){
|
||||
//alert($(this).html());
|
||||
$(this).next("div").hide();
|
||||
});
|
||||
});
|
||||
|
||||
//匿评弹框取消按钮
|
||||
|
|
|
@ -2795,3 +2795,5 @@ div.repos_explain{
|
|||
}
|
||||
.upload_img img{max-width: 100%;}
|
||||
#activity .upload_img img{max-width: 580px;}
|
||||
|
||||
img,embed{max-width: 100%;}
|
|
@ -52,6 +52,7 @@ a:hover.problem_pic{border:1px solid #64bdd9;}
|
|||
a.problem_name{ color:#ff5722;max-width:60px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
|
||||
a:hover.problem_name{ color:#d33503;}
|
||||
a.problem_tit{ color:#0781b4; max-width:410px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
a.pro_mes_w{ height:20px; float:right;display:block; color:#999999;}
|
||||
a:hover.problem_tit{ color:#09658c; }
|
||||
.problem_main{ border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;}
|
||||
/****翻页***/
|
||||
|
@ -278,14 +279,11 @@ a:hover.member_btn{ background:#329cbd;}
|
|||
/* 匿名评分弹框 */
|
||||
/*.popbox02{width:480px;height:200px;position:absolute;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}*/
|
||||
.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;}
|
||||
a.xls{ margin-left:5px; color:#136b3b;}
|
||||
|
||||
/* 开启匿评弹框 */
|
||||
.anonymos{width:480px;height:180px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
|
||||
.anonymos_work {position:fixed !important;left:60%;top:60%;margin:-215px 0 0 -300px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
|
||||
.ni_con { width:425px; margin:25px 30px;}
|
||||
.ni_con h2{ display:block; height:40px; width:425px; text-align:center; color:#3a3a3a;}
|
||||
.ni_con p{ color:#808181; }
|
||||
|
@ -294,6 +292,8 @@ a.xls{ margin-left:5px; color:#136b3b;}
|
|||
a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#15bccf; text-align:center; padding-top:4px; float:left; margin-right:15px;}
|
||||
a:hover.tijiao{ background:#0f99a9;}
|
||||
.c_pink{ color:#e65d5e;}
|
||||
.ni_con_work { width:300px; margin:25px 20px;}
|
||||
.ni_con_work p{ color:#808181; }
|
||||
|
||||
/* 学生列表*/
|
||||
.st_list{ width:670px;}
|
||||
|
@ -626,6 +626,8 @@ a:hover.icon_add{background:url(images/icons.png) -20px -310px no-repeat;}
|
|||
|
||||
.hwork_tit{ width:210px; float:left; }
|
||||
.hwork_tit a{ width:205px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
||||
.hwork_tit_une{ width:270px; float:left; }
|
||||
.hwork_tit_une a{ width:265px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
||||
.hwork_code{ width:56px; text-align:center; }
|
||||
.hwork_code02{ width:60px; text-align:center; }
|
||||
.hwork_tit_e{ width:420px; float:left; }
|
||||
|
@ -655,7 +657,8 @@ a.down_btn{ border:1px solid #CCC; color:#999; padding:0px 5px; font-size:12px;
|
|||
a:hover.down_btn{ background:#14ad5a; color:#fff; border:1px solid #14ad5a;}
|
||||
.fr{ float:right;}
|
||||
.li_min_search{ float:right; margin-right:-10px;}
|
||||
.info_ni{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;}
|
||||
.info_ni_download{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 200px;margin-top: 10px;}
|
||||
.info_ni{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 50px;margin-top: -5px;}
|
||||
/*返回顶部*/
|
||||
.to_top{width: 19px;height: 74px;position: fixed;top: 50px;right: 1px;color: white;background: #15bccf; line-height: 1.2; padding-top: 10px;padding-left: 5px;font-size: 14px;cursor: pointer;}
|
||||
.hwork_num_ab{ width:120px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;min-height: 1px;}
|
||||
|
@ -678,11 +681,13 @@ input#score{ width:40px;}
|
|||
.student_work_search{background-color: #64bdd9;color: white !important;padding: 2px 7px;margin-left: 10px;cursor: pointer; }
|
||||
|
||||
/* 与我相关 */
|
||||
.new_icon{background:url(../images/new_icon.png) 0px 0px no-repeat; width:35px; height:15px; display:block;}
|
||||
/*.new_icon{background:url(../images/new_icon.png) 0px 0px no-repeat; width:35px; height:15px; display:block;}*/
|
||||
a.about_me{text-align:center;font-size:16px; color:#64bdd9; margin:10px 0 0 10px;}
|
||||
a:hover.about_me{ color:#0781b4;}
|
||||
|
||||
|
||||
.mb5 li{width:200px;word-wrap: break-word;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -84,6 +84,7 @@ a:hover.problem_tit,a:hover.problem_tit02{ color:#09658c; }
|
|||
.problem_main{ border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;}
|
||||
a.pro_mes{ float:left; color:#a0a0a0; display:block; width:100px; height:20px; }
|
||||
a.pro_mes_w{ height:20px; float:left;display:block; color:#999999;}
|
||||
a.pro_mes_w_news{ height:20px; float:right;display:block; color:#999999;}
|
||||
|
||||
.pro_page_top{ font-size:14px; border-bottom:2px solid #64bdd9; margin-bottom:10px; padding-bottom:5px;}
|
||||
.pro_page_tit{color:#3e4040; font-weight:bold;width:480px; float:left; font-size:14px; margin-bottom:5px;}
|
||||
|
@ -244,7 +245,7 @@ a.remove-upload:hover {text-decoration:none !important;}
|
|||
|
||||
#attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;}
|
||||
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;}
|
||||
#attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px;}
|
||||
#attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px; white-space: nowrap; text-overflow:ellipsis;}
|
||||
span.add_attachment {font-size: 80%;line-height: 2.5em;}
|
||||
#attachments_fields span {display: block;white-space: nowrap;}
|
||||
.file_selector{position: relative;opacity: 0;filter: alpha(opacity:0);}
|
||||
|
|
|
@ -98,6 +98,8 @@ h4{ font-size:14px; color:#3b3b3b;}
|
|||
.w210{ width:210px;}
|
||||
.w150{ width:150px;}
|
||||
.w280{ width:280px;}
|
||||
.w265{ width: 265px;}
|
||||
.w270{ width: 270px;}
|
||||
.w430{ width:470px;}
|
||||
.w520{ width:520px;}
|
||||
.w543{ width:543px;}
|
||||
|
@ -439,7 +441,7 @@ a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
|
|||
|
||||
/*文本左对齐*/
|
||||
.tl{text-align: left;}
|
||||
img{max-width: 100%;}
|
||||
img,embed{max-width: 100%;}
|
||||
.attachments {clear: both;}
|
||||
.is_public_checkbox{margin-left: 15px;margin-right: 10px;}
|
||||
.author_name{color: #3ca5c6 !important;}
|
||||
|
|
|
@ -1635,6 +1635,7 @@ img.avatar {
|
|||
display: block;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue