<%= link_to l(:label_homework), homework_common_index_path(:course => @course.id), :class => "f14 c_blue02"%>
<%= link_to "(#{@course.homework_commons.count})", homework_common_index_path(:course => @course.id), :class => "subnav_num c_orange"%>
- <%#= link_to( "+#{l(:label_course_homework_new)}", new_homework_common_path(:course => @course.id), :class => 'subnav_green c_white') if is_teacher %>
+ <%= link_to( "+#{l(:label_course_homework_new)}", "javascript:void(0)", :class => 'subnav_green c_white', :onclick => "new_homework_alert();") if is_teacher %>
<%= link_to l(:label_course_news), course_news_index_path(@course), :class => "f14 c_blue02" %>
diff --git a/db/schema.rb b/db/schema.rb
index ebc66ead1..850160f9c 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20150909062619) do
+ActiveRecord::Schema.define(:version => 20150911031029) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -236,13 +236,6 @@ ActiveRecord::Schema.define(:version => 20150909062619) do
t.boolean "tracker_in_review_dialog", :default => false
end
- create_table "code_review_user_settings", :force => true do |t|
- t.integer "user_id", :default => 0, :null => false
- t.integer "mail_notification", :default => 0, :null => false
- t.datetime "created_at"
- t.datetime "updated_at"
- end
-
create_table "code_reviews", :force => true do |t|
t.integer "project_id"
t.integer "change_id"
@@ -476,13 +469,6 @@ ActiveRecord::Schema.define(:version => 20150909062619) do
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
- create_table "discuss_demos", :force => true do |t|
- t.string "title"
- t.text "body"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
create_table "documents", :force => true do |t|
t.integer "project_id", :default => 0, :null => false
t.integer "category_id", :default => 0, :null => false
@@ -497,26 +483,23 @@ ActiveRecord::Schema.define(:version => 20150909062619) do
add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
add_index "documents", ["project_id"], :name => "documents_project_id"
- create_table "dts", :primary_key => "Num", :force => true do |t|
- t.string "Defect", :limit => 50
- t.string "Category", :limit => 50
- t.string "File"
- t.string "Method"
- t.string "Module", :limit => 20
- t.string "Variable", :limit => 50
- t.integer "StartLine"
- t.integer "IPLine"
- t.string "IPLineCode", :limit => 200
- t.string "Judge", :limit => 15
- t.integer "Review", :limit => 1
+ create_table "dts", :force => true do |t|
+ t.string "IPLineCode"
t.string "Description"
- t.text "PreConditions", :limit => 2147483647
- t.text "TraceInfo", :limit => 2147483647
- t.text "Code", :limit => 2147483647
+ t.string "Num"
+ t.string "Variable"
+ t.string "TraceInfo"
+ t.string "Method"
+ t.string "File"
+ t.string "IPLine"
+ t.string "Review"
+ t.string "Category"
+ t.string "Defect"
+ t.string "PreConditions"
+ t.string "StartLine"
t.integer "project_id"
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "id", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "enabled_modules", :force => true do |t|
@@ -1179,18 +1162,18 @@ ActiveRecord::Schema.define(:version => 20150909062619) do
create_table "relative_memos", :force => true do |t|
t.integer "osp_id"
t.integer "parent_id"
- t.string "subject", :null => false
- t.text "content", :limit => 16777215, :null => false
+ t.string "subject", :null => false
+ t.text "content", :null => false
t.integer "author_id"
- t.integer "replies_count", :default => 0
+ t.integer "replies_count", :default => 0
t.integer "last_reply_id"
- t.boolean "lock", :default => false
- t.boolean "sticky", :default => false
- t.boolean "is_quote", :default => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- t.integer "viewed_count_crawl", :default => 0
- t.integer "viewed_count_local", :default => 0
+ t.boolean "lock", :default => false
+ t.boolean "sticky", :default => false
+ t.boolean "is_quote", :default => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.integer "viewed_count_crawl", :default => 0
+ t.integer "viewed_count_local", :default => 0
t.string "url"
t.string "username"
t.string "userhomeurl"
@@ -1215,19 +1198,6 @@ ActiveRecord::Schema.define(:version => 20150909062619) do
add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id"
- create_table "rich_rich_files", :force => true do |t|
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- t.string "rich_file_file_name"
- t.string "rich_file_content_type"
- t.integer "rich_file_file_size"
- t.datetime "rich_file_updated_at"
- t.string "owner_type"
- t.integer "owner_id"
- t.text "uri_cache"
- t.string "simplified_type", :default => "file"
- end
-
create_table "roles", :force => true do |t|
t.string "name", :limit => 30, :default => "", :null => false
t.integer "position", :default => 1
@@ -1279,11 +1249,10 @@ ActiveRecord::Schema.define(:version => 20150909062619) do
t.string "url"
t.string "title"
t.integer "share_type"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.integer "project_id"
t.integer "user_id"
- t.string "description"
end
create_table "softapplications", :force => true do |t|
@@ -1453,8 +1422,8 @@ ActiveRecord::Schema.define(:version => 20150909062619) do
t.integer "zip_code"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
- t.string "technical_title"
t.integer "identity"
+ t.string "technical_title"
t.string "student_id"
t.string "teacher_realname"
t.string "student_realname"
@@ -1522,6 +1491,9 @@ ActiveRecord::Schema.define(:version => 20150909062619) do
t.integer "active"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
+ t.integer "level"
+ t.integer "file"
+ t.integer "issue"
end
create_table "user_statuses", :force => true do |t|
diff --git a/public/javascripts/course.js b/public/javascripts/course.js
index be29fdc30..e5c50ac51 100644
--- a/public/javascripts/course.js
+++ b/public/javascripts/course.js
@@ -934,3 +934,8 @@ function SearchByName_1(url)
location.href = url + "&name=" + $("#course_student_name").val() + "&group=" + $("#late_penalty").val();
}
}
+
+//新建作业临时弹框
+function new_homework_alert(){
+ alert("您好!课程内直接发布作业的功能正在改进中,请直接点击\n顶部导航栏的“作业”向本课程发送作业。谢谢!如有问\n题,可参见帮助中心。");
+}
From 4ee4bb6e9d57a6568ec3a9d0492c92dc2dad45cc Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 11 Sep 2015 17:07:30 +0800
Subject: [PATCH 07/17] =?UTF-8?q?=E7=BC=96=E8=BE=91=E4=BD=9C=E4=B8=9A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/_user_homework_list.html.erb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/views/users/_user_homework_list.html.erb b/app/views/users/_user_homework_list.html.erb
index 1a24b1499..642373d58 100644
--- a/app/views/users/_user_homework_list.html.erb
+++ b/app/views/users/_user_homework_list.html.erb
@@ -35,8 +35,8 @@
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => homework_common.attachments} %>
- <%# if is_teacher%>
- <% if false%>
+ <% if is_teacher%>
+ <%# if false%>
- <%= link_to l(:label_submit), "javascript:void(0)",:class => "small", :onclick => "system_message_editor.sync();submit_message();" %>
+ <%= link_to l(:label_submit), "javascript:void(0)", :class => "btn_message_free", :onclick => "system_message_editor.sync();submit_message();" %>
<% end %>