Merge branch 'cxt_course' into szzh
This commit is contained in:
commit
c0ed149719
|
@ -29,7 +29,7 @@ class BlogsController < ApplicationController
|
||||||
def set_homepage
|
def set_homepage
|
||||||
@blog = Blog.find(params[:id])
|
@blog = Blog.find(params[:id])
|
||||||
@blog.update_attribute(:homepage_id, params[:article_id])
|
@blog.update_attribute(:homepage_id, params[:article_id])
|
||||||
redirect_to user_blogs_path(params[:user_id])
|
redirect_to user_path(params[:user_id])
|
||||||
end
|
end
|
||||||
|
|
||||||
def cancel_homepage
|
def cancel_homepage
|
||||||
|
|
|
@ -409,7 +409,12 @@ class ProjectsController < ApplicationController
|
||||||
@repository = Repository.factory(scm)
|
@repository = Repository.factory(scm)
|
||||||
@repository.is_default = @project.repository.nil?
|
@repository.is_default = @project.repository.nil?
|
||||||
@repository.project = @project
|
@repository.project = @project
|
||||||
|
unless @project.gpid.nil?
|
||||||
|
g = Gitlab.client
|
||||||
|
@gitlab_branches = g.branches(@project.gpid)
|
||||||
|
@branch_names = g.branches(@project.gpid).map{|b| b.name}
|
||||||
|
@gitlab_default_branch = g.project(@project.gpid).default_branch
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# 项目邀请用户加入实现过程
|
# 项目邀请用户加入实现过程
|
||||||
|
@ -670,8 +675,7 @@ class ProjectsController < ApplicationController
|
||||||
# 更新公开私有时同步gitlab公开私有
|
# 更新公开私有时同步gitlab公开私有
|
||||||
unless @project.gpid.nil?
|
unless @project.gpid.nil?
|
||||||
g = Gitlab.client
|
g = Gitlab.client
|
||||||
gproject = g.project(@project.gpid)
|
params[:project][:is_public] ? g.edit_project(@project.gpid, 20, params[:branch]) : g.edit_project(@project.gpid, 0, params[:branch])
|
||||||
params[:project][:is_public] ? g.edit_project(gproject.id, 20) : g.edit_project(gproject.id, 0)
|
|
||||||
end
|
end
|
||||||
# end
|
# end
|
||||||
if validate_parent_id && @project.save
|
if validate_parent_id && @project.save
|
||||||
|
|
|
@ -26,6 +26,7 @@ class UsersController < ApplicationController
|
||||||
menu_item :user_information, :only => :info
|
menu_item :user_information, :only => :info
|
||||||
menu_item :user_course, :only => :user_courses
|
menu_item :user_course, :only => :user_courses
|
||||||
menu_item :user_homework, :only => :user_homeworks
|
menu_item :user_homework, :only => :user_homeworks
|
||||||
|
menu_item :student_homework, :only => :student_homeworks
|
||||||
menu_item :user_project, :only => [:user_projects, :watch_projects]
|
menu_item :user_project, :only => [:user_projects, :watch_projects]
|
||||||
menu_item :requirement_focus, :only => :watch_contests
|
menu_item :requirement_focus, :only => :watch_contests
|
||||||
menu_item :user_newfeedback, :only => :user_newfeedback
|
menu_item :user_newfeedback, :only => :user_newfeedback
|
||||||
|
@ -35,12 +36,12 @@ class UsersController < ApplicationController
|
||||||
#
|
#
|
||||||
before_filter :can_show_course, :only => [:user_courses,:user_homeworks]
|
before_filter :can_show_course, :only => [:user_courses,:user_homeworks]
|
||||||
before_filter :find_user, :only => [:user_fanslist, :user_watchlist, :show, :edit, :update, :destroy, :edit_membership, :user_courses,
|
before_filter :find_user, :only => [:user_fanslist, :user_watchlist, :show, :edit, :update, :destroy, :edit_membership, :user_courses,
|
||||||
:user_homeworks, :destroy_membership, :user_activities, :user_projects, :user_newfeedback, :user_comments,
|
:user_homeworks,:student_homeworks, :destroy_membership, :user_activities, :user_projects, :user_newfeedback, :user_comments,
|
||||||
:watch_contests, :info, :watch_projects, :show_score, :topic_score_index, :project_score_index,
|
:watch_contests, :info, :watch_projects, :show_score, :topic_score_index, :project_score_index,
|
||||||
:activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index,
|
:activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index,
|
||||||
:activity_new_score_index, :influence_new_score_index, :score_new_index,:user_projects_index,:user_resource,
|
:activity_new_score_index, :influence_new_score_index, :score_new_index,:user_projects_index,:user_resource,
|
||||||
:user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,:user_messages,:edit_brief_introduction,
|
:user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,:user_messages,:edit_brief_introduction,
|
||||||
:user_import_homeworks,:user_search_homeworks,:user_import_resource, :user_system_messages]
|
:user_import_homeworks,:user_search_homeworks,:user_import_resource, :user_system_messages,:choose_user_course]
|
||||||
before_filter :auth_user_extension, only: :show
|
before_filter :auth_user_extension, only: :show
|
||||||
#before_filter :rest_user_score, only: :show
|
#before_filter :rest_user_score, only: :show
|
||||||
#before_filter :select_entry, only: :user_projects
|
#before_filter :select_entry, only: :user_projects
|
||||||
|
@ -374,6 +375,28 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
#用户作业列表
|
#用户作业列表
|
||||||
def user_homeworks
|
def user_homeworks
|
||||||
|
@user = User.current
|
||||||
|
if(params[:type].blank? || params[:type] == "1") #公共题库
|
||||||
|
visible_course = Course.where("is_public = 1 && is_delete = 0")
|
||||||
|
visible_course_ids = visible_course.empty? ? "(-1)" : "(" + visible_course.map{|course| course.id}.join(",") + ")"
|
||||||
|
@homeworks = HomeworkCommon.where("course_id in #{visible_course_ids} and publish_time <= '#{Date.today}'").order("created_at desc")
|
||||||
|
elsif params[:type] == "2" #我的题库
|
||||||
|
@homeworks = HomeworkCommon.where("user_id = #{@user.id} and publish_time <= '#{Date.today}'").order("created_at desc")
|
||||||
|
end
|
||||||
|
@type = params[:type]
|
||||||
|
@limit = 15
|
||||||
|
@is_remote = true
|
||||||
|
@hw_count = @homeworks.count
|
||||||
|
@hw_pages = Paginator.new @hw_count, @limit, params['page'] || 1
|
||||||
|
@offset ||= @hw_pages.offset
|
||||||
|
@homeworks = paginateHelper @homeworks,15
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
format.html {render :layout => 'static_base'}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def student_homeworks
|
||||||
if User.current == @user
|
if User.current == @user
|
||||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||||
user_course_ids = @user.courses.empty? ? "(-1)" :"(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
|
user_course_ids = @user.courses.empty? ? "(-1)" :"(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
|
||||||
|
@ -382,14 +405,9 @@ class UsersController < ApplicationController
|
||||||
visibleCourse = @user.courses.empty? ? [] : @user.courses.visible
|
visibleCourse = @user.courses.empty? ? [] : @user.courses.visible
|
||||||
homework_ids = []
|
homework_ids = []
|
||||||
visibleCourse.each do |course|
|
visibleCourse.each do |course|
|
||||||
if User.current.allowed_to?(:as_teacher,course)
|
|
||||||
homeworks = HomeworkCommon.where("course_id = #{course.id}")
|
|
||||||
homework_ids << homeworks.pluck(:id) unless homeworks.empty?
|
|
||||||
else
|
|
||||||
homeworks = HomeworkCommon.where("course_id = #{course.id} and publish_time <= '#{Date.today}'")
|
homeworks = HomeworkCommon.where("course_id = #{course.id} and publish_time <= '#{Date.today}'")
|
||||||
homework_ids << homeworks.pluck(:id) unless homeworks.empty?
|
homework_ids << homeworks.pluck(:id) unless homeworks.empty?
|
||||||
end
|
end
|
||||||
end
|
|
||||||
visible_homework_ids = homework_ids.size == 0 ? "(-1)" :"(" + homework_ids.join(",") + ")"
|
visible_homework_ids = homework_ids.size == 0 ? "(-1)" :"(" + homework_ids.join(",") + ")"
|
||||||
@homework_commons = HomeworkCommon.where("id in #{visible_homework_ids}").order("created_at desc").limit(10).offset(@page * 10)
|
@homework_commons = HomeworkCommon.where("id in #{visible_homework_ids}").order("created_at desc").limit(10).offset(@page * 10)
|
||||||
@is_teacher = User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)
|
@is_teacher = User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)
|
||||||
|
@ -403,6 +421,87 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def choose_user_course
|
||||||
|
if !params[:search].nil?
|
||||||
|
search = "%#{params[:search].to_s.strip.downcase}%"
|
||||||
|
@course = @user.courses.where(" #{Course.table_name}.id = #{params[:search].to_i } or #{Course.table_name}.name like :p",:p=>search).select { |course| @user.allowed_to?(:as_teacher,course)}
|
||||||
|
else
|
||||||
|
@course = @user.courses.select { |course| @user.allowed_to?(:as_teacher,course)}
|
||||||
|
end
|
||||||
|
@search = params[:search]
|
||||||
|
#这里仅仅是传递需要发送的资源id
|
||||||
|
@send_id = params[:send_id]
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def send_homework_to_course
|
||||||
|
homework = HomeworkCommon.find params[:send_id].to_i
|
||||||
|
course_ids = params[:course_ids]
|
||||||
|
course_ids.each do |course_id|
|
||||||
|
course = Course.find course_id.to_i
|
||||||
|
new_homework = HomeworkCommon.new
|
||||||
|
new_homework.name = homework.name
|
||||||
|
new_homework.user_id = User.current.id
|
||||||
|
new_homework.description = homework.description
|
||||||
|
new_homework.homework_type = homework.homework_type
|
||||||
|
new_homework.late_penalty = homework.late_penalty
|
||||||
|
new_homework.course_id = course.id
|
||||||
|
new_homework.teacher_priority = homework.teacher_priority
|
||||||
|
new_homework.anonymous_comment = homework.anonymous_comment
|
||||||
|
new_homework.quotes = 0
|
||||||
|
new_homework.is_open = homework.is_open
|
||||||
|
homework.attachments.each do |attachment|
|
||||||
|
att = attachment.copy
|
||||||
|
att.container_id = nil
|
||||||
|
att.container_type = nil
|
||||||
|
att.copy_from = attachment.id
|
||||||
|
att.save
|
||||||
|
new_homework.attachments << att
|
||||||
|
end
|
||||||
|
homework_detail_manual = homework.homework_detail_manual
|
||||||
|
homework_detail_programing = homework.homework_detail_programing
|
||||||
|
homework_detail_group = homework.homework_detail_group
|
||||||
|
if homework_detail_manual
|
||||||
|
new_homework.homework_detail_manual = HomeworkDetailManual.new
|
||||||
|
new_homework_detail_manual = new_homework.homework_detail_manual
|
||||||
|
new_homework_detail_manual.ta_proportion = homework_detail_manual.ta_proportion
|
||||||
|
new_homework_detail_manual.comment_status = 0
|
||||||
|
new_homework_detail_manual.evaluation_num = homework_detail_manual.evaluation_num
|
||||||
|
new_homework_detail_manual.absence_penalty = homework_detail_manual.absence_penalty
|
||||||
|
end
|
||||||
|
if homework_detail_programing
|
||||||
|
new_homework.homework_detail_programing = HomeworkDetailPrograming.new
|
||||||
|
new_homework.homework_detail_programing.ta_proportion = homework_detail_programing.ta_proportion
|
||||||
|
new_homework.homework_detail_programing.language = homework_detail_programing.language
|
||||||
|
homework.homework_tests.each_with_index do |homework_test|
|
||||||
|
new_homework.homework_tests << HomeworkTest.new(
|
||||||
|
input: homework_test.input,
|
||||||
|
output: homework_test.output
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if homework_detail_group
|
||||||
|
new_homework.homework_detail_group = HomeworkDetailGroup.new
|
||||||
|
new_homework.homework_detail_group.min_num = homework_detail_group.min_num
|
||||||
|
new_homework.homework_detail_group.max_num = homework_detail_group.max_num
|
||||||
|
new_homework.homework_detail_group.base_on_project = homework_detail_group.base_on_project
|
||||||
|
end
|
||||||
|
if new_homework.save
|
||||||
|
new_homework_detail_manual.save if new_homework_detail_manual
|
||||||
|
new_homework.homework_detail_programing.save if new_homework.homework_detail_programing
|
||||||
|
new_homework.homework_detail_group.save if new_homework.homework_detail_group
|
||||||
|
end
|
||||||
|
homework.update_attribute(:quotes, homework.quotes+1)
|
||||||
|
end
|
||||||
|
@homework = homework
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
#导入作业
|
#导入作业
|
||||||
def user_import_homeworks
|
def user_import_homeworks
|
||||||
@user = User.current
|
@user = User.current
|
||||||
|
@ -439,6 +538,7 @@ class UsersController < ApplicationController
|
||||||
@hw_pages = Paginator.new @hw_count, @limit, params['page'] || 1
|
@hw_pages = Paginator.new @hw_count, @limit, params['page'] || 1
|
||||||
@offset ||= @hw_pages.offset
|
@offset ||= @hw_pages.offset
|
||||||
@homeworks = paginateHelper @homeworks,15
|
@homeworks = paginateHelper @homeworks,15
|
||||||
|
@is_import = params[:is_import]
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
|
@ -446,6 +546,7 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
def show_homework_detail
|
def show_homework_detail
|
||||||
@homework = HomeworkCommon.find params[:homework].to_i
|
@homework = HomeworkCommon.find params[:homework].to_i
|
||||||
|
@is_import = params[:is_import]
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
|
@ -469,6 +570,7 @@ class UsersController < ApplicationController
|
||||||
@hw_pages = Paginator.new @hw_count, @limit, params['page'] || 1
|
@hw_pages = Paginator.new @hw_count, @limit, params['page'] || 1
|
||||||
@offset ||= @hw_pages.offset
|
@offset ||= @hw_pages.offset
|
||||||
@homeworks = paginateHelper @homeworks,15
|
@homeworks = paginateHelper @homeworks,15
|
||||||
|
@is_import = params[:is_import]
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
|
|
|
@ -2512,7 +2512,7 @@ module ApplicationHelper
|
||||||
|
|
||||||
#获取匿评相关连接代码
|
#获取匿评相关连接代码
|
||||||
def homework_anonymous_comment (homework, is_in_course, user_activity_id = -1, course_activity = -1)
|
def homework_anonymous_comment (homework, is_in_course, user_activity_id = -1, course_activity = -1)
|
||||||
if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
if homework.homework_detail_manual.comment_status == 0 ||Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
||||||
link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "作业截止日期之前不可以启动匿评"
|
link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "作业截止日期之前不可以启动匿评"
|
||||||
elsif homework.student_works.count >= 2 && homework.homework_detail_manual#作业份数大于2
|
elsif homework.student_works.count >= 2 && homework.homework_detail_manual#作业份数大于2
|
||||||
case homework.homework_detail_manual.comment_status
|
case homework.homework_detail_manual.comment_status
|
||||||
|
|
|
@ -116,7 +116,7 @@ module CoursesHelper
|
||||||
@course.journals_for_messages.where('m_parent_id IS NULL').count
|
@course.journals_for_messages.where('m_parent_id IS NULL').count
|
||||||
end
|
end
|
||||||
|
|
||||||
#当前学期
|
#当前学期(2015春季学期)
|
||||||
def current_time_and_term course
|
def current_time_and_term course
|
||||||
str = ""
|
str = ""
|
||||||
term = cur_course_term
|
term = cur_course_term
|
||||||
|
@ -144,6 +144,22 @@ module CoursesHelper
|
||||||
val
|
val
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#当前学期(2015春)
|
||||||
|
def current_time_and_term_short course
|
||||||
|
str = ""
|
||||||
|
term = cur_course_term
|
||||||
|
if (course.time == course.end_time && course.term == course.end_term) || (course.end_term.nil? && course.end_time.nil?) || course.time > Time.now.year
|
||||||
|
str = course.time.to_s + course.term[0]
|
||||||
|
elsif course.time == Time.now.year && set_term_value(cur_course_term) <= set_term_value(course.term)
|
||||||
|
str = course.time.to_s + course.term[0]
|
||||||
|
elsif course.end_time < Time.now.year || (course.end_time == Time.now.year && set_term_value(cur_course_term) >= set_term_value(course.term))
|
||||||
|
str = course.end_time.to_s + course.end_term[0]
|
||||||
|
else
|
||||||
|
str = Time.now.year.to_s + cur_course_term[0]
|
||||||
|
end
|
||||||
|
str
|
||||||
|
end
|
||||||
|
|
||||||
# 返回学生数量,即roles表中定义的Reporter
|
# 返回学生数量,即roles表中定义的Reporter
|
||||||
#def studentCount project
|
#def studentCount project
|
||||||
# searchStudent(project).count
|
# searchStudent(project).count
|
||||||
|
|
|
@ -86,6 +86,31 @@ module ExerciseHelper
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def convert_to_chi_num num
|
||||||
|
result = ""
|
||||||
|
case num.to_i
|
||||||
|
when 1
|
||||||
|
result = '一'
|
||||||
|
when 2
|
||||||
|
result = '二'
|
||||||
|
when 3
|
||||||
|
result = '三'
|
||||||
|
when 4
|
||||||
|
result = '四'
|
||||||
|
when 5
|
||||||
|
result = '五'
|
||||||
|
when 6
|
||||||
|
result = '六'
|
||||||
|
when 7
|
||||||
|
result = '七'
|
||||||
|
when 8
|
||||||
|
result = '八'
|
||||||
|
when 9
|
||||||
|
result = '九'
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
def get_current_score exercise
|
def get_current_score exercise
|
||||||
score = 0
|
score = 0
|
||||||
unless exercise.nil?
|
unless exercise.nil?
|
||||||
|
|
|
@ -59,17 +59,17 @@
|
||||||
<%=format_time(teacher.last_login_on) %>
|
<%=format_time(teacher.last_login_on) %>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<%=teacher.id %>
|
<%=teacher.user_id %>
|
||||||
</td>
|
</td>
|
||||||
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if teacher.try(:realname) == ' '%><%= teacher.login%><% else %><%=teacher.try(:realname) %><% end %>'>
|
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if teacher.try(:realname) == ' '%><%= teacher.login%><% else %><%=teacher.try(:realname) %><% end %>'>
|
||||||
<% if teacher.try(:realname) == ' '%>
|
<% if teacher.try(:realname) == ' '%>
|
||||||
<%= link_to(teacher.login, user_path(teacher)) %>
|
<%= link_to(teacher.login, user_path(teacher.user_id)) %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to(teacher.try(:realname), user_path(teacher)) %>
|
<%= link_to(teacher.try(:realname), user_path(teacher.user_id)) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<%=link_to(teacher.login, user_path(teacher)) %>
|
<%=link_to(teacher.login, user_path(teacher.user_id)) %>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
老师
|
老师
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
function submit_copy_course() {
|
||||||
|
if(regex_course_name()&®ex_course_class_period()&®ex_time_term()&®ex_course_password())
|
||||||
|
{
|
||||||
|
$("#new_course").submit();
|
||||||
|
document.getElementById("submit_copy_course").onclick = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$("#time").change(function(){
|
$("#time").change(function(){
|
||||||
document.getElementById("end_time").options[document.getElementById("time").selectedIndex].selected = true;
|
document.getElementById("end_time").options[document.getElementById("time").selectedIndex].selected = true;
|
||||||
|
@ -147,7 +154,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<div>
|
<div>
|
||||||
<a href="javascript:void(0);" class="greyBtn fr mr40 f12" onclick="submit_new_course();">完成</a>
|
<a href="javascript:void(0);" class="greyBtn fr mr40 f12" id="submit_copy_course" onclick="submit_copy_course();">完成</a>
|
||||||
<a href="javascript:void(0);" class="greyBtn fr mr10 f12" onclick="hideResource();">取消</a>
|
<a href="javascript:void(0);" class="greyBtn fr mr10 f12" onclick="hideResource();">取消</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
|
@ -8,7 +8,7 @@
|
||||||
$("#poll_question_standard_answer_<%=exercise_question.id %>").val("<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s)%>")
|
$("#poll_question_standard_answer_<%=exercise_question.id %>").val("<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s)%>")
|
||||||
$("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>" +
|
$("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>" +
|
||||||
"<li class='ur_item'>" +
|
"<li class='ur_item'>" +
|
||||||
"<label>选项<%=convert_to_char (index+1).to_s %><span class='ur_index'></span>: </label>" +
|
"<label name='select_items' class='w56'>选项<%=convert_to_char (index+1).to_s %><span class='ur_index'></span>: </label>" +
|
||||||
"<input maxlength='200' type='text' name='question_answer[<%=exercise_choice.id %>]' placeholder='输入选项内容' value='<%=exercise_choice.choice_text %>'/>" +
|
"<input maxlength='200' type='text' name='question_answer[<%=exercise_choice.id %>]' placeholder='输入选项内容' value='<%=exercise_choice.choice_text %>'/>" +
|
||||||
"<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a>" +
|
"<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a>" +
|
||||||
"<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>" +
|
"<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>" +
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
<div id="poll_answers_<%=exercise_question.id%>">
|
<div id="poll_answers_<%=exercise_question.id%>">
|
||||||
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
|
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
|
||||||
<li class="ur_item">
|
<li class="ur_item">
|
||||||
<label>选项<%=convert_to_char (index+1).to_s %><span class="ur_index"></span>: </label>
|
<label name='select_items' class='w56'>选项<%=convert_to_char (index+1).to_s %><span class="ur_index"></span>: </label>
|
||||||
<input maxlength="200" type='text' name='question_answer[<%=exercise_choice.id %>]' placeholder='输入选项内容' value="<%=exercise_choice.choice_text %>">
|
<input maxlength="200" type='text' name='question_answer[<%=exercise_choice.id %>]' placeholder='输入选项内容' value="<%=exercise_choice.choice_text %>">
|
||||||
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
||||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
$("#poll_question_standard_answer_<%=exercise_question.id %>").val("<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s)%>")
|
$("#poll_question_standard_answer_<%=exercise_question.id %>").val("<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s)%>")
|
||||||
$("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>" +
|
$("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>" +
|
||||||
"<li class='ur_item'>" +
|
"<li class='ur_item'>" +
|
||||||
"<label>选项<%=convert_to_char (index+1).to_s %><span class='ur_index'></span>: </label>" +
|
"<label name='select_items' class='w56'>选项<%=convert_to_char (index+1).to_s %><span class='ur_index'></span>: </label>" +
|
||||||
"<input maxlength='200' type='text' name='question_answer[<%= exercise_choice.id %>]' placeholder='输入选项内容' value='<%=exercise_choice.choice_text %>'/>" +
|
"<input maxlength='200' type='text' name='question_answer[<%= exercise_choice.id %>]' placeholder='输入选项内容' value='<%=exercise_choice.choice_text %>'/>" +
|
||||||
"<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a>" +
|
"<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a>" +
|
||||||
"<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>" +
|
"<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>" +
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
<div id="poll_answers_<%=exercise_question.id%>">
|
<div id="poll_answers_<%=exercise_question.id%>">
|
||||||
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
|
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
|
||||||
<li class="ur_item">
|
<li class="ur_item">
|
||||||
<label>选项<%=convert_to_char (index+1).to_s %><span class="ur_index"></span>: </label>
|
<label name='select_items' class='w56'>选项<%=convert_to_char (index+1).to_s %><span class="ur_index"></span>: </label>
|
||||||
<input maxlength="200" type='text' name='question_answer[<%= exercise_choice.id %>]' placeholder='输入选项内容' value="<%=exercise_choice.choice_text %>">
|
<input maxlength="200" type='text' name='question_answer[<%= exercise_choice.id %>]' placeholder='输入选项内容' value="<%=exercise_choice.choice_text %>">
|
||||||
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
||||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
$("#poll_question_score_<%=exercise_question.id %>").val("<%= exercise_question.question_score%>")
|
$("#poll_question_score_<%=exercise_question.id %>").val("<%= exercise_question.question_score%>")
|
||||||
$("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %>" +
|
$("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %>" +
|
||||||
"<li class='ur_item'>" +
|
"<li class='ur_item'>" +
|
||||||
"<label>候选答案<span class='ur_index'></span>: </label>" +
|
"<label name='candiate_items'>候选答案<%=convert_to_chi_num(index+1) %><span class='ur_index'></span>: </label>" +
|
||||||
"<input class='candiate_answer' name='exercise_choice[<%=exercise_choice.id %>]' placeholder='请输入候选答案' type='text' value='<%=exercise_choice.answer_text %>'/>" +
|
"<input class='candiate_answer' name='exercise_choice[<%=exercise_choice.id %>]' placeholder='请输入候选答案' type='text' value='<%=exercise_choice.answer_text %>'/>" +
|
||||||
|
|
||||||
"<a class='icon_add' title='向下插入选项' onclick='add_candidate_answer($(this));'></a>" +
|
"<a class='icon_add' title='向下插入选项' onclick='add_candidate_answer($(this));'></a>" +
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
<div id="poll_answers_<%=exercise_question.id%>">
|
<div id="poll_answers_<%=exercise_question.id%>">
|
||||||
<% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %>
|
<% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %>
|
||||||
<li class="ur_item">
|
<li class="ur_item">
|
||||||
<label>候选答案<span class="ur_index"></span>: </label>
|
<label name='candiate_items'>候选答案<%=convert_to_chi_num(index+1) %><span class="ur_index"></span>: </label>
|
||||||
<input class="candiate_answer" name="exercise_choice[<%=exercise_choice.id %>]" placeholder="请输入候选答案" type="text" value="<%=exercise_choice.answer_text %>"/>
|
<input class="candiate_answer" name="exercise_choice[<%=exercise_choice.id %>]" placeholder="请输入候选答案" type="text" value="<%=exercise_choice.answer_text %>"/>
|
||||||
<a class="icon_add" title="向下插入选项" onclick="add_candidate_answer($(this));"></a>
|
<a class="icon_add" title="向下插入选项" onclick="add_candidate_answer($(this));"></a>
|
||||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this));"></a>
|
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this));"></a>
|
||||||
|
|
|
@ -162,15 +162,38 @@
|
||||||
//单选题
|
//单选题
|
||||||
function add_single_answer(doc)
|
function add_single_answer(doc)
|
||||||
{
|
{
|
||||||
doc.parent().after("<li class='ur_item'><label>选项<span class='ur_index'></span>: </label><input maxlength='200' type='text' name='question_answer["+new Date().getTime()+"]' placeholder='输入选项内容'/>" +
|
var li = doc.parent().after("<li class='ur_item'><label name='select_items' class='w56'>选项 <span class='ur_index'></span>: </label><input maxlength='200' type='text' name='question_answer["+new Date().getTime()+"]' placeholder='输入选项内容'/>" +
|
||||||
"<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a><a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>"+
|
"<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a><a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>"+
|
||||||
"</li><div class='cl'></div>");
|
"</li><div class='cl'></div>");
|
||||||
|
var select_items =$("label[name='select_items']",li.parent());
|
||||||
|
for(var i=0; i<select_items.length; i++){
|
||||||
|
$(select_items[i]).html("选项"+String.fromCharCode(64 + parseInt(i+1))+"<span class='ur_index'></span>: ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function add_candidate_answer(doc)
|
function add_candidate_answer(doc)
|
||||||
{
|
{
|
||||||
doc.parent().after("<li class='ur_item'><label>候选答案<span class='ur_index'></span>: </label><input maxlength='200' type='text' name='exercise_choice["+new Date().getTime()+"]' placeholder='请输入候选答案(选填)'/>" +
|
doc.parent().after("<li class='ur_item'><label name='candiate_items'>候选答案<span class='ur_index'></span>: </label><input maxlength='200' type='text' name='exercise_choice["+new Date().getTime()+"]' placeholder='请输入候选答案(选填)'/>" +
|
||||||
"<a class='icon_add' title='向下插入选项' onclick='add_candidate_answer($(this));'></a><a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>"+
|
"<a class='icon_add' title='向下插入选项' onclick='add_candidate_answer($(this));'></a><a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>"+
|
||||||
"</li><div class='cl'></div>");
|
"</li><div class='cl'></div>");
|
||||||
|
var select_items =$("label[name='candiate_items']",doc.parent().parent());
|
||||||
|
for(var i=0; i<select_items.length; i++){
|
||||||
|
$(select_items[i]).html("候选答案"+revert_to_chinese_num(i + 1)+"<span class='ur_index'></span>: ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function revert_to_chinese_num(num){
|
||||||
|
var s_num = "";
|
||||||
|
switch (num) {
|
||||||
|
case 1: s_num = '一'; break;
|
||||||
|
case 2: s_num = '二'; break;
|
||||||
|
case 3: s_num = '三'; break;
|
||||||
|
case 4: s_num = '四'; break;
|
||||||
|
case 5: s_num = '五'; break;
|
||||||
|
case 6: s_num = '六'; break;
|
||||||
|
case 7: s_num = '七'; break;
|
||||||
|
case 8: s_num = '八'; break;
|
||||||
|
case 9: s_num = '九'; break;
|
||||||
|
}
|
||||||
|
return s_num;
|
||||||
}
|
}
|
||||||
function remove_single_answer(doc)
|
function remove_single_answer(doc)
|
||||||
{
|
{
|
||||||
|
@ -180,7 +203,16 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
var parent = doc.parent().parent();
|
||||||
doc.parent().remove();
|
doc.parent().remove();
|
||||||
|
var select_items =$("label[name='select_items']",parent);
|
||||||
|
var candiate_items =$("label[name='candiate_items']",parent);
|
||||||
|
for(var i=0; i<select_items.length; i++){
|
||||||
|
$(select_items[i]).html("选项"+String.fromCharCode(64 + parseInt(i+1))+"<span class='ur_index'></span>: ");
|
||||||
|
}
|
||||||
|
for(var i=0; i<candiate_items.length; i++){
|
||||||
|
$(candiate_items[i]).html("候选答案"+revert_to_chinese_num(i + 1)+"<span class='ur_index'></span>: ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -18,28 +18,28 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div>
|
<div>
|
||||||
<li class="ur_item">
|
<li class="ur_item">
|
||||||
<label>选项A<span class="ur_index"></span>: </label>
|
<label name='select_items' class='w56'>选项A<span class="ur_index"></span>: </label>
|
||||||
<input maxlength="200" type='text' name='question_answer[0]' placeholder='输入选项内容'>
|
<input maxlength="200" type='text' name='question_answer[0]' placeholder='输入选项内容'>
|
||||||
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
||||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<li class="ur_item">
|
<li class="ur_item">
|
||||||
<label>选项B<span class="ur_index"></span>: </label>
|
<label name='select_items' class='w56'>选项B<span class="ur_index"></span>: </label>
|
||||||
<input maxlength="200" type='text' name='question_answer[1]' placeholder='输入选项内容'>
|
<input maxlength="200" type='text' name='question_answer[1]' placeholder='输入选项内容'>
|
||||||
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
||||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<li class="ur_item">
|
<li class="ur_item">
|
||||||
<label>选项C<span class="ur_index"></span>: </label>
|
<label name='select_items' class='w56'>选项C<span class="ur_index"></span>: </label>
|
||||||
<input maxlength="200" type='text' name='question_answer[2]' placeholder='输入选项内容'/>
|
<input maxlength="200" type='text' name='question_answer[2]' placeholder='输入选项内容'/>
|
||||||
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
||||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<li class="ur_item">
|
<li class="ur_item">
|
||||||
<label>选项D<span class="ur_index"></span>: </label>
|
<label name='select_items' class='w56'>选项D<span class="ur_index"></span>: </label>
|
||||||
<input maxlength="200" type='text' name='question_answer[3]' placeholder='输入选项内容'/>
|
<input maxlength="200" type='text' name='question_answer[3]' placeholder='输入选项内容'/>
|
||||||
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
||||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||||
|
|
|
@ -18,28 +18,28 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div>
|
<div>
|
||||||
<li class="ur_item">
|
<li class="ur_item">
|
||||||
<label>选项A<span class="ur_index"></span>: </label>
|
<label name='select_items' class='w56'>选项A<span class="ur_index"></span>: </label>
|
||||||
<input maxlength="200" type='text' name='question_answer[0]' placeholder='输入选项内容'>
|
<input maxlength="200" type='text' name='question_answer[0]' placeholder='输入选项内容'>
|
||||||
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
||||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<li class="ur_item">
|
<li class="ur_item">
|
||||||
<label>选项B<span class="ur_index"></span>: </label>
|
<label name='select_items' class='w56'>选项B<span class="ur_index"></span>: </label>
|
||||||
<input maxlength="200" type='text' name='question_answer[1]' placeholder='输入选项内容'>
|
<input maxlength="200" type='text' name='question_answer[1]' placeholder='输入选项内容'>
|
||||||
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
||||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<li class="ur_item">
|
<li class="ur_item">
|
||||||
<label>选项C<span class="ur_index"></span>: </label>
|
<label name='select_items' class='w56'>选项C<span class="ur_index"></span>: </label>
|
||||||
<input maxlength="200" type='text' name='question_answer[2]' placeholder='输入选项内容'>
|
<input maxlength="200" type='text' name='question_answer[2]' placeholder='输入选项内容'>
|
||||||
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
||||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<li class="ur_item">
|
<li class="ur_item">
|
||||||
<label>选项D<span class="ur_index"></span>: </label>
|
<label name='select_items' class='w56'>选项D<span class="ur_index"></span>: </label>
|
||||||
<input maxlength="200" type='text' name='question_answer[3]' placeholder='输入选项内容'>
|
<input maxlength="200" type='text' name='question_answer[3]' placeholder='输入选项内容'>
|
||||||
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
||||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||||
|
|
|
@ -18,22 +18,22 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div>
|
<div>
|
||||||
<li class="ur_item">
|
<li class="ur_item">
|
||||||
<label>候选答案一<span class="ur_index"></span>: </label>
|
<label name='candiate_items'>候选答案一<span class="ur_index"></span>: </label>
|
||||||
<input class="candiate_answer" name="exercise_choice[0]" placeholder="请输入候选答案一" type="text">
|
<input class="candiate_answer" name="exercise_choice[0]" placeholder="请输入候选答案" type="text">
|
||||||
<a class="icon_add" title="向下插入选项" onclick="add_candidate_answer($(this));"></a>
|
<a class="icon_add" title="向下插入选项" onclick="add_candidate_answer($(this));"></a>
|
||||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<li class="ur_item">
|
<li class="ur_item">
|
||||||
<label>候选答案二<span class="ur_index"></span>: </label>
|
<label name='candiate_items'>候选答案二<span class="ur_index"></span>: </label>
|
||||||
<input class="candiate_answer" name="exercise_choice[1]" placeholder="请输入候选答案二(选填)" type="text">
|
<input class="candiate_answer" name="exercise_choice[1]" placeholder="请输入候选答案(选填)" type="text">
|
||||||
<a class="icon_add" title="向下插入选项" onclick="add_candidate_answer($(this));"></a>
|
<a class="icon_add" title="向下插入选项" onclick="add_candidate_answer($(this));"></a>
|
||||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<li class="ur_item">
|
<li class="ur_item">
|
||||||
<label>候选答案三<span class="ur_index"></span>: </label>
|
<label name='candiate_items'>候选答案三<span class="ur_index"></span>: </label>
|
||||||
<input class="candiate_answer" name="exercise_choice[2]" placeholder="请输入候选答案三(选填)" type="text">
|
<input class="candiate_answer" name="exercise_choice[2]" placeholder="请输入候选答案(选填)" type="text">
|
||||||
<a class="icon_add" title="向下插入选项" onclick="add_candidate_answer($(this));"></a>
|
<a class="icon_add" title="向下插入选项" onclick="add_candidate_answer($(this));"></a>
|
||||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -55,28 +55,28 @@
|
||||||
'<input value="<%=score %>" id="question_score" type="text" name="question_score" style="width:40px; text-align:center; padding-left:0px;"/>分'+
|
'<input value="<%=score %>" id="question_score" type="text" name="question_score" style="width:40px; text-align:center; padding-left:0px;"/>分'+
|
||||||
'</li><div>'+
|
'</li><div>'+
|
||||||
'<li class="ur_item">'+
|
'<li class="ur_item">'+
|
||||||
'<label>选项A<span class="ur_index"></span>: </label>'+
|
'<label name="select_items" class="w56">选项A<span class="ur_index"></span>: </label>'+
|
||||||
'<input maxlength="200" type="text" name="question_answer[0]" placeholder="输入选项内容"/>'+
|
'<input maxlength="200" type="text" name="question_answer[0]" placeholder="输入选项内容"/>'+
|
||||||
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
||||||
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
||||||
'</li>'+
|
'</li>'+
|
||||||
'<div class="cl"></div>'+
|
'<div class="cl"></div>'+
|
||||||
'<li class="ur_item">'+
|
'<li class="ur_item">'+
|
||||||
'<label>选项B<span class="ur_index"></span>: </label>'+
|
'<label name="select_items" class="w56">选项B<span class="ur_index"></span>: </label>'+
|
||||||
'<input maxlength="200" type="text" name="question_answer[1]" placeholder="输入选项内容"/>'+
|
'<input maxlength="200" type="text" name="question_answer[1]" placeholder="输入选项内容"/>'+
|
||||||
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
||||||
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
||||||
'</li>'+
|
'</li>'+
|
||||||
'<div class="cl"></div>'+
|
'<div class="cl"></div>'+
|
||||||
'<li class="ur_item">'+
|
'<li class="ur_item">'+
|
||||||
'<label>选项C<span class="ur_index"></span>: </label>'+
|
'<label name="select_items" class="w56">选项C<span class="ur_index"></span>: </label>'+
|
||||||
'<input maxlength="200" type="text" name="question_answer[2]" placeholder="输入选项内容"/>'+
|
'<input maxlength="200" type="text" name="question_answer[2]" placeholder="输入选项内容"/>'+
|
||||||
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
||||||
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
||||||
'</li>'+
|
'</li>'+
|
||||||
'<div class="cl"></div>'+
|
'<div class="cl"></div>'+
|
||||||
'<li class="ur_item">'+
|
'<li class="ur_item">'+
|
||||||
'<label>选项D<span class="ur_index"></span>: </label>'+
|
'<label name="select_items" class="w56">选项D<span class="ur_index"></span>: </label>'+
|
||||||
'<input maxlength="200" type="text" name="question_answer[3]" placeholder="输入选项内容"/>'+
|
'<input maxlength="200" type="text" name="question_answer[3]" placeholder="输入选项内容"/>'+
|
||||||
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
||||||
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
||||||
|
|
|
@ -54,28 +54,28 @@
|
||||||
'<input value="<%= score %>" id="question_score" type="text" name="question_score" style="width:40px; text-align:center; padding-left:0px;"/>分'+
|
'<input value="<%= score %>" id="question_score" type="text" name="question_score" style="width:40px; text-align:center; padding-left:0px;"/>分'+
|
||||||
'</li><div>'+
|
'</li><div>'+
|
||||||
'<li class="ur_item">'+
|
'<li class="ur_item">'+
|
||||||
'<label>选项A<span class="ur_index"></span>: </label>'+
|
'<label name="select_items" class="w56">选项A<span class="ur_index"></span>: </label>'+
|
||||||
'<input maxlength="200" type="text" name="question_answer[0]" placeholder="输入选项内容"/>'+
|
'<input maxlength="200" type="text" name="question_answer[0]" placeholder="输入选项内容"/>'+
|
||||||
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
||||||
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
||||||
'</li>'+
|
'</li>'+
|
||||||
'<div class="cl"></div>'+
|
'<div class="cl"></div>'+
|
||||||
'<li class="ur_item">'+
|
'<li class="ur_item">'+
|
||||||
'<label>选项B<span class="ur_index"></span>: </label>'+
|
'<label name="select_items" class="w56">选项B<span class="ur_index"></span>: </label>'+
|
||||||
'<input maxlength="200" type="text" name="question_answer[1]" placeholder="输入选项内容"/>'+
|
'<input maxlength="200" type="text" name="question_answer[1]" placeholder="输入选项内容"/>'+
|
||||||
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
||||||
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
||||||
'</li>'+
|
'</li>'+
|
||||||
'<div class="cl"></div>'+
|
'<div class="cl"></div>'+
|
||||||
'<li class="ur_item">'+
|
'<li class="ur_item">'+
|
||||||
'<label>选项C<span class="ur_index"></span>: </label>'+
|
'<label name="select_items" class="w56">选项C<span class="ur_index"></span>: </label>'+
|
||||||
'<input maxlength="200" type="text" name="question_answer[2]" placeholder="输入选项内容"/>'+
|
'<input maxlength="200" type="text" name="question_answer[2]" placeholder="输入选项内容"/>'+
|
||||||
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
||||||
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
||||||
'</li>'+
|
'</li>'+
|
||||||
'<div class="cl"></div>'+
|
'<div class="cl"></div>'+
|
||||||
'<li class="ur_item">'+
|
'<li class="ur_item">'+
|
||||||
'<label>选项D<span class="ur_index"></span>: </label>'+
|
'<label name="select_items" class="w56">选项D<span class="ur_index"></span>: </label>'+
|
||||||
'<input maxlength="200" type="text" name="question_answer[3]" placeholder="输入选项内容"/>'+
|
'<input maxlength="200" type="text" name="question_answer[3]" placeholder="输入选项内容"/>'+
|
||||||
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
||||||
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div>
|
<div>
|
||||||
<% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %>
|
<% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %>
|
||||||
候选答案:<%= exercise_choice.answer_text%><br />
|
候选答案<%= convert_to_chi_num(index+1) %>:<%= exercise_choice.answer_text%><br />
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -42,22 +42,22 @@
|
||||||
'<input value="<%= score %>" id="question_score" type="text" name="question_score" style="width:40px; text-align:center; padding-left:0px;"/>分'+
|
'<input value="<%= score %>" id="question_score" type="text" name="question_score" style="width:40px; text-align:center; padding-left:0px;"/>分'+
|
||||||
'</li><div>'+
|
'</li><div>'+
|
||||||
'<li class="ur_item">'+
|
'<li class="ur_item">'+
|
||||||
'<label>候选答案一<span class="ur_index"></span>: </label>'+
|
'<label name="candiate_items">候选答案一<span class="ur_index"></span>: </label>'+
|
||||||
'<input class="candiate_answer" type="text" name="exercise_choice[0]" placeholder="请输入候选答案一"/>'+
|
'<input class="candiate_answer" type="text" name="exercise_choice[0]" placeholder="请输入候选答案"/>'+
|
||||||
'<a class="icon_add" title="向下插入选项" onclick="add_candidate_answer($(this));"></a>'+
|
'<a class="icon_add" title="向下插入选项" onclick="add_candidate_answer($(this));"></a>'+
|
||||||
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
||||||
'</li>'+
|
'</li>'+
|
||||||
'<div class="cl"></div>'+
|
'<div class="cl"></div>'+
|
||||||
'<li class="ur_item">'+
|
'<li class="ur_item">'+
|
||||||
'<label>候选答案二<span class="ur_index"></span>: </label>'+
|
'<label name="candiate_items">候选答案二<span class="ur_index"></span>: </label>'+
|
||||||
'<input class="candiate_answer" type="text" name="exercise_choice[1]" placeholder="请输入候选答案二(选填)"/>'+
|
'<input class="candiate_answer" type="text" name="exercise_choice[1]" placeholder="请输入候选答案(选填)"/>'+
|
||||||
'<a class="icon_add" title="向下插入选项" onclick="add_candidate_answer($(this));"></a>'+
|
'<a class="icon_add" title="向下插入选项" onclick="add_candidate_answer($(this));"></a>'+
|
||||||
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
||||||
'</li>'+
|
'</li>'+
|
||||||
'<div class="cl"></div>'+
|
'<div class="cl"></div>'+
|
||||||
'<li class="ur_item">'+
|
'<li class="ur_item">'+
|
||||||
'<label>候选答案三<span class="ur_index"></span>: </label>'+
|
'<label name="candiate_items">候选答案三<span class="ur_index"></span>: </label>'+
|
||||||
'<input class="candiate_answer" type="text" name="exercise_choice[2]" placeholder="请输入候选答案三(选填)"/>'+
|
'<input class="candiate_answer" type="text" name="exercise_choice[2]" placeholder="请输入候选答案(选填)"/>'+
|
||||||
'<a class="icon_add" title="向下插入选项" onclick="add_candidate_answer($(this));"></a>'+
|
'<a class="icon_add" title="向下插入选项" onclick="add_candidate_answer($(this));"></a>'+
|
||||||
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
||||||
'</li></div>'+
|
'</li></div>'+
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="homepagePostTitle break_word mt-4">
|
<div class="homepagePostTitle break_word mt-4">
|
||||||
<%= link_to truncate(file.filename,length: 35, omission: '...'),
|
<%= link_to truncate(file.filename,length: 35, omission: '...'),
|
||||||
download_named_attachment_path(file.id, file.filename),
|
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" %>
|
:title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "linkGrey3 f_14 f_l" %>
|
||||||
<%= file_preview_eye(file, class: 'preview') %>
|
<%= file_preview_eye(file, class: 'preview') %>
|
||||||
<span id="image_private_<%= file.id%>">
|
<span id="image_private_<%= file.id%>">
|
||||||
<% if file.is_public? == false%>
|
<% if file.is_public? == false%>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="homepagePostTitle break_word mt-4">
|
<div class="homepagePostTitle break_word mt-4">
|
||||||
<%= link_to truncate(file.filename,length: 35, omission: '...'),
|
<%= link_to truncate(file.filename,length: 35, omission: '...'),
|
||||||
download_named_attachment_path(file.id, file.filename),
|
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 => "linkBlue f_14 f_b" %>
|
:title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "linkGrey3 f_14" %>
|
||||||
<%= file_preview_eye(file, class: 'preview') %>
|
<%= file_preview_eye(file, class: 'preview') %>
|
||||||
<span id="image_private_<%= file.id%>">
|
<span id="image_private_<%= file.id%>">
|
||||||
<% if file.is_public? == false%>
|
<% if file.is_public? == false%>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="homepagePostTitle break_word mt-4">
|
<div class="homepagePostTitle break_word mt-4">
|
||||||
<%= link_to truncate(file.filename,length: 35, omission: '...'),
|
<%= link_to truncate(file.filename,length: 35, omission: '...'),
|
||||||
download_named_attachment_path(file.id, file.filename),
|
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 => "linkBlue f_14 f_b" %>
|
:title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "linkGrey3 f_14" %>
|
||||||
<%= file_preview_eye(file, class: 'preview') %>
|
<%= file_preview_eye(file, class: 'preview') %>
|
||||||
<span id="image_private_<%= file.id%>">
|
<span id="image_private_<%= file.id%>">
|
||||||
<% if file.is_public? == false%>
|
<% if file.is_public? == false%>
|
||||||
|
|
|
@ -9,9 +9,15 @@
|
||||||
</li>
|
</li>
|
||||||
<li class="navHomepageMenu fl">
|
<li class="navHomepageMenu fl">
|
||||||
<a href="<%=url_for(:controller => 'users', :action => 'user_resource',:id=>User.current.id,:type=>1)%>" class="c_white f16 db p10">资源库</a></li>
|
<a href="<%=url_for(:controller => 'users', :action => 'user_resource',:id=>User.current.id,:type=>1)%>" class="c_white f16 db p10">资源库</a></li>
|
||||||
|
<% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
|
||||||
<li class="navHomepageMenu fl">
|
<li class="navHomepageMenu fl">
|
||||||
<%= link_to "作业", user_homeworks_user_path(User.current.id), :class => "c_white f16 db p10"%>
|
<%= link_to "题库", user_homeworks_user_path(User.current.id), :class => "c_white f16 db p10"%>
|
||||||
</li>
|
</li>
|
||||||
|
<% else %>
|
||||||
|
<li class="navHomepageMenu fl">
|
||||||
|
<%= link_to "我的作业", student_homeworks_user_path(User.current.id), :class => "c_white f16 db p10"%>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
<li class="navHomepageMenu fl mr30">
|
<li class="navHomepageMenu fl mr30">
|
||||||
<%= link_to "帮助中心", "https://#{Setting.host_name}/forums/1/memos/1168", :class =>"c_white f16 db p10" %>
|
<%= link_to "帮助中心", "https://#{Setting.host_name}/forums/1/memos/1168", :class =>"c_white f16 db p10" %>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -47,7 +47,10 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<%= render :partial => 'layouts/footer' %>
|
<%= render :partial => 'layouts/footer' %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<div id="ajax-modal" style="display:none;"></div>
|
||||||
|
<div id="ajax-indicator" style="display:none;">
|
||||||
|
<span><%= l(:label_loading) %></span>
|
||||||
|
</div>
|
||||||
<%= call_hook :view_layouts_base_body_bottom %>
|
<%= call_hook :view_layouts_base_body_bottom %>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<% if act.container_type == 'Organization' %>
|
<% if act.container_type == 'Organization' %>
|
||||||
<% if act.org_act_type == 'OrgDocumentComment' && act.org_act_id != @organization.home_id %>
|
<% if act.org_act_type == 'OrgDocumentComment' %>
|
||||||
<%= render :partial => 'organizations/show_org_document', :locals => {:document => act.org_act, :act => act, :flag => 2, :org_subfield_id => params[:org_subfield_id]} %>
|
<%= render :partial => 'organizations/show_org_document', :locals => {:document => act.org_act, :act => act, :flag => 2, :org_subfield_id => params[:org_subfield_id]} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if activity.homework_detail_manual && activity.homework_detail_manual.comment_status < 2 %>
|
<% if activity.homework_detail_manual && activity.homework_detail_manual.comment_status < 2 %>
|
||||||
<div class="homepagePostDeadline">提交截止时间:<%= activity.end_time.to_s %> 23:59</div>
|
<div class="homepagePostDeadline">提交截止时间:<%= activity.end_time.to_s %> 23:59</div>
|
||||||
<% elsif activity.homework_detail_manual && activity.homework_detail_manual.comment_status >= 2 %>
|
<% elsif activity.homework_detail_manual && activity.homework_detail_manual.comment_status >= 2 && activity.anonymous_comment == 0%>
|
||||||
<div class="homepagePostDeadline">匿评截止时间:<%= activity.homework_detail_manual.evaluation_end.to_s %> 23:59</div>
|
<div class="homepagePostDeadline">匿评截止时间:<%= activity.homework_detail_manual.evaluation_end.to_s %> 23:59</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -18,6 +18,13 @@
|
||||||
<textarea class="w543" id="project_description" name="project[description]" rows="8" placeholder="最多3000个汉字(或6000个英文字符)"><%= @project.description%></textarea>
|
<textarea class="w543" id="project_description" name="project[description]" rows="8" placeholder="最多3000个汉字(或6000个英文字符)"><%= @project.description%></textarea>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</li>
|
</li>
|
||||||
|
<% if !@project.gpid.nil? && !@gitlab_branches.blank? %>
|
||||||
|
<li>
|
||||||
|
<label class="label02"> 默认分支 :</label>
|
||||||
|
<%= select_tag :branch, options_for_select(["#{@gitlab_default_branch}"]+ @branch_names, @rev), :id => 'branch' %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
<li >
|
<li >
|
||||||
<label class="label02">公开 :</label>
|
<label class="label02">公开 :</label>
|
||||||
<input id="project_is_public" name="project[is_public]" type="checkbox" <%= @project.is_public ? "checked" : ""%>>
|
<input id="project_is_public" name="project[is_public]" type="checkbox" <%= @project.is_public ? "checked" : ""%>>
|
||||||
|
|
|
@ -46,9 +46,9 @@
|
||||||
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
||||||
<span class="f14"><span class="c_red">*</span><%=l(:label_repository_name)%>:</span>
|
<span class="f14"><span class="c_red">*</span><%=l(:label_repository_name)%>:</span>
|
||||||
<%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false,:label=>"", :no_label => true %>
|
<%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false,:label=>"", :no_label => true %>
|
||||||
<% unless @repository.identifier_frozen? %>
|
<%# unless @repository.identifier_frozen? %>
|
||||||
<span class="c_grey"><%=l(:text_length_between,:min=>1,:max=>254)<<l(:text_project_identifier_info) %></span>
|
<span class="c_grey"><%=l(:text_length_between,:min=>1,:max=>254)<<l(:text_project_identifier_info) %></span>
|
||||||
<% end %>
|
<%# end %>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<!-- Branches Dropdown -->
|
<!-- Branches Dropdown -->
|
||||||
<% if !@repository.branches.nil? && @repository.branches.length > 0 -%>
|
<% if !@repository.branches.nil? && @repository.branches.length > 0 -%>
|
||||||
<%= l(:label_branch) %>:
|
<%= l(:label_branch) %>:
|
||||||
<%= select_tag :branch, options_for_select([''] + @repository.branches, @rev), :id => 'branch' %>
|
<%= select_tag :branch, options_for_select(@repository.branches, @rev), :id => 'branch' %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<% if !@repository.tags.nil? && @repository.tags.length > 0 -%>
|
<% if !@repository.tags.nil? && @repository.tags.length > 0 -%>
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if activity.homework_detail_manual && activity.homework_detail_manual.comment_status < 2 %>
|
<% if activity.homework_detail_manual && activity.homework_detail_manual.comment_status < 2 %>
|
||||||
<div class="homepagePostDeadline">提交截止时间:<%= activity.end_time.to_s %> 23:59</div>
|
<div class="homepagePostDeadline">提交截止时间:<%= activity.end_time.to_s %> 23:59</div>
|
||||||
<% elsif activity.homework_detail_manual && activity.homework_detail_manual.comment_status >= 2 %>
|
<% elsif activity.homework_detail_manual && activity.homework_detail_manual.comment_status >= 2 && activity.anonymous_comment == 0%>
|
||||||
<div class="homepagePostDeadline">匿评截止时间:<%= activity.homework_detail_manual.evaluation_end.to_s %> 23:59</div>
|
<div class="homepagePostDeadline">匿评截止时间:<%= activity.homework_detail_manual.evaluation_end.to_s %> 23:59</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<div class="subjectInfo">题目信息</div>
|
<div class="subject-pop-info">题目信息</div>
|
||||||
<div class="subjectWrap">
|
<div class="subject-pop-wrap">
|
||||||
<% if homework.nil? %>
|
<% if homework.nil? %>
|
||||||
<span class="c_red" id="homework_notice_span">请先在左侧选择作业</span>
|
<span class="c_red" id="homework_notice_span">请先在左侧选择作业</span>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="subjectIntro mb15">标题:<%=homework.name %><br />
|
<div class="subject-pop-intro mb15">标题:<%=homework.name %><br />
|
||||||
来源:<%=homework.course.name %><br />
|
来源:<%=homework.course.name %><br />
|
||||||
<% if homework.homework_type == 2 && homework.homework_detail_programing %>
|
<% if homework.homework_type == 2 && homework.homework_detail_programing %>
|
||||||
编程语言:<%=homework.language_name %><br/>
|
编程语言:<%=homework.language_name %><br/>
|
||||||
|
@ -15,15 +15,15 @@
|
||||||
<br />
|
<br />
|
||||||
描述如下:
|
描述如下:
|
||||||
</div>
|
</div>
|
||||||
<div class="subjectContent" id="homework_description">
|
<div class="subject-pop-content" id="homework_description">
|
||||||
<%=homework.description.html_safe %>
|
<%=homework.description.html_safe %>
|
||||||
</div>
|
</div>
|
||||||
<% if homework.homework_type == 2 %>
|
<% if homework.homework_type == 2 %>
|
||||||
<div class="subjectContent mt10">
|
<div class="subject-pop-content mt10">
|
||||||
测试集:<%=homework.homework_tests.count %>组
|
测试集:<%=homework.homework_tests.count %>组
|
||||||
</div>
|
</div>
|
||||||
<% elsif homework.homework_type ==3 && homework.homework_detail_group %>
|
<% elsif homework.homework_type ==3 && homework.homework_detail_group %>
|
||||||
<div class="subjectContent mt10">
|
<div class="subject-pop-content mt10">
|
||||||
分组人数:<%=homework.homework_detail_group.min_num %> - <%=homework.homework_detail_group.max_num %>人
|
分组人数:<%=homework.homework_detail_group.min_num %> - <%=homework.homework_detail_group.max_num %>人
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
<script type="text/javascript">
|
||||||
|
function show_homework_detail(url){
|
||||||
|
$.get(
|
||||||
|
url,
|
||||||
|
{
|
||||||
|
|
||||||
|
},
|
||||||
|
function (data) {
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="h450">
|
||||||
|
<% homeworks.each do |homework| %>
|
||||||
|
<ul class="subject-list-row">
|
||||||
|
<li class="subject-list-name fl hidden">
|
||||||
|
<label onclick="show_homework_detail('<%=show_homework_detail_user_path(@user,:homework=>homework.id,:is_import => 0) %>')">
|
||||||
|
<input type="radio" name="checkMenu" class="mr5" style="vertical-align:middle;" value="<%= homework.id%>"/>
|
||||||
|
<span title="<%= homework.name%>"><%= homework.name%></span>
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
<li class="subject-list-from fl hidden"><span title="<%=homework.course.name %>(<%=current_time_and_term(homework.course) %>)"><%=homework.course.name %>(<%=current_time_and_term_short(homework.course) %>)</span></li>
|
||||||
|
<li class="subject-list-type fl">
|
||||||
|
<% case homework.homework_type %>
|
||||||
|
<% when 1 %>
|
||||||
|
普通
|
||||||
|
<% when 2 %>
|
||||||
|
编程
|
||||||
|
<% when 3 %>
|
||||||
|
分组
|
||||||
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li class="subject-list-publisher fl hidden"><%= homework.user.show_name %></li>
|
||||||
|
<li class="subject-list-count fl" id="subject_count_homework_<%=homework.id %>"><%= homework.quotes %></li>
|
||||||
|
<li class="fl subject-list-date"><%=format_date homework.publish_time %></li>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
|
@ -0,0 +1,33 @@
|
||||||
|
<div class="subjectDetail fl mt10">
|
||||||
|
<div class="subjectInfo">题目信息</div>
|
||||||
|
<div class="subject-content-wrapper">
|
||||||
|
<% if homework.nil? %>
|
||||||
|
<span class="c_red" id="homework_notice_span">请先在左侧选择作业</span>
|
||||||
|
<% else %>
|
||||||
|
<div class="subjectIntro mb15">标题:<%=homework.name %><br />
|
||||||
|
来源:<%=homework.course.name %><br />
|
||||||
|
<% if homework.homework_type == 2 && homework.homework_detail_programing %>
|
||||||
|
编程语言:<%=homework.language_name %><br/>
|
||||||
|
<% end %>
|
||||||
|
贡献者:<%=homework.user.show_name %>
|
||||||
|
<% if homework.user.user_extensions.occupation && homework.user.user_extensions.occupation!="" %>
|
||||||
|
,<%=homework.user.user_extensions.occupation%>
|
||||||
|
<% end %>
|
||||||
|
<br />
|
||||||
|
描述如下:
|
||||||
|
</div>
|
||||||
|
<div class="subjectContent" id="homework_description">
|
||||||
|
<%=homework.description.html_safe %>
|
||||||
|
</div>
|
||||||
|
<% if homework.homework_type == 2 %>
|
||||||
|
<div class="subjectContent mt10">
|
||||||
|
测试集:<%=homework.homework_tests.count %>组
|
||||||
|
</div>
|
||||||
|
<% elsif homework.homework_type ==3 && homework.homework_detail_group %>
|
||||||
|
<div class="subjectContent mt10">
|
||||||
|
分组人数:<%=homework.homework_detail_group.min_num %> - <%=homework.homework_detail_group.max_num %>人
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -1,4 +1,4 @@
|
||||||
<input type="text" name="search" placeholder="输入关键词进行搜索" class="subjectSearch fr" />
|
<input type="text" name="search" placeholder="输入关键词进行搜索" class="subject-pop-search fr" />
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var lastSearchCondition = '';
|
var lastSearchCondition = '';
|
||||||
var count = 0;
|
var count = 0;
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
}
|
}
|
||||||
lastSearchCondition = $(e.target).val().trim();
|
lastSearchCondition = $(e.target).val().trim();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<%= url_for(:controller => 'users', :action => 'user_search_homeworks') %>'+'?name='+ e.target.value+'&type=<%=type %>',
|
url: '<%= url_for(:controller => 'users', :action => 'user_search_homeworks') %>'+'?name='+ e.target.value+'&type=<%=type %>&is_import=<%=is_import %>',
|
||||||
type:'get'
|
type:'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,79 @@
|
||||||
|
<div class="boxContainer">
|
||||||
|
<div>
|
||||||
|
<div class="sendText fl mr10" style="width: auto">发送到</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<!--<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></div>-->
|
||||||
|
<div class="fl">
|
||||||
|
<!--<input type="text" name="search" placeholder="输入课程ID或者名称搜索" class="subjectSearch fr" />-->
|
||||||
|
<input type="text" id="search_course_input" value="<%= @search %>" name="search" placeholder="输入课程ID或者名称搜索" class="mt10 mb10 course-search" />
|
||||||
|
</div>
|
||||||
|
<%= form_tag send_homework_to_course_user_path(user),:remote=>true,:id=>'choose_course_list_form' %>
|
||||||
|
<div>
|
||||||
|
<%= hidden_field_tag(:send_id, send_id) %>
|
||||||
|
<div class="courseReferContainer">
|
||||||
|
<% if !courses.empty? %>
|
||||||
|
<% courses.each do |course| %>
|
||||||
|
<ul class="courseSend">
|
||||||
|
<li class="" style="display:inline-block">
|
||||||
|
<input name="course_ids[]" type="checkbox" value="<%= course.id %>" class="courseSendCheckbox"/>
|
||||||
|
</li>
|
||||||
|
<li class="sendCourseName"><%= truncate(course.name,:lendght=>25) + '['+current_time_and_term(course) + ']'%></li>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<span id="choose_courses_notice" class="c_red"></span>
|
||||||
|
<div>
|
||||||
|
<div class="courseSendSubmit">
|
||||||
|
<a href="javascript:void(0);" onfocus='this.blur();' onclick="send_submit();" class="sendSourceText">确定</a>
|
||||||
|
</div>
|
||||||
|
<div class="courseSendCancel">
|
||||||
|
<a href="javascript:void(0);" class="sendSourceText" onclick="hideModal();">取消</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function send_submit() {
|
||||||
|
var checkboxs = $("input[name='course_ids[]']:checked");
|
||||||
|
if(checkboxs.length == 0) {
|
||||||
|
$("#choose_courses_notice").text("请先选择课程");
|
||||||
|
} else{
|
||||||
|
$("#choose_courses_notice").text("");
|
||||||
|
$("#choose_course_list_form").submit();
|
||||||
|
hideModal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var lastSearchCondition = '';
|
||||||
|
var count = 0;
|
||||||
|
function search_courses(e){
|
||||||
|
if($(e.target).val().trim() == lastSearchCondition && lastSearchCondition != '')
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
lastSearchCondition = $(e.target).val().trim();
|
||||||
|
$.ajax({
|
||||||
|
url: '<%= url_for(:controller => 'users', :action => 'choose_user_course') %>'+'?search='+ e.target.value+'&send_id=<%=send_id %>',
|
||||||
|
type:'get',
|
||||||
|
success: function(data){ },
|
||||||
|
beforeSend: function(){ $(this).addClass('ajax-loading'); },
|
||||||
|
complete: function(){ $(this).removeClass('ajax-loading'); }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function throttle(method,context,e){
|
||||||
|
clearTimeout(method.tId);
|
||||||
|
method.tId=setTimeout(function(){
|
||||||
|
method.call(context,e);
|
||||||
|
},500);
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询项目
|
||||||
|
$("input[name='search']").on('input', function (e) {
|
||||||
|
throttle(search_courses,window,e);
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
|
@ -1,12 +1,13 @@
|
||||||
<% homeworks.each do |homework| %>
|
<% homeworks.each do |homework| %>
|
||||||
<ul class="subjectRow">
|
<ul class="subject-pop-row">
|
||||||
<li class="subjectName fl hidden">
|
<li class="subject-pop-name fl hidden">
|
||||||
<label onclick="show_homework_detail('<%=show_homework_detail_user_path(@user,:homework=>homework.id) %>')">
|
<label onclick="show_homework_detail('<%=show_homework_detail_user_path(@user,:homework=>homework.id,:is_import =>1) %>')">
|
||||||
<input type="radio" name="checkMenu" class="mr5" style="vertical-align:middle;" value="<%= homework.id%>"/>
|
<input type="radio" name="checkMenu" class="mr5" style="vertical-align:middle;" value="<%= homework.id%>"/>
|
||||||
<span title="<%= homework.name%>"><%= homework.name%></span>
|
<span title="<%= homework.name%>"><%= homework.name%></span>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="subjectType fl">
|
<li class="subject-pop-from fl hidden">攻城狮</li>
|
||||||
|
<li class="subject-pop-type fl">
|
||||||
<% case homework.homework_type %>
|
<% case homework.homework_type %>
|
||||||
<% when 1 %>
|
<% when 1 %>
|
||||||
普通
|
普通
|
||||||
|
@ -16,9 +17,9 @@
|
||||||
分组
|
分组
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
<li class="subjectCount fl"><%= homework.quotes %></li>
|
<li class="subject-pop-publisher fl hidden"><%= homework.user.show_name %></li>
|
||||||
<li class="subjectPublisher fl hidden"><%= homework.user.show_name %></li>
|
<li class="subject-pop-count fl"><%= homework.quotes %></li>
|
||||||
<li class="fl subjectDate"><%=format_date homework.publish_time %></li>
|
<li class="subject-pop-date fl"><%=format_date homework.publish_time %></li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
<div class="w985"> <a href="javascript:void(0);" class="popupClose" onclick="hideModal()"></a>
|
<div class="w985"> <a href="javascript:void(0);" class="popup-close" onclick="hideModal()"></a>
|
||||||
<div class="f16 fb fontBlue mb10">选用题库中的题目</div>
|
<div class="f16 fb fontBlue mb10">选用题库中的题目</div>
|
||||||
<div class="subjectList fl mr10">
|
<div class="subject-list fl mr10">
|
||||||
<a href="<%= user_homework_type_user_path(@user) %>" id="public_homeworks_choose" class="subjectChoose chooseActive fl" data-remote="true">公共题库</a>
|
<a href="<%= user_homework_type_user_path(@user,:is_import => 1) %>" id="public_homeworks_choose" class="subjectChoose chooseActive fl" data-remote="true">公共题库</a>
|
||||||
<a href="<%= user_homework_type_user_path(@user,:type=>'2') %>" id="user_homeworks_choose" class="subjectChoose fl" data-remote="true">我的题库</a>
|
<a href="<%= user_homework_type_user_path(@user,:type=>'2',:is_import => 1) %>" id="user_homeworks_choose" class="subjectChoose fl" data-remote="true">我的题库</a>
|
||||||
<div id="homework_search_input">
|
<div id="homework_search_input">
|
||||||
<%=render :partial=>'homework_search_input', :locals=>{:type=>@type} %>
|
<%=render :partial=>'homework_search_input', :locals=>{:type => @type,:is_import => 1} %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div>
|
<div>
|
||||||
<ul class="subjectBanner mt10">
|
<ul class="subject-pop-banner mt10">
|
||||||
<li class="subjectName fl hidden"><span style="padding-left:15px;">作业名称</span></li>
|
<li class="subject-pop-name fl hidden"><span style="padding-left:15px;">作业名称</span></li>
|
||||||
<li class="subjectType fl">类型</li>
|
<li class="subject-pop-from fl">来源</li>
|
||||||
<li class="subjectCount fl">引用数</li>
|
<li class="subject-pop-type fl">类别</li>
|
||||||
<li class="subjectPublisher fl">贡献者</li>
|
<li class="subject-pop-publisher fl">贡献者</li>
|
||||||
<li class="fl subjectDate">发布时间</li>
|
<li class="subject-pop-count fl">引用数</li>
|
||||||
|
<li class="subject-pop-date fl">发布时间</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<%= form_tag(user_select_homework_users_path, :multipart => true,:remote => true,:name=>"select_homework_form",:id=>'select_homework_form') do %>
|
<%= form_tag(user_select_homework_users_path, :multipart => true,:remote => true,:name=>"select_homework_form",:id=>'select_homework_form') do %>
|
||||||
|
@ -35,18 +36,18 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="subjectDetail fl" id="homework_detail_information">
|
<div class="subject-detail fl" id="homework_detail_information">
|
||||||
<%=render :partial=>'homework_detail_information', :locals=>{:homework=>nil} %>
|
<%=render :partial=>'homework_detail_information', :locals=>{:homework=>nil} %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#public_homeworks_choose").click(function(){
|
$("#public_homeworks_choose").click(function(){
|
||||||
$(this).toggleClass("chooseActive");
|
$(this).toggleClass("choose-active");
|
||||||
$("#user_homeworks_choose").toggleClass("chooseActive");
|
$("#user_homeworks_choose").toggleClass("choose-active");
|
||||||
});
|
});
|
||||||
$("#user_homeworks_choose").click(function(){
|
$("#user_homeworks_choose").click(function(){
|
||||||
$(this).toggleClass("chooseActive");
|
$(this).toggleClass("choose-active");
|
||||||
$("#public_homeworks_choose").toggleClass("chooseActive");
|
$("#public_homeworks_choose").toggleClass("choose-active");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -15,7 +15,9 @@
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<% if homework_common.homework_detail_manual%>
|
<% if homework_common.homework_detail_manual%>
|
||||||
<% if homework_common.homework_detail_manual.comment_status == 0 %>
|
<% if homework_common.homework_detail_manual.comment_status == 0 && homework_common.publish_time.nil? %>
|
||||||
|
<span class="grey_homework_btn_cir ml5">挂起</span>
|
||||||
|
<% elsif homework_common.homework_detail_manual.comment_status == 0 %>
|
||||||
<span class="grey_homework_btn_cir ml5">未发布</span>
|
<span class="grey_homework_btn_cir ml5">未发布</span>
|
||||||
<% elsif homework_common.homework_detail_manual.comment_status == 1%>
|
<% elsif homework_common.homework_detail_manual.comment_status == 1%>
|
||||||
<% if homework_common.anonymous_comment == 0%>
|
<% if homework_common.anonymous_comment == 0%>
|
||||||
|
@ -84,12 +86,12 @@
|
||||||
分组人数:<%=homework_common.homework_detail_group.min_num %>-<%=homework_common.homework_detail_group.max_num %> 人
|
分组人数:<%=homework_common.homework_detail_group.min_num %>-<%=homework_common.homework_detail_group.max_num %> 人
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if homework_common.homework_detail_manual && homework_common.homework_detail_manual.comment_status < 2 %>
|
<% if homework_common.homework_detail_manual && homework_common.homework_detail_manual.comment_status < 2 && !homework_common.publish_time.nil? %>
|
||||||
<div class="homepagePostDeadline">提交截止时间:<%= homework_common.end_time.to_s %> 23:59</div>
|
<div class="homepagePostDeadline">提交截止时间:<%= homework_common.end_time.to_s %> 23:59</div>
|
||||||
<% elsif homework_common.homework_detail_manual && homework_common.homework_detail_manual.comment_status >= 2 %>
|
<% elsif homework_common.homework_detail_manual && homework_common.homework_detail_manual.comment_status >= 2 && !homework_common.publish_time.nil? && homework_common.anonymous_comment == 0 %>
|
||||||
<div class="homepagePostDeadline">匿评截止时间:<%= homework_common.homework_detail_manual.evaluation_end.to_s %> 23:59</div>
|
<div class="homepagePostDeadline">匿评截止时间:<%= homework_common.homework_detail_manual.evaluation_end.to_s %> 23:59</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if homework_common.homework_detail_manual.comment_status == 0 %>
|
<% if homework_common.homework_detail_manual.comment_status == 0 && !homework_common.publish_time.nil? %>
|
||||||
<div class="homepagePostDeadline ml15">
|
<div class="homepagePostDeadline ml15">
|
||||||
<%= l(:label_publish_time)%>:<%= homework_common.publish_time%> 00:00
|
<%= l(:label_publish_time)%>:<%= homework_common.publish_time%> 00:00
|
||||||
</div>
|
</div>
|
||||||
|
@ -107,7 +109,7 @@
|
||||||
<div class="homepagePostDeadline">
|
<div class="homepagePostDeadline">
|
||||||
迟交扣分:<%= homework_common.late_penalty%>分
|
迟交扣分:<%= homework_common.late_penalty%>分
|
||||||
</div>
|
</div>
|
||||||
<% if homework_common.anonymous_comment == 0%>
|
<% if homework_common.anonymous_comment == 0 && !homework_common.publish_time.nil?%>
|
||||||
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_start_time_<%=homework_common.id %>">
|
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_start_time_<%=homework_common.id %>">
|
||||||
匿评开启时间:<%= homework_common.homework_detail_manual.evaluation_start%> 00:00
|
匿评开启时间:<%= homework_common.homework_detail_manual.evaluation_start%> 00:00
|
||||||
</div>
|
</div>
|
||||||
|
@ -120,7 +122,7 @@
|
||||||
缺评扣分:<%= homework_common.homework_detail_manual.absence_penalty%>分/作品
|
缺评扣分:<%= homework_common.homework_detail_manual.absence_penalty%>分/作品
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if homework_common.anonymous_comment == 0%>
|
<% if homework_common.anonymous_comment == 0 && !homework_common.publish_time.nil?%>
|
||||||
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_end_time_<%=homework_common.id %>">
|
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_end_time_<%=homework_common.id %>">
|
||||||
匿评关闭时间:<%= homework_common.homework_detail_manual.evaluation_end%> 23:59
|
匿评关闭时间:<%= homework_common.homework_detail_manual.evaluation_end%> 23:59
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -228,7 +228,9 @@
|
||||||
|
|
||||||
<script id="t:test-answer-list" type="text/html">
|
<script id="t:test-answer-list" type="text/html">
|
||||||
<div class="mt10">
|
<div class="mt10">
|
||||||
<textarea class="InputBox W320 fl mr10" placeholder="测试输入" name="program[input][]"></textarea><textarea class="InputBox W320 fl mr5" placeholder="测试输出" name="program[output][]"></textarea>
|
<label class="fl mt5" name="inputs_label"> </label>
|
||||||
|
<textarea class="InputBox W320 fl mr10" placeholder="测试输入" name="program[input][]"></textarea>
|
||||||
|
<textarea class="InputBox W320 fl mr5" placeholder="测试输出" name="program[output][]"></textarea>
|
||||||
<a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a>
|
<a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a>
|
||||||
<a href="javascript:void(0);" class=" fl icon_remove" title="删除测试组"></a>
|
<a href="javascript:void(0);" class=" fl icon_remove" title="删除测试组"></a>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<%= link_to "点击展开更多",homework_common_index_path(:course => course_id,:page => page,:is_in_course => is_in_course),:id => "user_show_more_homework",:remote => "true",:class => "loadMore f_grey"%>
|
<%= link_to "点击展开更多",homework_common_index_path(:course => course_id,:page => page,:is_in_course => is_in_course),:id => "user_show_more_homework",:remote => "true",:class => "loadMore f_grey"%>
|
||||||
<% else%>
|
<% else%>
|
||||||
<!-- 在个人主页 -->
|
<!-- 在个人主页 -->
|
||||||
<%= link_to "点击展开更多",user_homeworks_user_path(User.current.id,:page => page,:is_in_course => is_in_course),:id => "user_show_more_homework",:remote => "true",:class => "loadMore f_grey"%>
|
<%= link_to "点击展开更多",student_homeworks_user_path(User.current.id,:page => page,:is_in_course => is_in_course),:id => "user_show_more_homework",:remote => "true",:class => "loadMore f_grey"%>
|
||||||
<% end%>
|
<% end%>
|
||||||
<% end%>
|
<% end%>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
<script type="text/javascript">
|
||||||
|
function reset_homework(){
|
||||||
|
$("#homework_name").val("");
|
||||||
|
$("#homework_publish_time").val("");
|
||||||
|
$("#homework_end_time").val("");
|
||||||
|
$("#course_id").val($("#option_select").val());
|
||||||
|
$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => HomeworkCommon.new,:has_program => true,:has_group => true })%>");
|
||||||
|
//homework_description_editor.html("");
|
||||||
|
$("#homework_name_span").text("");
|
||||||
|
$("#homework_end_time_span").text("");
|
||||||
|
$("#homework_end_time_span").text("");
|
||||||
|
$("#homework_course_id_span").text("");
|
||||||
|
$("#homework_editor").toggle();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 点击 checkbox选中引用的资源的时候,保存该资源的id到session里去
|
||||||
|
function store_seleted_resource(dom){
|
||||||
|
if(dom.attr('checked') == 'checked' ){
|
||||||
|
$.get(
|
||||||
|
'<%= store_selected_resource_user_path %>'+'?save=y&res_id='+dom.val()
|
||||||
|
)
|
||||||
|
}else {
|
||||||
|
$.get(
|
||||||
|
'<%= store_selected_resource_user_path %>'+'?save=n&res_id='+dom.val()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<div class="homepageRightBanner mb10">
|
||||||
|
<div class="NewsBannerName">作业</div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
<% if @is_teacher%>
|
||||||
|
<!-- 老师身份才可以发布作业 -->
|
||||||
|
<div class="HomeWork mb10" nhname='homework_common_form'>
|
||||||
|
<% homework = HomeworkCommon.new %>
|
||||||
|
<% homework.homework_detail_manual = HomeworkDetailManual.new%>
|
||||||
|
<%= labelled_form_for homework,:url => user_new_homework_users_path,:method => "post" do |f| %>
|
||||||
|
<div id="HomeWorkCon">
|
||||||
|
<%= render :partial => 'users/user_homework_form', :locals => { :homework => homework,:f => f,:edit_mode => false } %>
|
||||||
|
</div>
|
||||||
|
<% end%>
|
||||||
|
</div><!----HomeWork end-->
|
||||||
|
<% end%>
|
||||||
|
|
||||||
|
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => @homework_commons,:page => 0,:is_in_course => 0} %>
|
|
@ -7,10 +7,11 @@
|
||||||
<%= options_for_select({"C语言"=>1, "C++"=>2, "Python"=>3, "Java"=>4}, (edit_mode && homework.is_program_homework?) ? homework.language : 1) %>
|
<%= options_for_select({"C语言"=>1, "C++"=>2, "Python"=>3, "Java"=>4}, (edit_mode && homework.is_program_homework?) ? homework.language : 1) %>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 320px; overflow-y:auto; width:730px;">
|
<div style="height: 320px; overflow-y:auto; width:756px;">
|
||||||
<% if edit_mode && homework.is_program_homework? %>
|
<% if edit_mode && homework.is_program_homework? %>
|
||||||
<% homework.homework_tests.each_with_index do |test, index| %>
|
<% homework.homework_tests.each_with_index do |test, index| %>
|
||||||
<div class="mt10">
|
<div class="mt10">
|
||||||
|
<label class="fl mt5" name="inputs_label"><%=index+1 %> </label>
|
||||||
<textarea class="InputBox W320 fl mr10" placeholder="测试输入" id="textarea_input_test"><%= test.input %></textarea>
|
<textarea class="InputBox W320 fl mr10" placeholder="测试输入" id="textarea_input_test"><%= test.input %></textarea>
|
||||||
<textarea class="InputBox W320 fl mr5" placeholder="测试输出" id="textarea_output_test"><%= test.output %></textarea>
|
<textarea class="InputBox W320 fl mr5" placeholder="测试输出" id="textarea_output_test"><%= test.output %></textarea>
|
||||||
<a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a>
|
<a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a>
|
||||||
|
@ -22,6 +23,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="mt10">
|
<div class="mt10">
|
||||||
|
<label class="fl mt5" name="inputs_label">1 </label>
|
||||||
<textarea class="InputBox W320 fl mr10" placeholder="测试输入" id="textarea_input_test"></textarea>
|
<textarea class="InputBox W320 fl mr10" placeholder="测试输入" id="textarea_input_test"></textarea>
|
||||||
<textarea class="InputBox W320 fl mr5" placeholder="测试输出" id="textarea_output_test"></textarea>
|
<textarea class="InputBox W320 fl mr5" placeholder="测试输出" id="textarea_output_test"></textarea>
|
||||||
<a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a>
|
<a href="javascript:void(0);" class=" fl icon_add" title="增加测试组"></a>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/send_homework_to_course', :locals => {:courses => @course, :user => @user, :send_id => @send_id}) %>');
|
||||||
|
showModal('ajax-modal', '452px');
|
||||||
|
$('#ajax-modal').siblings().remove();
|
||||||
|
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 435px;' class='resourceClose'></a>");
|
||||||
|
$('#ajax-modal').parent().css("top","50%").css("left","50%");
|
||||||
|
$('#ajax-modal').parent().addClass("popbox").addClass("resourceUploadPopup");
|
||||||
|
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
|
|
@ -0,0 +1 @@
|
||||||
|
$("#subject_count_homework_<%=@homework.id %>").html(<%= @homework.quotes %>);
|
|
@ -1 +1,5 @@
|
||||||
$("#homework_detail_information").html("<%=escape_javascript(render :partial => 'users/homework_detail_information', :locals => {:homework=>@homework}) %>")
|
<% if @is_import.to_i == 1 %>
|
||||||
|
$("#homework_detail_information").html("<%=escape_javascript(render :partial => 'users/homework_detail_information', :locals => {:homework=>@homework}) %>");
|
||||||
|
<% else %>
|
||||||
|
$("#homework_repository_detail").html("<%=escape_javascript(render :partial => 'users/homework_repository_detail', :locals => {:homework=>@homework}) %>");
|
||||||
|
<% end %>
|
|
@ -0,0 +1,47 @@
|
||||||
|
<script type="text/javascript">
|
||||||
|
function reset_homework(){
|
||||||
|
$("#homework_name").val("");
|
||||||
|
$("#homework_publish_time").val("");
|
||||||
|
$("#homework_end_time").val("");
|
||||||
|
$("#course_id").val($("#option_select").val());
|
||||||
|
$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => HomeworkCommon.new,:has_program => true,:has_group => true })%>");
|
||||||
|
//homework_description_editor.html("");
|
||||||
|
$("#homework_name_span").text("");
|
||||||
|
$("#homework_end_time_span").text("");
|
||||||
|
$("#homework_end_time_span").text("");
|
||||||
|
$("#homework_course_id_span").text("");
|
||||||
|
$("#homework_editor").toggle();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 点击 checkbox选中引用的资源的时候,保存该资源的id到session里去
|
||||||
|
function store_seleted_resource(dom){
|
||||||
|
if(dom.attr('checked') == 'checked' ){
|
||||||
|
$.get(
|
||||||
|
'<%= store_selected_resource_user_path %>'+'?save=y&res_id='+dom.val()
|
||||||
|
)
|
||||||
|
}else {
|
||||||
|
$.get(
|
||||||
|
'<%= store_selected_resource_user_path %>'+'?save=n&res_id='+dom.val()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<div class="homepageRightBanner mb10">
|
||||||
|
<div class="NewsBannerName">作业</div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
<% if @is_teacher%>
|
||||||
|
<!-- 老师身份才可以发布作业 -->
|
||||||
|
<div class="HomeWork mb10" nhname='homework_common_form'>
|
||||||
|
<% homework = HomeworkCommon.new %>
|
||||||
|
<% homework.homework_detail_manual = HomeworkDetailManual.new%>
|
||||||
|
<%= labelled_form_for homework,:url => user_new_homework_users_path,:method => "post" do |f| %>
|
||||||
|
<div id="HomeWorkCon">
|
||||||
|
<%= render :partial => 'users/user_homework_form', :locals => { :homework => homework,:f => f,:edit_mode => false } %>
|
||||||
|
</div>
|
||||||
|
<% end%>
|
||||||
|
</div><!----HomeWork end-->
|
||||||
|
<% end%>
|
||||||
|
|
||||||
|
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => @homework_commons,:page => 0,:is_in_course => 0} %>
|
|
@ -0,0 +1 @@
|
||||||
|
$("#user_show_more_homework").replaceWith("<%= escape_javascript( render :partial => 'users/user_homework_list',:locals => {:homework_commons => @homework_commons, :page => @page,:is_in_course => 0} )%>");
|
|
@ -1,4 +1,11 @@
|
||||||
|
<% if @is_import.to_i == 1 %>
|
||||||
$("#homework_list_form_show").html('<%= escape_javascript(render :partial => 'users/show_user_homework_form', :locals => {:homeworks => @homeworks})%>');
|
$("#homework_list_form_show").html('<%= escape_javascript(render :partial => 'users/show_user_homework_form', :locals => {:homeworks => @homeworks})%>');
|
||||||
$("#homewrok_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
$("#homewrok_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
||||||
$("#homework_detail_information").html("<%=escape_javascript(render :partial => 'users/homework_detail_information', :locals => {:homework=>nil}) %>");
|
$("#homework_detail_information").html("<%=escape_javascript(render :partial => 'users/homework_detail_information', :locals => {:homework=>nil}) %>");
|
||||||
$("#homework_search_input").html("<%=escape_javascript(render :partial=>'homework_search_input', :locals=>{:type=>@type}) %>");
|
$("#homework_search_input").html("<%=escape_javascript(render :partial=>'homework_search_input', :locals=>{:type=>@type,:is_import=>@is_import}) %>");
|
||||||
|
<% else %>
|
||||||
|
$("#homework_repository").html('<%= escape_javascript(render :partial => 'users/homework_repository', :locals => {:homeworks => @homeworks})%>');
|
||||||
|
$("#homework_pository_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
||||||
|
$("#homework_repository_detail").html("<%=escape_javascript(render :partial => 'users/homework_repository_detail', :locals => {:homework=>nil}) %>");
|
||||||
|
$("#homework_search_input").html("<%=escape_javascript(render :partial=>'homework_search_input', :locals=>{:type=>@type,:is_import=>@is_import}) %>");
|
||||||
|
<% end %>
|
||||||
|
|
|
@ -1,47 +1,96 @@
|
||||||
<script type="text/javascript">
|
<%= stylesheet_link_tag 'pleft','header','new_user','repository','org', 'public' %>
|
||||||
function reset_homework(){
|
<script>
|
||||||
$("#homework_name").val("");
|
$(document).ready(function(){
|
||||||
$("#homework_publish_time").val("");
|
$(".resource-switch").click(function(){
|
||||||
$("#homework_end_time").val("");
|
$(".resource-switch").children().removeClass("resource-tab-active");
|
||||||
$("#course_id").val($("#option_select").val());
|
$(this).children().addClass("resource-tab-active");
|
||||||
$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => HomeworkCommon.new,:has_program => true,:has_group => true })%>");
|
});
|
||||||
//homework_description_editor.html("");
|
$("input[name='subject-list-name']").click(function(){
|
||||||
$("#homework_name_span").text("");
|
if($("input[name='subject-list-name']:checked").length >= 1){
|
||||||
$("#homework_end_time_span").text("");
|
$(".resourcesSelectSendButton").removeClass("inactive-border");
|
||||||
$("#homework_end_time_span").text("");
|
$(".sendButtonBlue").removeClass("inactive-text");
|
||||||
$("#homework_course_id_span").text("");
|
|
||||||
$("#homework_editor").toggle();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 点击 checkbox选中引用的资源的时候,保存该资源的id到session里去
|
|
||||||
function store_seleted_resource(dom){
|
|
||||||
if(dom.attr('checked') == 'checked' ){
|
|
||||||
$.get(
|
|
||||||
'<%= store_selected_resource_user_path %>'+'?save=y&res_id='+dom.val()
|
|
||||||
)
|
|
||||||
}else {
|
}else {
|
||||||
$.get(
|
$(".resourcesSelectSendButton").addClass("inactive-border");
|
||||||
'<%= store_selected_resource_user_path %>'+'?save=n&res_id='+dom.val()
|
$(".sendButtonBlue").addClass("inactive-text");
|
||||||
)
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
function choose_course(user_id) {
|
||||||
|
var check = $('input[name="checkMenu"]:checked');
|
||||||
|
if(check.length == 0) {
|
||||||
|
$("#choose_homework_notice").text("请先选择一个作业");
|
||||||
|
} else {
|
||||||
|
$("#choose_homework_notice").text("");
|
||||||
|
$.ajax({
|
||||||
|
type: 'get',
|
||||||
|
url: '/users/' + user_id + '/choose_user_course',
|
||||||
|
data:{send_id:$('input[name="checkMenu"]:checked').val()}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<div class="homepageRightBanner mb10">
|
|
||||||
<div class="NewsBannerName">作业</div>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
|
|
||||||
<% if @is_teacher%>
|
<div class="homepageContentContainer">
|
||||||
<!-- 老师身份才可以发布作业 -->
|
<div class="homepageContent">
|
||||||
<div class="HomeWork mb10" nhname='homework_common_form'>
|
<div class="resource-wrapper mt10">
|
||||||
<% homework = HomeworkCommon.new %>
|
<ul class="resource-banner">
|
||||||
<% homework.homework_detail_manual = HomeworkDetailManual.new%>
|
<li class="fl resource-switch">
|
||||||
<%= labelled_form_for homework,:url => user_new_homework_users_path,:method => "post" do |f| %>
|
<a href="<%= user_homework_type_user_path(@user,:is_import => 0) %>" id="public_homeworks_choose" class="resource-tab resource-tab-active" data-remote="true">公共题库</a>
|
||||||
<div id="HomeWorkCon">
|
</li>
|
||||||
<%= render :partial => 'users/user_homework_form', :locals => { :homework => homework,:f => f,:edit_mode => false } %>
|
<li class="fl resource-switch">
|
||||||
|
<a href="<%= user_homework_type_user_path(@user,:type=>'2',:is_import => 0) %>" id="user_homeworks_choose" class="resource-tab" data-remote="true">我的题库</a>
|
||||||
|
</li>
|
||||||
|
<li class="fl w770 border-bottom h34"> </li>
|
||||||
|
<li class="fr resource-banner-li border-bottom h34">
|
||||||
|
<ul class="resourcesSelect">
|
||||||
|
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||||
|
<ul class="resourcesType">
|
||||||
|
<li> <a href="/users/8523/user_resource?type=1" class="resourcesTypeAll resourcesGrey" data-method="get" data-remote="true">全部</a> </li>
|
||||||
|
<li> <a href="/users/8523/user_resource?type=2" class="homepagePostTypeAssignment postTypeGrey" data-method="get" data-remote="true">普通作业</a> </li>
|
||||||
|
<li> <a href="/users/8523/user_resource?type=3" class="program-btn postTypeGrey" data-method="get" data-remote="true" style="white-space:nowrap;">编程作业</a> </li>
|
||||||
|
<li> <a href="/users/8523/user_resource?type=5" class="group-btn resourcesGrey" data-method="get" data-remote="true">分组作业</a> </li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div id="homework_search_input" class="mt10 fl">
|
||||||
|
<%=render :partial=>'homework_search_input', :locals=>{:type => @type,:is_import => 0} %>
|
||||||
</div>
|
</div>
|
||||||
<% end%>
|
<!--<form class="resourcesSearchloadBox mt10">
|
||||||
</div><!----HomeWork end-->
|
<input type="text" name="serach" placeholder="输入题库关键词进行搜索" class="searchResource" />
|
||||||
<% end%>
|
<a href="javascript:void(0);" class="homepageSearchIcon"></a>
|
||||||
|
</form>-->
|
||||||
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => @homework_commons,:page => 0,:is_in_course => 0} %>
|
<div class="cl"></div>
|
||||||
|
<div class="w583 fl mr10 mt10">
|
||||||
|
<ul class="subject-list-banner">
|
||||||
|
<li class="subject-list-name fl hidden"><span style="padding-left:15px;">作业名称</span></li>
|
||||||
|
<li class="subject-list-from fl">来源</li>
|
||||||
|
<li class="subject-list-type fl">类别</li>
|
||||||
|
<li class="subject-list-publisher fl">贡献者</li>
|
||||||
|
<li class="subject-list-count fl">引用数</li>
|
||||||
|
<li class="fl subject-list-date">发布时间</li>
|
||||||
|
</ul>
|
||||||
|
<div id="homework_repository">
|
||||||
|
<%=render :partial => 'homework_repository', :locals => {:homeworks => @homeworks} %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="homework_repository_detail">
|
||||||
|
<%=render :partial => 'homework_repository_detail', :locals => {:homework => nil} %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div>
|
||||||
|
<ul class="wlist mt10" id="homework_pository_ref_pages" style="margin-top: 5px;margin-right: 395px">
|
||||||
|
<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true%>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="fl resourcesSelectSendButton mr15 inactive-border mt10">
|
||||||
|
<a href="javascript:void(0)" onclick="choose_course('<%=User.current.id %>');" class="sendButtonBlue db inactive-text" data-remote="true">发送至</a>
|
||||||
|
</div>
|
||||||
|
<span class="c_red fl mt15" id="choose_homework_notice"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -1,2 +1,5 @@
|
||||||
$("#user_show_more_homework").replaceWith("<%= escape_javascript( render :partial => 'users/user_homework_list',:locals => {:homework_commons => @homework_commons, :page => @page,:is_in_course => 0} )%>");
|
$("#homework_repository").html('<%= escape_javascript(render :partial => 'users/homework_repository', :locals => {:homeworks => @homeworks})%>');
|
||||||
|
$("#homework_pository_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
||||||
|
$("#homework_repository_detail").html("<%=escape_javascript(render :partial => 'users/homework_repository_detail', :locals => {:homework=>nil}) %>");
|
||||||
|
/*$("#user_show_more_homework").replaceWith("<%#= escape_javascript( render :partial => 'users/user_homework_list',:locals => {:homework_commons => @homework_commons, :page => @page,:is_in_course => 0} )%>");*/
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
<% if @is_import.to_i == 1 %>
|
||||||
$("#homework_list_form_show").html('<%= escape_javascript(render :partial => 'users/show_user_homework_form', :locals => {:homeworks => @homeworks})%>');
|
$("#homework_list_form_show").html('<%= escape_javascript(render :partial => 'users/show_user_homework_form', :locals => {:homeworks => @homeworks})%>');
|
||||||
$("#homewrok_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
$("#homewrok_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
||||||
$("#homework_detail_information").html("<%=escape_javascript(render :partial => 'users/homework_detail_information', :locals => {:homework=>nil}) %>");
|
$("#homework_detail_information").html("<%=escape_javascript(render :partial => 'users/homework_detail_information', :locals => {:homework=>nil}) %>");
|
||||||
|
<% else %>
|
||||||
|
$("#homework_repository").html('<%= escape_javascript(render :partial => 'users/homework_repository', :locals => {:homeworks => @homeworks})%>');
|
||||||
|
$("#homework_pository_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
||||||
|
$("#homework_repository_detail").html("<%=escape_javascript(render :partial => 'users/homework_repository_detail', :locals => {:homework=>nil}) %>");
|
||||||
|
<% end %>
|
|
@ -505,8 +505,10 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'user_feedback4show', :to => 'users#user_feedback4show', :via => :get
|
match 'user_feedback4show', :to => 'users#user_feedback4show', :via => :get
|
||||||
match 'user_visitorlist', :to => 'users#user_visitorlist', :via => :get
|
match 'user_visitorlist', :to => 'users#user_visitorlist', :via => :get
|
||||||
match 'user_homeworks', :to => 'users#user_homeworks', :via => :get
|
match 'user_homeworks', :to => 'users#user_homeworks', :via => :get
|
||||||
|
match 'student_homeworks', :to => 'users#student_homeworks', :via => :get
|
||||||
get 'user_import_homeworks'
|
get 'user_import_homeworks'
|
||||||
get 'user_search_homeworks'
|
get 'user_search_homeworks'
|
||||||
|
get 'choose_user_course'
|
||||||
get 'user_import_resource'
|
get 'user_import_resource'
|
||||||
match 'watch_projects', :to => 'users#watch_projects', :via => :get
|
match 'watch_projects', :to => 'users#watch_projects', :via => :get
|
||||||
#
|
#
|
||||||
|
@ -539,6 +541,7 @@ RedmineApp::Application.routes.draw do
|
||||||
post "user_resource_create"
|
post "user_resource_create"
|
||||||
post "user_resource_delete"
|
post "user_resource_delete"
|
||||||
get "search_user_course"
|
get "search_user_course"
|
||||||
|
post "send_homework_to_course"
|
||||||
post "add_exist_file_to_course"
|
post "add_exist_file_to_course"
|
||||||
post "add_exist_file_to_project"
|
post "add_exist_file_to_project"
|
||||||
post 'add_exist_file_to_org'
|
post 'add_exist_file_to_org'
|
||||||
|
|
|
@ -85,8 +85,8 @@ class Gitlab::Client
|
||||||
# public (optional) - if true same as setting visibility_level = 20
|
# public (optional) - if true same as setting visibility_level = 20
|
||||||
# visibility_level (optional)
|
# visibility_level (optional)
|
||||||
|
|
||||||
def edit_project(id, visibility_level)
|
def edit_project(id, visibility_level, default_branch)
|
||||||
put("/projects/#{id}", :body => {:visibility_level => visibility_level})
|
put("/projects/#{id}", :body => {:visibility_level => visibility_level, :default_branch => default_branch})
|
||||||
end
|
end
|
||||||
|
|
||||||
# Deletes a project.
|
# Deletes a project.
|
||||||
|
|
|
@ -151,7 +151,7 @@ $(function(){
|
||||||
modal: true,
|
modal: true,
|
||||||
autoOpen: false,
|
autoOpen: false,
|
||||||
dialogClass: 'BluePopupBox',
|
dialogClass: 'BluePopupBox',
|
||||||
minWidth: 753
|
minWidth: 771
|
||||||
});
|
});
|
||||||
$('#BluePopupBox').parent().resizable("disable");
|
$('#BluePopupBox').parent().resizable("disable");
|
||||||
$('#BluePopupBox').parent().removeClass("ui-state-disabled");
|
$('#BluePopupBox').parent().removeClass("ui-state-disabled");
|
||||||
|
@ -243,6 +243,10 @@ $(function(){
|
||||||
$(this).parent('.mt10').after(html);
|
$(this).parent('.mt10').after(html);
|
||||||
var inputs = document.getElementsByName("program[input][]");
|
var inputs = document.getElementsByName("program[input][]");
|
||||||
var outputs = document.getElementsByName("program[output][]");
|
var outputs = document.getElementsByName("program[output][]");
|
||||||
|
var inputs_labels = document.getElementsByName("inputs_label");
|
||||||
|
for(var j= 0; j<inputs_labels.length; j++){
|
||||||
|
$(inputs_labels[j]).html(j + 1 + " " );
|
||||||
|
}
|
||||||
if (inputs.length == outputs.length) {
|
if (inputs.length == outputs.length) {
|
||||||
for (var i=0; i<inputs.length; i++) {
|
for (var i=0; i<inputs.length; i++) {
|
||||||
autoTextarea2(inputs[i], outputs[i]);
|
autoTextarea2(inputs[i], outputs[i]);
|
||||||
|
|
|
@ -420,7 +420,7 @@ a.resourcesBlack:hover {font-size:12px; color:#000000;}
|
||||||
.resourcesCheckAll {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle; float:left;}
|
.resourcesCheckAll {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle; float:left;}
|
||||||
.resourcesSelectSend {float:right;}
|
.resourcesSelectSend {float:right;}
|
||||||
/*.resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; margin-top:5px; margin-right:10px; margin-left:15px; text-align:center; border:1px solid #15bccf; border-radius:5px; float:right;}*/
|
/*.resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; margin-top:5px; margin-right:10px; margin-left:15px; text-align:center; border:1px solid #15bccf; border-radius:5px; float:right;}*/
|
||||||
.resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; margin-top:5px; margin-right:10px; margin-left:15px; text-align:center; border:1px solid #269ac9; border-radius:5px; float:right;}
|
.resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #269ac9; border-radius:5px; }
|
||||||
a.sendButtonBlue {color:#269ac9;}
|
a.sendButtonBlue {color:#269ac9;}
|
||||||
a.sendButtonBlue:hover {color:#ffffff;}
|
a.sendButtonBlue:hover {color:#ffffff;}
|
||||||
.resourcesSelectSendButton:hover {background-color:#297fb8;}
|
.resourcesSelectSendButton:hover {background-color:#297fb8;}
|
||||||
|
@ -1438,27 +1438,44 @@ span.at a{color:#269ac9;text-decoration: none;}
|
||||||
.proInfoP{color:#000000 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
.proInfoP{color:#000000 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
||||||
|
|
||||||
/*导入题库样式*/
|
/*导入题库样式*/
|
||||||
.popupWrap {border:3px solid #269ac9; padding:15px; background-color:#ffffff; position:relative; z-index:1000;}
|
.popup-wrapper {border:3px solid #269ac9; padding:15px; background-color:#ffffff; position:relative; z-index:1000;}
|
||||||
.subjectList {width:585px;}
|
.subject-list {width:585px;}
|
||||||
.subjectDetail {width:385px;}
|
.subject-detail {width:385px;}
|
||||||
a.subjectChoose {padding:8px 20px; background-color:#f1f1f1; color:#888888;}
|
a.subject-choose {padding:8px 20px; background-color:#f1f1f1; color:#888888;}
|
||||||
a.chooseActive {background-color:#269ac9; color:#ffffff;}
|
a.choose-active {background-color:#269ac9; color:#ffffff;}
|
||||||
.subjectBanner {width:585px; height:40px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;}
|
.subject-pop-banner {width:585px; height:40px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;}
|
||||||
.subjectBanner li {height:40px; line-height:40px; vertical-align:middle;}
|
.subject-pop-banner li {height:40px; line-height:40px; vertical-align:middle;}
|
||||||
.subjectName {width:270px; padding-left:10px; padding-right:10px;}
|
.subject-pop-name {width:200px; padding-left:10px; padding-right:10px;}
|
||||||
.subjectPublisher {width:80px; text-align:center;}
|
.subject-pop-publisher {width:80px; text-align:center;}
|
||||||
.subjectDate {width:80px; text-align:center;}
|
.subject-pop-date {width:75px; text-align:center;}
|
||||||
.subjectType {width:70px; text-align:center;}
|
.subject-pop-row {width:585px; height:30px; color:#7a7a7a; font-size:12px;}
|
||||||
.subjectCount {width:65px; text-align:center;}
|
.subject-pop-row li {height:30px; line-height:30px; vertical-align:middle;}
|
||||||
.subjectRow {width:585px; height:30px; color:#7a7a7a; font-size:12px;}
|
.subject-pop-search {border:1px solid #dddddd; height:32px; width:250px;}
|
||||||
.subjectRow li {height:30px; line-height:30px; vertical-align:middle;}
|
.subject-pop-info {width:385px; background-color:#f1f1f1; border:1px solid #dddddd; height:32px; line-height:32px; vertical-align:middle; text-align:center; color:#7a7a7a;}
|
||||||
.subjectSearch {border:1px solid #dddddd; height:32px; width:250px;outline: none;}
|
.subject-pop-wrap {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:475px; overflow-y:auto;}
|
||||||
.subjectInfo {width:385px; background-color:#f1f1f1; border:1px solid #dddddd; height:32px; line-height:32px; vertical-align:middle; text-align:center; color:#7a7a7a;}
|
.subject-pop-intro {color:#585858; line-height:18px; font-size:12px;}
|
||||||
.subjectWrap {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:470px; overflow-y:auto;}
|
.subject-pop-content {color:#888888; line-height:18px; font-size:12px;}
|
||||||
.subjectIntro {color:#585858; line-height:18px; font-size:12px;}
|
.popup-close {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;}
|
||||||
.subjectContent {color:#888888; line-height:18px; font-size:12px;}
|
.subject-pop-type {width:50px; text-align:center;}
|
||||||
.popupClose {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;}
|
.subject-pop-count {width:60px; text-align:center;}
|
||||||
|
.subject-pop-from {width:100px; text-align:center;}
|
||||||
.subjectContent p,.subjectContent div,.subjectContent em, .subjectContent span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important; color:#888888 !important; font-size:12px !important;}
|
.subjectContent p,.subjectContent div,.subjectContent em, .subjectContent span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important; color:#888888 !important; font-size:12px !important;}
|
||||||
|
|
||||||
.whiteSettingIcon {background:url(../images/hwork_icon.png) -5px -302px no-repeat; width:20px; height:20px;}
|
.whiteSettingIcon {background:url(../images/hwork_icon.png) -5px -302px no-repeat; width:20px; height:20px;}
|
||||||
.whiteSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
|
.whiteSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
|
||||||
|
|
||||||
|
/*20160301新题库样式*/
|
||||||
|
.subject-list-banner {width:585px; height:34px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;}
|
||||||
|
.subject-list-banner li {height:34px; line-height:34px; vertical-align:middle;}
|
||||||
|
.subject-list-name {width:200px; padding-left:10px; padding-right:10px;}
|
||||||
|
.subject-list-publisher {width:80px; text-align:center;}
|
||||||
|
.subject-list-date {width:70px; text-align:center;}
|
||||||
|
.subject-list-row {width:585px; height:30px; color:#7a7a7a; font-size:12px;}
|
||||||
|
.subject-list-row li {height:30px; line-height:30px; vertical-align:middle;}
|
||||||
|
.subject-list-search {border:1px solid #dddddd; height:32px; width:250px;}
|
||||||
|
.subject-list-info {width:385px; background-color:#f1f1f1; border:1px solid #dddddd; height:32px; line-height:32px; vertical-align:middle; text-align:center; color:#7a7a7a;}
|
||||||
|
.subject-list-wrap {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:460px; overflow-y:auto;}
|
||||||
|
.subject-content-wrapper {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:430px; overflow-y:auto;}
|
||||||
|
.subject-list-type {width:50px; text-align:center;}
|
||||||
|
.subject-list-count {width:60px; text-align:center;}
|
||||||
|
.subject-list-from {width:105px; text-align:center;}
|
||||||
|
|
|
@ -152,4 +152,6 @@ a:hover.btn_pu{ background:#3cb761;}
|
||||||
.polls_alert_upload_box{ width:120px; margin:15px auto;}
|
.polls_alert_upload_box{ width:120px; margin:15px auto;}
|
||||||
.polls_alert_box_p{ font-size:14px; padding-left: 45px;padding-top: 10px;}
|
.polls_alert_box_p{ font-size:14px; padding-left: 45px;padding-top: 10px;}
|
||||||
|
|
||||||
|
.w56 { width: 56px;}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -167,6 +167,8 @@ h4{ font-size:14px; color:#3b3b3b;}
|
||||||
.w610{ width:610px;}
|
.w610{ width:610px;}
|
||||||
.w600{ width:600px !important;}
|
.w600{ width:600px !important;}
|
||||||
.w606{ width:606px }
|
.w606{ width:606px }
|
||||||
|
.w705{ width:705px;}
|
||||||
|
.w770{ width:770px;}
|
||||||
.h20{height: 20px;}
|
.h20{height: 20px;}
|
||||||
.h22{ height:22px;}
|
.h22{ height:22px;}
|
||||||
.h26{ height:26px;}
|
.h26{ height:26px;}
|
||||||
|
@ -908,7 +910,7 @@ a.resourcesBlack:hover {font-size:12px; color:#000000;}
|
||||||
.resourcesListOption {width:710px; height:40px; line-height:40px; vertical-align:middle; margin-left:auto; margin-right:auto; background-color:#f6f6f6;}
|
.resourcesListOption {width:710px; height:40px; line-height:40px; vertical-align:middle; margin-left:auto; margin-right:auto; background-color:#f6f6f6;}
|
||||||
.resourcesCheckAll {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle; float:left;}
|
.resourcesCheckAll {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle; float:left;}
|
||||||
.resourcesSelectSend {float:right;}
|
.resourcesSelectSend {float:right;}
|
||||||
.resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; margin-top:5px; margin-right:10px; margin-left:15px; text-align:center; border:1px solid #269ac9; border-radius:5px; float:right;}
|
.resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #269ac9; border-radius:5px; }
|
||||||
a.sendButtonBlue {color:#269ac9;}
|
a.sendButtonBlue {color:#269ac9;}
|
||||||
a.sendButtonBlue:hover {color:#ffffff;}
|
a.sendButtonBlue:hover {color:#ffffff;}
|
||||||
.resourcesSelectSendButton:hover {background-color:#297fb8;}
|
.resourcesSelectSendButton:hover {background-color:#297fb8;}
|
||||||
|
@ -1025,27 +1027,75 @@ a:hover.userCancel{border:1px solid #888888; }
|
||||||
.relatePWrap{max-height: 210px;overflow:hidden;}
|
.relatePWrap{max-height: 210px;overflow:hidden;}
|
||||||
|
|
||||||
/*导入题库样式*/
|
/*导入题库样式*/
|
||||||
.popupWrap {border:3px solid #269ac9; padding:15px; background-color:#ffffff; position:relative; z-index:1000;}
|
.popup-wrapper {border:3px solid #269ac9; padding:15px; background-color:#ffffff; position:relative; z-index:1000;}
|
||||||
.subjectList {width:585px;}
|
.subject-list {width:585px;}
|
||||||
.subjectDetail {width:385px;}
|
.subject-detail {width:385px;}
|
||||||
a.subjectChoose {padding:8px 20px; background-color:#f1f1f1; color:#888888;}
|
a.subject-choose {padding:8px 20px; background-color:#f1f1f1; color:#888888;}
|
||||||
a.chooseActive {background-color:#269ac9; color:#ffffff;}
|
a.choose-active {background-color:#269ac9; color:#ffffff;}
|
||||||
.subjectBanner {width:585px; height:40px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;}
|
.subject-pop-banner {width:585px; height:40px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;}
|
||||||
.subjectBanner li {height:40px; line-height:40px; vertical-align:middle;}
|
.subject-pop-banner li {height:40px; line-height:40px; vertical-align:middle;}
|
||||||
.subjectName {width:270px; padding-left:10px; padding-right:10px;}
|
.subject-pop-name {width:200px; padding-left:10px; padding-right:10px;}
|
||||||
.subjectPublisher {width:80px; text-align:center;}
|
.subject-pop-publisher {width:80px; text-align:center;}
|
||||||
.subjectDate {width:80px; text-align:center;}
|
.subject-pop-date {width:75px; text-align:center;}
|
||||||
.subjectType {width:70px; text-align:center;}
|
.subject-pop-row {width:585px; height:30px; color:#7a7a7a; font-size:12px;}
|
||||||
.subjectCount {width:65px; text-align:center;}
|
.subject-pop-row li {height:30px; line-height:30px; vertical-align:middle;}
|
||||||
.subjectRow {width:585px; height:30px; color:#7a7a7a; font-size:12px;}
|
.subject-pop-search {border:1px solid #dddddd; height:32px; width:250px;}
|
||||||
.subjectRow li {height:30px; line-height:30px; vertical-align:middle;}
|
.subject-pop-info {width:385px; background-color:#f1f1f1; border:1px solid #dddddd; height:32px; line-height:32px; vertical-align:middle; text-align:center; color:#7a7a7a;}
|
||||||
.subjectSearch {border:1px solid #dddddd; height:32px; width:250px;outline: none;}
|
.subject-pop-wrap {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:475px; overflow-y:auto;}
|
||||||
.subjectInfo {width:385px; background-color:#f1f1f1; border:1px solid #dddddd; height:32px; line-height:32px; vertical-align:middle; text-align:center; color:#7a7a7a;}
|
.subject-pop-intro {color:#585858; line-height:18px; font-size:12px;}
|
||||||
.subjectWrap {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:470px; overflow-y:auto;}
|
.subject-pop-content {color:#888888; line-height:18px; font-size:12px;}
|
||||||
.subjectIntro {color:#585858; line-height:18px; font-size:12px;}
|
.popup-close {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;}
|
||||||
.subjectContent {color:#888888; line-height:18px; font-size:12px;}
|
.subject-pop-type {width:50px; text-align:center;}
|
||||||
.popupClose {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;}
|
.subject-pop-count {width:60px; text-align:center;}
|
||||||
|
.subject-pop-from {width:100px; text-align:center;}
|
||||||
.subjectContent p,.subjectContent div,.subjectContent em, .subjectContent span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important; color:#888888 !important; font-size:12px !important;}
|
.subjectContent p,.subjectContent div,.subjectContent em, .subjectContent span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important; color:#888888 !important; font-size:12px !important;}
|
||||||
|
|
||||||
.whiteSettingIcon {background:url(../images/hwork_icon.png) -5px -302px no-repeat; width:20px; height:20px;}
|
.whiteSettingIcon {background:url(../images/hwork_icon.png) -5px -302px no-repeat; width:20px; height:20px;}
|
||||||
.whiteSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
|
.whiteSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
|
||||||
|
|
||||||
|
/*20160226新资源库*/
|
||||||
|
.resource-wrapper {width:980px; padding:10px; border:1px solid #ddd; background-color:#fff; float:left;}
|
||||||
|
.resource-list-tab {width:980px; height:40px; background-color:#f6f6f6; border-bottom:1px solid #eaeaea; font-size:14px; color:#7a7a7a;}
|
||||||
|
.resource-list-checkbox {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle;}
|
||||||
|
.resource-checkbox {margin-top:14px; width:12px; height:12px;}
|
||||||
|
.resource-list-name {width:380px; height:40px; line-height:40px; text-align:left;}
|
||||||
|
.resource-list-from {width:150px; height:40px; line-height:40px; text-align:center;}
|
||||||
|
.resource-list-size {width:60px; height:40px; line-height:40px; text-align:center;}
|
||||||
|
.resource-list-type {width:80px; height:40px; line-height:40px; text-align:center;}
|
||||||
|
.resource-list-uploader {width:80px; height:40px; line-height:40px; text-align:center;}
|
||||||
|
.resource-list-time {width:70px; height:40px; line-height:40px; text-align:center;}
|
||||||
|
.resource-list-quote {width:60px; height:40px; line-height:40px; text-align:center;}
|
||||||
|
.resource-list-download {width:60px; height:40px; line-height:40px; text-align:center;}
|
||||||
|
.resource-list {width:980px; height:39px; background-color:#ffffff; border-bottom:1px dashed #eaeaea; color:#9a9a9a; font-size:12px; margin-left:auto; margin-right:auto; cursor:pointer;}
|
||||||
|
.resource-list:hover {background-color:#e1e1e1;}
|
||||||
|
.resource-list-option {width:980px; height:40px; line-height:40px; vertical-align:middle; margin-left:auto; margin-right:auto; background-color:#f6f6f6;}
|
||||||
|
.resource-check-all {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle; float:left;}
|
||||||
|
.border-bottom {border-bottom:1px solid #ddd;}
|
||||||
|
.h34 {height:34px;}
|
||||||
|
.resource-tab {font-size:16px; color:#4d4d4d; width:70px; padding:5px 10px; display:inline-block; text-align:left; border-bottom:1px solid #ddd;}
|
||||||
|
a.resource-tab-active {color:#fff; background-color:#269ac9; border-bottom:1px solid #269ac9;}
|
||||||
|
.inactive-text {color:#888888 !important;}
|
||||||
|
.inactive-border {border:1px solid #888888 !important;}
|
||||||
|
|
||||||
|
/*导入资源样式*/
|
||||||
|
.popupWrap {border:3px solid #269ac9; padding:15px; background-color:#ffffff; position:relative; z-index:1000;}
|
||||||
|
.resoure-list {width:705px;}
|
||||||
|
.subjectDetail {width:385px;}
|
||||||
|
.resource-pop-banner {width:705px; height:40px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;}
|
||||||
|
.resource-pop-banner li {height:40px; line-height:40px; vertical-align:middle;}
|
||||||
|
.resource-pop-name {width:270px; padding-left:10px; padding-right:10px;}
|
||||||
|
.resource-pop-publisher {width:80px; text-align:center;}
|
||||||
|
.resource-pop-date {width:80px; text-align:center;}
|
||||||
|
.resource-pop-row {width:705px; height:40px; color:#7a7a7a; font-size:12px;}
|
||||||
|
.resource-pop-row li {height:40px; line-height:40px; vertical-align:middle;}
|
||||||
|
.subjectSearch {border:1px solid #dddddd; height:32px; width:250px;}
|
||||||
|
.subjectInfo {width:385px; background-color:#f1f1f1; border:1px solid #dddddd; height:32px; line-height:32px; vertical-align:middle; text-align:center; color:#7a7a7a;}
|
||||||
|
.subjectWrap {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:460px; overflow-y:auto;}
|
||||||
|
.subjectIntro {color:#585858; line-height:18px; font-size:12px;}
|
||||||
|
.subjectContent {color:#888888; line-height:18px; font-size:12px;}
|
||||||
|
.popupClose {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;}
|
||||||
|
.resource-pop-type {width:70px; text-align:center;}
|
||||||
|
.resource-pop-size {width:65px; text-align:center;}
|
||||||
|
.resource-pop-from {width:120px; text-align:center;}
|
||||||
|
|
||||||
|
.course-search {border: 1px solid #dddddd; height: 25px; width: 200px;outline: none;}
|
||||||
|
|
Loading…
Reference in New Issue