commit
acf3296533
@ -1,5 +1,5 @@
|
|||||||
class CourseHomeworkCategory < ActiveRecord::Base
|
class CourseHomeworkCategory < ActiveRecord::Base
|
||||||
belongs_to :course
|
belongs_to :course
|
||||||
has_many :shixun_homework_categories
|
has_many :homework_commons
|
||||||
attr_accessible :name
|
attr_accessible :name
|
||||||
end
|
end
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
class SubjectLevelSystem < ActiveRecord::Base
|
||||||
|
default_scope :order => 'level'
|
||||||
|
|
||||||
|
# attr_accessible :title, :body
|
||||||
|
has_many :subjects
|
||||||
|
|
||||||
|
end
|
@ -1 +1 @@
|
|||||||
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="renderer" content="webkit"/><meta name="force-rendering" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><title>Educoder</title><script type="text/javascript">window.__isR=!0</script><link rel="stylesheet" href="/react/build/css/css_min_all.css"><link rel="stylesheet" href="/assets/iconfont/iconfont.css"><link href="/react/build/./static/css/main.266ab375.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="md_div" style="display:none"></div><div id="root" class="page -layout-v -fit"></div><div id="picture_display" style="display:none"></div><script type="text/javascript" src="/react/build/js/js_min_all.js"></script><script type="text/javascript" src="/assets/kindeditor/kindeditor.js"></script><script type="text/javascript" src="/react/build/js/create_kindeditor.js"></script><script type="text/javascript" src="/javascripts/educoder/edu_application.js"></script><script type="text/javascript" src="/react/build/./static/js/main.cc568f76.js"></script></body></html>
|
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="renderer" content="webkit"/><meta name="force-rendering" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><title>Educoder</title><script type="text/javascript">window.__isR=!0</script><link rel="stylesheet" href="/react/build/css/css_min_all.css"><link rel="stylesheet" href="/assets/iconfont/iconfont.css"><link href="/react/build/./static/css/main.3274c43b.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="md_div" style="display:none"></div><div id="root" class="page -layout-v -fit"></div><div id="picture_display" style="display:none"></div><script type="text/javascript" src="/react/build/js/js_min_all.js"></script><script type="text/javascript" src="/assets/kindeditor/kindeditor.js"></script><script type="text/javascript" src="/react/build/js/create_kindeditor.js"></script><script type="text/javascript" src="/javascripts/educoder/edu_application.js"></script><script type="text/javascript" src="/react/build/./static/js/main.9f01900e.js"></script></body></html>
|
@ -0,0 +1,107 @@
|
|||||||
|
<table class="edu-pop-table edu-txt-center" cellpadding="0" cellspacing="0">
|
||||||
|
<thead>
|
||||||
|
<th width="10%">等级</th>
|
||||||
|
<th width="15%" class="edu-txt-left">名称</th>
|
||||||
|
<th width="45" class="edu-txt-left">实训课程数</th>
|
||||||
|
<th width="15%">创建时间</th>
|
||||||
|
<th width="15%">操作</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @levels.each do |l| %>
|
||||||
|
<tr>
|
||||||
|
<td class="levelNo"><%= l.level %></td>
|
||||||
|
<td class="edu-txt-left levelName" data-value="<%= l.id %>"><%= l.name %></td>
|
||||||
|
<td class="edu-txt-left"><%= l.subjects.size %></td>
|
||||||
|
<td><%= format_time l.created_at %></td>
|
||||||
|
<td>
|
||||||
|
<a href="javascript:void(0)" class="mr15" onclick="delete_confirm_box_4('/managements/delete_subject_level?id=<%= l.id %>', '是否确定删除!');">删除</a>
|
||||||
|
<a href="javascript:void(0)" class="mr15 renameLine">重命名</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="5">
|
||||||
|
<a href="javascript:void(0)" class="color-blue" onclick="createLevel();">+ 新建</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<script type="text/html" id="template_newForm">
|
||||||
|
<div class="bor-grey-e mt20 clearfix padding10-20 edu-back-white" id="newForm">
|
||||||
|
<span class="fl mt3">名称</span>
|
||||||
|
<input type="text" class="winput-240-35 fl ml20" id="level_name"/>
|
||||||
|
<li class="fr mt3">
|
||||||
|
<a href="javascript:void(0)" class="mr15" onclick="cancelNew();">取消</a>
|
||||||
|
<a href="javascript:void(0)" class="mr15" onclick="createSubjectLevel()">保存</a>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
//新建
|
||||||
|
function createLevel(){
|
||||||
|
if($("#newForm").length==0){
|
||||||
|
var bt = baidu.template;
|
||||||
|
bt.LEFT_DELIMITER = '<!';
|
||||||
|
bt.RIGHT_DELIMITER = '!>';
|
||||||
|
var html = bt('template_newForm', null);
|
||||||
|
$("#levelSystem").append(html);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//新建--取消
|
||||||
|
function cancelNew(){
|
||||||
|
$("#newForm").remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
//重命名
|
||||||
|
var lastHtml="";
|
||||||
|
$("table").on("click",".renameLine",function(){
|
||||||
|
var tr=$(this).parents("tr");
|
||||||
|
lastHtml=$(tr).html();
|
||||||
|
var value=$(tr).find(".levelName").html();
|
||||||
|
var id = $(tr).find(".levelName").attr("data-value");
|
||||||
|
var No=$(tr).find(".levelNo").html();
|
||||||
|
var html='<td>'+No+'</td>'+
|
||||||
|
'<td colspan="4" class="edu-txt-left">'+
|
||||||
|
'<input type="winput-240-35" id="rename" name="name" value="'+value+'"/>'+
|
||||||
|
'<input type="hidden" id="level_id" value="'+id+'"/>'+
|
||||||
|
'<a href="javascript:void(0)" class="mr15 ml20" onclick="cancelEdit(this);">取消</a>'+
|
||||||
|
'<a href="javascript:void(0)" onclick="update_level(this);">保存</a>'+
|
||||||
|
'</td>';
|
||||||
|
$(tr).html(html);
|
||||||
|
})
|
||||||
|
|
||||||
|
//重命名--取消
|
||||||
|
function cancelEdit(item){
|
||||||
|
$(item).parents("tr").html(lastHtml);
|
||||||
|
}
|
||||||
|
// 重命名
|
||||||
|
function update_level(item){
|
||||||
|
var name = $(item).siblings("#rename").val();
|
||||||
|
var id = $(item).siblings("#level_id").val();
|
||||||
|
$.ajax({
|
||||||
|
url: "<%= rename_subject_level_managements_path %>",
|
||||||
|
type: "POST",
|
||||||
|
data:{id: id, name: name}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function createSubjectLevel(){
|
||||||
|
var name = $("#level_name").val()
|
||||||
|
$.ajax({
|
||||||
|
url: "<%= create_subject_level_managements_path %>",
|
||||||
|
type: "POST",
|
||||||
|
data: {name: name}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteLevel(id){
|
||||||
|
$.ajax({
|
||||||
|
url: "<%= delete_subject_level_managements_path %>",
|
||||||
|
type: "POST",
|
||||||
|
data: {id: id}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1,3 @@
|
|||||||
|
<div class="mt20" id="levelSystem">
|
||||||
|
<%= render :partial => "managements/subject_level_list" %>
|
||||||
|
</div>
|
@ -0,0 +1 @@
|
|||||||
|
$("#levelSystem").html("<%= j (render :partial => "subject_level_list") %>")
|
@ -0,0 +1,10 @@
|
|||||||
|
class DepartmentDefaultHostCount < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
change_column :departments, :host_count, :integer, :default => 5
|
||||||
|
|
||||||
|
Department.update_all(:host_count => 5)
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,9 @@
|
|||||||
|
class CreateSubjectLevelSystems < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :subject_level_systems do |t|
|
||||||
|
t.integer :level
|
||||||
|
t.string :name
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,9 @@
|
|||||||
|
class AddSubjectLevelSystemIdForSubjects < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
add_column :subjects, :subject_level_system_id, :integer
|
||||||
|
add_index :subjects, :subject_level_system_id
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,8 @@
|
|||||||
|
class AddIndexOnEvaluateRecords < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
add_index :evaluate_records, :user_id
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,14 @@
|
|||||||
|
namespace :myshixun do
|
||||||
|
desc "delete gpid is no"
|
||||||
|
task :delete_error_myshixuns => :environment do
|
||||||
|
begin
|
||||||
|
myshixuns = Myshixun.where("gpid is null and created_at > '#{Time.now.beginning_of_day}'")
|
||||||
|
myshixuns.find_each do |m|
|
||||||
|
m.destroy
|
||||||
|
puts("#myshixun_id: #{m.id}")
|
||||||
|
end
|
||||||
|
rescue Exception => e
|
||||||
|
puts e
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
After Width: | Height: | Size: 62 KiB |
@ -1 +1 @@
|
|||||||
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="renderer" content="webkit"/><meta name="force-rendering" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><title>Educoder</title><script type="text/javascript">window.__isR=!0</script><link rel="stylesheet" href="/css/css_min_all.css"><link rel="stylesheet" href="http://testbdweb.educoder.net/assets/iconfont/iconfont.css"><link href="/react/build/./static/css/main.266ab375.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="md_div" style="display:none"></div><div id="root" class="page -layout-v -fit"></div><div id="picture_display" style="display:none"></div><script type="text/javascript" src="/js/js_min_all.js"></script><script type="text/javascript" src="http://testbdweb.educoder.net/assets/kindeditor/kindeditor.js"></script><script type="text/javascript" src="/js/create_kindeditor.js"></script><script type="text/javascript" src="http://testbdweb.educoder.net/javascripts/educoder/edu_application.js"></script><script type="text/javascript" src="/react/build/./static/js/main.cc568f76.js"></script></body></html>
|
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="renderer" content="webkit"/><meta name="force-rendering" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><title>Educoder</title><script type="text/javascript">window.__isR=!0</script><link rel="stylesheet" href="/css/css_min_all.css"><link rel="stylesheet" href="http://testbdweb.educoder.net/assets/iconfont/iconfont.css"><link href="/react/build/./static/css/main.3274c43b.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="md_div" style="display:none"></div><div id="root" class="page -layout-v -fit"></div><div id="picture_display" style="display:none"></div><script type="text/javascript" src="/js/js_min_all.js"></script><script type="text/javascript" src="http://testbdweb.educoder.net/assets/kindeditor/kindeditor.js"></script><script type="text/javascript" src="/js/create_kindeditor.js"></script><script type="text/javascript" src="http://testbdweb.educoder.net/javascripts/educoder/edu_application.js"></script><script type="text/javascript" src="/react/build/./static/js/main.9f01900e.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue