Merge branch 'develop' of https://bdgit.trustie.net/hushasha/bigdata into develop

Conflicts:
	app/views/challenges/_single_or_multiple_question.html.erb
	app/views/messages/_common_reply_box.html.erb
	app/views/praise_tread/_edu_praise.html.erb
	app/views/student_work/_common_reply_box.html.erb
This commit is contained in:
huang 2017-09-15 21:13:14 +08:00
commit bfe758be78
78 changed files with 900 additions and 448 deletions

View File

@ -131,7 +131,7 @@ class ChallengesController < ApplicationController
end
end
end
@index = params[:position].to_i
@index = params[:position].to_i - 1
respond_to do |format|
format.js
end
@ -213,10 +213,9 @@ class ChallengesController < ApplicationController
def destroy
next_challenges = @shixun.challenges.where("position > #{@challenge.position}")
next_challenges.update_all("position = position - 1")
@challenge.destroy
@challenges = @shixun.challenges
add_shixun_modify_status(@shixun, 1)
@challenge.destroy
end
def update

View File

@ -1668,10 +1668,16 @@ class CoursesController < ApplicationController
#删除课程
#删除课程只是将课程的is_deleted状态改为falseis_deleted为false状态的课程只有管理员可以看到
def destroy
@course_id = @course.id
syllabus = @course.syllabus
@course.delete!
@course = nil
redirect_to syllabus_path(syllabus)
respond_to do |format|
format.js
format.html{redirect_to syllabuses_path()}
end
# redirect_to :back
end
#归档班级

View File

@ -100,11 +100,11 @@ class DepartmentController < ApplicationController
def destroy
if @department
if UserExtensions.where(:department_id => @department.id).count == 0
# if UserExtensions.where(:department_id => @department.id).count == 0
ApplyAddDepartment.where(:department_id=>@department.id).update_all(:status => 2)
@apply_dep = ApplyAddDepartment.where(:department_id=>@department.id).first
@department.destroy
end
# end
respond_to do |format|
format.js
end

View File

@ -243,7 +243,8 @@ class ManagementsController < ApplicationController
end
@courselist = @courselist.reorder("created_at desc")
@courselist_count = @courselist.count
@limit = 4
@limit = 15
@is_remote = true
@page = params['page'] ? params['page'].to_i : 1
@courselist_pages = Paginator.new @courselist_count, @limit, @page
@ -386,6 +387,26 @@ end
end
end
# 新增部门名称
def add_departments_part
end
def save_school
uploaded_io = params[:logo]
sl = School.create(:name => params[:schoolname],:province => params[:province],:city => params[:city],:address => params[:address])
# sl = School.create(:name => params[:school],:province => params[:schollProvince],:city => params[:schoolCity],:address => params[:address])
unless uploaded_io.nil?
File.new(Rails.root.join('public', 'images', 'school', sl.id.to_s+'.png'), 'wb').write(sl.id)
# File.new(Rails.root.join('public', 'images', 'school', sl.id.to_s+'.png'), 'wb') do |file|
# file.write(uploaded_io.read)
# end
sl.logo_link = '/images/school/'+sl.id.to_s+'.png'
end
redirect_to departments_part_managements_path
end
# 部门审核
def depart
@menu_type = 10
@ -413,11 +434,12 @@ end
# 批准
def approve_applied_departments
applied_department = ApplyAddDepartment.find params[:id]
applied_department = ApplyAddDepartment.find(params[:id])
applied_message = AppliedMessage.where(:applied_id => applied_department.id, :applied_type => "ApplyAddDepartment")
applied_message.update_all(:status => 1)
applied_department.update_column('status', 1) unless applied_department.nil?
applied_department.update_attribute(:status, 1) unless applied_department.nil?
AppliedMessage.create(:user_id => applied_department.user_id, :status => 1, :viewed => 0, :applied_id => applied_department.id, :applied_type => "ApplyAddDepartment", :name => applied_department.name )
UserExtensions.where(:user_id => applied_department.user_id).update_all(:department_id => applied_department.department_id)
respond_to do |format|
format.html{ redirect_to depart_managements_path }
end
@ -629,6 +651,7 @@ end
@courselist= @courselist.where("name like '%#{search}%'")
end
end
@courselist = @courselist.order("created_at #{@sx_order}")
@courselist_count = @courselist.count
limit = 20
@is_remote = true
@ -656,8 +679,7 @@ end
@menu_type = 2
@sub_type = 2
@sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order]
@courses = Course.where("0=0")
@course_lists = CourseList.where(:id => @courses.where("course_list_id is not null").map(&:course_list_id))
@courses = Course.where(:is_delete => 0)
@timing=Course.where(:is_end=>false).count
@end=Course.where(:is_end=>true).count
unless params[:school_id] || params[:search] || params[:keyword] || params[:status]
@ -671,7 +693,7 @@ end
if params[:school_id] && params[:school_id] != ''
@school_id = params[:school_id]
@courses =Course.joins("join users u on courses.tea_id = u.id").joins("join user_extensions ue on u.id = ue.user_id").where("ue.school_id = #{params[:school_id]}")
@courses = Course.joins("join users u on courses.tea_id = u.id").joins("join user_extensions ue on u.id = ue.user_id").where("ue.school_id = #{params[:school_id]}")
end
if params[:homepage_show]
@ -681,6 +703,7 @@ end
if params[:course_list] && params[:course_list] != ''
@courses = @courses.where(:course_list_id => courselist)
end
if params[:status] && params[:status]!=''
@status = params[:status]
@courses =@courses.where(:is_end =>status)
@ -825,22 +848,23 @@ end
condition = (params[:research_condition].nil? || params[:research_condition] == "name") ? "concat(lastname, firstname)" : params[:research_condition]
if 0 == status
if params[:research_condition] == "phone" && params[:research_contents].blank?
@users = User.reorder("#{@order_key} #{@us_order}")
@users = User.order("#{@order_key} #{@us_order}").all
else
@users = User.where("#{condition} like '%#{params[:research_contents]}%'")
@users = User.where("#{condition} like '%#{params[:research_contents]}%'").order("#{@order_key} #{@us_order}").all
end
else
if params[:research_condition] == "phone" && params[:research_contents].blank?
@users = User.where(:status => status)
@users = User.where(:status => status).order("#{@order_key} #{@us_order}").all
else
@users = User.where("status = #{status} and #{condition} like '%#{params[:research_contents]}%'")
@users = User.where("status = #{status} and #{condition} like '%#{params[:research_contents]}%'").order("#{@order_key} #{@us_order}").all
end
end
school_name = params[:school]
school = School.where("name like '%#{school_name}%'")
school_id = school.map(&:id)
user_id = UserExtensions.where(:school_id => school_id).map(&:user_id)
@users = @users.where(:id => user_id).reorder("#{@order_key} #{@us_order}")
school = School.where("name like '%#{school_name}%'")
school_id = school.map(&:id)
user_id = UserExtensions.where(:school_id => school_id).map(&:user_id)
@users = User.where(:id => user_id)
@users_count = @users.count
@limit = 20
@ -971,7 +995,8 @@ end
def users_trial
@menu_type = 7
@sub_type = 2
@users = User.where(:status => 1).order("last_login_on desc").all
@sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order]
@users = User.where(:status => 1).order("last_login_on #{@sx_order}").all
@users_count = @users.count
@limit = 20
@is_remote = true
@ -1169,8 +1194,14 @@ end
type = params[:type] || 0 # 存在type 就用type 没有就为 0
user_id = User.find_by_sql("select id from users where concat(lastname,firstname) like '%#{params[:name]}%'")
# @unapproved_user = ApplyUserAuthentication.where(:status => @type, :user_id => user_id, :auth_type => 1).find_by_sql("SELECT s.*, TIMESTAMPDIFF(SECOND, s.updated_at, now()) diff FROM `apply_user_authentications` s order by diff asc")
@unapproved_user = ApplyUserAuthentication.where(:status => @type, :user_id => user_id, :auth_type => 1).order("updated_at desc")
@unapproved_user = ApplyUserAuthentication.where(:status => @type, :user_id => user_id, :auth_type => 1).find_by_sql("SELECT s.*, TIMESTAMPDIFF(SECOND, s.updated_at, now()) diff FROM `apply_user_authentications` s order by diff asc")
# @unapproved_user = ApplyUserAuthentication.where(:status => @type, :user_id => user_id, :auth_type => 1).order("updated_at desc")
@unapproved_user_count = @unapproved_user.count
@limit = 15
@is_remote = true
@unapproved_user_pages = Paginator.new @unapproved_user_count, @limit, params['page'] || 1
@offset ||= @unapproved_user_pages.offset
@unapproved_user = paginateHelper @unapproved_user, @limit
respond_to do |format|
format.html
format.js
@ -1183,8 +1214,8 @@ end
@type = trial_authorization_status(params[:type])
type = params[:type] || 0 # 存在type 就用type 没有就为 0
user_id = User.find_by_sql("select id from users where concat(lastname,firstname) like '%#{params[:name]}%'")
# @unapproved_user = ApplyUserAuthentication.where(:status => @type, :user_id => user_id, :auth_type => 2).find_by_sql("SELECT s.*, TIMESTAMPDIFF(SECOND, s.updated_at, now()) diff FROM `apply_user_authentications` s order by diff asc")
@unapproved_user = ApplyUserAuthentication.where(:status => @type, :user_id => user_id, :auth_type => 2).order("updated_at desc")
@unapproved_user = ApplyUserAuthentication.where(:status => @type, :user_id => user_id, :auth_type => 2).find_by_sql("SELECT s.*, TIMESTAMPDIFF(SECOND, s.updated_at, now()) diff FROM `apply_user_authentications` s order by diff asc")
# @unapproved_user = ApplyUserAuthentication.where(:status => @type, :user_id => user_id, :auth_type => 2).order("updated_at desc")
respond_to do |format|
format.html
format.js

View File

@ -69,6 +69,21 @@ class MyshixunsController < ApplicationController
g = Gitlab.client
shixun_tomcat = Redmine::Configuration['shixun_tomcat']
shixun = @myshixun.shixun
@challenges = shixun.challenges
# 删除选择题用户记录
unless @challenges.blank?
@challenges.each do |challenge|
if challenge.st != 0
challenge.challenge_chooses.each do |choose|
user_output = choose.choose_outputs
unless user_output.blank?
user_output.delete
end
end
end
end
end
#end
myshixun_job = Base64.urlsafe_encode64("myshixun_#{@myshixun.id}")
StudentWork.where(:myshixun_id => @myshixun.id).update_all(:myshixun_id => nil, :work_status => 0)
@myshixun.destroy

View File

@ -17,7 +17,7 @@ class SchoolController < ApplicationController
s1.name = params[:name] unless params[:name].blank?
s1.province = params[:province] unless params[:province].blank?
s1.save
redirect_to departments_part_managements_path
redirect_to admin_schools_url(:school_name => params[:school_name])
end
def upload_logo
@ -33,7 +33,7 @@ class SchoolController < ApplicationController
def index
render :layout => "base_management"
end
def get_province

View File

@ -14,6 +14,10 @@ class ShixunsController < ApplicationController
CODES = %W(2 3 4 5 6 7 8 9 A B C D E F G H J K L N M O P Q R S T U V W X Y Z)
DCODES = %W(2 3 4 5 6 7 8 9 a b c f e f g h i j k l m n o p q r s t u v w x y z)
def statistics_students
end
# push代码的时候会触发gitlab hook
def ghook
shixun_modify_status_without_publish(@shixun, 1)

View File

@ -390,7 +390,7 @@ class StudentWorkController < ApplicationController
@stundet_works = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id)
end
elsif @homework.homework_detail_manual.comment_status == 3 || @homework.homework_detail_manual.comment_status == 4 #学生 && 开启匿评 看到匿评列表
my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id).first
my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id)
@stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id}
# elsif @homework.homework_detail_manual.comment_status == 5 || @homework.homework_detail_manual.comment_status == 6 #学生 && 关闭匿评 未提交作品之前列表为空,提交了作品看到所有的
# my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id).first
@ -421,7 +421,7 @@ class StudentWorkController < ApplicationController
@stundet_works = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id)
end
elsif @homework.homework_detail_manual.comment_status == 3 || @homework.homework_detail_manual.comment_status == 4 #学生 && 开启匿评 看到匿评列表
my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id).first
my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id)
@stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id}
# elsif @homework.homework_detail_manual.comment_status == 5 #学生 && 关闭匿评 未提交作品之前列表为空,提交了作品看到所有的
# my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id).first

View File

@ -8,8 +8,8 @@ class SubjectsController < ApplicationController
include ApplicationHelper
def index
@order = params[:order] || "created_at"
bsort = params[:sort] || "desc"
@order = params[:order] || "updated_at"
bsort = params[:sort] || "asc"
@sort = bsort == "desc" ? "asc" : "desc"
search = params[:search]
#ids = Subject.find_by_sql("select group_concat(id) as allId from subjects where id in (SELECT distinct(subject_id) FROM `stages`)")

View File

@ -272,7 +272,7 @@ module WatchersHelper
:target_id => target.id)
method = watched ? 'delete' : 'post'
id = watched ? 'cancel_watch' : ''
title = watched ? '取消关注' : '添加关注'
title = watched ? '取消关注' : '关注'
if target != user
link_to text, url, :remote => true, :method => method, :remote => true,
:class => "fr font-14 user_watch",:id => id, :title => title

View File

@ -6,6 +6,7 @@ class Game < ActiveRecord::Base
belongs_to :user
belongs_to :challenge
has_many :outputs, :dependent => :destroy
has_many :choose_output
has_many :test_sets, :dependent => :destroy
has_many :challenge_samples
has_one :game_code, :dependent => :destroy

View File

@ -1,6 +1,6 @@
class School < ActiveRecord::Base
default_scope :order => 'created_at desc'
attr_accessible :name, :province,:pinyin
attr_accessible :name, :province, :pinyin, :city, :address, :logo_link
has_many :courses
has_many :departments, :dependent => :destroy

View File

@ -35,7 +35,14 @@
</div>
</div>
<% end %>
<div style="text-align:center;">
<div class="pages_right_min" style="width:auto; display:inline-block;">
<ul id="trial_authorization_list_pages">
<%= pagination_links_full @unapproved_user_pages, @unapproved_user_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
</ul>
<div class="cl"></div>
</div>
</div>
<script>
$(function(){
var all_images = $(".edu-renzheng-img");

View File

@ -47,6 +47,14 @@
<% else %>
<%= render :partial => "welcome/no_data" %>
<% end %>
<div style="text-align:center;">
<div class="pages_right_min" style="width:auto; display:inline-block;">
<ul id="trial_authorization_list_pages">
<%= pagination_links_full @unapproved_user_pages, @unapproved_user_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
</ul>
<div class="cl"></div>
</div>
</div>
<script>
$(function(){

View File

@ -55,7 +55,11 @@
<p class="ml25 color-grey challenge_details">
<span class="mr100 itoblock_w150"><%= shixun_done(@shixun, challenge.position).to_i %>人&nbsp;完成挑战</span>
<span class="mr100 itoblock_w150"><%= shixun_running(@shixun, challenge.position).to_i %>人&nbsp;正在挑战</span>
<span class="mr100 w150 g_frame"><%= challenge.score %>经验值</span>
<% if challenge.st != 0 %>
<span class="mr100 w150 g_frame"><%= challenge.choose_score %>经验值</span>
<% else %>
<span class="mr100 w150 g_frame"><%= challenge.score %>经验值</span>
<% end %>
<% if @shixun.status == 2 %>
<span class="mr390 fr"><%= find_game_status challenge.id %></span>
<% end %>

View File

@ -27,7 +27,16 @@
输入输出
</div>
</li>
<li class="clearfix">
<li class="clearfix" style="position:relative;">
<div class="popup_tip_box fontGrey2" style="right:-315px; top:68px;position: absolute">
<em></em>
<span></span>
<p class="font-12">
提交:<br/>
1、每个黑色小方块代表一个空格<br/>
2、向下的黑色箭头代表测试集末尾的换行。
</p>
</div>
<label class="panel-form-label fl">测试集设置:</label>
<ul class="fl task-bg-grey panel-box-sizing panel-form-width-690">
<% if @test_sets.count > 0 %>
@ -39,8 +48,8 @@
<i class="fa fa-lock font-grey ml5" ></i>
<% end %>
</p>
<div class="clearfix"><span class="fl fb">输入:</span><p class="fl"><%= test.input.gsub("\r\n", "<br />").html_safe unless test.input.blank? %></p></div>
<div class="clearfix"><span class="fl fb">输出:</span><p class="fl"><%= test.output.gsub("\r\n", "<br />").html_safe unless test.output.blank? %></div>
<div class="clearfix"><span class="fl fb">输入:</span><p class="fl"><%= test.input.gsub(" ", "<span class=\"empty\"></span>").gsub(/\r\n$/, "<br/><i class=\"fa fa-level-down\" aria-hidden=\"true\"></i>").html_safe unless test.input.blank? %></p></div>
<div class="clearfix"><span class="fl fb">输出:</span><p class="fl"><%= test.output.gsub(" ", "<span class=\"empty\"></span>").gsub(/\r\n$/, "<br/><i class=\"fa fa-level-down\" aria-hidden=\"true\"></i>").html_safe unless test.output.blank? %></div>
</li>
<% end %>
<% else %>

View File

@ -190,8 +190,5 @@
$("#challenge_execfile_path").hide();
});
/* $("#evaluating_cancel").click(function(){
$("#evaluating_edit").hide();
$("#evaluating_show").show();
})*/
</script>

View File

@ -12,7 +12,7 @@
<%#= form_tag(url_for(new_or_edit_choose_question_shixun_challenge_path(@challenge, :shixun_id => @shixun, :type => @type, :position => @position)), :remote => true, :id => 'challenge_choose_update') do |f| %>
<!--<li class="clearfix pt30 pr30">
<a href="javascript:void(0);" class="task-btn task-btn-green fr" >编辑</a>
<a href="javascript:void(0)" class="task-btn fr mr10 deloption-btn" id="skill_cancel">删除</a>
<a href="<%= edit_shixun_challenge_path(@challenge, :shixun_id => @shixun) %>" class="task-btn fr mr10 deloption-btn" id="skill_cancel">删除</a>
</li>-->
<div class="panel-form">
<div id="shixun_form">
@ -21,7 +21,7 @@
<div id="challenge_choose_subject" class="fl task-bg-grey panel-box-sizing panel-form-width-690 new_li">
<textarea name="choose[subject]"><%= @challenge_choose.try(:subject) %></textarea>
</div>
<span style="display: none;margin-left: 10%;" class="c_red" id="new_shixun_pass">题干不能为空</span>
<span style="display: none;margin-left: 10%;" class="c_red" id="new_shixun_name">题干不能为空</span>
</li>
<% if @challenge_choose.blank? %>
<li class="clearfix pr">
@ -130,7 +130,7 @@
</div>
<% end %>
<% end %>
<div class="task-tag tag-grey mt5 mr10 fl <%= @challenge_choose.blank? ? "undis" : "" %>" id="add_shixun_skill">
<div class="task-tag tag-grey mt5 mr10 fl" id="add_shixun_skill">
<button data-dismiss="alert" class="close fr mt3 ml5" type="button" onclick="$('#add_shixun_skill').slideToggle();">×</button>
<input type="text" class="task-tag-input" onblur="add_tag();" id="shixun_skill_input" placeholder="请输入技能标签" />
</div>
@ -147,7 +147,7 @@
</div>
<li class="clearfix pr30 pb30">
<a href="javascript:void(0);" class="task-btn task-btn-green fr" onclick="challenge_choose_update(<%= @category %>, '<%= @challenge_choose.blank? ? "new" : 'edit' %>')">保存</a>
<a href="javascript:void(0)" class="task-btn fr mr10" id="skill_cancel">取消</a>
<a href="<%= edit_shixun_challenge_path(@challenge, :shixun_id => @shixun) %>" class="task-btn fr mr10" id="skill_cancel">取消</a>
</li>
<% end %>
<script>
@ -423,9 +423,6 @@
if($('#challenge_choose_subject textarea').val().trim() == ""){
$("#challenge_choose_subject textarea").focus();
$("#new_shixun_name").show();
}else if($("#challenge_choose_answer textarea").val().trim() == ""){
$("#challenge_choose_answer textarea").focus();
$("#new_shixun_pass").show();
}else if(judge_choice_contents()){
error.html("选项不能为空").show();
}else{

View File

@ -63,9 +63,9 @@
</div>
<script>
$(document).ready(function() {
/* $(document).ready(function() {
editormd.loadKaTeX(function() {
var taskPassMD = editormd.markdownToHTML("challenge_choose_subject_show", {
var subjectMD = editormd.markdownToHTML("challenge_choose_subject_show", {
htmlDecode: "style,script,iframe", // you can filter tags decode
taskList: true,
tex: true, // 默认不解析
@ -80,30 +80,5 @@
sequenceDiagram: true // 默认不解析
});
});
});
/* //技能标签
var SnSkill = $(".knowledge_frame").length;
function add_tag(){
var num = $(".task-inputs").children('div').length;
var val = $(".tags").val().trim();
if (val != ""){
testLength = $(".tags").val().trim().length;
$("#add_shixuns_skill").before("<div class='task-tag tag-grey mt5 mr10 fl' id='knowledge_" + num + "'>" +
"<button data-dismiss='alert' class='close fr mt3 ml5' type='button' onclick='close_tag(this)'>×</button>" +
"<input style='width:"+ testLength*12 +"px' class='knowledge_frame' name='knowledge[input][]' value='" + val +"'>" +
" </div>");
$(".tags").attr("value","");
}
$("#shixuns_skill_input").val("");
$("#add_shixuns_skill").hide();
var nSkill = $(".knowledge_frame");
console.log(nSkill.length);
}
function close_tag(thisObj){
// 获取父节点的id
var obj = $(thisObj).parent();
$(obj).remove();
}*/
});*/
</script>

View File

@ -1,2 +1,20 @@
$("#task_content").html("<%= j(render :partial => 'single_or_multiple_question_show')%>");
$("#challenge_choose_tab").html("<%= j(render :partial => "challenges/choose_tab") %>");
$("#challenge_choose_tab").html("<%= j(render :partial => "challenges/choose_tab") %>");
// JS局部刷新时有可能加载不成功需要重新加载一次具体原因不明
editormd.loadKaTeX(function() {
editormd.markdownToHTML("challenge_choose_subject_show", {
htmlDecode: "style,script,iframe", // you can filter tags decode
taskList: true,
tex: true, // 默认不解析
flowChart: true, // 默认不解析
sequenceDiagram: true // 默认不解析
});
editormd.markdownToHTML("choose_task_pass_show", {
htmlDecode: "style,script,iframe", // you can filter tags decode
taskList: true,
tex: true, // 默认不解析
flowChart: true, // 默认不解析
sequenceDiagram: true // 默认不解析
})
});

View File

@ -90,7 +90,6 @@
<div class="save-tip-content">已保存</div>
</div>
<script>
$(function(){
<% if @tab >0 %>
$("#shixun_tab").addClass("active");

View File

@ -1,2 +1,16 @@
$("#task_content").html("<%= j(render :partial => 'single_or_multiple_question_show')%>");
$("#challenge_choose_tab").html("<%= j(render :partial => "challenges/choose_tab") %>");
$("#challenge_choose_tab").html("<%= j(render :partial => "challenges/choose_tab") %>");
editormd.markdownToHTML("challenge_choose_subject_show", {
htmlDecode: "style,script,iframe", // you can filter tags decode
taskList: true,
tex: true, // 默认不解析
flowChart: true, // 默认不解析
sequenceDiagram: true // 默认不解析
});
editormd.markdownToHTML("choose_task_pass_show", {
htmlDecode: "style,script,iframe", // you can filter tags decode
taskList: true,
tex: true, // 默认不解析
flowChart: true, // 默认不解析
sequenceDiagram: true // 默认不解析
});

View File

@ -10,9 +10,15 @@
<% sy_author = User.find(sy.tea_id) %>
<div class="task-index-list-box-top">
<a href="<%= course_path(sy) %>" target="_blank">
<p class="font-14 task-index-list-title two_lines_show">
<% if sy.name.length > 32 %>
<p class="font-14 task-index-list-title two_lines_show" data-tip-down = "<%= sy.name %>">
<%= sy.name %>
</p>
<% else %>
<p class="font-14 task-index-list-title two_lines_show">
<%= sy.name %>
</p>
<% end %>
</a>
<div class="clearfix task-index-list-user">
<%= link_to image_tag(url_to_avatar(sy_author), :width => "60", :height => "60", :class => "panel-warp-img mr10 fl", :alt => "用户"), user_path(sy_author), :target => '_blank' %>
@ -65,6 +71,11 @@
<% end %>
<script>
//var Line = "<%#= sy.name %>";
// $(".task-index-list-title").mouseenter(function(){
// console.log(Line);
// })
var timer="";
$(".sub-con").hover(function(ev){
this.fn = function(){

View File

@ -11,7 +11,13 @@
<script>
//清空搜索框
function colse_searchbox(){
if($('.searchinput').val().trim() == ""){
return;
}
$('.searchinput').val('');
$("#search_syllabuses_name").submit();
<% unless @search.blank? %>
$("#search_syllabuses_name").submit();
<% end %>
}
</script>

View File

@ -0,0 +1 @@
$("#management_course_" + <%= @course_id %>).remove()

View File

@ -7,8 +7,8 @@
<input id="add_student_<%= user.id %>" type="checkbox" class="fl mt7 mr5 magic-checkbox" name="membership[user_ids][]" value="<%= user.id %>">
<label for="add_student_<%= user.id %>" style="top:0px">
<a href="<%= user_path(user) %>" target="_blank" class="task-hide fl span1 edu-name-dark edu-txt-w100"><%= user.show_real_name %>(<%= user.login %>)</a>
<span class="fl color-grey span2 ml10"><%= user.user_extensions.user_technical_title %></span>
<span class="span3 fl ml10 edu-txt-w140 task-hide" style="width: 189px"><%= user.user_extensions.school ? user.user_extensions.school.name : "" %></span>
<span class="fl color-grey span2 ml10 task-hide" style="width: 56px"><%= user.identity %></span>
<span class="span3 fl ml10 edu-txt-w140 task-hide" style="width: 161px"><%= user.user_extensions.school ? user.user_extensions.school.name : "" %></span>
</label>
</li>
<% end %>

View File

@ -14,7 +14,7 @@
<% unless game_challenge.choose_correct_num == nil %>
<% if game_challenge.choose_correct_num != game_challenge.challenge_chooses.count %>
<p class="-text-danger mb10">
<i class="fa fa-exclamation-circle font-16" ></i><span class="ml5 mr5 -text-danger"><%= game_challenge.choose_correct_num %>/<%= game_challenge.challenge_chooses.count %></span>错误
<i class="fa fa-exclamation-circle font-16" ></i><span class="ml5 mr5 -text-danger"><%= game_challenge.choose_correct_num %>/<%= game_challenge.challenge_chooses.count %></span>共有<%= game_challenge.challenge_chooses.count %>组测试集,其中有<%= game_challenge.challenge_chooses.count - game_challenge.choose_correct_num %>组测试结果不匹配。详情如下:
</p>
<% else %>
<p class="color-light-green mb10">

View File

@ -76,8 +76,8 @@
</div>
<ul class="sy_classlist clearfix" style="border: none">
<input class="magic-checkbox" type="checkbox" name="layout" id="homework_bank_all_select" class="fl">
<label for="homework_bank_all_select" class="fl mr15">全选</label>
<div class="fl resource_btns_bottom pt5">
<label for="homework_bank_all_select" class="fl mr15 mt10">全选</label>
<div class="fl resource_btns_bottom pt15">
<a href="javascript:void(0);" onclick="choose_course_to_send_hb();" class="fl mr10">发送</a>
<% if @type.to_i == 1 %>
<a href="javascript:void(0);" onclick="destroy_all_hb('<%= destroy_all_homework_bank_index_path() %>')" class="fl">删除</a>

View File

@ -7,8 +7,8 @@
<div class="list">
<i class="fa fa-plus-circle color-light-green font-20 pl15 pr10 pt5" aria-hidden="true"></i><span>教学</span>
<ul class="color-grey">
<li><a href="<%= syllabuses_path() %>" target="_blank" >我的课堂</a></li>
<li><a href="<%= new_course_path(:host=> Setting.host_course) %>" target="_blank" >新建课堂</a></li>
<li><a href="<%= syllabuses_path() %>" target="_self" >我的课堂</a></li>
<li><a href="<%= new_course_path(:host=> Setting.host_course) %>" target="_self" >新建课堂</a></li>
<li><%= link_to "加入课堂", join_private_courses_courses_path, :remote => true, :method => "post" %></li>
</ul>
</div>
@ -29,12 +29,12 @@
<div class="list">
<i class="fa fa-gamepad color-light-green font-20 pl15 pr10 pt5" aria-hidden="true"></i><span>实训</span>
<ul class="color-grey">
<li><%= link_to "我的实训", shixuns_user_path(User.current), :target => "_blank" %></li>
<li><%= link_to "我的实训", shixuns_user_path(User.current), :target => "_self" %></li>
<!-- <li><%#= link_to "新建实训", new_shixun_path, :target => "_blank" %></li>-->
<% if User.current.mail.blank? %>
<li><a href="javascript:void(0)" onclick="shixun_valication()">新建实训</a></li>
<% else %>
<li><%= link_to "新建实训", new_shixun_path, :target => "_blank" %></li>
<li><%= link_to "新建实训", new_shixun_path, :target => "_self" %></li>
<% end %>
</ul>
</div>

View File

@ -26,7 +26,7 @@
});
</script>
</head>
<body onload="prettyPrint();" style="height: 100%">
<body onload="prettyPrint();" style="height: 100%;background:#fff;">
<div class="newContainer pr"> <!-- 页面全部内容 -->
<div class="newHeader">
<% if User.current.logged? %>
@ -48,7 +48,7 @@
</div>
<% end %>
<% end %>
<div id="Container" class="panel-content clearfix user_bg_shadow">
<div id="Container" class="panel-content clearfix box_bg_shandow" style="margin-top:30px;">
<div class="panel-user-left fl">
<ul class="panel-user-leftnav">
<h3 class="mb15 ml15 mt15">账户管理</h3>

View File

@ -10,7 +10,7 @@
<%= javascript_heads %>
<%= heads_for_theme %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'css/edu-common', 'css/edu-public', 'css/font-awesome', 'css/edu-popup', 'css/magic-check', "css/edu-admin", "css/moduel", "css/taskstyle" %>
<%= javascript_include_tag "edu/application",'edu/base_edu', 'baiduTemplate', 'jquery.datetimepicker.js', "edu/management" %>
<%= javascript_include_tag "edu/application",'edu/base_edu','edu/account', 'baiduTemplate', 'jquery.datetimepicker.js', "edu/management" %>
<%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%>
</head>

View File

@ -37,8 +37,11 @@
:repository_id => shixun_repository(@shixun).try(:identifier)}),
:class => (params[:controller] == 'repositories' ? 'active' : '') %>
</li>
<li><a href="<%= collaborators_shixun_path(@shixun) %>" class="<%= params[:action] == "collaborators" ? "active" : "" %>">合作者</a></li>
<li><a href="<%= settings_shixun_path(@shixun) %>" class="<%= params[:action] == "settings" ? "active" : "" %>">配置</a></li>
<% end %>
<li><a href="<%= collaborators_shixun_path(@shixun) %>" class="<%= params[:action] == "collaborators" ? "active" : "" %>">合作者</a></li>
<!--<li><a href="<%#= statistics_students_shixun_path(@shixun) %>"class="<%#= params[:action] == "statistics_students" ? "active" : "" %>">学员统计</a></li>-->
<% if User.current.manager_of_shixun?(@shixun) %>
<li><a href="<%= settings_shixun_path(@shixun) %>" class="<%= params[:action] == "settings" ? "active" : "" %>">配置</a></li>
<% end %>
</ul>
</div>

View File

@ -47,7 +47,14 @@
<% else %>
<%= render :partial => "welcome/no_data" %>
<% end %>
<div style="text-align:center;">
<div class="pages_right_min" style="width:auto; display:inline-block;">
<ul id="trial_authorization_list_pages">
<%= pagination_links_full @unapproved_user_pages, @unapproved_user_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
</ul>
<div class="cl"></div>
</div>
</div>
<script>
$(function(){
var all_images = $(".edu-renzheng-img");

View File

@ -2,10 +2,11 @@
<thead>
<tr>
<th width="9%">ID</th>
<th width="18%" class="edu-txt-left">课堂名称</th>
<th width="13%" class="edu-txt-left">课堂名称</th>
<th width="4%">成员</th>
<th width="4%">资源</th>
<th width="4%">作业</th>
<th width="6%">普通作业</th>
<th width="5%">实训作业</th>
<th width="4%">试卷</th>
<th width="4%">私有</th>
<th width="8%">状态</th>
@ -17,12 +18,13 @@
</thead>
<tbody>
<% @courses.each do |course| %>
<tr>
<tr id="management_course_<%= course.id %>">
<td><%= course.id %></td>
<td class="edu-txt-left"><%= link_to course.name, course_path(course.id) %></a></td>
<td><%= course.members.count %></td>
<td><%= course.attachments.count %></td>
<td><%= course.homework_commons.count%></td>
<td><%= course.homework_commons.where(:homework_type => 1).count %></td>
<td><%= course.homework_commons.where(:homework_type => 4).count %></td>
<td><%= course.exercises.count %></td>
<td><%= course.is_public.to_i == 1 ? '--' : '√' %></td>
<td><%= course.is_end ? "已结束" : "正在进行" %></td>
@ -30,7 +32,9 @@
<td> <%= course.teacher ? link_to(course.teacher.try(:lastname)+course.teacher.try(:firstname), user_path(course.teacher)) : "" %></td>
<td> <%= format_time(course.updatetime) %></td>
<td>
<a href="script:void(0)">删除</a>
<a href="javascript:void(0);" onclick="delete_confirm_box_2('<%= course_path(course) %>', '确定要删除该课堂吗?')">删除&nbsp;</a>
<input type="checkbox" name="homepage_show" value="<%= course.id %>" <%= course.homepage_show ? "checked" : "" %> class="ml-3 mr5 magic-checkbox" id="join_course_role_<%= course.id %>">
<label style="top:0px;padding-left: 25px;float:right; margin-right: 10px" for="join_course_role_<%= course.id %>">首页显示</label>
</td>

View File

@ -4,7 +4,8 @@
<tr>
<th width="9%">序号</th>
<th width="25%" class="edu-txt-left">部门名称</th>
<th width="30%" class="edu-txt-left">单位名称</th>
<th width="20%" class="edu-txt-left">单位名称</th>
<th width="15%">创建者</th>
<th width="15%" class="eud-pointer">创建于<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
<th></th>
</tr>
@ -15,6 +16,7 @@
<td><%= apply.id %></td>
<td class="edu-txt-left"> <%= apply.name %></td>
<td class="edu-txt-left"> <%= apply.school.name %></td>
<td><%= apply.user.show_real_name %></td>
<td><%= format_time apply.created_at %></td>
<td class="center">
<%= link_to( l(:label_approve), { :controller => 'managements', :action => 'approve_applied_departments', :id => apply.id }, :class => "application-default-link" ) %>

View File

@ -16,11 +16,11 @@
<td><%= index + 1 %></td>
<td class="edu-txt-left"><%= department.name %></td>
<td class="edu-txt-left"><%= School.where(:id => department.school_id).first %></td>
<td><%= UserExtensions.where(:department_id => department.id,:school_id => department.school_id ).count %></td>
<td><%= ApplyUserAuthentication.where(:auth_type => 2,:user_id =>UserExtensions.where(:department_id => department.id,:school_id => department.school_id).map(&:user_id)).count%></td>
<td><%= UserExtensions.where(:department_id => department.department_id, :school_id => department.school_id ).count %></td>
<td><%= ApplyUserAuthentication.where(:auth_type => 2, :status => 1, :user_id => UserExtensions.where(:department_id => department.department_id,:school_id => department.school_id).map(&:user_id)).count%></td>
<td><%= format_time department.created_at %></td>
<td>
<% if UserExtensions.where(:department_id => department.id,:school_id => department.school_id ).count == 0 %>
<% if UserExtensions.where(:department_id => department.department_id,:school_id => department.school_id ).count == 0 %>
<a href="javascript:void(0);" onclick="delete_confirm_box_2('<%= department_path(department.department_id) %>', '确定要删除该部门吗?')">删除&nbsp;</a>
<% else %>
--

View File

@ -3,12 +3,13 @@
<tr>
<th width="9%">ID</th>
<th width="6%">LOGO</th>
<th width="18%" class="edu-txt-left">单位名称</th>
<th width="10%">地区</th>
<th width="19%" class="edu-txt-left">详细地址</th>
<th style="width: 6%;" >用户数</th>
<th width="6%">部门数</th>
<th width="15%" class="eud-pointer">创建于<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
<th width="15%" class="edu-txt-left">单位名称</th>
<th width="6%">地区</th>
<th width="15%" class="edu-txt-left">详细地址</th>
<th style="width: 5%;" >用户数</th>
<th width="5%">部门数</th>
<th width="13%" class="eud-pointer">创建于<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
<th width="13%" class="eud-pointer">修改时间<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
<th></th>
</tr>
</thead>
@ -29,7 +30,8 @@
<td><%= UserExtensions.where(:school_id => schools.id).count %></td>
<td><%= schools.departments.count %></td>
<td><%= format_time schools.created_at %></td>
<td>
<td><%= format_time schools.updated_at %></td>
<td>
<i class="fa fa-edit font-16"></i>
<%= link_to("修改", upload_logo_school_path(schools.id,:schools_name => @schools_name), :class => 'icon icon-copy') %>
</td>

View File

@ -17,7 +17,7 @@
<td><%= apply.id %></td>
<td class="edu-txt-left"><%= link_to apply.name,school_index_path(apply.id)%></td>
<td>
<span ondblclick = "show_edit_school_province('<%= apply.id %>');" id="apply_province_<%= apply.id %>">
<span onclick = "show_edit_school_province('<%= apply.id %>');" id="apply_province_<%= apply.id %>">
<%= (apply.province.nil? ? "" : apply.province) + (apply.city.nil? ? "" : apply.city) %>
</span>
<select onchange="showcity(this.value, document.getElementById('schoolCity_<%= apply.id %>'));edit_school_province('<%= edit_apply_province_school_path(apply.id)%>','<%= apply.id %>');" name="province" id="school_province_edit_<%=apply.id%>" class="fl" style="width:55px; height:20px; display: none">

View File

@ -11,7 +11,7 @@
<th>职业</th>
<th>单位</th>
<th>子单位</th>
<th>最后登录时间</th>
<th class="eud-pointer">最后登录时间<i class="fa fa-long-arrow-down color-light-green ml5"></i></th>
<th>试用状态</th>
</tr>
</thead>
@ -48,4 +48,4 @@
</ul>
<div class="cl"></div>
</div>
</div>
</div>

View File

@ -0,0 +1,128 @@
<div class="col-width-10 mt20" style="padding:20px 0 0 300px">
<%= form_tag save_school_managements_path(),method: "post",:id => "save_school" do %>
<div class="clearfix ml30">
<input type="hidden" value="<%= @school_name%>" name="school_name" class="w150">
<%= image_tag('', id: "avatar_image", :class=>"school_avatar ml25") %>
<a type="button" onclick="$('#file').click();" style="margin: 90px 0 0 0px;padding: 2px 5px;cursor: pointer;text-decoration: none;width: 70px;" class="fl color-grey">上传图片</a>
<%= file_field_tag 'logo',:style => "display:none;", :id => "file", :onchange => "showPreview(this)"%>
<a type="button"style="margin: 90px 0 0 0px;padding: 2px 5px;cursor: pointer;text-decoration: none;width: 70px;" class="fl color-grey" >删除图片</a>
<div class="cl"></div>
</div>
<div class="">
<div class="panel-form mr15">
<ul>
<li class="clearfix">
<label class="panel-form-label1 fl"><span class="color-red mr5">*</span>单位全称:</label>
<input id="schoolname" name="schoolname" type="text" class="task-form-40 task-height-40 panel-box-sizing fl" onBlur='ifNameRepeat();' onFocus='$("#schoolrepeatnotice").hide();$("#schoolrepeatnotice").attr("value",1);' placeholder="学校名称或者工作单位名称">
<i id="school_name_check" class="fa font-16 ml5 mt10 fl"></i>
<span class="color-orange fl hint none" id="schoolrepeatnotice" style="margin-left:90px;"><i class="fa fa-exclamation-circle mr5"></i>名称已存在</span>
<span class="color-orange fl none" id="school_id_notice" style="margin-left:20%;"><i class="fa fa-exclamation-circle mr5" ></i>请输入单位名称</span>
</li>
<li class="clearfix mb10">
<label class="panel-form-label1 fl" >&nbsp;</label>
<div class="fl"><span>示例:</span>
<p><i class="fa fa-check-circle font-16 color-light-green mr5"></i>国防科学技术大学</p>
<p><i class="fa fa-times-circle font-16 color-orange mr5"></i>国防科学技术大学四方坪校区</p>
<p><i class="fa fa-times-circle font-16 color-orange mr5"></i>国防科学技术大学计算机学院</p>
</div>
</li>
<li class="clearfix mb10">
<label class="panel-form-label1 fl"><span class="color-red mr5">*</span>地区:</label>
<select onchange="showcity(this.value, document.getElementById('schoolCity'));" name="province" id="schollProvince" class="fl task-height-40 task-form-20" style="width:19%; ">
<option value="">--请选择省份--</option>
<option value="北京">北京</option>
<option value="上海">上海</option>
<option value="广东">广东</option>
<option value="江苏">江苏</option>
<option value="浙江">浙江</option>
<option value="重庆">重庆</option>
<option value="安徽">安徽</option>
<option value="福建">福建</option>
<option value="甘肃">甘肃</option>
<option value="广西">广西</option>
<option value="贵州">贵州</option>
<option value="海南">海南</option>
<option value="河北">河北</option>
<option value="黑龙江">黑龙江</option>
<option value="河南">河南</option>
<option value="湖北">湖北</option>
<option value="湖南">湖南</option>
<option value="江西">江西</option>
<option value="吉林">吉林</option>
<option value="辽宁">辽宁</option>
<option value="内蒙古">内蒙古</option>
<option value="宁夏">宁夏</option>
<option value="青海">青海</option>
<option value="山东">山东</option>
<option value="山西">山西</option>
<option value="陕西">陕西</option>
<option value="四川">四川</option>
<option value="天津">天津</option>
<option value="新疆">新疆</option>
<option value="西藏">西藏</option>
<option value="云南">云南</option>
<option value="香港">香港特别行政区</option>
<option value="澳门">澳门特别行政区</option>
<option value="台湾">台湾</option>
<option value="海外">海外</option>
</select>
<select name="city" id="schoolCity" class="fl task-height-40" style="width:19%;margin-left:2%;"></select>
<div class="cl"></div>
<span class="color-orange fl hint none" id="province_notice" style="margin-left:90px;"><i class="fa fa-exclamation-circle mr5"></i>请选择省份和城市</span>
</li>
<li class="clearfix mb10">
<label class="panel-form-label1 fl"><span class="color-red mr5">*</span>详细地址:</label>
<input type="text" id="address" name="address" class="task-form-40 task-height-40 panel-box-sizing fl" placeholder="请填写完整的地址信息">
<div class="cl"></div>
<span class="color-orange fl hint none" id="address_notice" style="margin-left:90px;"><i class="fa fa-exclamation-circle mr5"></i>请填写单位的详细地址</span>
</li>
<li class="clearfix" style="margin-left:50%;">
<a href="javascript:void(0);" class="task-btn mr10">取消</a>
<a href="javascript:void(0);" class="task-btn task-btn-blue" onclick="submit_department()">确定</a>
</li>
</ul>
</div>
</div>
<% end %>
</div>
<script>
function submit_department(){
$("#save_school").submit();
}
// function submit_department(){
// var school = $("#schoolname").val();
// var department = $("#department_name").val();
// var address = $("#address").val();
// var schollProvince = $("#schollProvince").val();
// var schoolCity = $("#schoolCity").val();
// var avatar_image =$("avatar_image").val();
//// console.log($("#avatar_image").val());
// if($("#schoolname").val() == ""){
// $("#school_id_notice").show();
// } else if($("#department_name").val() ==""){
// $("#add_department_notice").show();
// } else if($("#schollProvince").val ==''){
// $("#province_notice").show();
// } else if($("#address").val ==''){
// $("#address_notice").show();
// } else{
// $.ajax({
// url: '/managements/save_school',
// type: 'post',
// data:{school:school,department:department,address:address,schollProvince:schollProvince,schoolCity:schoolCity,logo:$('#file').val()}
// });
// }
// }
function showPreview(source) {
var file = source.files[0];
if(window.FileReader) {
var fr = new FileReader();
fr.onloadend = function(e) {
document.getElementById("avatar_image").src = e.target.result;
};
fr.readAsDataURL(file);
}
}
</script>

View File

@ -26,9 +26,12 @@
</span>
<select class="mt10 task-form-20 task-height-30 ml25 fl" name="course_list" id="course_list">
<option value="" selected="selected">课程名称</option>
<% @course_lists.each do |course_list| %>
<option value="<%= course_list.id %>"><%= course_list.name %></option>
<% unless @course_lists.nil? %>
<% @course_lists.each do |course_list| %>
<option value="<%= course_list.id %>"><%= course_list.name %></option>
<% end %>
<% end %>
</select>
<input name="sx_order" type="hidden">
<%#= link_to "导出Excel", export_excel_managements_path(:format => "xls"), :class => "task-btn task-btn-blue ml5 mt3 fr mb5 mr30" %>

View File

@ -1,11 +1,12 @@
<%= form_tag(url_for(departments_part_managements_path),:id=>"department_part_search",:method => "post",:remote=>true) do %>
<div class="edu-con-top clearfix mb20 xmt10">
<input class="fl task-form-20 task-height-30 ml35" id="shixun_Look_name" name="search" maxlength="" placeholder="输入关键字进行搜索" type="text" style="height: 21px;">
<a href="javascript:void(0);" class="fl task-btn task-btn-blue ml5 mt2" onclick="$('#department_part_search').submit();">搜索</a>
<a href="javascript:clearSearchCondition();" class="fl task-btn ml5 mt2" id="clear_contents">清除</a>
<a href="#" class="task-btn task-btn-green fr mt6 mr30" >新建单位</a>
<input name="sx_order" type="hidden">
</div>
<div class="edu-con-top clearfix mb20 xmt10">
<input class="fl task-form-20 task-height-30 ml35" id="shixun_Look_name" name="search" maxlength="" placeholder="输入关键字进行搜索" type="text" style="height: 21px;">
<a href="javascript:void(0);" class="fl task-btn task-btn-blue ml5 mt2" onclick="$('#department_part_search').submit();">搜索</a>
<a href="javascript:clearSearchCondition();" class="fl task-btn ml5 mt2" id="clear_contents">清除</a>
<% link_to "新建单位", :class => "task-btn task-btn-green fr mt6 mr30" %>
<%#= link_to "新建单位",add_departments_part_managements_path(),:class => "task-btn task-btn-green fr mt6 mr30" %>
<input name="sx_order" type="hidden">
</div>
<% end %>
<div class="edu-con-bg01 mt15" id="managements_department_part_list">
<%= render :partial => "managements/departments_part_list" %>
@ -14,5 +15,6 @@
function clearSearchCondition() {
$("#shixun_Look_name").val("");
$.get('<%= departments_part_managements_path() %>')
}
};
</script>

View File

@ -37,6 +37,7 @@
</div>
<div class="cl"></div>
<div id="audit_authentication_list">
</div>
</div>
</div>

View File

@ -1,6 +1,6 @@
<div class="edu-class-container mb15">
<div class="edu-con-top clearfix">
<p class="ml15 fl color-grey">课程实训发布</p>
<p class="ml15 fl color-grey">实训路径发布</p>
</div>
<div class="edu-con-bg01 mt15">
<div class="edu-tab clearfix mb20">

View File

@ -431,6 +431,9 @@
var d_count = 0; //查询结果的总量
var d_maxPage = 0;//最大页面值
$(function () {
<% if @trail_authentication && @trail_authentication.status == 0%>
yes_notice_box("平台已收到你的试用申请,很快将会审核通过");
<% end %>
$("#search_department_result_list").scroll(function (e) {
d_nScrollHight = $(this)[0].scrollHeight;
d_nScrollTop = $(this)[0].scrollTop;

View File

@ -1,4 +1,4 @@
<div class="pro_new_info">
<div class="pro_new_info box_bg_shandow bor-grey-e">
<div class="icons_tishi"><img src="/images/new_project/icons_smile.png" width="110" height="110" alt=""></div>
<p class="sy_tab_con_p ">没有数据可以显示!</p>
</div>

View File

@ -1,95 +1,97 @@
<% port = ":3000" if Rails.env.development? %>
<script type="text/javascript">
$(document).ready(function() {
var prefix = '';
if(location.href.indexOf('ros') >= 0)
{
prefix = '/ros'
}
$("#province").html("<option value='0' selected = true style='display: none;'></option>");
$.ajax({
type :"POST",
url :prefix + '/school/get_province',
data: "send",
success: function(data, textStatus){
$("#province").append(data.text);
$("#schoollist").html(data.text_s);
}
})
});
function get_school(value){
var prefix = '';
if(location.href.indexOf('ros') >= 0)
{
prefix = '/ros'
}
$.ajax({
type :"POST",
url :prefix + '/school/get_schoollist/'+encodeURIComponent(value),
data :'text',
success: function(data){
$("#schoollist").html(data);
}
})
}
function test(id){
location.href = encodeURI('http://<%= Setting.host_course %>/?school_id='+id);
}
function ssearch(){
//alert($("#key_word").val());
var value = $("#key_word").val();
var province = $("#province").val();
//alert(value);
if(value == "")
{
alert("<%= l(:label_search_conditions_not_null) %>");
return;
}
var prefix = '';
if(location.href.indexOf('ros') >= 0)
{
prefix = '/ros'
}
$.ajax({
type :"POST",
url :prefix + '/school/search_school/?key_word='+encodeURIComponent(value)+'&province='+encodeURIComponent(province),
data :'text',
success: function(data){
$("#schoollist").html(data);
}
})
}
function word_keydown(e){
if(e&& e.keyCode==13){
ssearch();
}
}
</script>
<div>
<p>
<%= link_to l(:label_all_schol),school_index_path %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<% if User.current.logged? %>
<a href="http://<%= Setting.host_course %>">
<%= l(:label_my_school) %>
</a>
<% end %>
</p>
<ul>
<li style="width: 40%; float: left">
<%= l(:label_select_province) %>:
<select id="province" name="province" onchange="get_school(this.value)"></select>
</li>
<li style="width: 50%; float: left">
<input type="text" id="key_word" name="key_word" onkeydown="word_keydown(event);"/>
<input type="button" class="enterprise" value="<%= l(:label_search) %>" onclick="ssearch()">
</li>
</ul>
</div>
<div style="clear: both"></div>
<div class="school-index">
<ul id="schoollist" style="line-height: 25px">
</ul>
</div>
<% html_title(l(:label_school_all)) -%>
<% port = ":3000" if Rails.env.development? %>
<script type="text/javascript">
$(document).ready(function() {
var prefix = '';
if(location.href.indexOf('ros') >= 0)
{
prefix = '/ros'
}
$("#province").html("<option value='0' selected = true style='display: none;'></option>");
$.ajax({
type :"POST",
url :prefix + '/school/get_province',
data: "send",
success: function(data, textStatus){
$("#province").append(data.text);
$("#schoollist").html(data.text_s);
}
})
});
function get_school(value){
var prefix = '';
if(location.href.indexOf('ros') >= 0)
{
prefix = '/ros'
}
$.ajax({
type :"POST",
url :prefix + '/school/get_schoollist/'+encodeURIComponent(value),
data :'text',
success: function(data){
$("#schoollist").html(data);
}
})
}
function test(id){
location.href = encodeURI('http://<%= Setting.host_course %>/?school_id='+id);
}
function ssearch(){
//alert($("#key_word").val());
var value = $("#key_word").val();
var province = $("#province").val();
//alert(value);
if(value == "")
{
alert("<%= l(:label_search_conditions_not_null) %>");
return;
}
var prefix = '';
if(location.href.indexOf('ros') >= 0)
{
prefix = '/ros'
}
$.ajax({
type :"POST",
url :prefix + '/school/search_school/?key_word='+encodeURIComponent(value)+'&province='+encodeURIComponent(province),
data :'text',
success: function(data){
$("#schoollist").html(data);
}
})
}
function word_keydown(e){
if(e&& e.keyCode==13){
ssearch();
}
}
</script>
<div style="background: white;padding: 10px 0;margin-top: 20px">
<div>
<p class="mb20">
<%= link_to l(:label_all_schol),school_index_path %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<% if User.current.logged? %>
<a href="http://<%= Setting.host_course %>">
<%= l(:label_my_school) %>
</a>
<% end %>
</p>
<ul>
<li style="width: 40%; float: left;">
<%= l(:label_select_province) %>:
<select id="province" name="province" onchange="get_school(this.value)" class="task-form-30 task-height-30"></select>
</li>
<li style="width: 50%; float: left">
<input type="text" id="key_word" name="key_word" onkeydown="word_keydown(event);" class="fl task-form-35 task-height-30"/>
<a href="javascript:void(0);" class="fl task-btn task-btn-blue ml5 mt3" onclick="ssearch()" value="<%= l(:label_search) %>">搜索</a>
<!--<input type="button" class="enterprise fl task-btn task-btn-blue task-height-30 ml20 " value="<%= l(:label_search) %>" onclick="ssearch()" >-->
</li>
</ul>
</div>
<div style="clear:both"></div>
<div class="school-index ml20">
<ul id="schoollist" style="line-height: 25px;overflow: hidden">
</ul>
</div>
</div>
<% html_title(l(:label_school_all)) -%>

View File

@ -1,5 +1,5 @@
<div class="task-pm-content mb20">
<div class="mt20">
<div class="task-pm-content">
<div class="">
<div class="panel-form">
<div class="clearfix mb20">
<p class="fr">

View File

@ -1,19 +1,20 @@
<%= stylesheet_link_tag '/editormd/css/editormd','/editormd/css/editormd.min.css' %>
<%= javascript_include_tag '/editormd/lib/marked.min.js','/editormd/lib/prettify.min.js','/editormd/lib/raphael.min.js','/editormd/lib/underscore.min.js','/editormd/lib/sequence-diagram.min.js',
'/editormd/lib/flowchart.min.js','/editormd/lib/jquery.flowchart.min.js','/editormd/editormd.js'%>
<ul id="tab_nav" class="nav_check_item mt30" style="background:#fff;margin-bottom:0">
<div class=" box_bg_shandow mt30 mb30">
<ul id="tab_nav" style="background:#fff;border-bottom:1px solid #eee;">
<li id="tab_nav_1" class="tab_hover_setting" onclick="HoverLi(1);">
<a href="javascript:void(0);" class="tab_type">实训</a>
</li>
<li id="tab_nav_2" onclick="HoverLi(2);">
<a href="javascript:void(0);" class="tab_type" >版本库</a>
<a href="javascript:void(0);" class="tab_type">配置</a>
</li>
<!--<li id="tab_nav_2" onclick="HoverLi(2);">-->
<!--<a href="javascript:void(0);" class="tab_type" >版本库</a>-->
<!--</li>-->
<!--<li id="tab_nav_3" onclick="HoverLi(3);">-->
<!--<a href="javascript:void(0);" class="tab_type" >测试脚本</a>-->
<!--</li>-->
</ul>
<div class="task-pm-content box_bg_shandow ">
<div class="task-pm-box mb30">
<div class="task-pm-content">
<div class="task-pm-box" style="border:0;">
<div class="tab_content clearfix" >
<div class="cl"></div>
@ -25,26 +26,26 @@
<%= render :partial => "shixuns/settings_show" %>
</div>
</div>
<div id="tab_con_2" class="undis" >
<%= render :partial=>"shixuns/settings_repository" %>
</div>
<!--<div id="tab_con_2" class="undis" >-->
<!--<%#= render :partial=>"shixuns/settings_repository" %>-->
<!--</div>-->
<!--<div id="tab_con_3" class="undis" >-->
<!--<%#= render :partial=>"shixuns/settings_challenges" %>-->
<!--</div>-->
</div>
</div>
</div>
</div>
<script type="text/javascript">
function g(o){return document.getElementById(o);}
function HoverLi(n){
for(var i=1;i<=2;i++){
g('tab_nav_'+i).className='tab_nomal';
g('tab_con_'+i).className='undis';
}
g('tab_con_'+n).className='dis';
g('tab_nav_'+n).className='tab_hover_setting';
}
// function HoverLi(n){
// for(var i=1;i<=2;i++){
// g('tab_nav_'+i).className='tab_nomal';
// g('tab_con_'+i).className='undis';
// }
// g('tab_con_'+n).className='dis';
// g('tab_nav_'+n).className='tab_hover_setting';
// }
function close_waring_frame(){
$("#warning_frame").hide();
}

View File

@ -0,0 +1,197 @@
<div class="task-pm-content ">
<div class="task-pm-box mt20 mb20">
<div class="panel-header clearfix">
<h3 class="fl mt5">学员广场</h3>
<div class="fr panel-search">
<input type="text" class="panel-search-input" placeholder="输入学员登录名、姓名进行搜索"/>
<a href="#" class="panel-search-btn"><i class="fa fa-search font-16"></i></a>
</div>
</div>
<table class="panel-new-table panel-table-pd15" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="table-num">1</td>
<td >
<a href="#" class="panel-table-name hide fl">胡莎莎学员 </a>
<span class="ml5 mr5 fl">/</span>
<a href="#" class="panel-table-title hide fl">HelloworldJava入门实训项目</a>
<div class="cl"></div>
</td>
<td>
<div class="panel-slider-bg fl mt15">
<span class="panel-slider-inner03 "></span>
</div>
<span class="panel-slider-txt fl ml10">第3关/共10关</span>
</td>
<td><span class=" mr20">100分</span></td>
<td ><a href="#" class="link-color-grey02 font-14 mr15"><span class="fa-icons-flower mr5"></span>给TA送花</a></td>
</tr>
<tr>
<td class="table-num">2</td>
<td >
<a href="#" class="panel-table-name hide fl">胡莎莎学员 </a>
<span class="ml5 mr5 fl">/</span>
<a href="#" class="panel-table-title hide fl">HelloworldJava入门实训项目HelloworldJava入门实训项目</a>
<div class="cl"></div>
</td>
<td>
<div class="panel-slider-bg fl mt15">
<span class="panel-slider-inner06 "></span>
</div>
<span class="panel-slider-txt fl ml10">第6关/共10关</span>
</td>
<td><span class=" mr20">100分</span></td>
<td ><a href="#" class="link-color-grey02 font-14 mr15"><span class="fa-icons-flower mr5"></span>给TA送花</a></td>
</tr>
<tr>
<td class="table-num">3</td>
<td >
<a href="#" class="panel-table-name hide fl">胡莎莎学员 </a>
<span class="ml5 mr5 fl">/</span>
<a href="#" class="panel-table-title hide fl">HelloworldJava入门实训项目</a>
<div class="cl"></div>
</td>
<td>
<div class="panel-slider-bg fl mt15">
<span class="panel-slider-inner03 "></span>
</div>
<span class="panel-slider-txt fl ml10">第3关/共10关</span>
</td>
<td><span class=" mr20">100分</span></td>
<td ><a href="#" class="link-color-grey02 font-14 mr15"><span class="fa-icons-flower mr5"></span>给TA送花</a></td>
</tr>
<tr>
<td class="table-num">4</td>
<td >
<a href="#" class="panel-table-name hide fl">胡莎莎学员 </a>
<span class="ml5 mr5 fl">/</span>
<a href="#" class="panel-table-title hide fl">HelloworldJava入门实训项目HelloworldJava入门实训项目</a>
<div class="cl"></div>
</td>
<td>
<div class="panel-slider-bg fl mt15">
<span class="panel-slider-inner06 "></span>
</div>
<span class="panel-slider-txt fl ml10">第6关/共10关</span>
</td>
<td><span class=" mr20">100分</span></td>
<td ><a href="#" class="link-color-grey02 font-14 mr15"><span class="fa-icons-flower mr5"></span>给TA送花</a></td>
</tr>
<tr>
<td class="table-num">4</td>
<td >
<a href="#" class="panel-table-name hide fl">胡莎莎学员 </a>
<span class="ml5 mr5 fl">/</span>
<a href="#" class="panel-table-title hide fl">HelloworldJava入门实训项目HelloworldJava入门实训项目</a>
<div class="cl"></div>
</td>
<td>
<div class="panel-slider-bg fl mt15">
<span class="panel-slider-inner06 "></span>
</div>
<span class="panel-slider-txt fl ml10">第6关/共10关</span>
</td>
<td><span class=" mr20">100分</span></td>
<td ><a href="#" class="link-color-grey02 font-14 mr15"><span class="fa-icons-flower mr5"></span>给TA送花</a></td>
</tr>
<tr>
<td class="table-num">4</td>
<td >
<a href="#" class="panel-table-name hide fl">胡莎莎学员 </a>
<span class="ml5 mr5 fl">/</span>
<a href="#" class="panel-table-title hide fl">HelloworldJava入门实训项目HelloworldJava入门实训项目</a>
<div class="cl"></div>
</td>
<td>
<div class="panel-slider-bg fl mt15">
<span class="panel-slider-inner06 "></span>
</div>
<span class="panel-slider-txt fl ml10">第6关/共10关</span>
</td>
<td><span class=" mr20">100分</span></td>
<td ><a href="#" class="link-color-grey02 font-14 mr15"><span class="fa-icons-flower mr5"></span>给TA送花</a></td>
</tr>
<tr>
<td class="table-num">4</td>
<td >
<a href="#" class="panel-table-name hide fl">胡莎莎学员 </a>
<span class="ml5 mr5 fl">/</span>
<a href="#" class="panel-table-title hide fl">HelloworldJava入门实训项目HelloworldJava入门实训项目</a>
<div class="cl"></div>
</td>
<td>
<div class="panel-slider-bg fl mt15">
<span class="panel-slider-inner06 "></span>
</div>
<span class="panel-slider-txt fl ml10">第6关/共10关</span>
</td>
<td><span class=" mr20">100分</span></td>
<td ><a href="#" class="link-color-grey02 font-14 mr15"><span class="fa-icons-flower mr5"></span>给TA送花</a></td>
</tr>
<tr>
<td class="table-num">4</td>
<td >
<a href="#" class="panel-table-name hide fl">胡莎莎学员 </a>
<span class="ml5 mr5 fl">/</span>
<a href="#" class="panel-table-title hide fl">HelloworldJava入门实训项目HelloworldJava入门实训项目</a>
<div class="cl"></div>
</td>
<td>
<div class="panel-slider-bg fl mt15">
<span class="panel-slider-inner06 "></span>
</div>
<span class="panel-slider-txt fl ml10">第6关/共10关</span>
</td>
<td><span class=" mr20">100分</span></td>
<td ><a href="#" class="link-color-grey02 font-14 mr15"><span class="fa-icons-flower mr5"></span>给TA送花</a></td>
</tr>
<tr>
<td class="table-num">4</td>
<td >
<a href="#" class="panel-table-name hide fl">胡莎莎学员 </a>
<span class="ml5 mr5 fl">/</span>
<a href="#" class="panel-table-title hide fl">HelloworldJava入门实训项目HelloworldJava入门实训项目</a>
<div class="cl"></div>
</td>
<td>
<div class="panel-slider-bg fl mt15">
<span class="panel-slider-inner06 "></span>
</div>
<span class="panel-slider-txt fl ml10">第6关/共10关</span>
</td>
<td><span class=" mr20">100分</span></td>
<td ><a href="#" class="link-color-grey02 font-14 mr15"><span class="fa-icons-flower mr5"></span>给TA送花</a></td>
</tr>
<tr>
<td class="table-num">4</td>
<td >
<a href="#" class="panel-table-name hide fl">胡莎莎学员 </a>
<span class="ml5 mr5 fl">/</span>
<a href="#" class="panel-table-title hide fl">HelloworldJava入门实训项目HelloworldJava入门实训项目</a>
<div class="cl"></div>
</td>
<td>
<div class="panel-slider-bg fl mt15">
<span class="panel-slider-inner06 "></span>
</div>
<span class="panel-slider-txt fl ml10">第6关/共10关</span>
</td>
<td><span class=" mr20">100分</span></td>
<td ><a href="#" class="link-color-grey02 font-14 mr15"><span class="fa-icons-flower mr5"></span>给TA送花</a></td>
</tr>
</tbody>
</table>
<div class="panel-pages ">
<a href="javascript:void(0);" class="pages-big">上一页</a>
<a href="javascript:void(0);" class="active ">1</a>
<a href="javascript:void(0);">2</a>
<a href="javascript:void(0);">3</a>
<a href="javascript:void(0);">...</a>
<a href="javascript:void(0);">31</a>
<a href="javascript:void(0);" class="pages-big">下一页</a>
<div class="cl"></div>
</div>
</div>
</div>

View File

@ -10,7 +10,7 @@
<span class="fl mr5 ml5">/</span>
<%= link_to @shixun.name, shixun_path(@shixun), :class => "edu-info-dark fl", :target => "_blank" %>
</p>
<span class="edu-cir-grey fr mt5" style="padding:5px; background:#ddd;">经验值:<%= @myshixun.total_score %> </span>
<span class="edu-cir-grey fr mt5" style="padding:5px; background:#ddd;" data-tip-down = "<%= @myshixun.total_score %>">经验值:<%= @myshixun.total_score %> </span>
</div>
<div class="clearfix mb20 color-grey">
<%= link_to image_tag(url_to_avatar(@work.user), :width =>"50", :height => "50", :alt=>"头像", :style => "width:50px; height:50px;"), user_path(@work.user), :class => "fl edu-work-user-img", :target => "_blank" %>
@ -22,8 +22,8 @@
<li>通关时间: <%= @myshixun.try(:status) == 1 ? (format_time @myshixun.done_time) : '- -' %></li>
</ul>
<ul class="fl edu-txt-w240">
<li>通关情况<%= had_passed_changllenge_num(@shixun, @work.user).to_s+" / "+@shixun.challenges.count.to_s %></li>
<li>总耗时<%=had_passed_changllenge_num(@shixun, @work.user) > 0 ? game_spend_time(@myshixun.total_spend_time) : '- -' %></li>
<li>通关情况:<%= had_passed_changllenge_num(@shixun, @work.user).to_s+" / "+@shixun.challenges.count.to_s %></li>
<li>总耗时&nbsp;:<%=had_passed_changllenge_num(@shixun, @work.user) > 0 ? game_spend_time(@myshixun.total_spend_time) : '- -' %></li>
</ul>
</div>
<div class="edu-h200-auto" style="max-height:250px;">

View File

@ -1,10 +1,10 @@
<ul class="nav_check_item border-bottom-orange clearfix mb15">
<li class="fl <%= @order == 'created_at' ? 'check_nav' : "" %>">
<%= link_to "最新", subjects_path(:order => "created_at", :search => @search, :sort => @sort), :remote => true %>
</li>
<li class="fl <%= @order == 'updated_at' ? 'check_nav' : "" %>">
<%= link_to "最热", subjects_path(:order => "updated_at", :search => @search, :sort => @sort), :remote => true %>
</li>
<li class="fl <%= @order == 'created_at' ? 'check_nav' : "" %>">
<%= link_to "最新", subjects_path(:order => "created_at", :search => @search, :sort => @sort), :remote => true %>
</li>
<li class="fr" style="width: auto;cursor:default;">共<span class="color-orange"><%= @subjects_count %></span>个检索结果</li>
</ul>
<div class="content clearfix mh320">

View File

@ -2,8 +2,8 @@
<p class="edu-con-top clearfix" style="height: 50px; border: none;">
<a href="<%= syllabuses_path(:type => 1, :tab => @tab) %>" class="fl ml15 edu-filter-cir-grey mr5 font-12 active mt12" data-remote="true" id="syllabuses_processing">正在进行</a>
<a href="<%= syllabuses_path(:type => 2, :tab => @tab) %>" class="fl edu-filter-cir-grey mr5 font-12 mt12" data-remote="true" id="syllabuses_end">已结束</a>
<a href="/courses/new" class="color-light-green fr font-14 mr30 mt12" >+&nbsp;新建</a>
<a href="/courses/join_private_courses" class="color-light-green fr mr20 font-14 mt12" data-method="post" data-remote="true" rel="nofollow" >+&nbsp;加入</a>
<a href="/courses/new" class="white-btn orange-btn fr font-14 mr30 " style="margin-top:10px">+&nbsp;新建</a>
<a href="/courses/join_private_courses" class="white-btn orange-btn fr mr20 font-14 " style="margin-top:10px" data-method="post" data-remote="true" rel="nofollow" >+&nbsp;加入课堂</a>
</p>
<div id="my_syllabuses">
<%= render :partial => "syllabuses/my_syllabuses" %>

View File

@ -7,13 +7,13 @@
<div class="edu-tab clearfix mb20">
<ul id="edu-tab-nav" class="border-bottom-orange">
<li id="edu-tab-nav-1" class="new-tab-nav background-orange">
<%=link_to "全部", syllabuses_path(:tab => 1), :class => "tab_type", :remote => true %>
<%=link_to "全部", syllabuses_path(:tab => 1), :class => "tab_type font-16", :remote => true %>
</li>
<li id="edu-tab-nav-2" class="new-tab-nav">
<%=link_to "我管理的", syllabuses_path(:tab => 2), :class => "tab_type", :remote => true %>
<%=link_to "我管理的", syllabuses_path(:tab => 2), :class => "tab_type font-16", :remote => true %>
</li>
<li id="edu-tab-nav-3" class="new-tab-nav">
<%=link_to "我参与的", syllabuses_path(:tab => 3), :class => "tab_type", :remote => true %>
<%=link_to "我参与的", syllabuses_path(:tab => 3), :class => "tab_type font-16", :remote => true %>
</li>
</ul>
<div class="cl"></div>

View File

@ -1,27 +1,19 @@
<%= form_tag share_message_to_course_user_path(user), :remote => true, :id => 'course_list_form' %>
<div>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<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, :length => 25) %></li>
</ul>
<%= form_tag share_message_to_course_user_path(user),:remote=>true,:id=>'course_list_form' do %>
<div class="clearfix mb15 edu-bg-light-blue edu-max-h200">
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<ul>
<% if !courses.empty? %>
<% courses.each do |course| %>
<li class="clearfix">
<label class="fl mt5 ml5 edu-class-pop-label edu-color-grey">
<input id="send_course_<%= course.id %>" type="checkbox" class="fl mt5 mr5 magic-checkbox" name="course_ids[]" value="<%= course.id %>">
<label for="send_course_<%= course.id %>" class="edu-info-dark task-hide fl" title="<%= course.name %>"><%= course.name %></label>
</label>
</li>
<% end %>
<% end %>
<% end %>
</div>
</div>
<div class="cl"></div>
<div>
<div class="courseSendSubmit">
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
<%= submit_tag '确定', :class => 'sendSourceText', :onfocus => 'this.blur();' %>
</div>
<div class="courseSendCancel">
<a href="javascript:void(0);" class="sendSourceText mt10" onclick="hideModal();">取消</a></div>
</div>
<div class="cl"></div>
</ul>
</div>
<div class="cl"></div>
<% end %>

View File

@ -9,12 +9,12 @@
</li>
</ul>
<div id="edu-tab-con-1" class="box_bg_shandow bor-grey-e">
<div id="edu-tab-con-1" class="box_bg_shandow bor-grey-e" style="min-height: 124px">
<% if @user_watchlist_count > 12 %>
<a href="<%= user_watchlist_user_path(@user) %>" target="_blank" class="font-12 color-grey fr mr20 mt5" style="cursor: pointer">查看全部</a>
<% end %>
<% if @user_watchlist_count == 0 %>
<p class="p2 font-16">
<p class="p2 font-16 mt20">
<% if current_user %>
<span>你还没有关注任何人,去找找感兴趣的用户</span>
<% else %>

View File

@ -1,30 +1,34 @@
<div class="task-popup" style="width:450px;">
<div class="task-popup-title clearfix task-popup-bggrey">
<h3 class="fl">发送资源</h3>
<a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
</div>
<div class="task_popup_con">
<div class="newupload_conbox">
<div class="mb10 mt-10 edu-position">
<%= form_tag search_user_course_user_path(user),:method => 'get', :remote=>true, :id=> 'search_user_course_form', :class=> '' do %>
<%= hidden_field_tag(:send_id, send_id) %>
<input type="text" id="search_course_input" value="<%= @search %>" name="search" placeholder="输入班级ID或者名称搜索" class="task-form-100 task-height-40 panel-box-sizing" />
<script>
observeSearchfieldOnInput('search_course_input','<%= search_user_course_user_path(user)%>','<%= send_id %>','','file')
</script>
<a href="javascript:void(0);" class="edu-btn-search font-16 color-grey mt5"><i class="fa fa-search"></i></a>
<% end %>
</div>
<div id="course_file_form">
<%= render :partial => "users/course_file_form", :locals => {:user => user, :send_id => send_id, :courses => courses, :type => type} %>
</div>
<div>
<span class="color-red undis fl" id="search_course_notice_h"></span>
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" onclick="submit_send_res_to_course();">确定</a>
<a href="javascript:void(0);" class="pop_close task-btn fr mr10">取消</a>
<div class="cl"></div>
</div>
</div>
</div>
</div>
<div class="task-popup" style="width:450px;">
<div class="task-popup-title clearfix task-popup-bggrey">
<h3 class="fl">发送资源</h3>
<a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
</div>
<div class="task_popup_con">
<div class="">
<div class="alert alert-orange mb15 font-12">
<button data-dismiss="alert" class="task-close fr" type="button">×</button>
选择的资源将会发送到指定课堂
</div>
<div class="mb10 edu-position">
<%= form_tag search_user_course_user_path(user),:method => 'get', :remote=>true, :id=> 'search_user_course_form', :class=> '' do %>
<%= hidden_field_tag(:send_id, send_id) %>
<input type="text" id="search_course_input" value="<%= @search %>" name="search" placeholder="输入班级ID或者名称搜索" class="task-form-100 task-height-40 panel-box-sizing" />
<script>
observeSearchfieldOnInput('search_course_input','<%= search_user_course_user_path(user)%>','<%= send_id %>','','file')
</script>
<a href="javascript:void(0);" class="edu-btn-search font-16 color-grey mt5"><i class="fa fa-search"></i></a>
<% end %>
</div>
<div id="course_file_form">
<%= render :partial => "users/course_file_form", :locals => {:user => user, :send_id => send_id, :courses => courses, :type => type} %>
</div>
<div>
<span class="color-red undis fl" id="search_course_notice_h"></span>
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" onclick="submit_send_res_to_course();">确定</a>
<a href="javascript:void(0);" class="pop_close task-btn fr mr10">取消</a>
<div class="cl"></div>
</div>
</div>
</div>
</div>

View File

@ -4,37 +4,36 @@
<h3 class="fl">发送资源</h3>
<a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
</div>
<!--<div>-->
<!--<div class="resourcesSendTo ml40">-->
<!--<select class="resourcesSendType" onclick="chooseSendType('<%= send_id%>','<%= send_ids%>','<%= User.current.id %>','message');">-->
<!--<option value="1">班级</option>-->
<!--<option value="2">项目</option>-->
<!--<option value="3">组织</option>-->
<!--</select>-->
<!--</div>-->
<!--<div class="cl"></div>-->
<!--</div>-->
<!--<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose" onclick="closeModal();"></a></div>-->
<div class="task_popup_con">
<div class="newupload_conbox">
<div class="mb10 mt-10 edu-position">
<%= form_tag search_user_course_user_path(user),:method => 'get',:remote=>true,:id=>'search_user_course_form',:class=>'resourcesSearchBox' do %>
<div class="">
<div class="alert alert-orange mb15 font-12">
<button data-dismiss="alert" class="task-close fr" type="button">×</button>
选择的资源将会发送到指定课堂
</div>
<div class="mb10 edu-position">
<%= form_tag search_user_course_user_path(user, :send_message => 1),:method => 'get', :remote => true, :id => 'course_list_form', :class=> '' do %>
<%= hidden_field_tag(:send_id, send_id) %>
<%= hidden_field_tag(:send_ids, send_ids) %>
<%= hidden_field_tag(@send_ids,send_ids) %>
<input type="text" id="search_course_input" value="<%= @search %>" name="search" placeholder="输入班级ID或者名称搜索" class="task-form-100 task-height-40 panel-box-sizing" />
<!--<div class="undis" id="search_course_error">课程名称不能为空</div>-->
<script>
observeSearchfieldOnInput('search_course_input','<%= search_user_course_user_path(user)%>','<%= send_id %>','<%= send_ids%>','message')
observeSearchfieldOnInput('search_course_input','<%= search_user_course_user_path(user)%>','<%= send_id %>','<%= send_ids %>','message')
</script>
<!--<a href="javascript:void(0);" class="edu-btn-search font-16 color-grey mt5"><i class="fa fa-search"></i></a>-->
<a href="javascript:void(0);" class="edu-btn-search font-16 color-grey mt5"><i class="fa fa-search"></i></a>
<!--<a href="javascript:void(0);" class="searchIconPopup"></a>-->
<%= submit_tag '',:class=>'searchIcon2',:onfocus=>"this.blur();",:style=>'border-style:none' %>
<% end %>
</div>
<div id="course_message_form">
<%= render :partial => 'users/course_message_form', :locals => {:user => user, :courses => courses, :send_id => send_id, :send_ids => send_ids} %>
<%= render :partial => 'users/course_message_form', :locals => {:user => user, :courses => courses, :send_id => send_id,:send_ids => send_ids} %>
</div>
<div>
<span class="color-red undis fl" id="search_course_notice_h"></span>
<%#= submit_tag '确定', :class => 'sendSourceText', :onfocus => 'this.blur();' %>
<a href="javascript:void(0);" class="task-btn task-btn-blue fr sendSourceText searchIcon2" onclick="submit_send_res_to_course()">确定</a>
<a href="javascript:void(0);" class="pop_close task-btn fr mr10">取消</a>
<div class="cl"></div>
</div>
</div>
</div>
</div>

View File

@ -7,11 +7,11 @@
<% else %>
<table class="edu-pop-table-all" cellpadding="0" cellspacing="0">
<thead>
<tr>
<tr class="edu-bg-grey">
<th width="15%">操作</th>
<th width="15%">变更</th>
<th width="55%">详情</th>
<th width="15%">操作时间</th>
<th width="58%">详情</th>
<th width="12%">操作时间</th>
</tr>
</thead>
<tbody>

View File

@ -7,11 +7,11 @@
<% else %>
<table class="edu-pop-table-all" cellpadding="0" cellspacing="0">
<thead>
<tr>
<tr class="edu-bg-grey">
<th width="15%">操作</th>
<th width="15%" class="edu-txt-center">变更</th>
<th width="55%">详情</th>
<th width="15%" class="edu-txt-center">操作时间</th>
<th width="58%">详情</th>
<th width="12%" class="edu-txt-center">操作时间</th>
</tr>
</thead>
<tbody>

View File

@ -1,4 +1,4 @@
<div class="eduResources mb10" id="user_activity_<%= user_activity_id%>">
<div class="eduResources box_bg_shandow bor-grey-e" style="margin-bottom:20px;" id="user_activity_<%= user_activity_id%>">
<div class="eduHomepagePostBrief">
<div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user), :alt => "用户头像" %>

View File

@ -112,7 +112,7 @@
</div>
</div>
<% else %>
<div class="edu-tab-con-box box_bg_shandow bor-grey-e">
<div class="edu-tab-con-box box_bg_shandow bor-grey-e mt20">
<img src="../images/bigdata/edu-class/edu-nodata.png" class="edu-nodata-img">
<p class="edu-nodata-p mb30">没有数据可以显示!</p>
</div>

View File

@ -22,25 +22,16 @@
$('#ajax-modal').parent().css({"border":"3px solid #269ac9", "padding":"4px"});
var val = $("#search_course_input").val();
$("#search_course_input").val("").focus().val(val);
<% elsif params[:send_type] == 'file' %>
var htmlvalue = "<%= escape_javascript(render :partial => 'users/resource_share_popup', :locals => {:courses => @course, :user => @user, :send_id => @send_id, :type=>@type}) %>";
pop_box_new(htmlvalue, 452, 463);
<% elsif params[:send_type] == 'message' %>
var htmlvalue = "<%= escape_javascript( render :partial => 'users/share_message_to_course' ,:locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>";
pop_box_new(htmlvalue, 452, 463);
// $("#ajax-modal").html('<%#= escape_javascript( render :partial => 'users/share_message_to_course' ,:locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>');
// 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");
// //与更新版本弹窗js冲突新增样式代码
// $('#ajax-modal').parent().css({"border":"3px solid #269ac9", "padding":"4px"});
// var val = $("#search_course_input").val();
// $("#search_course_input").val("").focus().val(val);
var htmlvalue = "<%= escape_javascript( render :partial => 'users/share_message_to_course' ,:locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>";
pop_box_new(htmlvalue, 452, 463);
<!--<%# elsif params[:send_message] == "1" %>-->
// alert("发送成功!");
<% end %>
<% else %>
<% if params[:send_type] == 'news' %>

View File

@ -6,18 +6,18 @@
<div class="edu-tab clearfix mb20">
<ul id="edu-tab-nav" class="border-bottom-orange">
<li id="shixun_all" class="new-tab-nav background-orange">
<a href="javascript:void(0);" class="tab_type">全部</a>
<a href="javascript:void(0);" class="tab_type font-16">全部</a>
</li>
<li id="shixun_create" class="new-tab-nav">
<a href="javascript:void(0);" class="tab_type">我创建的</a>
<a href="javascript:void(0);" class="tab_type font-16">我创建的</a>
</li>
<li id="shixun_cooperative" class="new-tab-nav">
<a href="javascript:void(0);" class="tab_type" >我合作的</a>
<a href="javascript:void(0);" class="tab_type font-16" >我合作的</a>
</li>
<li id="shixun_challenge" class="new-tab-nav">
<a href="javascript:void(0);" class="tab_type">我挑战的</a>
<a href="javascript:void(0);" class="tab_type font-16">我挑战的</a>
</li>
<a href="javascript:void(0);" class="color-light-green fr font-16 mr30 mt10" onclick="shixun_new(<%= @mail %>)">+&nbsp;新建</a>
<a href="javascript:void(0);" class="white-btn orange-btn fr font-16 mr30" style = "margin-top:8px" onclick="shixun_new(<%= @mail %>)">+&nbsp;新建</a>
</ul>
<div class="cl"></div>
<div id="edu-tab-con-1" class="box_bg_shandow">

View File

@ -153,15 +153,14 @@
:class => "fr font-14 user_watch link-color-orange",
:id => "cancel_watch",
:method => "delete",
:remote => "true",
:title => "取消关注" %>
:remote => "true" %>
<% else %>
<%= link_to "添加关注",
watch_path(:object_type => 'user', :object_id => @user.id, :target_id => @user.id),
:class => "fr font-14 user_watch link-color-orange",
:class => "fr font-14 user_watch link-color-orange ",
:method => "post",
:remote => "true",
:title => "添加关注" %>
:remote => "true"%>
<% end %>
<span class="fr mr20 color-grey-8 mt3">经验值 <span class="ml5 color-orange03"><%= @user.experience %></span> </span>
<span class="fr mr20 color-grey-8 mt3">金币<span class="ml5 color-orange03"><%= @user.grade %></span></span>
@ -221,9 +220,9 @@
<a href="<%= shixuns_or_courses_filter_user_path(@user, :index => "shixun", :filter => "cooperative") %>" class="user_course_filtrate fl mt20 mr30" data-remote="true"><span class="user_filtrate_span1"><%= str %>合作的</span><span class="user_filtrate_span2 ml10"><%= @cooperative_num %></span></a>
<a href="<%= shixuns_or_courses_filter_user_path(@user, :index => "shixun", :filter => "challenge") %>" class="user_course_filtrate fl mt20 mr30" data-remote="true"><span class="user_filtrate_span1"><%= str %>挑战的</span><span class="user_filtrate_span2 ml10"><%= @challenge_num %></span></a>
<% if User.current.mail.blank? %>
<li><a href="javascript:void(0)" class="color-light-green fr font-14 mr20" style="line-height:56px" onclick="shixun_valication()">+&nbsp;新建</a></li>
<li><a href="javascript:void(0)" class="white-btn orange-btn fr font-14 mr20 mt20" style="" onclick="shixun_valication()">+&nbsp;新建</a></li>
<% else %>
<li><%= link_to "+ 新建", new_shixun_path, :class => "color-light-green fr font-14 mr20", :style => "line-height:56px" %></li>
<li><%= link_to "+ 新建", new_shixun_path, :target => "_blank", :class => "white-btn orange-btn fr font-14 mr20 mt20", :style => "" %></li>
<% end %>
</div>
<div class="lesson clearfix homepage-list-show" id="my_shixuns_list">
@ -246,8 +245,8 @@
<a href="<%= shixuns_or_courses_filter_user_path(@user, :index => "course", :filter => "all") %>" class="user_course_filtrate fl mt20 mr30" data-remote="true"><span class="user_filtrate_span1 user_filtrate_span1_bg">全部</span><span class="user_filtrate_span2 user_filtrate_span2_bg ml10"><%= @all_courses_count %></span></a>
<a href="<%= shixuns_or_courses_filter_user_path(@user, :index => "course", :filter => "manage") %>" class="user_course_filtrate fl mt20 mr30" data-remote="true"><span class="user_filtrate_span1"><%= str %>管理的</span><span class="user_filtrate_span2 ml10"><%= @create_courses_count %></span></a>
<a href="<%= shixuns_or_courses_filter_user_path(@user, :index => "course", :filter => "join") %>" class="user_course_filtrate fl mt20 mr30" data-remote="true"><span class="user_filtrate_span1"><%= str %>参与的</span><span class="user_filtrate_span2 ml10"><%= @join_courses_count %></span></a>
<a href="/courses/new" class="color-light-green fr font-14 mr30" style="line-height:56px">+&nbsp;新建</a>
<a href="/courses/join_private_courses" class="color-light-green fr mr20 font-14" data-method="post" data-remote="true" rel="nofollow" style="line-height:56px">+&nbsp;加入</a>
<a href="/courses/new" class="white-btn orange-btn fr font-14 mr30 mt20">+&nbsp;新建</a>
<a href="/courses/join_private_courses" class="white-btn orange-btn fr mr20 font-14 mt20" data-method="post" data-remote="true" rel="nofollow">+&nbsp;加入课堂</a>
</div>
<div class="lesson clearfix homepage-list-show" id="my_courses_list">
<%#= render :partial => "my_homepage_courses_list" %>
@ -268,8 +267,10 @@
<!-------------------侧边提示区域-------------------------->
<div class="-task-sidebar">
<div class="feedback" tooltips="意见反馈">
<i class="fa fa-envelope-o" aria-hidden="true"></i>
<a target="_blank" class="color_white" href="<%= shixun_feedback_managements_path()%>"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
</div>
<div class="scan" tooltips="快来扫一扫">
<i class="fa fa-qrcode" aria-hidden="true"></i>
</div>

View File

@ -1,8 +1,11 @@
<style>
body{background:#fff!important;}
</style>
<div class="-task-con">
<div class="-task-con-int">
<div class="favour">
<% str = (current_user == @user) ? '我' : 'TA' %>
<ul id="edu-user-tab-nav">
<ul id="edu-user-tab-nav" style="background:#fff">
<li class=" new-tab-nav">
<a href="<%= user_watchlist_user_path(@user) %>" class="font-16 tab_type" id="user_watcher_cout" ><%= str %>的关注 <%= @user_watchlist_count %></a>
</li>
@ -10,7 +13,7 @@
<a href="<%= user_fanslist_user_path(@user) %>" class="font-16 tab_type" id="user_fans_count"><%= str %>的粉丝 <%= @user_fanlist_count %></a>
</li>
</ul>
<div id="edu-tab-con-1" class="user_bg_shadow">
<div id="edu-tab-con-1" class="box_bg_shandow">
<div class="clearfix mt20" id="user_fans_list">
<%= render :partial => "user_watcher_or_fans_list", :locals => {:users => @user_fanlist, :user_count => @user_fanlist_count, :user_pages => @fans_pages} %>
</div>

View File

@ -1,5 +1,8 @@
<style>
body{height:100%;background:#fff;}
</style>
<div>
<div class="eduhomepageRightBanner mb10">
<div class="eduhomepageRightBanner box_bg_shandow bor-grey-e" style="margin:20px auto;">
<div class="NewsBannerName pr"><span id="mesLabel">留言</span></div>
<ul class="resourcesSelect">
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
@ -15,7 +18,7 @@
<div id="messageContent">
<% unless is_current_user %>
<div class="eduResources mb10" style="height: 160px"><%= link_to image_tag(url_to_avatar(User.current),:class=>"fl mr10", :width => "50", :height => "50"), :alt => "用户头像" %>
<div class="eduResources box_bg_shandow bor-grey-e" style="height: 160px;margin-bottom:20px;"><%= link_to image_tag(url_to_avatar(User.current),:class=>"fl mr10", :width => "50", :height => "50"), :alt => "用户头像" %>
<div class="fl" style="width:92%" >
<%= form_for('new_form',:url => leave_user_message_path(@user.id), :html =>{:id => "user_feedback_new"}, :method => "post") do |f|%>
<%= render :partial => "jour_form", :locals => {:f => f, :object => @user} %>

View File

@ -1,8 +1,11 @@
<style>
body{background:#fff!important;}
</style>
<div class="-task-con">
<div class="-task-con-int">
<div class="favour">
<% str = (current_user == @user) ? '我' : 'TA' %>
<ul id="edu-user-tab-nav">
<ul id="edu-user-tab-nav" style="background:#fff">
<li id="edu-tab-nav-1" class="edu-user-tab-hover new-tab-nav">
<a href="<%= user_watchlist_user_path(@user) %>" class="font-16 tab_type" id="user_watcher_cout" ><%= str %>的关注 <%= @user_watchlist_count %></a>
</li>
@ -10,7 +13,7 @@
<a href="<%= user_fanslist_user_path(@user) %>" class="font-16 tab_type" id="user_fans_count"><%= str %>的粉丝 <%= @user_fanlist_count %></a>
</li>
</ul>
<div id="edu-tab-con-1" class="user_bg_shadow mh650">
<div id="edu-tab-con-1" class="box_bg_shandow mh650">
<div class="clearfix mt20" id="user_watch_list">
<%= render :partial => "user_watcher_or_fans_list", :locals => {:users => @user_watchlist, :user_count => @user_watchlist_count, :user_pages => @watchlist_pages} %>
</div>

View File

@ -104,6 +104,7 @@ RedmineApp::Application.routes.draw do
match 'ghook'
get 'search_user_courses'
post 'send_to_course'
get 'statistics_students'
end
collection do
get 'shixun_courses'
@ -239,6 +240,8 @@ RedmineApp::Application.routes.draw do
match 'update_user',:via=>[:get,:post]
post 'support_shixuns_search'
match 'export_excel', :via => [:get, :post]
get 'add_departments_part'
post 'save_school'
end
end
# Enable Grack support

View File

@ -0,0 +1,8 @@
class UpdateUserIdToCourselists < ActiveRecord::Migration
def up
sql = "update course_lists set user_id = 1 where user_id is null"
end
def down
end
end

View File

@ -0,0 +1,35 @@
class ModifyChooseQuestionForChallenge < ActiveRecord::Migration
def up
challenges = Challenge.where(:st => [1,2]).where("created_at < '#{Time.now - 24*60*60}'")
unless challenges.blank?
challenges.each do |challenge|
questions = ChallengeQuestion.where(:challenge_choose_id => challenge.id)
answer = ""
unless questions.blank?
questions.each do |question|
if question.right_key
answer << (question.position.to_i + 65).chr
end
end
end
option = ChallengeChoose.create(:subject => challenge.task_pass,
:challenge_id => challenge.id,
:standard_answer => answer,
:answer => challenge.answer,
:score => challenge.score,
:difficult => challenge.difficulty,
:category => ((challenge.st == 1) ? 2 : 1),
:position => 1)
tag = ChallengeTag.where(:challenge_id => challenge.id)
questions.update_all(:challenge_choose_id => option.id)
unless tag.blank?
tag.update_all(:challenge_id => nil, :challenge_choose_id => option.id)
end
end
challenges.update_all(:st => 1)
end
end
def down
end
end

View File

@ -3,23 +3,23 @@
*/
//---------------侧边固定提示功能---------------//
$(function(){
var $desc = $("<div class='-task-desc'></div>").appendTo("body");
var $descSide = $("<div class='-task-desc'></div>").appendTo("body");
$(".-task-sidebar>div").hover(function(){
var $tool = $(this).attr("tooltips");
$desc.html($tool+"<div><img src='../images/edu_user/jt.png'></div>");
$desc.css({
left:$(this).offset().left - $desc.width()-30,
$descSide.html($tool+"<div><img src='../images/edu_user/jt.png'></div>");
$descSide.show().css({
left:$(this).offset().left - $descSide.width()-30,
opacity:0,
top:$(this).offset().top
}).stop().animate({
left:$(this).offset().left - $desc.width()-5,
left:$(this).offset().left - $descSide.width()-5,
opacity:1
},400);
},function(){
$desc.stop().animate({
left:$(this).offset().left - $desc.width()-30,
$descSide.stop().animate({
left:$(this).offset().left - $descSide.width()-30,
opacity:0
},200);
},200).hide();
});
$(window).scroll(function(){
if($(document).scrollTop()>0){
@ -34,60 +34,6 @@ $(function(){
});
//平台tip的样式优化js
// var $desc = $("<div class=\"-task-title\">"+
// "<div class=\"-title-zhixiang tip-down\">"+"<i class=\"fa fa-sort-up\"></i>"+"</div>"+
// "<div class=\"-title-zhixiang tip-left\">"+"<i class=\"fa fa-caret-left\"></i>"+"</div>"+
// "<div class=\"-title-zhixiang tip-right\">"+"<i class=\"fa fa-caret-right\"></i>"+"</div>"+
// "<div class=\"-task-desc-title\"></div>"+
// "</div>").appendTo("body");
// var $desc1 = $(".-task-desc-title");
// $("[data-tip-right]").hover(function(){
// $(".tip-left").show();
// var $tool = $(this).attr("data-tip-right");
// $desc1.html($tool);
// $desc.show().css({
// left:$(this).offset().left +30,
// opacity:0.7,
// top:$(this).offset().top-$desc.height()/4
// });
// },function(){
// $(".tip-left").hide();
// $desc.css({
// opacity:0
// }).hide();
// });
// $("[data-tip-down]").hover(function(){
// $(".tip-down").show();
// var $tool = $(this).attr("data-tip-down");
// $desc1.html($tool);
// $desc.show().css({
// left:$(this).offset().left -($desc.width()-$(this).width())/2,
// opacity:0.7,
// top:$(this).offset().top+30
// });
// },function(){
// $(".tip-down").hide();
// $desc.css({
// opacity:0
// }).hide();
// });
// $("[data-tip-left]").hover(function(){
// console.log(1);
// $(".tip-right").show();
// var $tool = $(this).attr("data-tip-left");
// $desc1.html($tool);
// $desc.show().css({
// left:$(this).offset().left-$desc.width()-10,
// opacity:0.7,
// top:$(this).offset().top-$desc.height()/4
// });
// },function(){
// $(".tip-right").hide();
// $desc.css({
// opacity:0
// }).hide();
// });
var $desc = $("<div class=\"-task-title\">"+
"<div class=\"data-tip-down\"></div>"+
"<div class=\"data-tip-left\"></div>"+
@ -109,9 +55,9 @@ $(function(){
var $tool = $(this).attr("data-tip-down");
$(".data-tip-down").show().html($tool);
$desc.show().css({
left:$(this).offset().left -($desc.width()-$(this).width())/2,
left:$(this).offset().left -($desc.width()-$(this).outerWidth())/2,
opacity:0.7,
top:$(this).offset().top+30
top:$(this).offset().top + $(this).height() +10
});
});
$("[data-tip-right]").live("mouseenter",function(){
@ -1065,12 +1011,15 @@ function submit_send_res_to_course(){
if($("input[name='course_ids[]']:checked").length >= 1){
$("#search_course_notice_h").html("").hide();
$("#course_list_form").submit();
alert("发送成功!");
hideModal();
}else{
$("#search_course_notice_h").html("请先选择一个班级").show();
}
}
//验证实训名称
function regex_shixun_name()
{

View File

@ -437,13 +437,13 @@ function code_evaluation(test_sets,
"<li class=\"clearfix\">" +
"<div class=\"clearfix\">" +
" <span class=\"-task-ces-info-left color-blue fl fb\">预期输出:</span>" +
"<p class=\"fl\">" + ( test_sets[i].output == null ? "空" : test_sets[i].output.replace(/\r\n/g, "<br>").replace(/\t/g, "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;").replace(/ /g, "<span class=\"empty\"></span>") ) + "</p>" +
"<p class=\"fl\">" + ( test_sets[i].output == null ? "空" : test_sets[i].output.replace(/\r\n/g, "<br><i class=\"fa fa-level-down\" aria-hidden=\"true\"></i>").replace(/\t/g, "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;").replace(/ /g, "<span class=\"empty\"></span>") ) + "</p>" +
"</div>" +
"</li>" +
"<li class=\"clearfix\">" +
"<div class=\"clearfix\">" +
"<span class=\"-task-ces-info-left color-blue fl fb\">实际输出:</span>" +
"<p class=\"fl color-orange\">" + (test_sets[i].actual_output == null ? "空" : (test_sets[i].compile_success == "1" ? test_sets[i].actual_output.replace(/\r\n/g, "<br>").replace(/ /g, "<span class=\"empty\"></span>") : test_sets[i].actual_output.replace(/\r\n/g, "<br>"))) + "</p>" +
"<p class=\"fl color-orange\">" + (test_sets[i].actual_output == null ? "空" : (test_sets[i].compile_success == "1" ? test_sets[i].actual_output.replace(/\r\n$/, "<br><i class=\"fa fa-level-down\" aria-hidden=\"true\"></i>").replace(/ /g, "<span class=\"empty\"></span>") : test_sets[i].actual_output.replace(/\r\n/g, "<br>"))) + "</p>" +
"</div>" +
"</li>" +
"</ul>" +

View File

@ -421,7 +421,7 @@ window.requestAnimFrame = (function() {
function loop() {
context.clearRect(0, 0, canvasWid, canvasHig);
context.fillStyle='rgba(255,75,00,0.5)';
context.fillStyle='rgba(255,75,00,0.6)';
context.fillRect(0,0,1350,130);
// context.font="30px Arial";
// context.fillText("在线课堂",550,75);

View File

@ -482,3 +482,6 @@ input::-ms-clear{display:none;}
/*在线课堂*/
.courseRefer{float:left; max-height:120px;margin-bottom:10px;overflow:auto; overflow-x:hidden;}
.logo {width: 295px;height: 30px;border-style:none;position: absolute;top:50%;left:39%;}

View File

@ -29,10 +29,10 @@
/*.-task-con-data .top .top-right .itnew .p2{}*/
.-task-con-data .top .top-right .itnew .p2{color:#ccc;}
.-task-con-data .top .top-right .itnew .sub a{border:1px solid #e5e5e5;display:inline-block;padding:2px 10px;text-align:center;border-radius:5px;}
.-task-con-data .top .top-right .itnew .sub a:hover{background:#FF7500!important;color:#fff;}
.-task-con-data .top .top-right .itnew .sub a:hover{background:#FF7500!important;color:#fff;border:none;}
.-task-con-data .top .top-right .itnew .sub{width:100%;}
.-task-con-data .bot input{width:100%;height:40px;line-height:40px;border:none;outline:none;background:#fff;}
.-task-con-data .bot p{width: 100%; height: 25px; background: #fff;}
.-task-con-data .bot p{width: 100%; height: 40px;line-height:40px; background: #fff;}
/*-----------------博客------------------------*/
.-task-con-int .blog,.favour{width:100%;background:#fff;}
.-task-con-int .blog .p1{width:100%;height:40px;background:#f2f2f2;line-height:40px;text-indent:10px;}
@ -229,6 +229,7 @@ input.new_loggin_input_test{ -webkit-box-shadow: 0 0 0px 1000px white inset; ou
.edu-table{width: 100%;border: 1px solid #cccccc;background: #ffffff;border-collapse: collapse;}
.panel-cer-content .edu-table thead{background: #f5f5f5}
.panel-cer-content .edu-table tr th{padding: 6px 10px;}
.panel-cer-content .edu-table tr td{padding: 0px;border: none;border: 1px solid #ccc;padding: 6px 10px;}
.panel-cer-content .edu-table tr td:nth-child(1){text-align:right;width: 25%;color: #666666}
.panel-cer-content .edu-table tr td:nth-child(2){text-align:left;color: #333333;}

View File

@ -48,9 +48,9 @@ a.rightbar-pause{ color:#29bd8b; font-size: 18px; margin-right:15px; margin-top:
#tab_nav li {float:left; padding:0 30px;text-align:center;height: 40px;line-height: 40px; }
#tab_nav li a{font-size:14px; }
.tab_hover {border-bottom:1px solid #fff; background: #fff;}
.tab_hover_setting{background:#FC7033;}
/*.tab_hover_setting{background:#FC7033;}*/
.tab_hover a{ color:#29bd8b;}
.tab_hover_setting a{color:#fff;}
/*.tab_hover_setting a{color:#fff;}*/
.undis {display:none;}
.dis {display:block;}
.tab-info{ }