Merge remote-tracking branch 'origin/szzh' into szzh
This commit is contained in:
commit
e85ef7b192
|
@ -20,11 +20,10 @@ class CoursesController < ApplicationController
|
|||
menu_item l(:label_sort_by_influence), :only => :index
|
||||
|
||||
before_filter :can_show_course, :except => []
|
||||
before_filter :logged_user_by_apptoken,:only => [:show,:new_homework,:feedback]
|
||||
before_filter :find_course, :except => [ :index, :search,:list, :new,:join,:unjoin, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise,:view_homework_attaches,:join_private_courses]
|
||||
before_filter :authorize_course, :only => [:show, :settings, :edit, :update, :modules, :close, :reopen, :view_homework_attaches, :course]
|
||||
before_filter :authorize_course_global, :only => [:view_homework_attaches, :new,:create]
|
||||
before_filter :require_admin, :only => [:copy, :archive, :unarchive, :destroy, :calendar]
|
||||
before_filter :logged_user_by_apptoken,:only => [:show,:feedback]
|
||||
before_filter :find_course, :except => [ :index, :search, :new,:join,:unjoin, :create, :new_join, :course,:join_private_courses]
|
||||
before_filter :authorize_course, :only => [:show, :settings, :update, :course]
|
||||
before_filter :authorize_course_global, :only => [:new,:create]
|
||||
before_filter :toggleCourse, :only => [:finishcourse, :restartcourse]
|
||||
|
||||
before_filter :require_login, :only => [:join, :unjoin]
|
||||
|
@ -605,7 +604,7 @@ class CoursesController < ApplicationController
|
|||
|
||||
def toggleCourse
|
||||
@course_prefs = Course.find_by_extra(@course.extra)
|
||||
unless (@course_prefs.teacher == User.current || User.current.admin?)
|
||||
unless (@course_prefs.student != User.current || User.current.admin?)
|
||||
render_403
|
||||
end
|
||||
end
|
||||
|
@ -809,6 +808,12 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
#删除课程
|
||||
#删除课程只是将课程的is_delete状态改为false,is_delete为false状态的课程只有管理员可以看到
|
||||
def destroy
|
||||
|
||||
end
|
||||
|
||||
private
|
||||
def allow_join course
|
||||
if course_endTime_timeout? course
|
||||
|
|
|
@ -18,31 +18,31 @@ class HomeworkCommonController < ApplicationController
|
|||
end
|
||||
|
||||
def new
|
||||
@homework_type = "1"
|
||||
|
||||
@homework = HomeworkCommon.new
|
||||
@homework.safe_attributes = params[:homework_common]
|
||||
@homework.late_penalty = 0
|
||||
@homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||
@homework.publish_time = Time.now.strftime('%Y-%m-%d')
|
||||
|
||||
if @homework_type == "1"
|
||||
#匿评作业相关属性
|
||||
@homework_detail_manual = HomeworkDetailManual.new
|
||||
@homework_detail_manual.ta_proportion = 0.6
|
||||
@homework_detail_manual.absence_penalty = 0
|
||||
@homework_detail_manual.evaluation_num = 3
|
||||
@homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d')
|
||||
@homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||
@homework.homework_detail_manual = @homework_detail_manual
|
||||
elsif @homework_type == "2"
|
||||
#编程作业相关属性
|
||||
@homework_detail_programing = HomeworkDetailPrograming.new
|
||||
@homework.homework_detail_programing = @homework_detail_programing
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html
|
||||
end
|
||||
# @homework_type = "1"
|
||||
#
|
||||
# @homework = HomeworkCommon.new
|
||||
# @homework.safe_attributes = params[:homework_common]
|
||||
# @homework.late_penalty = 0
|
||||
# @homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||
# @homework.publish_time = Time.now.strftime('%Y-%m-%d')
|
||||
#
|
||||
# if @homework_type == "1"
|
||||
# #匿评作业相关属性
|
||||
# @homework_detail_manual = HomeworkDetailManual.new
|
||||
# @homework_detail_manual.ta_proportion = 0.6
|
||||
# @homework_detail_manual.absence_penalty = 0
|
||||
# @homework_detail_manual.evaluation_num = 3
|
||||
# @homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d')
|
||||
# @homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||
# @homework.homework_detail_manual = @homework_detail_manual
|
||||
# elsif @homework_type == "2"
|
||||
# #编程作业相关属性
|
||||
# @homework_detail_programing = HomeworkDetailPrograming.new
|
||||
# @homework.homework_detail_programing = @homework_detail_programing
|
||||
# end
|
||||
# respond_to do |format|
|
||||
# format.html
|
||||
# end
|
||||
end
|
||||
|
||||
#新建作业下一步
|
||||
|
@ -209,7 +209,7 @@ class HomeworkCommonController < ApplicationController
|
|||
end
|
||||
|
||||
if @homework.homework_type == 2 && @homework_detail_programing #编程作业
|
||||
@homework_detail_programing.language = "C++"
|
||||
@homework_detail_programing.language = params[:language]
|
||||
@homework_detail_programing.standard_code = params[:standard_code]
|
||||
@homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6
|
||||
homework_tests = @homework.homework_tests
|
||||
|
@ -236,6 +236,25 @@ class HomeworkCommonController < ApplicationController
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
#发送修改作业的请求
|
||||
question = {title:@homework.name,content:@homework.description}
|
||||
question[:input] = []
|
||||
question[:output] = []
|
||||
@homework.homework_tests.each do |test|
|
||||
question[:input] << test.input
|
||||
question[:output] << test.output
|
||||
end
|
||||
uri = URI("http://192.168.80.21:8080/api/questions/#{@homework_detail_programing.question_id}.json")
|
||||
body = question.to_json
|
||||
res = Net::HTTP.new(uri.host, uri.port).start do |client|
|
||||
request = Net::HTTP::Put.new(uri.path)
|
||||
request.body = body
|
||||
request["Content-Type"] = "application/json"
|
||||
client.request(request)
|
||||
end
|
||||
result = JSON.parse(res.body)
|
||||
homework_detail_programing.question_id = result["id"] if result["status"] && result["status"] == 0
|
||||
end
|
||||
|
||||
@homework.save_attachments(params[:attachments])
|
||||
|
|
|
@ -484,7 +484,18 @@ update
|
|||
if params[:repository_id].present?
|
||||
@repository = @project.repositories.find_by_identifier_param(params[:repository_id])
|
||||
else
|
||||
@repository = @project.repository
|
||||
# 多版本库,如果一个版本库为空则去下一个
|
||||
rep_count = @project.repositories.count
|
||||
if @project.repository.nil?
|
||||
for i in 0..rep_count
|
||||
unless @project.repositories[i].nil?
|
||||
@repository = @project.repositories[i]
|
||||
break
|
||||
end
|
||||
end
|
||||
else
|
||||
@repository = @project.repository
|
||||
end
|
||||
end
|
||||
(render_404; return false) unless @repository
|
||||
@path = params[:path].is_a?(Array) ? params[:path].join('/') : params[:path].to_s
|
||||
|
|
|
@ -468,22 +468,60 @@ class StudentWorkController < ApplicationController
|
|||
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_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),
|
||||
l(:excel_t_score),l(:excel_ta_score),l(:excel_n_score),l(:excel_f_score),l(:excel_commit_time)])
|
||||
count_row = 1
|
||||
items.each do |homework|
|
||||
sheet1[count_row,0]=homework.user.id
|
||||
sheet1[count_row,1] = homework.user.lastname.to_s + homework.user.firstname.to_s
|
||||
sheet1[count_row,2] = homework.user.login
|
||||
sheet1[count_row,3] = homework.user.user_extensions.student_id
|
||||
sheet1[count_row,4] = homework.user.mail
|
||||
sheet1[count_row,5] = homework.name
|
||||
sheet1[count_row,6] = homework.teacher_score.nil? ? l(:label_without_score) : format("%.2f",homework.teacher_score)
|
||||
sheet1[count_row,7] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : format("%.2f",homework.teaching_asistant_score)
|
||||
sheet1[count_row,8] = homework.student_score.nil? ? l(:label_without_score) : format("%.2f",homework.student_score)
|
||||
sheet1[count_row,9] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : format("%.2f",homework.score) : l(:label_without_score)
|
||||
sheet1[count_row,10] = format_time(homework.created_at)
|
||||
count_row += 1
|
||||
if @homework.homework_type == 0 #普通作业
|
||||
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),
|
||||
l(:excel_t_score),l(:excel_ta_score),l(:excel_f_score),l(:excel_commit_time)])
|
||||
count_row = 1
|
||||
items.each do |homework|
|
||||
sheet1[count_row,0]=homework.user.id
|
||||
sheet1[count_row,1] = homework.user.lastname.to_s + homework.user.firstname.to_s
|
||||
sheet1[count_row,2] = homework.user.login
|
||||
sheet1[count_row,3] = homework.user.user_extensions.student_id
|
||||
sheet1[count_row,4] = homework.user.mail
|
||||
sheet1[count_row,5] = homework.name
|
||||
sheet1[count_row,6] = homework.teacher_score.nil? ? l(:label_without_score) : format("%.2f",homework.teacher_score)
|
||||
sheet1[count_row,7] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : format("%.2f",homework.teaching_asistant_score)
|
||||
# sheet1[count_row,8] = homework.student_score.nil? ? l(:label_without_score) : format("%.2f",homework.student_score)
|
||||
sheet1[count_row,8] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : format("%.2f",homework.score) : l(:label_without_score)
|
||||
sheet1[count_row,9] = format_time(homework.created_at)
|
||||
count_row += 1
|
||||
end
|
||||
elsif @homework.homework_type == 1 #匿评作业
|
||||
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),
|
||||
l(:excel_t_score),l(:excel_ta_score), l(:excel_n_score),l(:excel_f_score),l(:excel_commit_time)])
|
||||
count_row = 1
|
||||
items.each do |homework|
|
||||
sheet1[count_row,0]=homework.user.id
|
||||
sheet1[count_row,1] = homework.user.lastname.to_s + homework.user.firstname.to_s
|
||||
sheet1[count_row,2] = homework.user.login
|
||||
sheet1[count_row,3] = homework.user.user_extensions.student_id
|
||||
sheet1[count_row,4] = homework.user.mail
|
||||
sheet1[count_row,5] = homework.name
|
||||
sheet1[count_row,6] = homework.teacher_score.nil? ? l(:label_without_score) : format("%.2f",homework.teacher_score)
|
||||
sheet1[count_row,7] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : format("%.2f",homework.teaching_asistant_score)
|
||||
sheet1[count_row,8] = homework.student_score.nil? ? l(:label_without_score) : format("%.2f",homework.student_score)
|
||||
sheet1[count_row,9] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : format("%.2f",homework.score) : l(:label_without_score)
|
||||
sheet1[count_row,10] = format_time(homework.created_at)
|
||||
count_row += 1
|
||||
end
|
||||
elsif @homework.homework_type == 2 #编程作业
|
||||
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),
|
||||
l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_f_score),l(:excel_commit_time)])
|
||||
count_row = 1
|
||||
items.each do |homework|
|
||||
sheet1[count_row,0]=homework.user.id
|
||||
sheet1[count_row,1] = homework.user.lastname.to_s + homework.user.firstname.to_s
|
||||
sheet1[count_row,2] = homework.user.login
|
||||
sheet1[count_row,3] = homework.user.user_extensions.student_id
|
||||
sheet1[count_row,4] = homework.user.mail
|
||||
sheet1[count_row,5] = homework.name
|
||||
sheet1[count_row,6] = homework.teacher_score.nil? ? l(:label_without_score) : format("%.2f",homework.teacher_score)
|
||||
sheet1[count_row,7] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : format("%.2f",homework.teaching_asistant_score)
|
||||
sheet1[count_row,8] = homework.student_score.nil? ? l(:label_without_score) : format("%.2f",homework.student_score)
|
||||
sheet1[count_row,9] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : format("%.2f",homework.score) : l(:label_without_score)
|
||||
sheet1[count_row,10] = format_time(homework.created_at)
|
||||
count_row += 1
|
||||
end
|
||||
end
|
||||
book.write xls_report
|
||||
xls_report.string
|
||||
|
|
|
@ -448,7 +448,7 @@ class UsersController < ApplicationController
|
|||
|
||||
def user_courses4show
|
||||
query = Course.joins("join members m on #{Course.table_name}.id=m.course_id")
|
||||
query = query.where("m.user_id = ?",@user.id)
|
||||
query = query.where("m.user_id = ?",@user.id).order("#{Course.table_name}.id desc")
|
||||
if User.current == @user #看自己
|
||||
else
|
||||
if @user.user_extensions!=nil && @user.user_extensions.identity == 0 #看老师
|
||||
|
@ -456,13 +456,12 @@ class UsersController < ApplicationController
|
|||
query = query.where("r.role_id in(3,7,9)")
|
||||
end
|
||||
query = query.where(Course.table_name+".is_public = 1")
|
||||
# or exists (select 1 from courses c2,members m2 where c2.id=m2.course_id and c2.id=#{Course.table_name}.id and m2.user_id= User.current.id)
|
||||
end
|
||||
|
||||
if params[:lastid]!=nil && !params[:lastid].empty?
|
||||
query = query.where("( (#{Course.table_name}.updated_at=? and #{Course.table_name}.id < ?) or #{Course.table_name}.updated_at<?)",params[:lasttime],params[:lastid],params[:lasttime])
|
||||
query = query.where(" #{Course.table_name}.id < ?",params[:lastid],)
|
||||
end
|
||||
@list = query.order("#{Course.table_name}.updated_at desc,#{Course.table_name}.id desc").limit(8).all
|
||||
@list = query.limit(8)
|
||||
|
||||
render :layout=>nil
|
||||
end
|
||||
|
|
|
@ -38,7 +38,7 @@ module MembersHelper
|
|||
scope = []
|
||||
end
|
||||
principals = paginateHelper scope,10
|
||||
s = content_tag('ul', project_member_check_box_tags_ex('membership[user_ids][]', principals), :class => 'mb5')
|
||||
s = content_tag('ul', project_member_check_box_tags_ex('membership[user_ids][]', principals), :class => 'mb5', :id => 'principals')
|
||||
links = pagination_links_full(@obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true){|text, parameters, options|
|
||||
link_to text, autocomplete_project_memberships_path(project, parameters.merge(:q => params[:q],:flag => true, :format => 'js')), :remote => true
|
||||
}
|
||||
|
|
|
@ -20,9 +20,9 @@ module PraiseTreadHelper
|
|||
# when 0
|
||||
# return @record.tread_num.nil? ? 0 : @record.tread_num
|
||||
# end
|
||||
return (@record.praise_num.to_i-@record.tread_num.to_i)
|
||||
return ((@record.praise_num.nil? ? 0 : @record.praise_num.to_i)-(@record.tread_num.nil? ? 0 : @record.tread_num.to_i))
|
||||
else
|
||||
return 0
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -328,73 +328,41 @@ module UsersHelper
|
|||
return [0,[]]
|
||||
end
|
||||
list = query.order("updated_on desc").limit(10).all
|
||||
return [count,list];
|
||||
return [count,list]
|
||||
end
|
||||
|
||||
def get_create_course_count(user)
|
||||
return Course.where("tea_id = ?",user.id).count()
|
||||
if user == User.current
|
||||
user.courses.count
|
||||
else
|
||||
user.courses.where("is_public = 1").count
|
||||
end
|
||||
end
|
||||
def get_join_course_count(user)
|
||||
return user.coursememberships.count() - get_create_course_count(user)
|
||||
user.coursememberships.count - get_create_course_count(user)
|
||||
end
|
||||
def get_homework_commons_count(user)
|
||||
return HomeworkCommon.where("user_id = ?",user.id).count()
|
||||
HomeworkCommon.where("user_id = ?",user.id).count
|
||||
end
|
||||
def get_projectandcourse_attachment_count(user)
|
||||
return Attachment.where("author_id = ? and container_type in ('Project','Course')",user.id).count()
|
||||
Attachment.where("author_id = ? and container_type in ('Project','Course')",user.id).count
|
||||
end
|
||||
def get_create_project_count(user)
|
||||
return Project.where("user_id = ? and project_type = ?",user.id,Project::ProjectType_project).count()
|
||||
Project.where("user_id = ? and project_type = ?",user.id,Project::ProjectType_project).count
|
||||
end
|
||||
def get_join_project_count(user)
|
||||
return user.memberships.count(conditions: "projects.project_type = #{Project::ProjectType_project}") - get_create_project_count(user)
|
||||
user.memberships.count(conditions: "projects.project_type = #{Project::ProjectType_project}") - get_create_project_count(user)
|
||||
end
|
||||
def get_create_issue_count(user)
|
||||
return Issue.where("author_id = ?",user.id).count()
|
||||
Issue.where("author_id = ?",user.id).count
|
||||
end
|
||||
def get_resolve_issue_count(user)
|
||||
return Issue.where("assigned_to_id = ? and status_id=3",user.id).count()
|
||||
Issue.where("assigned_to_id = ? and status_id=3",user.id).count
|
||||
end
|
||||
def get_anonymous_evaluation_count(user)
|
||||
return StudentWorksScore.where("user_id = ? and reviewer_role=3",user.id).count()
|
||||
StudentWorksScore.where("user_id = ? and reviewer_role=3",user.id).count
|
||||
end
|
||||
|
||||
|
||||
# def query_activities(query,type)
|
||||
# query_rec_count = 8
|
||||
# # query = query.where("act_type='JournalsForMessage'")
|
||||
# #query = query.where("act_type not in (?)", ['JournalsForMessage','Message','HomeworkCommon','News','Issue','Journal','Poll'])
|
||||
# list = query.order("id desc").limit(query_rec_count).all
|
||||
#
|
||||
# result = [];
|
||||
# for item in list
|
||||
# container = get_activity_container(item,type)
|
||||
# if( activity_is_show(item,container) )
|
||||
# result << { :item=>item,:e=>container }
|
||||
# end
|
||||
# end
|
||||
# return [lastid,result]
|
||||
# end
|
||||
# def get_activity_container activity,type
|
||||
# e = nil;
|
||||
# if type == 'Project'
|
||||
# if activity.act_type == 'Poll'
|
||||
# # 项目没有问卷
|
||||
# # e = Project.find_by_id(activity.act.polls_group_id)
|
||||
# else
|
||||
# e = activity.act.project if activity.act.respond_to?('project')
|
||||
# end
|
||||
# end
|
||||
# if type == 'Course'
|
||||
# if activity.act_type == 'Poll'
|
||||
# e = Course.find_by_id(activity.act.polls_group_id)
|
||||
# else
|
||||
# e = activity.act.course if activity.act.respond_to?('course')
|
||||
# end
|
||||
# end
|
||||
#
|
||||
# return e;
|
||||
# end
|
||||
def query_activities(query)
|
||||
list = query.limit(8).all
|
||||
result = [];
|
||||
|
@ -406,31 +374,8 @@ module UsersHelper
|
|||
end
|
||||
def get_activity_container activity
|
||||
return activity.activity_container
|
||||
# if type == 'Project'
|
||||
# return activity.act.project if activity.act.respond_to?('project')
|
||||
# end
|
||||
# if type == 'Course'
|
||||
# if activity.act_type == 'Poll'
|
||||
# return Course.find_by_id(activity.act.polls_group_id)
|
||||
# end
|
||||
# return activity.act.course if activity.act.respond_to?('course')
|
||||
# end
|
||||
# return nil;
|
||||
end
|
||||
|
||||
# def activity_is_show(activity,e)
|
||||
# if(!e)
|
||||
# return false
|
||||
# end
|
||||
#
|
||||
# if activity.user_id == User.current.id
|
||||
# return true
|
||||
# end
|
||||
# if( e.visible? )
|
||||
# return true
|
||||
# end
|
||||
# return false
|
||||
# end
|
||||
def get_activity_act_showname_htmlclear(activity)
|
||||
str = get_activity_act_showname(activity)
|
||||
str = str.gsub(/<.*>/,'')
|
||||
|
|
|
@ -2,5 +2,5 @@ class HomeworkTest < ActiveRecord::Base
|
|||
attr_accessible :input, :output, :homework_common_id
|
||||
|
||||
belongs_to :homework_common
|
||||
has_one :student_work_test
|
||||
has_many :student_work_test
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<div class="box tabular">
|
||||
<p>
|
||||
<label for="mail"><%=l(:field_mail)%> <span class="required">*</span></label>
|
||||
<%= text_field_tag 'mail', nil, :size => 40 %>
|
||||
<%= text_field_tag 'mail', nil, :size => 40, :placeholder => '请输入注册邮箱'%>
|
||||
<%= submit_tag l(:button_submit) %>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
:member_id => member.id,
|
||||
:remote => true},
|
||||
:class => 'ml258 c_red' %>
|
||||
<span class="ml65 c_grey"><%= format_date(member.created_on)%></span>
|
||||
<span class="fr mr15 c_grey"><%= format_date(member.created_on)%></span>
|
||||
<%= call_hook(:view_projects_settings_members_table_row, { :course => @course, :member => member}) %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<ul>
|
||||
<li >
|
||||
<label class="label02"> 开发语言: </label>
|
||||
<%= select_tag :language,options_for_select(programing_languages_options,homework.homework_detail_programing.language), {:class => "fl mb10 h26 w70"} %>
|
||||
<%= select_tag :language,options_for_select(programing_languages_options,homework.homework_detail_programing.language.to_i), {:class => "fl mb10 h26 w70"} %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% if(User.current.logged? && User.current!=target)%>
|
||||
<%if(target.watched_by?(User.current))%>
|
||||
<a id="user_watch_id" href="<%= watch_path(:object_type=>
|
||||
'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr qx_btn mr10" data-method="delete" data-remote="true" title="取消关注">取消</a>
|
||||
'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr qx_btn mr10" data-method="delete" data-remote="true" title="取消关注">取消关注</a>
|
||||
<% else %>
|
||||
<a id="user_watch_id" href="<%= watch_path(:object_type=>'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr gz_btn mr10" data-method="post" data-remote="true" title="添加关注">关注</a>
|
||||
<% end %>
|
||||
|
|
|
@ -19,77 +19,8 @@
|
|||
<%= javascript_heads %>
|
||||
<%= heads_for_theme %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<!-- page specific tags -->
|
||||
<%= yield :header_tags -%>
|
||||
|
||||
<!--
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>个人中心(st)</title>
|
||||
<link href="css/public.css" rel="stylesheet" type="text/css" />
|
||||
<link href="css/leftside.css" rel="stylesheet" type="text/css" />
|
||||
<link href="css/users.css" rel="stylesheet" type="text/css" />
|
||||
<script src="js/jquery-1.3.2.js" type="text/javascript"></script>
|
||||
<script src="js/jquery-1.8.3-ui-1.9.2-ujs-2.0.3.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="js/sidebar.js"></script>
|
||||
|
||||
<script type="text/javascript" src="js/jquery.js"></script>
|
||||
<script type="text/javascript" src="js/jquery-ui-1.8.4.custom.min.js"></script>
|
||||
<script type="text/javascript" src="js/jQuery.peSlider.js"></script>
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
//头部导航
|
||||
var menuids=["TopUserNav"] //Enter id(s) of SuckerTree UL menus, separated by commas
|
||||
function buildsubmenus(){
|
||||
for (var i=0; i<menuids.length; i++){
|
||||
var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
|
||||
for (var t=0; t<ultags.length; t++){
|
||||
ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
|
||||
ultags[t].parentNode.onmouseover=function(){
|
||||
this.getElementsByTagName("ul")[0].style.display="block"
|
||||
}
|
||||
ultags[t].parentNode.onmouseout=function(){
|
||||
this.getElementsByTagName("ul")[0].style.display="none"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (window.addEventListener)
|
||||
window.addEventListener("load", buildsubmenus, false)
|
||||
else if (window.attachEvent)
|
||||
window.attachEvent("onload", buildsubmenus)
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">//侧导航
|
||||
$(function(){
|
||||
$(".subNav").click(function(){
|
||||
$(this).toggleClass("currentDd").siblings(".subNav").removeClass("currentDd")
|
||||
$(this).toggleClass("currentDt").siblings(".subNav").removeClass("currentDt")
|
||||
|
||||
// 修改数字控制速度, slideUp(500)控制卷起速度
|
||||
$(this).next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500);
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function show_window () {
|
||||
$('#light').css('display','block');
|
||||
$('#fade').css('display','block');
|
||||
}
|
||||
|
||||
function close_window(){
|
||||
$('#light').css('display','none');
|
||||
$('#fade').css('display','none');
|
||||
}
|
||||
//弹框l
|
||||
</script> -->
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
@ -103,12 +34,6 @@ $(".subNav").click(function(){
|
|||
<%=link_to l(:field_homepage), home_path %> > <%=link_to (@center_flag ? '个人中心' : '个人主页'), user_path(@user) %> > <%=link_to @user.name, user_path(@user) %>
|
||||
</p>
|
||||
</div>
|
||||
<!--<div class="search fl">-->
|
||||
<!--<form class="search">-->
|
||||
<!--<input type="text" name="serach" placeholder="输入关键词进行搜索" class="search_text fl">-->
|
||||
<!--<a href="javascript:void(0);" class="search_btn fl f14 c_white" >搜 索</a>-->
|
||||
<!--</form>-->
|
||||
<!--</div>-->
|
||||
</div><!--TopBar end-->
|
||||
<div class="cl"></div>
|
||||
|
||||
|
@ -116,7 +41,7 @@ $(".subNav").click(function(){
|
|||
<div id="LSide" class="fl">
|
||||
<div class="users_info">
|
||||
<div class="pic_head">
|
||||
<%= image_tag(url_to_avatar(@user), :id=>'nh_user_tx',:style=>"width:216px;height:216px;",:alt=>"头像") %>
|
||||
<%= image_tag(url_to_avatar(@user), :id=>'nh_user_tx',:style=>"width:214px;height:214px;overflow:hidden",:alt=>"头像") %>
|
||||
<% if @center_flag %>
|
||||
<a href="<%= url_for(:controller => 'my', :action => 'clear_user_avatar_temp') %>" data-remote="true" class="pic_edit usersphoto_edit"></a>
|
||||
<% end %>
|
||||
|
@ -146,11 +71,13 @@ $(".subNav").click(function(){
|
|||
|
||||
<div class="leftbox mt10">
|
||||
<ul class="leftbox_ul_left">
|
||||
<li>加入时间 :</li>
|
||||
<li>最近登录 :</li> <!--加入时间修改为最近登录 -->
|
||||
<% if @user.user_extensions!=nil && @user.user_extensions.identity == 2 %>
|
||||
<li><%= l(:label_company_name) %> :</li>
|
||||
<% elsif !@user.firstname.empty? || !@user.lastname.empty? %>
|
||||
<li>真实姓名 :</li>
|
||||
<% if @user.user_extensions.identity == 0 %>
|
||||
<li>真实姓名 :</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% unless @user.user_extensions.nil? %>
|
||||
<% if @user.user_extensions.identity == 0 %>
|
||||
|
@ -172,8 +99,10 @@ $(".subNav").click(function(){
|
|||
<% end %>
|
||||
</ul>
|
||||
<ul class="leftbox_ul_right c_dgrey">
|
||||
<li><%= format_date(@user.created_on) %></li>
|
||||
<li style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="<%= @user.show_name %>"><%= @user.show_name %></li>
|
||||
<li><%= format_date(@user.last_login_on) %></li> <!-- 加入时间修改为最近登录时间-->
|
||||
<% if @user.user_extensions.identity == 0 %>
|
||||
<li style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="<%= @user.show_name %>"><%= @user.show_name %></li>
|
||||
<% end %>
|
||||
<% unless @user.user_extensions.nil? %>
|
||||
<% if @user.user_extensions.identity == 0 %>
|
||||
<li><%= get_technical_title @user %></li>
|
||||
|
@ -200,22 +129,18 @@ $(".subNav").click(function(){
|
|||
<% if @center_flag %>
|
||||
<div class="subNavBox ">
|
||||
<div class="subNav "><a href="<%=url_for(:controller => 'users', :action => 'show',:id=>@user.id)%>" class=" f14 c_blue02">动态</a></div>
|
||||
<div class="subNav subNav_jiantou"><a href="<%=url_for(:controller => 'users', :action => 'user_courses',:id=>@user.id)%>" class=" f14 c_blue02">我的课程<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.courses.count%>)</span></a></div>
|
||||
<!--<ul class="navContent " >-->
|
||||
<!--<li><a href="javascirpt:void();" >大学计算机基础</a></li>-->
|
||||
<!--<li><a href="javascirpt:void();" >大牛软件核心知识开放课程</a></li>-->
|
||||
<!--<li><a href="javascirpt:void();" >大学计算机基础</a></li>-->
|
||||
<!--<li><a href="javascirpt:void();" >大牛软件核心知识开放课程</a></li>-->
|
||||
<!--<li><a href="javascirpt:void();" >大学计算机基础</a></li>-->
|
||||
<!--</ul>-->
|
||||
<div class="subNav subNav_jiantou"><a href="<%=url_for(:controller => 'users', :action => 'user_projects',:id=>@user.id)%>" class=" f14 c_blue02">我的项目<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.count%>)</span></a></div>
|
||||
<!--<ul class="navContent " >-->
|
||||
<!--<li><a href="javascirpt:void();" >Trustie-Forge</a></li>-->
|
||||
<!--<li><a href="javascirpt:void();" >Trustie-weekly</a></li>-->
|
||||
<!--<li><a href="javascirpt:void();" >大学计算机基础</a></li>-->
|
||||
<!--<li><a href="javascirpt:void();" >大牛软件核心知识开放课程</a></li>-->
|
||||
<!--<li><a href="javascirpt:void();" >大学计算机基础</a></li>-->
|
||||
<!--</ul>-->
|
||||
<div class="subNav subNav_jiantou">
|
||||
<a href="<%=url_for(:controller => 'users', :action => 'user_courses',:id=>@user.id)%>" class=" f14 c_blue02">
|
||||
我的课程
|
||||
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.courses.count%>)</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="subNav subNav_jiantou">
|
||||
<a href="<%=url_for(:controller => 'users', :action => 'user_projects',:id=>@user.id)%>" class=" f14 c_blue02">
|
||||
我的项目
|
||||
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.count%>)</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="subNav "><a href="<%= url_for(:controller => 'my', :action => 'account') %>" class=" f14 c_blue02">编辑资料</a></div>
|
||||
</div><!--侧导航 end-->
|
||||
<% end %>
|
||||
|
@ -256,16 +181,18 @@ $(".subNav").click(function(){
|
|||
<%= render :partial => 'layouts/user_watch_list', :locals => {:user => @user} %>
|
||||
<%= render :partial => 'layouts/user_fans_list', :locals => {:user => @user} %>
|
||||
<% visitor_count,visitor_list = get_visitor_users(@user) %>
|
||||
<div class="leftbox mt10" style="display:<%= visitor_count==0 ? 'none' : 'block' %>">
|
||||
<h4 class="fl">访客</h4><a href="<%=url_for(:controller => 'users', :action => 'user_visitorlist', :id=>@user.id)%>" data-count="<%= visitor_count %>" style="display:<%= visitor_count>10 ? 'block' : 'block' %>" class="more fr mr10">更多</a>
|
||||
<div class="cl"></div>
|
||||
<div class="mt5">
|
||||
<% for visitor in visitor_list %>
|
||||
<%= link_to image_tag(url_to_avatar(visitor.user), :style => "width:38px;height:38px;"), user_path(visitor.user), :class => "pic_members", :title => "#{visitor.user.name}" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<% if(User.current.admin?) %>
|
||||
<div class="leftbox mt10" style="display:<%= visitor_count==0 ? 'none' : 'block' %>">
|
||||
<h4 class="fl">访客</h4><a href="<%=url_for(:controller => 'users', :action => 'user_visitorlist', :id=>@user.id)%>" data-count="<%= visitor_count %>" style="display:<%= visitor_count>10 ? 'block' : 'block' %>" class="more fr mr10">更多</a>
|
||||
<div class="cl"></div>
|
||||
<div class="mt5">
|
||||
<% for visitor in visitor_list %>
|
||||
<%= link_to image_tag(url_to_avatar(visitor.user), :style => "width:38px;height:38px;"), user_path(visitor.user), :class => "pic_members", :title => "#{visitor.user.name}" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div><!--LSide end-->
|
||||
|
||||
|
@ -320,7 +247,7 @@ $(".subNav").click(function(){
|
|||
<span>48px*48px</span> <br />
|
||||
</div>
|
||||
<div class="cl mb10"></div>
|
||||
<a href="javascript:hideModal();" class=" fr grey_btn mr2"> 取 消</a>
|
||||
<a href="javascript:hideModal();" class=" fr grey_btn mr15"> 取 消</a>
|
||||
<a href="<%= url_for(:controller => 'my', :action => 'save_user_avatar') %>" data-remote="true" class="blue_btn fr mr10">确 定</a>
|
||||
|
||||
</div><!--talknew end-->
|
||||
|
|
|
@ -8,8 +8,9 @@
|
|||
<% if @message.project %>
|
||||
<%=h @message.board.project.name %> - <%=h @message.board.name %>: <%= link_to(h(@message.subject), @message_url,:style=>'color:#1b55a7; font-weight:bold;') %>
|
||||
<% elsif @message.course %>
|
||||
<%=h @message.board.course.name %> - <%=h @message.board.name %>: <%= link_to(h(@message.subject), @message_url,:style=>'color:#1b55a7; font-weight:bold;') %>
|
||||
<% end %>
|
||||
<%=h @message.board.course.name %> - <%=h @message.board.name %>:
|
||||
<%= link_to(h(@message.subject), @message_url + "?topic_id=#{@message.id}&&parent_id=#{@message.parent_id ? @message.parent_id : @message.id}",:style=>'color:#1b55a7; font-weight:bold;') %>
|
||||
<% end %>
|
||||
</span><%= l(:mail_issue_title_active)%></p>
|
||||
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
|
||||
<ul style="list-style-type:none; margin:0; padding:0;">
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
<% if @project%>
|
||||
var checked = $("#principals input:checked").size();
|
||||
if(checked > 0)
|
||||
{
|
||||
alert('翻页或搜索后将丢失当前选择的用户数据!');
|
||||
}
|
||||
<% if @flag == "true"%>
|
||||
$('#principals_for_new_member').html('<%= escape_javascript(render_project_members(@project)) %>');
|
||||
<% else%>
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<div class="lz">
|
||||
<!-- 在这里添加赞和踩-->
|
||||
<span id="praise_tread" style="float: right"> <%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%> </span>
|
||||
<span id="praise_tread" style="float: right">
|
||||
<%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
|
||||
</span>
|
||||
<div class="lz-left">
|
||||
<div>
|
||||
<%= link_to image_tag(url_to_avatar(@memo.author), :class => "avatar"), user_path(@memo.author) %>
|
||||
|
|
|
@ -4,4 +4,5 @@
|
|||
$('#ajax-modal').siblings().hide();
|
||||
$('#ajax-modal').parent().removeClass("alert_praise");
|
||||
//$('#ajax-modal').parent().css("top","").css("left","");
|
||||
$('#ajax-modal').parent().addClass("alert_box");
|
||||
$('#ajax-modal').parent().addClass("alert_box");
|
||||
$('#ajax-modal').parent().css("border", "2px solid #15bccf").css("border-radius", "0").css(" -webkit-border-radius", "0").css(" -moz-border-radius", "0");
|
|
@ -1,2 +1,2 @@
|
|||
$("#nh_user_tx").replaceWith('<%= image_tag(url_to_avatar(@user), :id=>'nh_user_tx',:style=>"width:216px;height:216px;",:alt=>"头像") %>');
|
||||
$("#nh_user_tx").replaceWith('<%= image_tag(url_to_avatar(@user), :id=>'nh_user_tx',:style=>"width:214px;height:214px;overflow:hidden",:alt=>"头像") %>');
|
||||
hideModal();
|
|
@ -69,12 +69,12 @@
|
|||
}
|
||||
</script>
|
||||
<div class="project-search" style="float: right">
|
||||
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => "regexName();", :style => "float:left" %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 30, :onkeyup => "regexName();" %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
|
||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %> <!--修改项目搜索按钮的样式 -->
|
||||
<!-- <a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
|
||||
<%= l(:label_search)%>
|
||||
</a>
|
||||
</a> -->
|
||||
<br />
|
||||
<span id="project_name_span" style="float: left"></span>
|
||||
</div>
|
||||
|
|
|
@ -23,34 +23,45 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
||||
<li ><span class="tit_fb ">测试结果:</span>
|
||||
<table class="border_ce" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<!--<%#@work.student_work_test.each do |test|%>-->
|
||||
<!--<tr class="<%#= cycle("", "b_grey") %>">-->
|
||||
<!--<td class="td_tit">-->
|
||||
<!--<%#= test.homework_test.input%>-->
|
||||
<!--</td>-->
|
||||
<!--<td class="td_tit">-->
|
||||
<!--<%#= test.homework_test.output%>-->
|
||||
<!--</td>-->
|
||||
<!--<td class="td_50 c_red"><%#= test.status_to_s%></td>-->
|
||||
<!--<td class="td_50 "><%#= test.test_score%></td>-->
|
||||
<!--</tr>-->
|
||||
<!--<%# end%>-->
|
||||
|
||||
<tr class=" b_lblue fb c_w">
|
||||
<td class="td_tit ">输入</td>
|
||||
<td class="td_tit border_l ">输出</td>
|
||||
<td class="td_50 border_l ">测试结果</td>
|
||||
</tr>
|
||||
<%@homework.homework_tests.each do |test|%>
|
||||
<tr class="<%= cycle("", "b_grey") %>">
|
||||
<td class="td_tit">
|
||||
<td class="td_tit hidden">
|
||||
<%= test.input%>
|
||||
</td>
|
||||
<td class="td_tit">
|
||||
<td class="td_tit border_l hidden">
|
||||
<%= test.output%>
|
||||
</td>
|
||||
<td class="td_50 c_red"><%= test.student_work_test.nil? ? "正在编译" : test.student_work_test.status_to_s%></td>
|
||||
<input type="hidden" value="<%= test.student_work_test.result if test.student_work_test%>">
|
||||
<% student_work_test = StudentWorkTest.where(:homework_test_id => test.id,:student_work_id => @work.id).first%>
|
||||
<td class="td_50 c_red border_l"><%= student_work_test.nil? ? "正在编译" : student_work_test.status_to_s%></td>
|
||||
<input type="hidden" value="<%= student_work_test.result if student_work_test%>">
|
||||
</tr>
|
||||
<% end%>
|
||||
<% student_work_test = @work.student_work_test.first%>
|
||||
<% if student_work_test && student_work_test.error_msg && !student_work_test.error_msg.empty?%>
|
||||
<tr class="border_t" >
|
||||
<td colspan="3" class="td_end" >
|
||||
<%= student_work_test.error_msg%>
|
||||
</td>
|
||||
</tr>
|
||||
<% end%>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
||||
<li ><span class="tit_fb ">测试结果:</span>
|
||||
<table class="border_ce" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="courses_list line" id="fans_item_<%=item.id%>">
|
||||
<div class="courses_list_pic fl">
|
||||
<a href="javascirpt:void();">
|
||||
<a href="<%= user_path(item) %>">
|
||||
<%= image_tag(url_to_avatar(item), :style=>"width:64px;height:64px;",:alt=>"头像") %>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<div class="message_box mb10">
|
||||
<div nhname='new_message' style="display:none;">
|
||||
<form action="<%= url_for(:controller => 'words', :action => 'create', :user_id => @user.id) %>" data-remote="true" method="post">
|
||||
<textarea nhname='new_message_textarea' name="new_form[user_message]" style="display:none;"></textarea>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" nhname='new_message_textarea' name="new_form[user_message]"></textarea>
|
||||
<p nhname='contentmsg'></p>
|
||||
<div nhname='toolbar_container' style="float:left;padding-top:3px;"></div>
|
||||
<a id="new_message_cancel_btn" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:3px;">取消</a>
|
||||
|
@ -119,10 +119,9 @@
|
|||
$(function(){
|
||||
|
||||
function init_editor(params){
|
||||
params.textarea.removeAttr('placeholder');
|
||||
var editor = params.kindutil.create(params.textarea, {
|
||||
resizeType : 1,minWidth:"1px",width:"100%",height:"150px",
|
||||
items:['emoticons'],
|
||||
resizeType : 1,minWidth:"1px",width:"100%",height:"80px",
|
||||
items:['emoticons'],
|
||||
afterChange:function(){//按键事件
|
||||
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
},
|
||||
|
|
|
@ -1835,6 +1835,7 @@ zh:
|
|||
excel_t_score: 教师评分
|
||||
excel_ta_score: 教辅评分
|
||||
excel_n_score: 匿名评分
|
||||
excel_s_score: 系统评分
|
||||
excel_f_score: 成绩
|
||||
excel_commit_time: 提交时间
|
||||
excel_homework_score: 作业积分
|
||||
|
|
|
@ -4,6 +4,6 @@ class AddErrormsgToStudenWorkTest < ActiveRecord::Migration
|
|||
end
|
||||
|
||||
def down
|
||||
remove_column :student_work_tests,:error_msg,
|
||||
remove_column :student_work_tests,:error_msg
|
||||
end
|
||||
end
|
||||
|
|
11
db/schema.rb
11
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20150719092427) do
|
||||
ActiveRecord::Schema.define(:version => 20150722015428) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -454,13 +454,6 @@ ActiveRecord::Schema.define(:version => 20150719092427) do
|
|||
|
||||
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
||||
|
||||
create_table "discuss_demos", :force => true do |t|
|
||||
t.string "title"
|
||||
t.text "body"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "documents", :force => true do |t|
|
||||
t.integer "project_id", :default => 0, :null => false
|
||||
t.integer "category_id", :default => 0, :null => false
|
||||
|
@ -861,6 +854,7 @@ ActiveRecord::Schema.define(:version => 20150719092427) do
|
|||
t.datetime "created_on"
|
||||
t.integer "comments_count", :default => 0, :null => false
|
||||
t.integer "course_id"
|
||||
t.datetime "updated_on"
|
||||
end
|
||||
|
||||
add_index "news", ["author_id"], :name => "index_news_on_author_id"
|
||||
|
@ -1248,6 +1242,7 @@ ActiveRecord::Schema.define(:version => 20150719092427) do
|
|||
t.integer "result"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.text "error_msg"
|
||||
end
|
||||
|
||||
create_table "student_works", :force => true do |t|
|
||||
|
|
|
@ -685,12 +685,18 @@ input#score{ width:40px;}
|
|||
.ui-slider .ui-slider-handle:hover,.ui-slider .ui-slider-handle:focus{background:#64bdd9;}
|
||||
.ui-slider .ui-slider-handle:active{background-image:none;}
|
||||
.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;top:0;height:100%;background:#64bdd9;left:0;}
|
||||
|
||||
/* 编程作品 */
|
||||
.border_ce{ border:1px solid #e4e4e4; }
|
||||
.border_ce tr td{ height:26px; }
|
||||
.td_tit{width:155px; text-align:center;}
|
||||
.td_50{width:50px; text-align:center;}
|
||||
a.work_list_tit{width:610px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.td_tit{width:170px; text-align:center;}
|
||||
.td_50{width:60px; text-align:center;}
|
||||
a.work_list_tit{width:580px; display:block; overflow:hidden; font-size:14px; font-weight:bold; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.work_list_pro{ width:670px;}
|
||||
.border_l{border-left:1px solid #e4e4e4;}
|
||||
.border_t{ border-top:1px solid #e4e4e4;}
|
||||
.td_end{border-top:1px solid #e4e4e4; height:auto; padding:5px; }
|
||||
.c_w{ color:#fff;}
|
||||
|
||||
.filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.evaluation{position: relative;}
|
||||
|
@ -708,3 +714,5 @@ a:hover.about_me{ color:#0781b4;}
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ a.pr_join_a{ color:#fff; display:block; padding:0 5px 0 3px; padding-top:2px; h
|
|||
.pr_close{ display:block; background:url(../images/leftside.png) -1px -49px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
|
||||
.pr_add{display:block; background:url(../images/leftside.png) 0px -71px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
|
||||
.pr_arrow{display:block; background:url(../images/leftside.png) 0px -90px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
|
||||
.pr_delete{ display:block; background:url(../images/leftside.png) -1px -157px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
|
||||
.pr_info_name{ color:#3e4040; font-size:14px; line-height:1.5;}
|
||||
a:hover.pr_info_name{ color:#3ca5c6;}
|
||||
.pr_info_score{ font-size:14px; color:#3e4040; }
|
||||
|
|
|
@ -73,6 +73,7 @@ h4{ font-size:14px; color:#3b3b3b;}
|
|||
.ml320{ margin-left:320px;}
|
||||
.mr5{ margin-right:5px;}
|
||||
.mr10{ margin-right:10px;}
|
||||
.mr15 {margin-right: 15px;}
|
||||
.mr20{ margin-right:20px;}
|
||||
.mr30{ margin-right:30px;}
|
||||
.mr40{ margin-right:40px;}
|
||||
|
|
|
@ -97,7 +97,7 @@ a.select_btn_select{ background:#64bddb; color:#fff;}
|
|||
/* 个人主页*/
|
||||
a.gz_btn{display:block; background:url(../images/pic_uersall.png) -318px -25px no-repeat; width:33px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
|
||||
a:hover.gz_btn{ color:#ff5722;}
|
||||
a.qx_btn{display:block; background:url(../images/pic_uersall.png) -318px -47px no-repeat; width:33px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
|
||||
a.qx_btn{display:block; background:url(../images/pic_uersall.png) -318px -47px no-repeat; width:53px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
|
||||
a:hover.qx_btn{color:#64bdd9;}
|
||||
a.c_lgrey{ color:#CCC;}
|
||||
a:hover.c_lgrey{ color:#3ca5c6;}
|
||||
|
@ -113,7 +113,7 @@ a:hover.c_lgrey{ color:#3ca5c6;}
|
|||
/* 20150506上传头像*/
|
||||
.uppicBox{ width:265px; height:265px; background:#f2f2f5; float:left; color:#666; text-align:center;}
|
||||
.showpicBox{width:133px; height:250px; background:#f2f2f5; float:left; margin-left:20px; text-align:center; padding-top:15px; color:#666;}
|
||||
.mr2{ margin-right:2px;}
|
||||
.mr15{ margin-right:15px;}
|
||||
.uppic_btn{border:none; width:150px; background:none; margin-bottom:5px; color:#666; margin-top:105px;}
|
||||
/* 新建作品*/
|
||||
.mr8{ margin-right:8px;}
|
||||
|
|
Loading…
Reference in New Issue