+
<% if teacher_logged_in? %>
<%= form_for grade, url: grade_url(id: grade.id, course_id: grade.course.id), method: :patch do |f| %>
<%= f.text_field :grade %>
diff --git a/app/views/shared/_sidenav.html.erb b/app/views/shared/_sidenav.html.erb
index 44cfbc6..d89d246 100644
--- a/app/views/shared/_sidenav.html.erb
+++ b/app/views/shared/_sidenav.html.erb
@@ -66,6 +66,7 @@
<% if teacher_logged_in? %>
成绩管理
+
<% end %>
<% if student_logged_in? %>
diff --git a/config/routes.rb b/config/routes.rb
index fd8bddd..198f500 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,4 +1,6 @@
Rails.application.routes.draw do
+ get 'excel/parse'
+
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
diff --git a/db/migrate/20161228082748_add_excel_to_course.rb b/db/migrate/20161228082748_add_excel_to_course.rb
new file mode 100644
index 0000000..45fd8b8
--- /dev/null
+++ b/db/migrate/20161228082748_add_excel_to_course.rb
@@ -0,0 +1,5 @@
+class AddExcelToCourse < ActiveRecord::Migration
+ def change
+ add_column :courses, :excel, :string
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index eed474d..4b3d2f5 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -12,9 +12,11 @@
# It's strongly recommended that you check this file into your version control system.
+
ActiveRecord::Schema.define(version: 20161228082748) do
+
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
diff --git a/public/uploads/course/excel/1/___.xlsx b/public/uploads/course/excel/1/___.xlsx
new file mode 100644
index 0000000..32e5f09
Binary files /dev/null and b/public/uploads/course/excel/1/___.xlsx differ
diff --git a/public/uploads/course/excel/3/___.xlsx b/public/uploads/course/excel/3/___.xlsx
new file mode 100644
index 0000000..32e5f09
Binary files /dev/null and b/public/uploads/course/excel/3/___.xlsx differ
diff --git a/public/uploads/tmp/1482915177-15750-0002-3592/2016-11-28_16-09-39____.png b/public/uploads/tmp/1482915177-15750-0002-3592/2016-11-28_16-09-39____.png
new file mode 100644
index 0000000..fc3552b
Binary files /dev/null and b/public/uploads/tmp/1482915177-15750-0002-3592/2016-11-28_16-09-39____.png differ
diff --git a/public/uploads/tmp/1482915623-15750-0003-8279/build.txt b/public/uploads/tmp/1482915623-15750-0003-8279/build.txt
new file mode 100644
index 0000000..33cb22d
--- /dev/null
+++ b/public/uploads/tmp/1482915623-15750-0003-8279/build.txt
@@ -0,0 +1 @@
+RM-162.2380.8
\ No newline at end of file
diff --git a/public/uploads/tmp/1482915720-16509-0002-9588/2016-11-28_16-12-02____.png b/public/uploads/tmp/1482915720-16509-0002-9588/2016-11-28_16-12-02____.png
new file mode 100644
index 0000000..86af168
Binary files /dev/null and b/public/uploads/tmp/1482915720-16509-0002-9588/2016-11-28_16-12-02____.png differ
diff --git a/public/uploads/tmp/1482915720-16509-0002-9588/thumb_2016-11-28_16-12-02____.png b/public/uploads/tmp/1482915720-16509-0002-9588/thumb_2016-11-28_16-12-02____.png
new file mode 100644
index 0000000..0287265
Binary files /dev/null and b/public/uploads/tmp/1482915720-16509-0002-9588/thumb_2016-11-28_16-12-02____.png differ
diff --git a/public/uploads/tmp/1482917457-4739-0001-1935/___.xlsx b/public/uploads/tmp/1482917457-4739-0001-1935/___.xlsx
new file mode 100644
index 0000000..32e5f09
Binary files /dev/null and b/public/uploads/tmp/1482917457-4739-0001-1935/___.xlsx differ
diff --git a/public/uploads/tmp/1482917587-4739-0003-2543/___.xlsx b/public/uploads/tmp/1482917587-4739-0003-2543/___.xlsx
new file mode 100644
index 0000000..32e5f09
Binary files /dev/null and b/public/uploads/tmp/1482917587-4739-0003-2543/___.xlsx differ
diff --git a/test/controllers/excel_controller_test.rb b/test/controllers/excel_controller_test.rb
new file mode 100644
index 0000000..dce5566
--- /dev/null
+++ b/test/controllers/excel_controller_test.rb
@@ -0,0 +1,9 @@
+require 'test_helper'
+
+class ExcelControllerTest < ActionController::TestCase
+ test "should get parse" do
+ get :parse
+ assert_response :success
+ end
+
+end